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

namespace MobileL3__CC__Types {

/* Literal string constants */

const unsigned char bs_2_bits[] = { 32 },
bs_25_bits[] = { 16 },
bs_26_bits[] = { 48 },
bs_27_bits[] = { 8 },
bs_9_bits[] = { 40 },
bs_7_bits[] = { 24 },
bs_4_bits[] = { 56 },
bs_3_bits[] = { 4 },
bs_8_bits[] = { 36 },
bs_6_bits[] = { 28 },
bs_5_bits[] = { 60 },
bs_13_bits[] = { 2 },
bs_12_bits[] = { 50 },
bs_10_bits[] = { 58 },
bs_18_bits[] = { 6 },
bs_28_bits[] = { 38 },
bs_29_bits[] = { 22 },
bs_19_bits[] = { 14 },
bs_30_bits[] = { 46 },
bs_31_bits[] = { 30 },
bs_11_bits[] = { 62 },
bs_1_bits[] = { 1 },
bs_14_bits[] = { 41 },
bs_16_bits[] = { 21 },
bs_15_bits[] = { 45 },
bs_24_bits[] = { 35 },
bs_35_bits[] = { 19 },
bs_0_bits[] = { 11 },
bs_23_bits[] = { 11 },
bs_21_bits[] = { 43 },
bs_33_bits[] = { 27 },
bs_34_bits[] = { 59 },
bs_32_bits[] = { 39 },
bs_17_bits[] = { 23 },
bs_22_bits[] = { 47 },
bs_20_bits[] = { 31 };
extern const BITSTRING bs_2(6, bs_2_bits),
bs_25(6, bs_25_bits),
bs_26(6, bs_26_bits),
bs_27(6, bs_27_bits),
bs_9(6, bs_9_bits),
bs_7(6, bs_7_bits),
bs_4(6, bs_4_bits),
bs_3(6, bs_3_bits),
bs_8(6, bs_8_bits),
bs_6(6, bs_6_bits),
bs_5(6, bs_5_bits),
bs_13(6, bs_13_bits),
bs_12(6, bs_12_bits),
bs_10(6, bs_10_bits),
bs_18(6, bs_18_bits),
bs_28(6, bs_28_bits),
bs_29(6, bs_29_bits),
bs_19(6, bs_19_bits),
bs_30(6, bs_30_bits),
bs_31(6, bs_31_bits),
bs_11(6, bs_11_bits),
bs_1(4, bs_1_bits),
bs_14(6, bs_14_bits),
bs_16(6, bs_16_bits),
bs_15(6, bs_15_bits),
bs_24(6, bs_24_bits),
bs_35(6, bs_35_bits),
bs_0(4, bs_0_bits),
bs_23(6, bs_23_bits),
bs_21(6, bs_21_bits),
bs_33(6, bs_33_bits),
bs_34(6, bs_34_bits),
bs_32(6, bs_32_bits),
bs_17(6, bs_17_bits),
bs_22(6, bs_22_bits),
bs_20(6, bs_20_bits);
const unsigned char os_4_octets[] = { 4 },
os_5_octets[] = { 8 },
os_6_octets[] = { 21 },
os_24_octets[] = { 25 },
os_30_octets[] = { 27 },
os_0_octets[] = { 28 },
os_29_octets[] = { 29 },
os_1_octets[] = { 30 },
os_31_octets[] = { 36 },
os_7_octets[] = { 45 },
os_12_octets[] = { 46 },
os_8_octets[] = { 47 },
os_17_octets[] = { 52 },
os_25_octets[] = { 58 },
os_26_octets[] = { 65 },
os_9_octets[] = { 76 },
os_10_octets[] = { 77 },
os_18_octets[] = { 92 },
os_19_octets[] = { 93 },
os_20_octets[] = { 94 },
os_21_octets[] = { 109 },
os_22_octets[] = { 116 },
os_23_octets[] = { 117 },
os_11_octets[] = { 123 },
os_13_octets[] = { 124 },
os_14_octets[] = { 125 },
os_2_octets[] = { 126 },
os_3_octets[] = { 127 },
os_27_octets[] = { 161 },
os_28_octets[] = { 162 },
os_15_octets[] = { 163 },
os_16_octets[] = { 164 };
extern const OCTETSTRING os_4(1, os_4_octets),
os_5(1, os_5_octets),
os_6(1, os_6_octets),
os_24(1, os_24_octets),
os_30(1, os_30_octets),
os_0(1, os_0_octets),
os_29(1, os_29_octets),
os_1(1, os_1_octets),
os_31(1, os_31_octets),
os_7(1, os_7_octets),
os_12(1, os_12_octets),
os_8(1, os_8_octets),
os_17(1, os_17_octets),
os_25(1, os_25_octets),
os_26(1, os_26_octets),
os_9(1, os_9_octets),
os_10(1, os_10_octets),
os_18(1, os_18_octets),
os_19(1, os_19_octets),
os_20(1, os_20_octets),
os_21(1, os_21_octets),
os_22(1, os_22_octets),
os_23(1, os_23_octets),
os_11(1, os_11_octets),
os_13(1, os_13_octets),
os_14(1, os_14_octets),
os_2(1, os_2_octets),
os_3(1, os_3_octets),
os_27(1, os_27_octets),
os_28(1, os_28_octets),
os_15(1, os_15_octets),
os_16(1, os_16_octets);
const unsigned char pp_0[] = { 0xff };
const unsigned char module_checksum[] = { 0xc6, 0x63, 0xb7, 0x68, 0xfb, 0x70, 0x4b, 0xe8, 0x3b, 0xa4, 0xe2, 0x51, 0x9c, 0x2c, 0xcd, 0x93 };

/* Global variable definitions */

const XERdescriptor_t       AuxiliaryStates__TLV_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int AuxiliaryStates__TLV_elementIdentifier_oer_ext_arr_[0] = {};
const int AuxiliaryStates__TLV_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t AuxiliaryStates__TLV_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, AuxiliaryStates__TLV_elementIdentifier_oer_ext_arr_, 0, AuxiliaryStates__TLV_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t AuxiliaryStates__TLV_elementIdentifier_descr_ = { "@MobileL3_CC_Types.AuxiliaryStates_TLV.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &AuxiliaryStates__TLV_elementIdentifier_xer_, &OCTETSTRING_json_, &AuxiliaryStates__TLV_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AuxiliaryStates__TLV_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t AuxiliaryStates__TLV_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       AuxiliaryStates__TLV_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t AuxiliaryStates__TLV_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AuxiliaryStates__TLV_lengthIndicator_descr_ = { "@MobileL3_CC_Types.AuxiliaryStates_TLV.lengthIndicator", &INTEGER_ber_, &AuxiliaryStates__TLV_lengthIndicator_raw_, &INTEGER_text_, &AuxiliaryStates__TLV_lengthIndicator_xer_, &INTEGER_json_, &AuxiliaryStates__TLV_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AuxiliaryStates__TLV_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       AuxiliaryStates__TLV_mPTYAuxiliaryState_xer_ = { {"mPTYAuxiliaryState>\n", "mPTYAuxiliaryState>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t AuxiliaryStates__TLV_mPTYAuxiliaryState_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AuxiliaryStates__TLV_mPTYAuxiliaryState_descr_ = { "@MobileL3_CC_Types.AuxiliaryStates_TLV.mPTYAuxiliaryState", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &AuxiliaryStates__TLV_mPTYAuxiliaryState_xer_, &BITSTRING_json_, &AuxiliaryStates__TLV_mPTYAuxiliaryState_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AuxiliaryStates__TLV_mPTYAuxiliaryState_default_coding("RAW");
const XERdescriptor_t       AuxiliaryStates__TLV_holdAuxState_xer_ = { {"holdAuxState>\n", "holdAuxState>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t AuxiliaryStates__TLV_holdAuxState_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AuxiliaryStates__TLV_holdAuxState_descr_ = { "@MobileL3_CC_Types.AuxiliaryStates_TLV.holdAuxState", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &AuxiliaryStates__TLV_holdAuxState_xer_, &BITSTRING_json_, &AuxiliaryStates__TLV_holdAuxState_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AuxiliaryStates__TLV_holdAuxState_default_coding("RAW");
const XERdescriptor_t       AuxiliaryStates__TLV_spare__3_xer_ = { {"spare_3>\n", "spare_3>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t AuxiliaryStates__TLV_spare__3_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AuxiliaryStates__TLV_spare__3_descr_ = { "@MobileL3_CC_Types.AuxiliaryStates_TLV.spare_3", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &AuxiliaryStates__TLV_spare__3_xer_, &BITSTRING_json_, &AuxiliaryStates__TLV_spare__3_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AuxiliaryStates__TLV_spare__3_default_coding("RAW");
const XERdescriptor_t       AuxiliaryStates__TLV_ext_xer_ = { {"ext>\n", "ext>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t AuxiliaryStates__TLV_ext_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AuxiliaryStates__TLV_ext_descr_ = { "@MobileL3_CC_Types.AuxiliaryStates_TLV.ext", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &AuxiliaryStates__TLV_ext_xer_, &BITSTRING_json_, &AuxiliaryStates__TLV_ext_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AuxiliaryStates__TLV_ext_default_coding("RAW");
const TTCN_RAWdescriptor_t AuxiliaryStates__TLV_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for AuxiliaryStates__TLV
const TTCN_Typedescriptor_t AuxiliaryStates__TLV_descr_ = { "@MobileL3_CC_Types.AuxiliaryStates_TLV", NULL, &AuxiliaryStates__TLV_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AuxiliaryStates__TLV_default_coding("RAW");
const TTCN_RAWdescriptor_t AuxiliaryStates__LV_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       AuxiliaryStates__LV_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t AuxiliaryStates__LV_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AuxiliaryStates__LV_lengthIndicator_descr_ = { "@MobileL3_CC_Types.AuxiliaryStates_LV.lengthIndicator", &INTEGER_ber_, &AuxiliaryStates__LV_lengthIndicator_raw_, &INTEGER_text_, &AuxiliaryStates__LV_lengthIndicator_xer_, &INTEGER_json_, &AuxiliaryStates__LV_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AuxiliaryStates__LV_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       AuxiliaryStates__LV_mPTYAuxState_xer_ = { {"mPTYAuxState>\n", "mPTYAuxState>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t AuxiliaryStates__LV_mPTYAuxState_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AuxiliaryStates__LV_mPTYAuxState_descr_ = { "@MobileL3_CC_Types.AuxiliaryStates_LV.mPTYAuxState", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &AuxiliaryStates__LV_mPTYAuxState_xer_, &BITSTRING_json_, &AuxiliaryStates__LV_mPTYAuxState_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AuxiliaryStates__LV_mPTYAuxState_default_coding("RAW");
const XERdescriptor_t       AuxiliaryStates__LV_holdAuxiliaryState_xer_ = { {"holdAuxiliaryState>\n", "holdAuxiliaryState>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t AuxiliaryStates__LV_holdAuxiliaryState_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AuxiliaryStates__LV_holdAuxiliaryState_descr_ = { "@MobileL3_CC_Types.AuxiliaryStates_LV.holdAuxiliaryState", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &AuxiliaryStates__LV_holdAuxiliaryState_xer_, &BITSTRING_json_, &AuxiliaryStates__LV_holdAuxiliaryState_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AuxiliaryStates__LV_holdAuxiliaryState_default_coding("RAW");
const XERdescriptor_t       AuxiliaryStates__LV_spare__3_xer_ = { {"spare_3>\n", "spare_3>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t AuxiliaryStates__LV_spare__3_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AuxiliaryStates__LV_spare__3_descr_ = { "@MobileL3_CC_Types.AuxiliaryStates_LV.spare_3", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &AuxiliaryStates__LV_spare__3_xer_, &BITSTRING_json_, &AuxiliaryStates__LV_spare__3_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AuxiliaryStates__LV_spare__3_default_coding("RAW");
const XERdescriptor_t       AuxiliaryStates__LV_ext_xer_ = { {"ext>\n", "ext>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t AuxiliaryStates__LV_ext_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AuxiliaryStates__LV_ext_descr_ = { "@MobileL3_CC_Types.AuxiliaryStates_LV.ext", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &AuxiliaryStates__LV_ext_xer_, &BITSTRING_json_, &AuxiliaryStates__LV_ext_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AuxiliaryStates__LV_ext_default_coding("RAW");
const TTCN_RAWdescriptor_t AuxiliaryStates__LV_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for AuxiliaryStates__LV
const TTCN_Typedescriptor_t AuxiliaryStates__LV_descr_ = { "@MobileL3_CC_Types.AuxiliaryStates_LV", NULL, &AuxiliaryStates__LV_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AuxiliaryStates__LV_default_coding("RAW");
const XERdescriptor_t       BBC__octet3_informationTransferCapability_xer_ = { {"informationTransferCapability>\n", "informationTransferCapability>\n"}, {31, 31}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BBC__octet3_informationTransferCapability_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BBC__octet3_informationTransferCapability_descr_ = { "@MobileL3_CC_Types.BBC_octet3.informationTransferCapability", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &BBC__octet3_informationTransferCapability_xer_, &BITSTRING_json_, &BBC__octet3_informationTransferCapability_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BBC__octet3_informationTransferCapability_default_coding("RAW");
const XERdescriptor_t       BBC__octet3_transferMode_xer_ = { {"transferMode>\n", "transferMode>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BBC__octet3_transferMode_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BBC__octet3_transferMode_descr_ = { "@MobileL3_CC_Types.BBC_octet3.transferMode", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BBC__octet3_transferMode_xer_, &BITSTRING_json_, &BBC__octet3_transferMode_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BBC__octet3_transferMode_default_coding("RAW");
const XERdescriptor_t       BBC__octet3_codingStandard_xer_ = { {"codingStandard>\n", "codingStandard>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BBC__octet3_codingStandard_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BBC__octet3_codingStandard_descr_ = { "@MobileL3_CC_Types.BBC_octet3.codingStandard", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BBC__octet3_codingStandard_xer_, &BITSTRING_json_, &BBC__octet3_codingStandard_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BBC__octet3_codingStandard_default_coding("RAW");
const XERdescriptor_t       BBC__octet3_radioChannelRequirement_xer_ = { {"radioChannelRequirement>\n", "radioChannelRequirement>\n"}, {25, 25}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BBC__octet3_radioChannelRequirement_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BBC__octet3_radioChannelRequirement_descr_ = { "@MobileL3_CC_Types.BBC_octet3.radioChannelRequirement", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BBC__octet3_radioChannelRequirement_xer_, &BITSTRING_json_, &BBC__octet3_radioChannelRequirement_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BBC__octet3_radioChannelRequirement_default_coding("RAW");
const XERdescriptor_t       BBC__octet3_extension__octet__3_xer_ = { {"extension_octet_3>\n", "extension_octet_3>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BBC__octet3_extension__octet__3_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BBC__octet3_extension__octet__3_descr_ = { "@MobileL3_CC_Types.BBC_octet3.extension_octet_3", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BBC__octet3_extension__octet__3_xer_, &BITSTRING_json_, &BBC__octet3_extension__octet__3_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BBC__octet3_extension__octet__3_default_coding("RAW");
const TTCN_RAWdescriptor_t BBC__octet3_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_YES,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for BBC__octet3
const TTCN_Typedescriptor_t BBC__octet3_descr_ = { "@MobileL3_CC_Types.BBC_octet3", NULL, &BBC__octet3_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BBC__octet3_default_coding("RAW");
const XERdescriptor_t       BBC__octet5_signallingAccessProtocol_xer_ = { {"signallingAccessProtocol>\n", "signallingAccessProtocol>\n"}, {26, 26}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BBC__octet5_signallingAccessProtocol_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BBC__octet5_signallingAccessProtocol_descr_ = { "@MobileL3_CC_Types.BBC_octet5.signallingAccessProtocol", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &BBC__octet5_signallingAccessProtocol_xer_, &BITSTRING_json_, &BBC__octet5_signallingAccessProtocol_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BBC__octet5_signallingAccessProtocol_default_coding("RAW");
const XERdescriptor_t       BBC__octet5_rateAdaptation_xer_ = { {"rateAdaptation>\n", "rateAdaptation>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BBC__octet5_rateAdaptation_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BBC__octet5_rateAdaptation_descr_ = { "@MobileL3_CC_Types.BBC_octet5.rateAdaptation", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BBC__octet5_rateAdaptation_xer_, &BITSTRING_json_, &BBC__octet5_rateAdaptation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BBC__octet5_rateAdaptation_default_coding("RAW");
const XERdescriptor_t       BBC__octet5_accessId_xer_ = { {"accessId>\n", "accessId>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BBC__octet5_accessId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BBC__octet5_accessId_descr_ = { "@MobileL3_CC_Types.BBC_octet5.accessId", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BBC__octet5_accessId_xer_, &BITSTRING_json_, &BBC__octet5_accessId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BBC__octet5_accessId_default_coding("RAW");
const XERdescriptor_t       BBC__octet5_extension__octet__5_xer_ = { {"extension_octet_5>\n", "extension_octet_5>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BBC__octet5_extension__octet__5_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BBC__octet5_extension__octet__5_descr_ = { "@MobileL3_CC_Types.BBC_octet5.extension_octet_5", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BBC__octet5_extension__octet__5_xer_, &BITSTRING_json_, &BBC__octet5_extension__octet__5_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BBC__octet5_extension__octet__5_default_coding("RAW");
const TTCN_RAWdescriptor_t BBC__octet5_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_YES,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for BBC__octet5
const TTCN_Typedescriptor_t BBC__octet5_descr_ = { "@MobileL3_CC_Types.BBC_octet5", NULL, &BBC__octet5_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       BBC__octet5_spare2__3_xer_ = { {"spare2_3>\n", "spare2_3>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BBC__octet5_spare2__3_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BBC__octet5_spare2__3_descr_ = { "@MobileL3_CC_Types.BBC_octet5.spare2_3", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &BBC__octet5_spare2__3_xer_, &BITSTRING_json_, &BBC__octet5_spare2__3_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BBC__octet5_spare2__3_default_coding("RAW");
const XERdescriptor_t       BBC__octet5_otherRateAdaptation_xer_ = { {"otherRateAdaptation>\n", "otherRateAdaptation>\n"}, {21, 21}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BBC__octet5_otherRateAdaptation_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BBC__octet5_otherRateAdaptation_descr_ = { "@MobileL3_CC_Types.BBC_octet5.otherRateAdaptation", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BBC__octet5_otherRateAdaptation_xer_, &BITSTRING_json_, &BBC__octet5_otherRateAdaptation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BBC__octet5_otherRateAdaptation_default_coding("RAW");
const XERdescriptor_t       BBC__octet5_otherInformationTransferCapability_xer_ = { {"otherInformationTransferCapability>\n", "otherInformationTransferCapability>\n"}, {36, 36}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BBC__octet5_otherInformationTransferCapability_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BBC__octet5_otherInformationTransferCapability_descr_ = { "@MobileL3_CC_Types.BBC_octet5.otherInformationTransferCapability", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BBC__octet5_otherInformationTransferCapability_xer_, &BITSTRING_json_, &BBC__octet5_otherInformationTransferCapability_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BBC__octet5_otherInformationTransferCapability_default_coding("RAW");
const XERdescriptor_t       BBC__octet5_extension__octet__5a_xer_ = { {"extension_octet_5a>\n", "extension_octet_5a>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BBC__octet5_extension__octet__5a_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BBC__octet5_extension__octet__5a_descr_ = { "@MobileL3_CC_Types.BBC_octet5.extension_octet_5a", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BBC__octet5_extension__octet__5a_xer_, &BITSTRING_json_, &BBC__octet5_extension__octet__5a_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BBC__octet5_extension__octet__5a_default_coding("RAW");
UNIVERSAL_CHARSTRING BBC__octet5_default_coding("RAW");
const XERdescriptor_t       BackupBearerCapacity_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int BackupBearerCapacity_elementIdentifier_oer_ext_arr_[0] = {};
const int BackupBearerCapacity_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t BackupBearerCapacity_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, BackupBearerCapacity_elementIdentifier_oer_ext_arr_, 0, BackupBearerCapacity_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t BackupBearerCapacity_elementIdentifier_descr_ = { "@MobileL3_CC_Types.BackupBearerCapacity.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &BackupBearerCapacity_elementIdentifier_xer_, &OCTETSTRING_json_, &BackupBearerCapacity_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BackupBearerCapacity_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t BackupBearerCapacity_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       BackupBearerCapacity_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BackupBearerCapacity_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BackupBearerCapacity_lengthIndicator_descr_ = { "@MobileL3_CC_Types.BackupBearerCapacity.lengthIndicator", &INTEGER_ber_, &BackupBearerCapacity_lengthIndicator_raw_, &INTEGER_text_, &BackupBearerCapacity_lengthIndicator_xer_, &INTEGER_json_, &BackupBearerCapacity_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BackupBearerCapacity_lengthIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING BackupBearerCapacity_octet3_default_coding("RAW");
const TTCN_RAWdescriptor_t BackupBearerCapacity_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for BackupBearerCapacity
const TTCN_Typedescriptor_t BackupBearerCapacity_descr_ = { "@MobileL3_CC_Types.BackupBearerCapacity", NULL, &BackupBearerCapacity_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       BC__octet4_establishment_xer_ = { {"establishment>\n", "establishment>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet4_establishment_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet4_establishment_descr_ = { "@MobileL3_CC_Types.BC_octet4.establishment", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet4_establishment_xer_, &BITSTRING_json_, &BC__octet4_establishment_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet4_establishment_default_coding("RAW");
const XERdescriptor_t       BC__octet4_nirr_xer_ = { {"nirr>\n", "nirr>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet4_nirr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet4_nirr_descr_ = { "@MobileL3_CC_Types.BC_octet4.nirr", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet4_nirr_xer_, &BITSTRING_json_, &BC__octet4_nirr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet4_nirr_default_coding("RAW");
const XERdescriptor_t       BC__octet4_configuration_xer_ = { {"configuration>\n", "configuration>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet4_configuration_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet4_configuration_descr_ = { "@MobileL3_CC_Types.BC_octet4.configuration", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet4_configuration_xer_, &BITSTRING_json_, &BC__octet4_configuration_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet4_configuration_default_coding("RAW");
const XERdescriptor_t       BC__octet4_duplexMode_xer_ = { {"duplexMode>\n", "duplexMode>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet4_duplexMode_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet4_duplexMode_descr_ = { "@MobileL3_CC_Types.BC_octet4.duplexMode", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet4_duplexMode_xer_, &BITSTRING_json_, &BC__octet4_duplexMode_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet4_duplexMode_default_coding("RAW");
const XERdescriptor_t       BC__octet4_structure_xer_ = { {"structure>\n", "structure>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet4_structure_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet4_structure_descr_ = { "@MobileL3_CC_Types.BC_octet4.structure", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BC__octet4_structure_xer_, &BITSTRING_json_, &BC__octet4_structure_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet4_structure_default_coding("RAW");
const XERdescriptor_t       BC__octet4_compression_xer_ = { {"compression>\n", "compression>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet4_compression_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet4_compression_descr_ = { "@MobileL3_CC_Types.BC_octet4.compression", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet4_compression_xer_, &BITSTRING_json_, &BC__octet4_compression_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet4_compression_default_coding("RAW");
const XERdescriptor_t       BC__octet4_extension__octet__4_xer_ = { {"extension_octet_4>\n", "extension_octet_4>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet4_extension__octet__4_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet4_extension__octet__4_descr_ = { "@MobileL3_CC_Types.BC_octet4.extension_octet_4", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet4_extension__octet__4_xer_, &BITSTRING_json_, &BC__octet4_extension__octet__4_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet4_extension__octet__4_default_coding("RAW");
const TTCN_RAWdescriptor_t BC__octet4_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_YES,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for BC__octet4
const TTCN_Typedescriptor_t BC__octet4_descr_ = { "@MobileL3_CC_Types.BC_octet4", NULL, &BC__octet4_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet4_default_coding("RAW");
UNIVERSAL_CHARSTRING BackupBearerCapacity_octet4_default_coding("RAW");
UNIVERSAL_CHARSTRING BackupBearerCapacity_octet5_default_coding("RAW");
const XERdescriptor_t       BC__octet6_synchronous__asynchronous_xer_ = { {"synchronous_asynchronous>\n", "synchronous_asynchronous>\n"}, {26, 26}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_synchronous__asynchronous_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_synchronous__asynchronous_descr_ = { "@MobileL3_CC_Types.BC_octet6.synchronous_asynchronous", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet6_synchronous__asynchronous_xer_, &BITSTRING_json_, &BC__octet6_synchronous__asynchronous_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_synchronous__asynchronous_default_coding("RAW");
const XERdescriptor_t       BC__octet6_userInformationLayer1Protocol_xer_ = { {"userInformationLayer1Protocol>\n", "userInformationLayer1Protocol>\n"}, {31, 31}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_userInformationLayer1Protocol_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_userInformationLayer1Protocol_descr_ = { "@MobileL3_CC_Types.BC_octet6.userInformationLayer1Protocol", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &BC__octet6_userInformationLayer1Protocol_xer_, &BITSTRING_json_, &BC__octet6_userInformationLayer1Protocol_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_userInformationLayer1Protocol_default_coding("RAW");
const XERdescriptor_t       BC__octet6_layer1Id_xer_ = { {"layer1Id>\n", "layer1Id>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_layer1Id_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_layer1Id_descr_ = { "@MobileL3_CC_Types.BC_octet6.layer1Id", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BC__octet6_layer1Id_xer_, &BITSTRING_json_, &BC__octet6_layer1Id_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_layer1Id_default_coding("RAW");
const XERdescriptor_t       BC__octet6_extension__octet__6_xer_ = { {"extension_octet_6>\n", "extension_octet_6>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_extension__octet__6_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_extension__octet__6_descr_ = { "@MobileL3_CC_Types.BC_octet6.extension_octet_6", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet6_extension__octet__6_xer_, &BITSTRING_json_, &BC__octet6_extension__octet__6_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_extension__octet__6_default_coding("RAW");
const TTCN_RAWdescriptor_t BC__octet6_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_YES,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for BC__octet6
const TTCN_Typedescriptor_t BC__octet6_descr_ = { "@MobileL3_CC_Types.BC_octet6", NULL, &BC__octet6_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       BC__octet6_userRate_xer_ = { {"userRate>\n", "userRate>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_userRate_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_userRate_descr_ = { "@MobileL3_CC_Types.BC_octet6.userRate", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &BC__octet6_userRate_xer_, &BITSTRING_json_, &BC__octet6_userRate_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_userRate_default_coding("RAW");
const XERdescriptor_t       BC__octet6_numberDataBits_xer_ = { {"numberDataBits>\n", "numberDataBits>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_numberDataBits_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_numberDataBits_descr_ = { "@MobileL3_CC_Types.BC_octet6.numberDataBits", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet6_numberDataBits_xer_, &BITSTRING_json_, &BC__octet6_numberDataBits_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_numberDataBits_default_coding("RAW");
const XERdescriptor_t       BC__octet6_negotiation_xer_ = { {"negotiation>\n", "negotiation>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_negotiation_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_negotiation_descr_ = { "@MobileL3_CC_Types.BC_octet6.negotiation", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet6_negotiation_xer_, &BITSTRING_json_, &BC__octet6_negotiation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_negotiation_default_coding("RAW");
const XERdescriptor_t       BC__octet6_numberStopBits_xer_ = { {"numberStopBits>\n", "numberStopBits>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_numberStopBits_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_numberStopBits_descr_ = { "@MobileL3_CC_Types.BC_octet6.numberStopBits", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet6_numberStopBits_xer_, &BITSTRING_json_, &BC__octet6_numberStopBits_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_numberStopBits_default_coding("RAW");
const XERdescriptor_t       BC__octet6_extension__octet__6a_xer_ = { {"extension_octet_6a>\n", "extension_octet_6a>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_extension__octet__6a_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_extension__octet__6a_descr_ = { "@MobileL3_CC_Types.BC_octet6.extension_octet_6a", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet6_extension__octet__6a_xer_, &BITSTRING_json_, &BC__octet6_extension__octet__6a_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_extension__octet__6a_default_coding("RAW");
const XERdescriptor_t       BC__octet6_parity_xer_ = { {"parity>\n", "parity>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_parity_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_parity_descr_ = { "@MobileL3_CC_Types.BC_octet6.parity", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &BC__octet6_parity_xer_, &BITSTRING_json_, &BC__octet6_parity_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_parity_default_coding("RAW");
const XERdescriptor_t       BC__octet6_nicOnRX_xer_ = { {"nicOnRX>\n", "nicOnRX>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_nicOnRX_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_nicOnRX_descr_ = { "@MobileL3_CC_Types.BC_octet6.nicOnRX", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet6_nicOnRX_xer_, &BITSTRING_json_, &BC__octet6_nicOnRX_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_nicOnRX_default_coding("RAW");
const XERdescriptor_t       BC__octet6_nicOnTX_xer_ = { {"nicOnTX>\n", "nicOnTX>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_nicOnTX_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_nicOnTX_descr_ = { "@MobileL3_CC_Types.BC_octet6.nicOnTX", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet6_nicOnTX_xer_, &BITSTRING_json_, &BC__octet6_nicOnTX_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_nicOnTX_default_coding("RAW");
const XERdescriptor_t       BC__octet6_intermediateRate_xer_ = { {"intermediateRate>\n", "intermediateRate>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_intermediateRate_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_intermediateRate_descr_ = { "@MobileL3_CC_Types.BC_octet6.intermediateRate", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BC__octet6_intermediateRate_xer_, &BITSTRING_json_, &BC__octet6_intermediateRate_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_intermediateRate_default_coding("RAW");
const XERdescriptor_t       BC__octet6_extension__octet__6b_xer_ = { {"extension_octet_6b>\n", "extension_octet_6b>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_extension__octet__6b_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_extension__octet__6b_descr_ = { "@MobileL3_CC_Types.BC_octet6.extension_octet_6b", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet6_extension__octet__6b_xer_, &BITSTRING_json_, &BC__octet6_extension__octet__6b_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_extension__octet__6b_default_coding("RAW");
const XERdescriptor_t       BC__octet6_modemType_xer_ = { {"modemType>\n", "modemType>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_modemType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_modemType_descr_ = { "@MobileL3_CC_Types.BC_octet6.modemType", &BITSTRING_ber_, &General__Types::BIT5_raw_, NULL, &BC__octet6_modemType_xer_, &BITSTRING_json_, &BC__octet6_modemType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_modemType_default_coding("RAW");
const XERdescriptor_t       BC__octet6_connectionElement_xer_ = { {"connectionElement>\n", "connectionElement>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_connectionElement_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_connectionElement_descr_ = { "@MobileL3_CC_Types.BC_octet6.connectionElement", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BC__octet6_connectionElement_xer_, &BITSTRING_json_, &BC__octet6_connectionElement_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_connectionElement_default_coding("RAW");
const XERdescriptor_t       BC__octet6_extension__octet__6c_xer_ = { {"extension_octet_6c>\n", "extension_octet_6c>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_extension__octet__6c_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_extension__octet__6c_descr_ = { "@MobileL3_CC_Types.BC_octet6.extension_octet_6c", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet6_extension__octet__6c_xer_, &BITSTRING_json_, &BC__octet6_extension__octet__6c_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_extension__octet__6c_default_coding("RAW");
const XERdescriptor_t       BC__octet6_fixedNetworkUserRate_xer_ = { {"fixedNetworkUserRate>\n", "fixedNetworkUserRate>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_fixedNetworkUserRate_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_fixedNetworkUserRate_descr_ = { "@MobileL3_CC_Types.BC_octet6.fixedNetworkUserRate", &BITSTRING_ber_, &General__Types::BIT5_raw_, NULL, &BC__octet6_fixedNetworkUserRate_xer_, &BITSTRING_json_, &BC__octet6_fixedNetworkUserRate_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_fixedNetworkUserRate_default_coding("RAW");
const XERdescriptor_t       BC__octet6_otherModemType_xer_ = { {"otherModemType>\n", "otherModemType>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_otherModemType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_otherModemType_descr_ = { "@MobileL3_CC_Types.BC_octet6.otherModemType", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BC__octet6_otherModemType_xer_, &BITSTRING_json_, &BC__octet6_otherModemType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_otherModemType_default_coding("RAW");
const XERdescriptor_t       BC__octet6_extension__octet__6d_xer_ = { {"extension_octet_6d>\n", "extension_octet_6d>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_extension__octet__6d_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_extension__octet__6d_descr_ = { "@MobileL3_CC_Types.BC_octet6.extension_octet_6d", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet6_extension__octet__6d_xer_, &BITSTRING_json_, &BC__octet6_extension__octet__6d_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_extension__octet__6d_default_coding("RAW");
const XERdescriptor_t       BC__octet6_maxNumberOfTrafficChannels_xer_ = { {"maxNumberOfTrafficChannels>\n", "maxNumberOfTrafficChannels>\n"}, {28, 28}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_maxNumberOfTrafficChannels_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_maxNumberOfTrafficChannels_descr_ = { "@MobileL3_CC_Types.BC_octet6.maxNumberOfTrafficChannels", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &BC__octet6_maxNumberOfTrafficChannels_xer_, &BITSTRING_json_, &BC__octet6_maxNumberOfTrafficChannels_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_maxNumberOfTrafficChannels_default_coding("RAW");
const XERdescriptor_t       BC__octet6_acceptableChannelCodings_xer_ = { {"acceptableChannelCodings>\n", "acceptableChannelCodings>\n"}, {26, 26}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_acceptableChannelCodings_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_acceptableChannelCodings_descr_ = { "@MobileL3_CC_Types.BC_octet6.acceptableChannelCodings", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &BC__octet6_acceptableChannelCodings_xer_, &BITSTRING_json_, &BC__octet6_acceptableChannelCodings_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_acceptableChannelCodings_default_coding("RAW");
const XERdescriptor_t       BC__octet6_extension__octet__6e_xer_ = { {"extension_octet_6e>\n", "extension_octet_6e>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_extension__octet__6e_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_extension__octet__6e_descr_ = { "@MobileL3_CC_Types.BC_octet6.extension_octet_6e", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet6_extension__octet__6e_xer_, &BITSTRING_json_, &BC__octet6_extension__octet__6e_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_extension__octet__6e_default_coding("RAW");
const XERdescriptor_t       BC__octet6_wantedAirInterfaceUserRate_xer_ = { {"wantedAirInterfaceUserRate>\n", "wantedAirInterfaceUserRate>\n"}, {28, 28}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_wantedAirInterfaceUserRate_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_wantedAirInterfaceUserRate_descr_ = { "@MobileL3_CC_Types.BC_octet6.wantedAirInterfaceUserRate", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &BC__octet6_wantedAirInterfaceUserRate_xer_, &BITSTRING_json_, &BC__octet6_wantedAirInterfaceUserRate_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_wantedAirInterfaceUserRate_default_coding("RAW");
const XERdescriptor_t       BC__octet6_uimi_xer_ = { {"uimi>\n", "uimi>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_uimi_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_uimi_descr_ = { "@MobileL3_CC_Types.BC_octet6.uimi", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &BC__octet6_uimi_xer_, &BITSTRING_json_, &BC__octet6_uimi_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_uimi_default_coding("RAW");
const XERdescriptor_t       BC__octet6_extension__octet__6f_xer_ = { {"extension_octet_6f>\n", "extension_octet_6f>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_extension__octet__6f_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_extension__octet__6f_descr_ = { "@MobileL3_CC_Types.BC_octet6.extension_octet_6f", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet6_extension__octet__6f_xer_, &BITSTRING_json_, &BC__octet6_extension__octet__6f_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_extension__octet__6f_default_coding("RAW");
const XERdescriptor_t       BC__octet6_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 TTCN_OERdescriptor_t BC__octet6_spare_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_spare_descr_ = { "@MobileL3_CC_Types.BC_octet6.spare", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BC__octet6_spare_xer_, &BITSTRING_json_, &BC__octet6_spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_spare_default_coding("RAW");
const XERdescriptor_t       BC__octet6_asymetryIndication_xer_ = { {"asymetryIndication>\n", "asymetryIndication>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_asymetryIndication_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_asymetryIndication_descr_ = { "@MobileL3_CC_Types.BC_octet6.asymetryIndication", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BC__octet6_asymetryIndication_xer_, &BITSTRING_json_, &BC__octet6_asymetryIndication_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_asymetryIndication_default_coding("RAW");
const XERdescriptor_t       BC__octet6_acceptableChannelCodingsExt_xer_ = { {"acceptableChannelCodingsExt>\n", "acceptableChannelCodingsExt>\n"}, {29, 29}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_acceptableChannelCodingsExt_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_acceptableChannelCodingsExt_descr_ = { "@MobileL3_CC_Types.BC_octet6.acceptableChannelCodingsExt", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &BC__octet6_acceptableChannelCodingsExt_xer_, &BITSTRING_json_, &BC__octet6_acceptableChannelCodingsExt_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_acceptableChannelCodingsExt_default_coding("RAW");
const XERdescriptor_t       BC__octet6_extension__octet__6g_xer_ = { {"extension_octet_6g>\n", "extension_octet_6g>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet6_extension__octet__6g_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet6_extension__octet__6g_descr_ = { "@MobileL3_CC_Types.BC_octet6.extension_octet_6g", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet6_extension__octet__6g_xer_, &BITSTRING_json_, &BC__octet6_extension__octet__6g_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet6_extension__octet__6g_default_coding("RAW");
UNIVERSAL_CHARSTRING BC__octet6_default_coding("RAW");
UNIVERSAL_CHARSTRING BackupBearerCapacity_octet6_default_coding("RAW");
const XERdescriptor_t       BC__octet7_userInformationLayer2Protocol_xer_ = { {"userInformationLayer2Protocol>\n", "userInformationLayer2Protocol>\n"}, {31, 31}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet7_userInformationLayer2Protocol_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet7_userInformationLayer2Protocol_descr_ = { "@MobileL3_CC_Types.BC_octet7.userInformationLayer2Protocol", &BITSTRING_ber_, &General__Types::BIT5_raw_, NULL, &BC__octet7_userInformationLayer2Protocol_xer_, &BITSTRING_json_, &BC__octet7_userInformationLayer2Protocol_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet7_userInformationLayer2Protocol_default_coding("RAW");
const XERdescriptor_t       BC__octet7_layer2Id_xer_ = { {"layer2Id>\n", "layer2Id>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet7_layer2Id_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet7_layer2Id_descr_ = { "@MobileL3_CC_Types.BC_octet7.layer2Id", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BC__octet7_layer2Id_xer_, &BITSTRING_json_, &BC__octet7_layer2Id_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet7_layer2Id_default_coding("RAW");
const XERdescriptor_t       BC__octet7_extension__octet__7_xer_ = { {"extension_octet_7>\n", "extension_octet_7>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet7_extension__octet__7_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet7_extension__octet__7_descr_ = { "@MobileL3_CC_Types.BC_octet7.extension_octet_7", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet7_extension__octet__7_xer_, &BITSTRING_json_, &BC__octet7_extension__octet__7_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet7_extension__octet__7_default_coding("RAW");
const TTCN_RAWdescriptor_t BC__octet7_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_YES,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for BC__octet7
const TTCN_Typedescriptor_t BC__octet7_descr_ = { "@MobileL3_CC_Types.BC_octet7", NULL, &BC__octet7_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet7_default_coding("RAW");
UNIVERSAL_CHARSTRING BackupBearerCapacity_octet7_default_coding("RAW");
UNIVERSAL_CHARSTRING BackupBearerCapacity_default_coding("RAW");
const XERdescriptor_t       BC__octet5_signallingAccessProtocol_xer_ = { {"signallingAccessProtocol>\n", "signallingAccessProtocol>\n"}, {26, 26}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_signallingAccessProtocol_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_signallingAccessProtocol_descr_ = { "@MobileL3_CC_Types.BC_octet5.signallingAccessProtocol", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &BC__octet5_signallingAccessProtocol_xer_, &BITSTRING_json_, &BC__octet5_signallingAccessProtocol_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_signallingAccessProtocol_default_coding("RAW");
const XERdescriptor_t       BC__octet5_rateAdaptation_xer_ = { {"rateAdaptation>\n", "rateAdaptation>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_rateAdaptation_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_rateAdaptation_descr_ = { "@MobileL3_CC_Types.BC_octet5.rateAdaptation", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BC__octet5_rateAdaptation_xer_, &BITSTRING_json_, &BC__octet5_rateAdaptation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_rateAdaptation_default_coding("RAW");
const XERdescriptor_t       BC__octet5_accessId_xer_ = { {"accessId>\n", "accessId>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_accessId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_accessId_descr_ = { "@MobileL3_CC_Types.BC_octet5.accessId", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BC__octet5_accessId_xer_, &BITSTRING_json_, &BC__octet5_accessId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_accessId_default_coding("RAW");
const XERdescriptor_t       BC__octet5_extension__octet__5_xer_ = { {"extension_octet_5>\n", "extension_octet_5>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_extension__octet__5_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_extension__octet__5_descr_ = { "@MobileL3_CC_Types.BC_octet5.extension_octet_5", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet5_extension__octet__5_xer_, &BITSTRING_json_, &BC__octet5_extension__octet__5_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_extension__octet__5_default_coding("RAW");
const TTCN_RAWdescriptor_t BC__octet5_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_YES,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for BC__octet5
const TTCN_Typedescriptor_t BC__octet5_descr_ = { "@MobileL3_CC_Types.BC_octet5", NULL, &BC__octet5_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       BC__octet5_spare2__3_xer_ = { {"spare2_3>\n", "spare2_3>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_spare2__3_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_spare2__3_descr_ = { "@MobileL3_CC_Types.BC_octet5.spare2_3", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &BC__octet5_spare2__3_xer_, &BITSTRING_json_, &BC__octet5_spare2__3_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_spare2__3_default_coding("RAW");
const XERdescriptor_t       BC__octet5_otherRateAdaptation_xer_ = { {"otherRateAdaptation>\n", "otherRateAdaptation>\n"}, {21, 21}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_otherRateAdaptation_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_otherRateAdaptation_descr_ = { "@MobileL3_CC_Types.BC_octet5.otherRateAdaptation", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BC__octet5_otherRateAdaptation_xer_, &BITSTRING_json_, &BC__octet5_otherRateAdaptation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_otherRateAdaptation_default_coding("RAW");
const XERdescriptor_t       BC__octet5_otherInformationTransferCapability_xer_ = { {"otherInformationTransferCapability>\n", "otherInformationTransferCapability>\n"}, {36, 36}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_otherInformationTransferCapability_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_otherInformationTransferCapability_descr_ = { "@MobileL3_CC_Types.BC_octet5.otherInformationTransferCapability", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BC__octet5_otherInformationTransferCapability_xer_, &BITSTRING_json_, &BC__octet5_otherInformationTransferCapability_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_otherInformationTransferCapability_default_coding("RAW");
const XERdescriptor_t       BC__octet5_extension__octet__5a_xer_ = { {"extension_octet_5a>\n", "extension_octet_5a>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_extension__octet__5a_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_extension__octet__5a_descr_ = { "@MobileL3_CC_Types.BC_octet5.extension_octet_5a", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet5_extension__octet__5a_xer_, &BITSTRING_json_, &BC__octet5_extension__octet__5a_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_extension__octet__5a_default_coding("RAW");
const XERdescriptor_t       BC__octet5_spare3__1_xer_ = { {"spare3_1>\n", "spare3_1>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_spare3__1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_spare3__1_descr_ = { "@MobileL3_CC_Types.BC_octet5.spare3_1", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet5_spare3__1_xer_, &BITSTRING_json_, &BC__octet5_spare3__1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_spare3__1_default_coding("RAW");
const XERdescriptor_t       BC__octet5_inbandNegotiation_xer_ = { {"inbandNegotiation>\n", "inbandNegotiation>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_inbandNegotiation_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_inbandNegotiation_descr_ = { "@MobileL3_CC_Types.BC_octet5.inbandNegotiation", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet5_inbandNegotiation_xer_, &BITSTRING_json_, &BC__octet5_inbandNegotiation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_inbandNegotiation_default_coding("RAW");
const XERdescriptor_t       BC__octet5_assignor__assignee_xer_ = { {"assignor_assignee>\n", "assignor_assignee>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_assignor__assignee_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_assignor__assignee_descr_ = { "@MobileL3_CC_Types.BC_octet5.assignor_assignee", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet5_assignor__assignee_xer_, &BITSTRING_json_, &BC__octet5_assignor__assignee_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_assignor__assignee_default_coding("RAW");
const XERdescriptor_t       BC__octet5_lli_xer_ = { {"lli>\n", "lli>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_lli_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_lli_descr_ = { "@MobileL3_CC_Types.BC_octet5.lli", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet5_lli_xer_, &BITSTRING_json_, &BC__octet5_lli_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_lli_default_coding("RAW");
const XERdescriptor_t       BC__octet5_mode_xer_ = { {"mode>\n", "mode>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_mode_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_mode_descr_ = { "@MobileL3_CC_Types.BC_octet5.mode", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet5_mode_xer_, &BITSTRING_json_, &BC__octet5_mode_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_mode_default_coding("RAW");
const XERdescriptor_t       BC__octet5_multiframe_xer_ = { {"multiframe>\n", "multiframe>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_multiframe_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_multiframe_descr_ = { "@MobileL3_CC_Types.BC_octet5.multiframe", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet5_multiframe_xer_, &BITSTRING_json_, &BC__octet5_multiframe_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_multiframe_default_coding("RAW");
const XERdescriptor_t       BC__octet5_hdrNohdr_xer_ = { {"hdrNohdr>\n", "hdrNohdr>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_hdrNohdr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_hdrNohdr_descr_ = { "@MobileL3_CC_Types.BC_octet5.hdrNohdr", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet5_hdrNohdr_xer_, &BITSTRING_json_, &BC__octet5_hdrNohdr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_hdrNohdr_default_coding("RAW");
const XERdescriptor_t       BC__octet5_extension__octet__5b_xer_ = { {"extension_octet_5b>\n", "extension_octet_5b>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet5_extension__octet__5b_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet5_extension__octet__5b_descr_ = { "@MobileL3_CC_Types.BC_octet5.extension_octet_5b", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet5_extension__octet__5b_xer_, &BITSTRING_json_, &BC__octet5_extension__octet__5b_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet5_extension__octet__5b_default_coding("RAW");
UNIVERSAL_CHARSTRING BC__octet5_default_coding("RAW");
const XERdescriptor_t       Speech__AuxiliarySpeech_speechVersionIndication_xer_ = { {"speechVersionIndication>\n", "speechVersionIndication>\n"}, {25, 25}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t Speech__AuxiliarySpeech_speechVersionIndication_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t Speech__AuxiliarySpeech_speechVersionIndication_descr_ = { "@MobileL3_CC_Types.Speech_AuxiliarySpeech.speechVersionIndication", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &Speech__AuxiliarySpeech_speechVersionIndication_xer_, &BITSTRING_json_, &Speech__AuxiliarySpeech_speechVersionIndication_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING Speech__AuxiliarySpeech_speechVersionIndication_default_coding("RAW");
const XERdescriptor_t       Speech__AuxiliarySpeech_spare1__1_xer_ = { {"spare1_1>\n", "spare1_1>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t Speech__AuxiliarySpeech_spare1__1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t Speech__AuxiliarySpeech_spare1__1_descr_ = { "@MobileL3_CC_Types.Speech_AuxiliarySpeech.spare1_1", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &Speech__AuxiliarySpeech_spare1__1_xer_, &BITSTRING_json_, &Speech__AuxiliarySpeech_spare1__1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING Speech__AuxiliarySpeech_spare1__1_default_coding("RAW");
const XERdescriptor_t       Speech__AuxiliarySpeech_cTM__or__Spare_xer_ = { {"cTM_or_Spare>\n", "cTM_or_Spare>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t Speech__AuxiliarySpeech_cTM__or__Spare_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t Speech__AuxiliarySpeech_cTM__or__Spare_descr_ = { "@MobileL3_CC_Types.Speech_AuxiliarySpeech.cTM_or_Spare", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &Speech__AuxiliarySpeech_cTM__or__Spare_xer_, &BITSTRING_json_, &Speech__AuxiliarySpeech_cTM__or__Spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING Speech__AuxiliarySpeech_cTM__or__Spare_default_coding("RAW");
const XERdescriptor_t       Speech__AuxiliarySpeech_coding_xer_ = { {"coding>\n", "coding>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t Speech__AuxiliarySpeech_coding_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t Speech__AuxiliarySpeech_coding_descr_ = { "@MobileL3_CC_Types.Speech_AuxiliarySpeech.coding", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &Speech__AuxiliarySpeech_coding_xer_, &BITSTRING_json_, &Speech__AuxiliarySpeech_coding_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING Speech__AuxiliarySpeech_coding_default_coding("RAW");
const XERdescriptor_t       Speech__AuxiliarySpeech_extension__octet__3a__3b_xer_ = { {"extension_octet_3a_3b>\n", "extension_octet_3a_3b>\n"}, {23, 23}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t Speech__AuxiliarySpeech_extension__octet__3a__3b_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t Speech__AuxiliarySpeech_extension__octet__3a__3b_descr_ = { "@MobileL3_CC_Types.Speech_AuxiliarySpeech.extension_octet_3a_3b", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &Speech__AuxiliarySpeech_extension__octet__3a__3b_xer_, &BITSTRING_json_, &Speech__AuxiliarySpeech_extension__octet__3a__3b_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING Speech__AuxiliarySpeech_extension__octet__3a__3b_default_coding("RAW");
const TTCN_RAWdescriptor_t Speech__AuxiliarySpeech_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_YES,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for Speech__AuxiliarySpeech
const TTCN_Typedescriptor_t Speech__AuxiliarySpeech_descr_ = { "@MobileL3_CC_Types.Speech_AuxiliarySpeech", NULL, &Speech__AuxiliarySpeech_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING Speech__AuxiliarySpeech_default_coding("RAW");
const TTCN_RAWdescriptor_t Speech__AuxiliarySpeech__List_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_YES,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for Speech__AuxiliarySpeech__List
const TTCN_Typedescriptor_t Speech__AuxiliarySpeech__List_descr_ = { "@MobileL3_CC_Types.Speech_AuxiliarySpeech_List", NULL, &Speech__AuxiliarySpeech__List_raw_, NULL, NULL, NULL, NULL, NULL, &Speech__AuxiliarySpeech_descr_, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING Speech__AuxiliarySpeech__List_0_default_coding("RAW");
UNIVERSAL_CHARSTRING Speech__AuxiliarySpeech__List_default_coding("RAW");
const XERdescriptor_t       BC__octet3_informationTransferCapability_xer_ = { {"informationTransferCapability>\n", "informationTransferCapability>\n"}, {31, 31}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet3_informationTransferCapability_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet3_informationTransferCapability_descr_ = { "@MobileL3_CC_Types.BC_octet3.informationTransferCapability", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &BC__octet3_informationTransferCapability_xer_, &BITSTRING_json_, &BC__octet3_informationTransferCapability_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet3_informationTransferCapability_default_coding("RAW");
const XERdescriptor_t       BC__octet3_transferMode_xer_ = { {"transferMode>\n", "transferMode>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet3_transferMode_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet3_transferMode_descr_ = { "@MobileL3_CC_Types.BC_octet3.transferMode", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet3_transferMode_xer_, &BITSTRING_json_, &BC__octet3_transferMode_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet3_transferMode_default_coding("RAW");
const XERdescriptor_t       BC__octet3_codingStandard_xer_ = { {"codingStandard>\n", "codingStandard>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet3_codingStandard_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet3_codingStandard_descr_ = { "@MobileL3_CC_Types.BC_octet3.codingStandard", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet3_codingStandard_xer_, &BITSTRING_json_, &BC__octet3_codingStandard_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet3_codingStandard_default_coding("RAW");
const XERdescriptor_t       BC__octet3_radioChannelRequirement_xer_ = { {"radioChannelRequirement>\n", "radioChannelRequirement>\n"}, {25, 25}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet3_radioChannelRequirement_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet3_radioChannelRequirement_descr_ = { "@MobileL3_CC_Types.BC_octet3.radioChannelRequirement", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &BC__octet3_radioChannelRequirement_xer_, &BITSTRING_json_, &BC__octet3_radioChannelRequirement_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet3_radioChannelRequirement_default_coding("RAW");
const XERdescriptor_t       BC__octet3_extension__octet__3_xer_ = { {"extension_octet_3>\n", "extension_octet_3>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BC__octet3_extension__octet__3_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BC__octet3_extension__octet__3_descr_ = { "@MobileL3_CC_Types.BC_octet3.extension_octet_3", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &BC__octet3_extension__octet__3_xer_, &BITSTRING_json_, &BC__octet3_extension__octet__3_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet3_extension__octet__3_default_coding("RAW");
const TTCN_RAWdescriptor_t BC__octet3_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_YES,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for BC__octet3
const TTCN_Typedescriptor_t BC__octet3_descr_ = { "@MobileL3_CC_Types.BC_octet3", NULL, &BC__octet3_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BC__octet3_speech__aux__3a__3b_default_coding("RAW");
UNIVERSAL_CHARSTRING BC__octet3_default_coding("RAW");
const XERdescriptor_t       BearerCapability__TLV_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int BearerCapability__TLV_elementIdentifier_oer_ext_arr_[0] = {};
const int BearerCapability__TLV_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t BearerCapability__TLV_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, BearerCapability__TLV_elementIdentifier_oer_ext_arr_, 0, BearerCapability__TLV_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t BearerCapability__TLV_elementIdentifier_descr_ = { "@MobileL3_CC_Types.BearerCapability_TLV.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &BearerCapability__TLV_elementIdentifier_xer_, &OCTETSTRING_json_, &BearerCapability__TLV_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BearerCapability__TLV_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t BearerCapability__TLV_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       BearerCapability__TLV_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BearerCapability__TLV_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BearerCapability__TLV_lengthIndicator_descr_ = { "@MobileL3_CC_Types.BearerCapability_TLV.lengthIndicator", &INTEGER_ber_, &BearerCapability__TLV_lengthIndicator_raw_, &INTEGER_text_, &BearerCapability__TLV_lengthIndicator_xer_, &INTEGER_json_, &BearerCapability__TLV_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BearerCapability__TLV_lengthIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING BearerCapability__TLV_octet3_default_coding("RAW");
const TTCN_RAWdescriptor_t BearerCapability__TLV_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for BearerCapability__TLV
const TTCN_Typedescriptor_t BearerCapability__TLV_descr_ = { "@MobileL3_CC_Types.BearerCapability_TLV", NULL, &BearerCapability__TLV_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BearerCapability__TLV_octet4_default_coding("RAW");
UNIVERSAL_CHARSTRING BearerCapability__TLV_octet5_default_coding("RAW");
UNIVERSAL_CHARSTRING BearerCapability__TLV_octet6_default_coding("RAW");
UNIVERSAL_CHARSTRING BearerCapability__TLV_octet7_default_coding("RAW");
UNIVERSAL_CHARSTRING BearerCapability__TLV_default_coding("RAW");
const TTCN_RAWdescriptor_t BearerCapability__LV_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       BearerCapability__LV_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t BearerCapability__LV_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t BearerCapability__LV_lengthIndicator_descr_ = { "@MobileL3_CC_Types.BearerCapability_LV.lengthIndicator", &INTEGER_ber_, &BearerCapability__LV_lengthIndicator_raw_, &INTEGER_text_, &BearerCapability__LV_lengthIndicator_xer_, &INTEGER_json_, &BearerCapability__LV_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BearerCapability__LV_lengthIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING BearerCapability__LV_octet3_default_coding("RAW");
const TTCN_RAWdescriptor_t BearerCapability__LV_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for BearerCapability__LV
const TTCN_Typedescriptor_t BearerCapability__LV_descr_ = { "@MobileL3_CC_Types.BearerCapability_LV", NULL, &BearerCapability__LV_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING BearerCapability__LV_octet4_default_coding("RAW");
UNIVERSAL_CHARSTRING BearerCapability__LV_octet5_default_coding("RAW");
UNIVERSAL_CHARSTRING BearerCapability__LV_octet6_default_coding("RAW");
UNIVERSAL_CHARSTRING BearerCapability__LV_octet7_default_coding("RAW");
UNIVERSAL_CHARSTRING BearerCapability__LV_default_coding("RAW");
const XERdescriptor_t       CallControlCapabilities_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int CallControlCapabilities_elementIdentifier_oer_ext_arr_[0] = {};
const int CallControlCapabilities_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t CallControlCapabilities_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, CallControlCapabilities_elementIdentifier_oer_ext_arr_, 0, CallControlCapabilities_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t CallControlCapabilities_elementIdentifier_descr_ = { "@MobileL3_CC_Types.CallControlCapabilities.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &CallControlCapabilities_elementIdentifier_xer_, &OCTETSTRING_json_, &CallControlCapabilities_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallControlCapabilities_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t CallControlCapabilities_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       CallControlCapabilities_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallControlCapabilities_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallControlCapabilities_lengthIndicator_descr_ = { "@MobileL3_CC_Types.CallControlCapabilities.lengthIndicator", &INTEGER_ber_, &CallControlCapabilities_lengthIndicator_raw_, &INTEGER_text_, &CallControlCapabilities_lengthIndicator_xer_, &INTEGER_json_, &CallControlCapabilities_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallControlCapabilities_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       CallControlCapabilities_dTMF_xer_ = { {"dTMF>\n", "dTMF>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallControlCapabilities_dTMF_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallControlCapabilities_dTMF_descr_ = { "@MobileL3_CC_Types.CallControlCapabilities.dTMF", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &CallControlCapabilities_dTMF_xer_, &BITSTRING_json_, &CallControlCapabilities_dTMF_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallControlCapabilities_dTMF_default_coding("RAW");
const XERdescriptor_t       CallControlCapabilities_pCP_xer_ = { {"pCP>\n", "pCP>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallControlCapabilities_pCP_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallControlCapabilities_pCP_descr_ = { "@MobileL3_CC_Types.CallControlCapabilities.pCP", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &CallControlCapabilities_pCP_xer_, &BITSTRING_json_, &CallControlCapabilities_pCP_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallControlCapabilities_pCP_default_coding("RAW");
const XERdescriptor_t       CallControlCapabilities_eNICM_xer_ = { {"eNICM>\n", "eNICM>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallControlCapabilities_eNICM_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallControlCapabilities_eNICM_descr_ = { "@MobileL3_CC_Types.CallControlCapabilities.eNICM", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &CallControlCapabilities_eNICM_xer_, &BITSTRING_json_, &CallControlCapabilities_eNICM_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallControlCapabilities_eNICM_default_coding("RAW");
const XERdescriptor_t       CallControlCapabilities_mcat_xer_ = { {"mcat>\n", "mcat>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallControlCapabilities_mcat_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallControlCapabilities_mcat_descr_ = { "@MobileL3_CC_Types.CallControlCapabilities.mcat", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &CallControlCapabilities_mcat_xer_, &BITSTRING_json_, &CallControlCapabilities_mcat_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallControlCapabilities_mcat_default_coding("RAW");
const XERdescriptor_t       CallControlCapabilities_maxNumberOfSupportedBearers_xer_ = { {"maxNumberOfSupportedBearers>\n", "maxNumberOfSupportedBearers>\n"}, {29, 29}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallControlCapabilities_maxNumberOfSupportedBearers_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallControlCapabilities_maxNumberOfSupportedBearers_descr_ = { "@MobileL3_CC_Types.CallControlCapabilities.maxNumberOfSupportedBearers", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &CallControlCapabilities_maxNumberOfSupportedBearers_xer_, &BITSTRING_json_, &CallControlCapabilities_maxNumberOfSupportedBearers_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallControlCapabilities_maxNumberOfSupportedBearers_default_coding("RAW");
const XERdescriptor_t       CallControlCapabilities_maxNumberOfSpeechBearers_xer_ = { {"maxNumberOfSpeechBearers>\n", "maxNumberOfSpeechBearers>\n"}, {26, 26}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallControlCapabilities_maxNumberOfSpeechBearers_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallControlCapabilities_maxNumberOfSpeechBearers_descr_ = { "@MobileL3_CC_Types.CallControlCapabilities.maxNumberOfSpeechBearers", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &CallControlCapabilities_maxNumberOfSpeechBearers_xer_, &BITSTRING_json_, &CallControlCapabilities_maxNumberOfSpeechBearers_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallControlCapabilities_maxNumberOfSpeechBearers_default_coding("RAW");
const XERdescriptor_t       CallControlCapabilities_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 CallControlCapabilities_spare2_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallControlCapabilities_spare2_descr_ = { "@MobileL3_CC_Types.CallControlCapabilities.spare2", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &CallControlCapabilities_spare2_xer_, &BITSTRING_json_, &CallControlCapabilities_spare2_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallControlCapabilities_spare2_default_coding("RAW");
const TTCN_RAWdescriptor_t CallControlCapabilities_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for CallControlCapabilities
const TTCN_Typedescriptor_t CallControlCapabilities_descr_ = { "@MobileL3_CC_Types.CallControlCapabilities", NULL, &CallControlCapabilities_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallControlCapabilities_default_coding("RAW");
const XERdescriptor_t       CallState__V_callStateValue_xer_ = { {"callStateValue>\n", "callStateValue>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallState__V_callStateValue_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallState__V_callStateValue_descr_ = { "@MobileL3_CC_Types.CallState_V.callStateValue", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &CallState__V_callStateValue_xer_, &BITSTRING_json_, &CallState__V_callStateValue_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallState__V_callStateValue_default_coding("RAW");
const XERdescriptor_t       CallState__V_codingStd_xer_ = { {"codingStd>\n", "codingStd>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallState__V_codingStd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallState__V_codingStd_descr_ = { "@MobileL3_CC_Types.CallState_V.codingStd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &CallState__V_codingStd_xer_, &BITSTRING_json_, &CallState__V_codingStd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallState__V_codingStd_default_coding("RAW");
const TTCN_RAWdescriptor_t CallState__V_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for CallState__V
const TTCN_Typedescriptor_t CallState__V_descr_ = { "@MobileL3_CC_Types.CallState_V", NULL, &CallState__V_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallState__V_default_coding("RAW");
const XERdescriptor_t       CallState__TV_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int CallState__TV_elementIdentifier_oer_ext_arr_[0] = {};
const int CallState__TV_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t CallState__TV_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, CallState__TV_elementIdentifier_oer_ext_arr_, 0, CallState__TV_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t CallState__TV_elementIdentifier_descr_ = { "@MobileL3_CC_Types.CallState_TV.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &CallState__TV_elementIdentifier_xer_, &OCTETSTRING_json_, &CallState__TV_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallState__TV_elementIdentifier_default_coding("RAW");
const XERdescriptor_t       CallState__TV_callStateValue_xer_ = { {"callStateValue>\n", "callStateValue>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallState__TV_callStateValue_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallState__TV_callStateValue_descr_ = { "@MobileL3_CC_Types.CallState_TV.callStateValue", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &CallState__TV_callStateValue_xer_, &BITSTRING_json_, &CallState__TV_callStateValue_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallState__TV_callStateValue_default_coding("RAW");
const XERdescriptor_t       CallState__TV_codingStd_xer_ = { {"codingStd>\n", "codingStd>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallState__TV_codingStd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallState__TV_codingStd_descr_ = { "@MobileL3_CC_Types.CallState_TV.codingStd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &CallState__TV_codingStd_xer_, &BITSTRING_json_, &CallState__TV_codingStd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallState__TV_codingStd_default_coding("RAW");
const TTCN_RAWdescriptor_t CallState__TV_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for CallState__TV
const TTCN_Typedescriptor_t CallState__TV_descr_ = { "@MobileL3_CC_Types.CallState_TV", NULL, &CallState__TV_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallState__TV_default_coding("RAW");
const XERdescriptor_t       CalledPartyBCD__Number_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int CalledPartyBCD__Number_elementIdentifier_oer_ext_arr_[0] = {};
const int CalledPartyBCD__Number_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t CalledPartyBCD__Number_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, CalledPartyBCD__Number_elementIdentifier_oer_ext_arr_, 0, CalledPartyBCD__Number_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t CalledPartyBCD__Number_elementIdentifier_descr_ = { "@MobileL3_CC_Types.CalledPartyBCD_Number.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &CalledPartyBCD__Number_elementIdentifier_xer_, &OCTETSTRING_json_, &CalledPartyBCD__Number_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CalledPartyBCD__Number_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t CalledPartyBCD__Number_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       CalledPartyBCD__Number_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CalledPartyBCD__Number_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CalledPartyBCD__Number_lengthIndicator_descr_ = { "@MobileL3_CC_Types.CalledPartyBCD_Number.lengthIndicator", &INTEGER_ber_, &CalledPartyBCD__Number_lengthIndicator_raw_, &INTEGER_text_, &CalledPartyBCD__Number_lengthIndicator_xer_, &INTEGER_json_, &CalledPartyBCD__Number_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CalledPartyBCD__Number_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       CalledPartyBCD__Number_numberingPlanIdentification_xer_ = { {"numberingPlanIdentification>\n", "numberingPlanIdentification>\n"}, {29, 29}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CalledPartyBCD__Number_numberingPlanIdentification_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CalledPartyBCD__Number_numberingPlanIdentification_descr_ = { "@MobileL3_CC_Types.CalledPartyBCD_Number.numberingPlanIdentification", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &CalledPartyBCD__Number_numberingPlanIdentification_xer_, &BITSTRING_json_, &CalledPartyBCD__Number_numberingPlanIdentification_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CalledPartyBCD__Number_numberingPlanIdentification_default_coding("RAW");
const XERdescriptor_t       CalledPartyBCD__Number_typeOfNumber_xer_ = { {"typeOfNumber>\n", "typeOfNumber>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CalledPartyBCD__Number_typeOfNumber_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CalledPartyBCD__Number_typeOfNumber_descr_ = { "@MobileL3_CC_Types.CalledPartyBCD_Number.typeOfNumber", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &CalledPartyBCD__Number_typeOfNumber_xer_, &BITSTRING_json_, &CalledPartyBCD__Number_typeOfNumber_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CalledPartyBCD__Number_typeOfNumber_default_coding("RAW");
const XERdescriptor_t       CalledPartyBCD__Number_ext1_xer_ = { {"ext1>\n", "ext1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CalledPartyBCD__Number_ext1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CalledPartyBCD__Number_ext1_descr_ = { "@MobileL3_CC_Types.CalledPartyBCD_Number.ext1", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &CalledPartyBCD__Number_ext1_xer_, &BITSTRING_json_, &CalledPartyBCD__Number_ext1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CalledPartyBCD__Number_ext1_default_coding("RAW");
const TTCN_RAWdescriptor_t CalledPartyBCD__Number_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for CalledPartyBCD__Number
const TTCN_Typedescriptor_t CalledPartyBCD__Number_descr_ = { "@MobileL3_CC_Types.CalledPartyBCD_Number", NULL, &CalledPartyBCD__Number_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t CalledPartyBCD__Number_digits_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,8,0,0,8,8,pp_0,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       CalledPartyBCD__Number_digits_xer_ = { {"digits>\n", "digits>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t CalledPartyBCD__Number_digits_descr_ = { "@MobileL3_CC_Types.CalledPartyBCD_Number.digits", NULL, &CalledPartyBCD__Number_digits_raw_, NULL, &CalledPartyBCD__Number_digits_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CalledPartyBCD__Number_digits_default_coding("RAW");
UNIVERSAL_CHARSTRING CalledPartyBCD__Number_default_coding("RAW");
const XERdescriptor_t       CalledPartySubAddress_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int CalledPartySubAddress_elementIdentifier_oer_ext_arr_[0] = {};
const int CalledPartySubAddress_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t CalledPartySubAddress_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, CalledPartySubAddress_elementIdentifier_oer_ext_arr_, 0, CalledPartySubAddress_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t CalledPartySubAddress_elementIdentifier_descr_ = { "@MobileL3_CC_Types.CalledPartySubAddress.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &CalledPartySubAddress_elementIdentifier_xer_, &OCTETSTRING_json_, &CalledPartySubAddress_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CalledPartySubAddress_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t CalledPartySubAddress_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       CalledPartySubAddress_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CalledPartySubAddress_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CalledPartySubAddress_lengthIndicator_descr_ = { "@MobileL3_CC_Types.CalledPartySubAddress.lengthIndicator", &INTEGER_ber_, &CalledPartySubAddress_lengthIndicator_raw_, &INTEGER_text_, &CalledPartySubAddress_lengthIndicator_xer_, &INTEGER_json_, &CalledPartySubAddress_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CalledPartySubAddress_lengthIndicator_default_coding("RAW");
const TTCN_RAWdescriptor_t CalledPartySubAddress_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for CalledPartySubAddress
const TTCN_Typedescriptor_t CalledPartySubAddress_descr_ = { "@MobileL3_CC_Types.CalledPartySubAddress", NULL, &CalledPartySubAddress_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       CalledPartySubAddress_spare1__3_xer_ = { {"spare1_3>\n", "spare1_3>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CalledPartySubAddress_spare1__3_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CalledPartySubAddress_spare1__3_descr_ = { "@MobileL3_CC_Types.CalledPartySubAddress.spare1_3", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &CalledPartySubAddress_spare1__3_xer_, &BITSTRING_json_, &CalledPartySubAddress_spare1__3_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CalledPartySubAddress_spare1__3_default_coding("RAW");
const XERdescriptor_t       CalledPartySubAddress_odd__evenIndicator_xer_ = { {"odd_evenIndicator>\n", "odd_evenIndicator>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CalledPartySubAddress_odd__evenIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CalledPartySubAddress_odd__evenIndicator_descr_ = { "@MobileL3_CC_Types.CalledPartySubAddress.odd_evenIndicator", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &CalledPartySubAddress_odd__evenIndicator_xer_, &BITSTRING_json_, &CalledPartySubAddress_odd__evenIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CalledPartySubAddress_odd__evenIndicator_default_coding("RAW");
const XERdescriptor_t       CalledPartySubAddress_typeOfSubAddress_xer_ = { {"typeOfSubAddress>\n", "typeOfSubAddress>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CalledPartySubAddress_typeOfSubAddress_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CalledPartySubAddress_typeOfSubAddress_descr_ = { "@MobileL3_CC_Types.CalledPartySubAddress.typeOfSubAddress", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &CalledPartySubAddress_typeOfSubAddress_xer_, &BITSTRING_json_, &CalledPartySubAddress_typeOfSubAddress_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CalledPartySubAddress_typeOfSubAddress_default_coding("RAW");
const XERdescriptor_t       CalledPartySubAddress_ext1_xer_ = { {"ext1>\n", "ext1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CalledPartySubAddress_ext1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CalledPartySubAddress_ext1_descr_ = { "@MobileL3_CC_Types.CalledPartySubAddress.ext1", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &CalledPartySubAddress_ext1_xer_, &BITSTRING_json_, &CalledPartySubAddress_ext1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CalledPartySubAddress_ext1_default_coding("RAW");
const XERdescriptor_t       CalledPartySubAddress_subAddressInformation_xer_ = { {"subAddressInformation>\n", "subAddressInformation>\n"}, {23, 23}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int CalledPartySubAddress_subAddressInformation_oer_ext_arr_[0] = {};
const int CalledPartySubAddress_subAddressInformation_oer_p_[0] = {};
const TTCN_OERdescriptor_t CalledPartySubAddress_subAddressInformation_oer_ = { -1, TRUE, -1, FALSE, 0, 0, CalledPartySubAddress_subAddressInformation_oer_ext_arr_, 0, CalledPartySubAddress_subAddressInformation_oer_p_};
const TTCN_Typedescriptor_t CalledPartySubAddress_subAddressInformation_descr_ = { "@MobileL3_CC_Types.CalledPartySubAddress.subAddressInformation", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &CalledPartySubAddress_subAddressInformation_xer_, &OCTETSTRING_json_, &CalledPartySubAddress_subAddressInformation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CalledPartySubAddress_subAddressInformation_default_coding("RAW");
UNIVERSAL_CHARSTRING CalledPartySubAddress_default_coding("RAW");
const XERdescriptor_t       CallingOrCalled__Number__oct3_numberingPlanIdentification_xer_ = { {"numberingPlanIdentification>\n", "numberingPlanIdentification>\n"}, {29, 29}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallingOrCalled__Number__oct3_numberingPlanIdentification_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallingOrCalled__Number__oct3_numberingPlanIdentification_descr_ = { "@MobileL3_CC_Types.CallingOrCalled_Number_oct3.numberingPlanIdentification", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &CallingOrCalled__Number__oct3_numberingPlanIdentification_xer_, &BITSTRING_json_, &CallingOrCalled__Number__oct3_numberingPlanIdentification_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingOrCalled__Number__oct3_numberingPlanIdentification_default_coding("RAW");
const XERdescriptor_t       CallingOrCalled__Number__oct3_typeOfNumber_xer_ = { {"typeOfNumber>\n", "typeOfNumber>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallingOrCalled__Number__oct3_typeOfNumber_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallingOrCalled__Number__oct3_typeOfNumber_descr_ = { "@MobileL3_CC_Types.CallingOrCalled_Number_oct3.typeOfNumber", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &CallingOrCalled__Number__oct3_typeOfNumber_xer_, &BITSTRING_json_, &CallingOrCalled__Number__oct3_typeOfNumber_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingOrCalled__Number__oct3_typeOfNumber_default_coding("RAW");
const XERdescriptor_t       CallingOrCalled__Number__oct3_ext1_xer_ = { {"ext1>\n", "ext1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallingOrCalled__Number__oct3_ext1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallingOrCalled__Number__oct3_ext1_descr_ = { "@MobileL3_CC_Types.CallingOrCalled_Number_oct3.ext1", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &CallingOrCalled__Number__oct3_ext1_xer_, &BITSTRING_json_, &CallingOrCalled__Number__oct3_ext1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingOrCalled__Number__oct3_ext1_default_coding("RAW");
const TTCN_RAWdescriptor_t CallingOrCalled__Number__oct3_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_YES,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for CallingOrCalled__Number__oct3
const TTCN_Typedescriptor_t CallingOrCalled__Number__oct3_descr_ = { "@MobileL3_CC_Types.CallingOrCalled_Number_oct3", NULL, &CallingOrCalled__Number__oct3_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       CallingOrCalled__Number__oct3_screeningIndicator_xer_ = { {"screeningIndicator>\n", "screeningIndicator>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallingOrCalled__Number__oct3_screeningIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallingOrCalled__Number__oct3_screeningIndicator_descr_ = { "@MobileL3_CC_Types.CallingOrCalled_Number_oct3.screeningIndicator", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &CallingOrCalled__Number__oct3_screeningIndicator_xer_, &BITSTRING_json_, &CallingOrCalled__Number__oct3_screeningIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingOrCalled__Number__oct3_screeningIndicator_default_coding("RAW");
const XERdescriptor_t       CallingOrCalled__Number__oct3_spare1__3_xer_ = { {"spare1_3>\n", "spare1_3>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallingOrCalled__Number__oct3_spare1__3_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallingOrCalled__Number__oct3_spare1__3_descr_ = { "@MobileL3_CC_Types.CallingOrCalled_Number_oct3.spare1_3", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &CallingOrCalled__Number__oct3_spare1__3_xer_, &BITSTRING_json_, &CallingOrCalled__Number__oct3_spare1__3_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingOrCalled__Number__oct3_spare1__3_default_coding("RAW");
const XERdescriptor_t       CallingOrCalled__Number__oct3_presentationIndicator_xer_ = { {"presentationIndicator>\n", "presentationIndicator>\n"}, {23, 23}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallingOrCalled__Number__oct3_presentationIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallingOrCalled__Number__oct3_presentationIndicator_descr_ = { "@MobileL3_CC_Types.CallingOrCalled_Number_oct3.presentationIndicator", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &CallingOrCalled__Number__oct3_presentationIndicator_xer_, &BITSTRING_json_, &CallingOrCalled__Number__oct3_presentationIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingOrCalled__Number__oct3_presentationIndicator_default_coding("RAW");
const XERdescriptor_t       CallingOrCalled__Number__oct3_ext2_xer_ = { {"ext2>\n", "ext2>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallingOrCalled__Number__oct3_ext2_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallingOrCalled__Number__oct3_ext2_descr_ = { "@MobileL3_CC_Types.CallingOrCalled_Number_oct3.ext2", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &CallingOrCalled__Number__oct3_ext2_xer_, &BITSTRING_json_, &CallingOrCalled__Number__oct3_ext2_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingOrCalled__Number__oct3_ext2_default_coding("RAW");
UNIVERSAL_CHARSTRING CallingOrCalled__Number__oct3_default_coding("RAW");
const XERdescriptor_t       CallingPartyBCD__Number_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int CallingPartyBCD__Number_elementIdentifier_oer_ext_arr_[0] = {};
const int CallingPartyBCD__Number_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t CallingPartyBCD__Number_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, CallingPartyBCD__Number_elementIdentifier_oer_ext_arr_, 0, CallingPartyBCD__Number_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t CallingPartyBCD__Number_elementIdentifier_descr_ = { "@MobileL3_CC_Types.CallingPartyBCD_Number.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &CallingPartyBCD__Number_elementIdentifier_xer_, &OCTETSTRING_json_, &CallingPartyBCD__Number_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingPartyBCD__Number_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t CallingPartyBCD__Number_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       CallingPartyBCD__Number_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallingPartyBCD__Number_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallingPartyBCD__Number_lengthIndicator_descr_ = { "@MobileL3_CC_Types.CallingPartyBCD_Number.lengthIndicator", &INTEGER_ber_, &CallingPartyBCD__Number_lengthIndicator_raw_, &INTEGER_text_, &CallingPartyBCD__Number_lengthIndicator_xer_, &INTEGER_json_, &CallingPartyBCD__Number_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingPartyBCD__Number_lengthIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING CallingPartyBCD__Number_oct3_default_coding("RAW");
const TTCN_RAWdescriptor_t CallingPartyBCD__Number_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for CallingPartyBCD__Number
const TTCN_Typedescriptor_t CallingPartyBCD__Number_descr_ = { "@MobileL3_CC_Types.CallingPartyBCD_Number", NULL, &CallingPartyBCD__Number_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t CallingPartyBCD__Number_digits_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,8,0,0,8,8,pp_0,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       CallingPartyBCD__Number_digits_xer_ = { {"digits>\n", "digits>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t CallingPartyBCD__Number_digits_descr_ = { "@MobileL3_CC_Types.CallingPartyBCD_Number.digits", NULL, &CallingPartyBCD__Number_digits_raw_, NULL, &CallingPartyBCD__Number_digits_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingPartyBCD__Number_digits_default_coding("RAW");
UNIVERSAL_CHARSTRING CallingPartyBCD__Number_default_coding("RAW");
const XERdescriptor_t       CallingPartySubAddress_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int CallingPartySubAddress_elementIdentifier_oer_ext_arr_[0] = {};
const int CallingPartySubAddress_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t CallingPartySubAddress_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, CallingPartySubAddress_elementIdentifier_oer_ext_arr_, 0, CallingPartySubAddress_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t CallingPartySubAddress_elementIdentifier_descr_ = { "@MobileL3_CC_Types.CallingPartySubAddress.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &CallingPartySubAddress_elementIdentifier_xer_, &OCTETSTRING_json_, &CallingPartySubAddress_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingPartySubAddress_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t CallingPartySubAddress_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       CallingPartySubAddress_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallingPartySubAddress_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallingPartySubAddress_lengthIndicator_descr_ = { "@MobileL3_CC_Types.CallingPartySubAddress.lengthIndicator", &INTEGER_ber_, &CallingPartySubAddress_lengthIndicator_raw_, &INTEGER_text_, &CallingPartySubAddress_lengthIndicator_xer_, &INTEGER_json_, &CallingPartySubAddress_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingPartySubAddress_lengthIndicator_default_coding("RAW");
const TTCN_RAWdescriptor_t CallingPartySubAddress_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for CallingPartySubAddress
const TTCN_Typedescriptor_t CallingPartySubAddress_descr_ = { "@MobileL3_CC_Types.CallingPartySubAddress", NULL, &CallingPartySubAddress_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       CallingPartySubAddress_spare1__3_xer_ = { {"spare1_3>\n", "spare1_3>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallingPartySubAddress_spare1__3_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallingPartySubAddress_spare1__3_descr_ = { "@MobileL3_CC_Types.CallingPartySubAddress.spare1_3", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &CallingPartySubAddress_spare1__3_xer_, &BITSTRING_json_, &CallingPartySubAddress_spare1__3_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingPartySubAddress_spare1__3_default_coding("RAW");
const XERdescriptor_t       CallingPartySubAddress_odd__evenIndicator_xer_ = { {"odd_evenIndicator>\n", "odd_evenIndicator>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallingPartySubAddress_odd__evenIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallingPartySubAddress_odd__evenIndicator_descr_ = { "@MobileL3_CC_Types.CallingPartySubAddress.odd_evenIndicator", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &CallingPartySubAddress_odd__evenIndicator_xer_, &BITSTRING_json_, &CallingPartySubAddress_odd__evenIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingPartySubAddress_odd__evenIndicator_default_coding("RAW");
const XERdescriptor_t       CallingPartySubAddress_typeOfSubAddress_xer_ = { {"typeOfSubAddress>\n", "typeOfSubAddress>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallingPartySubAddress_typeOfSubAddress_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallingPartySubAddress_typeOfSubAddress_descr_ = { "@MobileL3_CC_Types.CallingPartySubAddress.typeOfSubAddress", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &CallingPartySubAddress_typeOfSubAddress_xer_, &BITSTRING_json_, &CallingPartySubAddress_typeOfSubAddress_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingPartySubAddress_typeOfSubAddress_default_coding("RAW");
const XERdescriptor_t       CallingPartySubAddress_ext1_xer_ = { {"ext1>\n", "ext1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CallingPartySubAddress_ext1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CallingPartySubAddress_ext1_descr_ = { "@MobileL3_CC_Types.CallingPartySubAddress.ext1", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &CallingPartySubAddress_ext1_xer_, &BITSTRING_json_, &CallingPartySubAddress_ext1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingPartySubAddress_ext1_default_coding("RAW");
const XERdescriptor_t       CallingPartySubAddress_subAddressInformation_xer_ = { {"subAddressInformation>\n", "subAddressInformation>\n"}, {23, 23}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int CallingPartySubAddress_subAddressInformation_oer_ext_arr_[0] = {};
const int CallingPartySubAddress_subAddressInformation_oer_p_[0] = {};
const TTCN_OERdescriptor_t CallingPartySubAddress_subAddressInformation_oer_ = { -1, TRUE, -1, FALSE, 0, 0, CallingPartySubAddress_subAddressInformation_oer_ext_arr_, 0, CallingPartySubAddress_subAddressInformation_oer_p_};
const TTCN_Typedescriptor_t CallingPartySubAddress_subAddressInformation_descr_ = { "@MobileL3_CC_Types.CallingPartySubAddress.subAddressInformation", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &CallingPartySubAddress_subAddressInformation_xer_, &OCTETSTRING_json_, &CallingPartySubAddress_subAddressInformation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CallingPartySubAddress_subAddressInformation_default_coding("RAW");
UNIVERSAL_CHARSTRING CallingPartySubAddress_default_coding("RAW");
const XERdescriptor_t       CLIR_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int CLIR_elementIdentifier_oer_ext_arr_[0] = {};
const int CLIR_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t CLIR_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, CLIR_elementIdentifier_oer_ext_arr_, 0, CLIR_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t CLIR_elementIdentifier_descr_ = { "@MobileL3_CC_Types.CLIR.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &CLIR_elementIdentifier_xer_, &OCTETSTRING_json_, &CLIR_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CLIR_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t CLIR_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for CLIR
const TTCN_Typedescriptor_t CLIR_descr_ = { "@MobileL3_CC_Types.CLIR", NULL, &CLIR_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CLIR_default_coding("RAW");
const XERdescriptor_t       CongestionLevel_congestionLevel_xer_ = { {"congestionLevel>\n", "congestionLevel>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CongestionLevel_congestionLevel_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CongestionLevel_congestionLevel_descr_ = { "@MobileL3_CC_Types.CongestionLevel.congestionLevel", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &CongestionLevel_congestionLevel_xer_, &BITSTRING_json_, &CongestionLevel_congestionLevel_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CongestionLevel_congestionLevel_default_coding("RAW");
const XERdescriptor_t       CongestionLevel_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CongestionLevel_elementIdentifier_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CongestionLevel_elementIdentifier_descr_ = { "@MobileL3_CC_Types.CongestionLevel.elementIdentifier", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &CongestionLevel_elementIdentifier_xer_, &BITSTRING_json_, &CongestionLevel_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CongestionLevel_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t CongestionLevel_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for CongestionLevel
const TTCN_Typedescriptor_t CongestionLevel_descr_ = { "@MobileL3_CC_Types.CongestionLevel", NULL, &CongestionLevel_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CongestionLevel_default_coding("RAW");
const XERdescriptor_t       CongestionLevelV_xer_ = { {"CongestionLevelV>\n", "CongestionLevelV>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CongestionLevelV_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CongestionLevelV_descr_ = { "@MobileL3_CC_Types.CongestionLevelV", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &CongestionLevelV_xer_, &BITSTRING_json_, &CongestionLevelV_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CongestionLevelV_default_coding("RAW");
const XERdescriptor_t       ConnectedNumber_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ConnectedNumber_elementIdentifier_oer_ext_arr_[0] = {};
const int ConnectedNumber_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t ConnectedNumber_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ConnectedNumber_elementIdentifier_oer_ext_arr_, 0, ConnectedNumber_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t ConnectedNumber_elementIdentifier_descr_ = { "@MobileL3_CC_Types.ConnectedNumber.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &ConnectedNumber_elementIdentifier_xer_, &OCTETSTRING_json_, &ConnectedNumber_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ConnectedNumber_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t ConnectedNumber_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       ConnectedNumber_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ConnectedNumber_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ConnectedNumber_lengthIndicator_descr_ = { "@MobileL3_CC_Types.ConnectedNumber.lengthIndicator", &INTEGER_ber_, &ConnectedNumber_lengthIndicator_raw_, &INTEGER_text_, &ConnectedNumber_lengthIndicator_xer_, &INTEGER_json_, &ConnectedNumber_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ConnectedNumber_lengthIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING ConnectedNumber_oct3_default_coding("RAW");
const TTCN_RAWdescriptor_t ConnectedNumber_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for ConnectedNumber
const TTCN_Typedescriptor_t ConnectedNumber_descr_ = { "@MobileL3_CC_Types.ConnectedNumber", NULL, &ConnectedNumber_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t ConnectedNumber_digits_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,8,0,0,8,8,pp_0,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       ConnectedNumber_digits_xer_ = { {"digits>\n", "digits>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t ConnectedNumber_digits_descr_ = { "@MobileL3_CC_Types.ConnectedNumber.digits", NULL, &ConnectedNumber_digits_raw_, NULL, &ConnectedNumber_digits_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ConnectedNumber_digits_default_coding("RAW");
UNIVERSAL_CHARSTRING ConnectedNumber_default_coding("RAW");
const XERdescriptor_t       ConnectedSubAddress_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ConnectedSubAddress_elementIdentifier_oer_ext_arr_[0] = {};
const int ConnectedSubAddress_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t ConnectedSubAddress_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ConnectedSubAddress_elementIdentifier_oer_ext_arr_, 0, ConnectedSubAddress_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t ConnectedSubAddress_elementIdentifier_descr_ = { "@MobileL3_CC_Types.ConnectedSubAddress.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &ConnectedSubAddress_elementIdentifier_xer_, &OCTETSTRING_json_, &ConnectedSubAddress_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ConnectedSubAddress_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t ConnectedSubAddress_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       ConnectedSubAddress_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ConnectedSubAddress_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ConnectedSubAddress_lengthIndicator_descr_ = { "@MobileL3_CC_Types.ConnectedSubAddress.lengthIndicator", &INTEGER_ber_, &ConnectedSubAddress_lengthIndicator_raw_, &INTEGER_text_, &ConnectedSubAddress_lengthIndicator_xer_, &INTEGER_json_, &ConnectedSubAddress_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ConnectedSubAddress_lengthIndicator_default_coding("RAW");
const TTCN_RAWdescriptor_t ConnectedSubAddress_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for ConnectedSubAddress
const TTCN_Typedescriptor_t ConnectedSubAddress_descr_ = { "@MobileL3_CC_Types.ConnectedSubAddress", NULL, &ConnectedSubAddress_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ConnectedSubAddress_spare1__3_xer_ = { {"spare1_3>\n", "spare1_3>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ConnectedSubAddress_spare1__3_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ConnectedSubAddress_spare1__3_descr_ = { "@MobileL3_CC_Types.ConnectedSubAddress.spare1_3", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &ConnectedSubAddress_spare1__3_xer_, &BITSTRING_json_, &ConnectedSubAddress_spare1__3_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ConnectedSubAddress_spare1__3_default_coding("RAW");
const XERdescriptor_t       ConnectedSubAddress_odd__evenIndicator_xer_ = { {"odd_evenIndicator>\n", "odd_evenIndicator>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ConnectedSubAddress_odd__evenIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ConnectedSubAddress_odd__evenIndicator_descr_ = { "@MobileL3_CC_Types.ConnectedSubAddress.odd_evenIndicator", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &ConnectedSubAddress_odd__evenIndicator_xer_, &BITSTRING_json_, &ConnectedSubAddress_odd__evenIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ConnectedSubAddress_odd__evenIndicator_default_coding("RAW");
const XERdescriptor_t       ConnectedSubAddress_typeOfSubAddress_xer_ = { {"typeOfSubAddress>\n", "typeOfSubAddress>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ConnectedSubAddress_typeOfSubAddress_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ConnectedSubAddress_typeOfSubAddress_descr_ = { "@MobileL3_CC_Types.ConnectedSubAddress.typeOfSubAddress", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &ConnectedSubAddress_typeOfSubAddress_xer_, &BITSTRING_json_, &ConnectedSubAddress_typeOfSubAddress_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ConnectedSubAddress_typeOfSubAddress_default_coding("RAW");
const XERdescriptor_t       ConnectedSubAddress_ext1_xer_ = { {"ext1>\n", "ext1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ConnectedSubAddress_ext1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ConnectedSubAddress_ext1_descr_ = { "@MobileL3_CC_Types.ConnectedSubAddress.ext1", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &ConnectedSubAddress_ext1_xer_, &BITSTRING_json_, &ConnectedSubAddress_ext1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ConnectedSubAddress_ext1_default_coding("RAW");
const XERdescriptor_t       ConnectedSubAddress_subAddressInformation_xer_ = { {"subAddressInformation>\n", "subAddressInformation>\n"}, {23, 23}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ConnectedSubAddress_subAddressInformation_oer_ext_arr_[0] = {};
const int ConnectedSubAddress_subAddressInformation_oer_p_[0] = {};
const TTCN_OERdescriptor_t ConnectedSubAddress_subAddressInformation_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ConnectedSubAddress_subAddressInformation_oer_ext_arr_, 0, ConnectedSubAddress_subAddressInformation_oer_p_};
const TTCN_Typedescriptor_t ConnectedSubAddress_subAddressInformation_descr_ = { "@MobileL3_CC_Types.ConnectedSubAddress.subAddressInformation", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ConnectedSubAddress_subAddressInformation_xer_, &OCTETSTRING_json_, &ConnectedSubAddress_subAddressInformation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ConnectedSubAddress_subAddressInformation_default_coding("RAW");
UNIVERSAL_CHARSTRING ConnectedSubAddress_default_coding("RAW");
const XERdescriptor_t       HLC__octet3_presentationMethod_xer_ = { {"presentationMethod>\n", "presentationMethod>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t HLC__octet3_presentationMethod_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t HLC__octet3_presentationMethod_descr_ = { "@MobileL3_CC_Types.HLC_octet3.presentationMethod", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &HLC__octet3_presentationMethod_xer_, &BITSTRING_json_, &HLC__octet3_presentationMethod_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING HLC__octet3_presentationMethod_default_coding("RAW");
const XERdescriptor_t       HLC__octet3_interpretation_xer_ = { {"interpretation>\n", "interpretation>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t HLC__octet3_interpretation_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t HLC__octet3_interpretation_descr_ = { "@MobileL3_CC_Types.HLC_octet3.interpretation", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &HLC__octet3_interpretation_xer_, &BITSTRING_json_, &HLC__octet3_interpretation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING HLC__octet3_interpretation_default_coding("RAW");
const XERdescriptor_t       HLC__octet3_codingStandard_xer_ = { {"codingStandard>\n", "codingStandard>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t HLC__octet3_codingStandard_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t HLC__octet3_codingStandard_descr_ = { "@MobileL3_CC_Types.HLC_octet3.codingStandard", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &HLC__octet3_codingStandard_xer_, &BITSTRING_json_, &HLC__octet3_codingStandard_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING HLC__octet3_codingStandard_default_coding("RAW");
const XERdescriptor_t       HLC__octet3_extension__octet__3_xer_ = { {"extension_octet_3>\n", "extension_octet_3>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t HLC__octet3_extension__octet__3_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t HLC__octet3_extension__octet__3_descr_ = { "@MobileL3_CC_Types.HLC_octet3.extension_octet_3", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &HLC__octet3_extension__octet__3_xer_, &BITSTRING_json_, &HLC__octet3_extension__octet__3_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING HLC__octet3_extension__octet__3_default_coding("RAW");
const TTCN_RAWdescriptor_t HLC__octet3_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_YES,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for HLC__octet3
const TTCN_Typedescriptor_t HLC__octet3_descr_ = { "@MobileL3_CC_Types.HLC_octet3", NULL, &HLC__octet3_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING HLC__octet3_default_coding("RAW");
const XERdescriptor_t       HLC__octet4_highLayerCharId_xer_ = { {"highLayerCharId>\n", "highLayerCharId>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t HLC__octet4_highLayerCharId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t HLC__octet4_highLayerCharId_descr_ = { "@MobileL3_CC_Types.HLC_octet4.highLayerCharId", &BITSTRING_ber_, &General__Types::BIT7_raw_, NULL, &HLC__octet4_highLayerCharId_xer_, &BITSTRING_json_, &HLC__octet4_highLayerCharId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING HLC__octet4_highLayerCharId_default_coding("RAW");
const XERdescriptor_t       HLC__octet4_extension__octet__4_xer_ = { {"extension_octet_4>\n", "extension_octet_4>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t HLC__octet4_extension__octet__4_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t HLC__octet4_extension__octet__4_descr_ = { "@MobileL3_CC_Types.HLC_octet4.extension_octet_4", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &HLC__octet4_extension__octet__4_xer_, &BITSTRING_json_, &HLC__octet4_extension__octet__4_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING HLC__octet4_extension__octet__4_default_coding("RAW");
const TTCN_RAWdescriptor_t HLC__octet4_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_YES,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for HLC__octet4
const TTCN_Typedescriptor_t HLC__octet4_descr_ = { "@MobileL3_CC_Types.HLC_octet4", NULL, &HLC__octet4_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       HLC__octet4_extendedHighLayerCharId_xer_ = { {"extendedHighLayerCharId>\n", "extendedHighLayerCharId>\n"}, {25, 25}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t HLC__octet4_extendedHighLayerCharId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t HLC__octet4_extendedHighLayerCharId_descr_ = { "@MobileL3_CC_Types.HLC_octet4.extendedHighLayerCharId", &BITSTRING_ber_, &General__Types::BIT7_raw_, NULL, &HLC__octet4_extendedHighLayerCharId_xer_, &BITSTRING_json_, &HLC__octet4_extendedHighLayerCharId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING HLC__octet4_extendedHighLayerCharId_default_coding("RAW");
const XERdescriptor_t       HLC__octet4_extension__octet__4a_xer_ = { {"extension_octet_4a>\n", "extension_octet_4a>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t HLC__octet4_extension__octet__4a_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t HLC__octet4_extension__octet__4a_descr_ = { "@MobileL3_CC_Types.HLC_octet4.extension_octet_4a", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &HLC__octet4_extension__octet__4a_xer_, &BITSTRING_json_, &HLC__octet4_extension__octet__4a_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING HLC__octet4_extension__octet__4a_default_coding("RAW");
UNIVERSAL_CHARSTRING HLC__octet4_default_coding("RAW");
const XERdescriptor_t       HighLayerCompatibility_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int HighLayerCompatibility_elementIdentifier_oer_ext_arr_[0] = {};
const int HighLayerCompatibility_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t HighLayerCompatibility_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, HighLayerCompatibility_elementIdentifier_oer_ext_arr_, 0, HighLayerCompatibility_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t HighLayerCompatibility_elementIdentifier_descr_ = { "@MobileL3_CC_Types.HighLayerCompatibility.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &HighLayerCompatibility_elementIdentifier_xer_, &OCTETSTRING_json_, &HighLayerCompatibility_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING HighLayerCompatibility_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t HighLayerCompatibility_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       HighLayerCompatibility_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t HighLayerCompatibility_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t HighLayerCompatibility_lengthIndicator_descr_ = { "@MobileL3_CC_Types.HighLayerCompatibility.lengthIndicator", &INTEGER_ber_, &HighLayerCompatibility_lengthIndicator_raw_, &INTEGER_text_, &HighLayerCompatibility_lengthIndicator_xer_, &INTEGER_json_, &HighLayerCompatibility_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING HighLayerCompatibility_lengthIndicator_default_coding("RAW");
const TTCN_RAWdescriptor_t HighLayerCompatibility_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for HighLayerCompatibility
const TTCN_Typedescriptor_t HighLayerCompatibility_descr_ = { "@MobileL3_CC_Types.HighLayerCompatibility", NULL, &HighLayerCompatibility_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING HighLayerCompatibility_octet3_default_coding("RAW");
UNIVERSAL_CHARSTRING HighLayerCompatibility_octet4_default_coding("RAW");
UNIVERSAL_CHARSTRING HighLayerCompatibility_default_coding("RAW");
const XERdescriptor_t       KeypadFacility_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int KeypadFacility_elementIdentifier_oer_ext_arr_[0] = {};
const int KeypadFacility_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t KeypadFacility_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, KeypadFacility_elementIdentifier_oer_ext_arr_, 0, KeypadFacility_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t KeypadFacility_elementIdentifier_descr_ = { "@MobileL3_CC_Types.KeypadFacility.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &KeypadFacility_elementIdentifier_xer_, &OCTETSTRING_json_, &KeypadFacility_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING KeypadFacility_elementIdentifier_default_coding("RAW");
const XERdescriptor_t       KeypadFacility_keypadInformation_xer_ = { {"keypadInformation>\n", "keypadInformation>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t KeypadFacility_keypadInformation_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t KeypadFacility_keypadInformation_descr_ = { "@MobileL3_CC_Types.KeypadFacility.keypadInformation", &BITSTRING_ber_, &General__Types::BIT7_raw_, NULL, &KeypadFacility_keypadInformation_xer_, &BITSTRING_json_, &KeypadFacility_keypadInformation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING KeypadFacility_keypadInformation_default_coding("RAW");
const XERdescriptor_t       KeypadFacility_spare__1_xer_ = { {"spare_1>\n", "spare_1>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t KeypadFacility_spare__1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t KeypadFacility_spare__1_descr_ = { "@MobileL3_CC_Types.KeypadFacility.spare_1", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &KeypadFacility_spare__1_xer_, &BITSTRING_json_, &KeypadFacility_spare__1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING KeypadFacility_spare__1_default_coding("RAW");
const TTCN_RAWdescriptor_t KeypadFacility_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for KeypadFacility
const TTCN_Typedescriptor_t KeypadFacility_descr_ = { "@MobileL3_CC_Types.KeypadFacility", NULL, &KeypadFacility_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING KeypadFacility_default_coding("RAW");
const XERdescriptor_t       LowLayerCompatibility_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int LowLayerCompatibility_elementIdentifier_oer_ext_arr_[0] = {};
const int LowLayerCompatibility_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t LowLayerCompatibility_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, LowLayerCompatibility_elementIdentifier_oer_ext_arr_, 0, LowLayerCompatibility_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t LowLayerCompatibility_elementIdentifier_descr_ = { "@MobileL3_CC_Types.LowLayerCompatibility.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &LowLayerCompatibility_elementIdentifier_xer_, &OCTETSTRING_json_, &LowLayerCompatibility_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING LowLayerCompatibility_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t LowLayerCompatibility_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       LowLayerCompatibility_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t LowLayerCompatibility_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t LowLayerCompatibility_lengthIndicator_descr_ = { "@MobileL3_CC_Types.LowLayerCompatibility.lengthIndicator", &INTEGER_ber_, &LowLayerCompatibility_lengthIndicator_raw_, &INTEGER_text_, &LowLayerCompatibility_lengthIndicator_xer_, &INTEGER_json_, &LowLayerCompatibility_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING LowLayerCompatibility_lengthIndicator_default_coding("RAW");
const TTCN_RAWdescriptor_t LowLayerCompatibility_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for LowLayerCompatibility
const TTCN_Typedescriptor_t LowLayerCompatibility_descr_ = { "@MobileL3_CC_Types.LowLayerCompatibility", NULL, &LowLayerCompatibility_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       LowLayerCompatibility_lowLayerCompatibilityContents_xer_ = { {"lowLayerCompatibilityContents>\n", "lowLayerCompatibilityContents>\n"}, {31, 31}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int LowLayerCompatibility_lowLayerCompatibilityContents_oer_ext_arr_[0] = {};
const int LowLayerCompatibility_lowLayerCompatibilityContents_oer_p_[0] = {};
const TTCN_OERdescriptor_t LowLayerCompatibility_lowLayerCompatibilityContents_oer_ = { -1, TRUE, -1, FALSE, 0, 0, LowLayerCompatibility_lowLayerCompatibilityContents_oer_ext_arr_, 0, LowLayerCompatibility_lowLayerCompatibilityContents_oer_p_};
const TTCN_Typedescriptor_t LowLayerCompatibility_lowLayerCompatibilityContents_descr_ = { "@MobileL3_CC_Types.LowLayerCompatibility.lowLayerCompatibilityContents", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &LowLayerCompatibility_lowLayerCompatibilityContents_xer_, &OCTETSTRING_json_, &LowLayerCompatibility_lowLayerCompatibilityContents_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING LowLayerCompatibility_lowLayerCompatibilityContents_default_coding("RAW");
UNIVERSAL_CHARSTRING LowLayerCompatibility_default_coding("RAW");
const XERdescriptor_t       NotificationIndicator_notificationDescription_xer_ = { {"notificationDescription>\n", "notificationDescription>\n"}, {25, 25}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int NotificationIndicator_notificationDescription_oer_ext_arr_[0] = {};
const int NotificationIndicator_notificationDescription_oer_p_[0] = {};
const TTCN_OERdescriptor_t NotificationIndicator_notificationDescription_oer_ = { -1, TRUE, 1, FALSE, 0, 0, NotificationIndicator_notificationDescription_oer_ext_arr_, 0, NotificationIndicator_notificationDescription_oer_p_};
const TTCN_Typedescriptor_t NotificationIndicator_notificationDescription_descr_ = { "@MobileL3_CC_Types.NotificationIndicator.notificationDescription", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &NotificationIndicator_notificationDescription_xer_, &OCTETSTRING_json_, &NotificationIndicator_notificationDescription_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING NotificationIndicator_notificationDescription_default_coding("RAW");
const TTCN_RAWdescriptor_t NotificationIndicator_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for NotificationIndicator
const TTCN_Typedescriptor_t NotificationIndicator_descr_ = { "@MobileL3_CC_Types.NotificationIndicator", NULL, &NotificationIndicator_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING NotificationIndicator_default_coding("RAW");
const TTCN_RAWdescriptor_t ProgressIndicator__LV_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       ProgressIndicator__LV_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ProgressIndicator__LV_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ProgressIndicator__LV_lengthIndicator_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_LV.lengthIndicator", &INTEGER_ber_, &ProgressIndicator__LV_lengthIndicator_raw_, &INTEGER_text_, &ProgressIndicator__LV_lengthIndicator_xer_, &INTEGER_json_, &ProgressIndicator__LV_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__LV_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       ProgressIndicator__LV_location_xer_ = { {"location>\n", "location>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ProgressIndicator__LV_location_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ProgressIndicator__LV_location_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_LV.location", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &ProgressIndicator__LV_location_xer_, &BITSTRING_json_, &ProgressIndicator__LV_location_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__LV_location_default_coding("RAW");
const XERdescriptor_t       ProgressIndicator__LV_spare1__1_xer_ = { {"spare1_1>\n", "spare1_1>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ProgressIndicator__LV_spare1__1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ProgressIndicator__LV_spare1__1_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_LV.spare1_1", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &ProgressIndicator__LV_spare1__1_xer_, &BITSTRING_json_, &ProgressIndicator__LV_spare1__1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__LV_spare1__1_default_coding("RAW");
const XERdescriptor_t       ProgressIndicator__LV_codingStandard_xer_ = { {"codingStandard>\n", "codingStandard>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ProgressIndicator__LV_codingStandard_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ProgressIndicator__LV_codingStandard_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_LV.codingStandard", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &ProgressIndicator__LV_codingStandard_xer_, &BITSTRING_json_, &ProgressIndicator__LV_codingStandard_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__LV_codingStandard_default_coding("RAW");
const XERdescriptor_t       ProgressIndicator__LV_ext1_xer_ = { {"ext1>\n", "ext1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ProgressIndicator__LV_ext1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ProgressIndicator__LV_ext1_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_LV.ext1", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &ProgressIndicator__LV_ext1_xer_, &BITSTRING_json_, &ProgressIndicator__LV_ext1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__LV_ext1_default_coding("RAW");
const XERdescriptor_t       ProgressIndicator__LV_progressDescription_xer_ = { {"progressDescription>\n", "progressDescription>\n"}, {21, 21}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ProgressIndicator__LV_progressDescription_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ProgressIndicator__LV_progressDescription_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_LV.progressDescription", &BITSTRING_ber_, &General__Types::BIT7_raw_, NULL, &ProgressIndicator__LV_progressDescription_xer_, &BITSTRING_json_, &ProgressIndicator__LV_progressDescription_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__LV_progressDescription_default_coding("RAW");
const XERdescriptor_t       ProgressIndicator__LV_ext2_xer_ = { {"ext2>\n", "ext2>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ProgressIndicator__LV_ext2_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ProgressIndicator__LV_ext2_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_LV.ext2", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &ProgressIndicator__LV_ext2_xer_, &BITSTRING_json_, &ProgressIndicator__LV_ext2_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__LV_ext2_default_coding("RAW");
const TTCN_RAWdescriptor_t ProgressIndicator__LV_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for ProgressIndicator__LV
const TTCN_Typedescriptor_t ProgressIndicator__LV_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_LV", NULL, &ProgressIndicator__LV_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__LV_default_coding("RAW");
const XERdescriptor_t       ProgressIndicator__TLV_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ProgressIndicator__TLV_elementIdentifier_oer_ext_arr_[0] = {};
const int ProgressIndicator__TLV_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t ProgressIndicator__TLV_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ProgressIndicator__TLV_elementIdentifier_oer_ext_arr_, 0, ProgressIndicator__TLV_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t ProgressIndicator__TLV_elementIdentifier_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_TLV.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &ProgressIndicator__TLV_elementIdentifier_xer_, &OCTETSTRING_json_, &ProgressIndicator__TLV_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__TLV_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t ProgressIndicator__TLV_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       ProgressIndicator__TLV_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ProgressIndicator__TLV_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ProgressIndicator__TLV_lengthIndicator_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_TLV.lengthIndicator", &INTEGER_ber_, &ProgressIndicator__TLV_lengthIndicator_raw_, &INTEGER_text_, &ProgressIndicator__TLV_lengthIndicator_xer_, &INTEGER_json_, &ProgressIndicator__TLV_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__TLV_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       ProgressIndicator__TLV_location_xer_ = { {"location>\n", "location>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ProgressIndicator__TLV_location_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ProgressIndicator__TLV_location_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_TLV.location", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &ProgressIndicator__TLV_location_xer_, &BITSTRING_json_, &ProgressIndicator__TLV_location_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__TLV_location_default_coding("RAW");
const XERdescriptor_t       ProgressIndicator__TLV_spare1__1_xer_ = { {"spare1_1>\n", "spare1_1>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ProgressIndicator__TLV_spare1__1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ProgressIndicator__TLV_spare1__1_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_TLV.spare1_1", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &ProgressIndicator__TLV_spare1__1_xer_, &BITSTRING_json_, &ProgressIndicator__TLV_spare1__1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__TLV_spare1__1_default_coding("RAW");
const XERdescriptor_t       ProgressIndicator__TLV_codingStandard_xer_ = { {"codingStandard>\n", "codingStandard>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ProgressIndicator__TLV_codingStandard_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ProgressIndicator__TLV_codingStandard_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_TLV.codingStandard", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &ProgressIndicator__TLV_codingStandard_xer_, &BITSTRING_json_, &ProgressIndicator__TLV_codingStandard_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__TLV_codingStandard_default_coding("RAW");
const XERdescriptor_t       ProgressIndicator__TLV_ext1_xer_ = { {"ext1>\n", "ext1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ProgressIndicator__TLV_ext1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ProgressIndicator__TLV_ext1_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_TLV.ext1", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &ProgressIndicator__TLV_ext1_xer_, &BITSTRING_json_, &ProgressIndicator__TLV_ext1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__TLV_ext1_default_coding("RAW");
const XERdescriptor_t       ProgressIndicator__TLV_progressDescription_xer_ = { {"progressDescription>\n", "progressDescription>\n"}, {21, 21}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ProgressIndicator__TLV_progressDescription_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ProgressIndicator__TLV_progressDescription_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_TLV.progressDescription", &BITSTRING_ber_, &General__Types::BIT7_raw_, NULL, &ProgressIndicator__TLV_progressDescription_xer_, &BITSTRING_json_, &ProgressIndicator__TLV_progressDescription_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__TLV_progressDescription_default_coding("RAW");
const XERdescriptor_t       ProgressIndicator__TLV_ext2_xer_ = { {"ext2>\n", "ext2>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ProgressIndicator__TLV_ext2_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ProgressIndicator__TLV_ext2_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_TLV.ext2", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &ProgressIndicator__TLV_ext2_xer_, &BITSTRING_json_, &ProgressIndicator__TLV_ext2_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__TLV_ext2_default_coding("RAW");
const TTCN_RAWdescriptor_t ProgressIndicator__TLV_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for ProgressIndicator__TLV
const TTCN_Typedescriptor_t ProgressIndicator__TLV_descr_ = { "@MobileL3_CC_Types.ProgressIndicator_TLV", NULL, &ProgressIndicator__TLV_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ProgressIndicator__TLV_default_coding("RAW");
const XERdescriptor_t       RecallType_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int RecallType_elementIdentifier_oer_ext_arr_[0] = {};
const int RecallType_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t RecallType_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, RecallType_elementIdentifier_oer_ext_arr_, 0, RecallType_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t RecallType_elementIdentifier_descr_ = { "@MobileL3_CC_Types.RecallType.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &RecallType_elementIdentifier_xer_, &OCTETSTRING_json_, &RecallType_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RecallType_elementIdentifier_default_coding("RAW");
const XERdescriptor_t       RecallType_recallType_xer_ = { {"recallType>\n", "recallType>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t RecallType_recallType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t RecallType_recallType_descr_ = { "@MobileL3_CC_Types.RecallType.recallType", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &RecallType_recallType_xer_, &BITSTRING_json_, &RecallType_recallType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RecallType_recallType_default_coding("RAW");
const XERdescriptor_t       RecallType_spare__5_xer_ = { {"spare_5>\n", "spare_5>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t RecallType_spare__5_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t RecallType_spare__5_descr_ = { "@MobileL3_CC_Types.RecallType.spare_5", &BITSTRING_ber_, &General__Types::BIT5_raw_, NULL, &RecallType_spare__5_xer_, &BITSTRING_json_, &RecallType_spare__5_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RecallType_spare__5_default_coding("RAW");
const TTCN_RAWdescriptor_t RecallType_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for RecallType
const TTCN_Typedescriptor_t RecallType_descr_ = { "@MobileL3_CC_Types.RecallType", NULL, &RecallType_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RecallType_default_coding("RAW");
const XERdescriptor_t       RedirectingPartyBCDNumberTLV_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int RedirectingPartyBCDNumberTLV_elementIdentifier_oer_ext_arr_[0] = {};
const int RedirectingPartyBCDNumberTLV_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t RedirectingPartyBCDNumberTLV_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, RedirectingPartyBCDNumberTLV_elementIdentifier_oer_ext_arr_, 0, RedirectingPartyBCDNumberTLV_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t RedirectingPartyBCDNumberTLV_elementIdentifier_descr_ = { "@MobileL3_CC_Types.RedirectingPartyBCDNumberTLV.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &RedirectingPartyBCDNumberTLV_elementIdentifier_xer_, &OCTETSTRING_json_, &RedirectingPartyBCDNumberTLV_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RedirectingPartyBCDNumberTLV_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t RedirectingPartyBCDNumberTLV_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       RedirectingPartyBCDNumberTLV_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t RedirectingPartyBCDNumberTLV_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t RedirectingPartyBCDNumberTLV_lengthIndicator_descr_ = { "@MobileL3_CC_Types.RedirectingPartyBCDNumberTLV.lengthIndicator", &INTEGER_ber_, &RedirectingPartyBCDNumberTLV_lengthIndicator_raw_, &INTEGER_text_, &RedirectingPartyBCDNumberTLV_lengthIndicator_xer_, &INTEGER_json_, &RedirectingPartyBCDNumberTLV_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RedirectingPartyBCDNumberTLV_lengthIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING RedirectingPartyBCDNumberTLV_oct3_default_coding("RAW");
const TTCN_RAWdescriptor_t RedirectingPartyBCDNumberTLV_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for RedirectingPartyBCDNumberTLV
const TTCN_Typedescriptor_t RedirectingPartyBCDNumberTLV_descr_ = { "@MobileL3_CC_Types.RedirectingPartyBCDNumberTLV", NULL, &RedirectingPartyBCDNumberTLV_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t RedirectingPartyBCDNumberTLV_digits_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,8,0,0,8,8,pp_0,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       RedirectingPartyBCDNumberTLV_digits_xer_ = { {"digits>\n", "digits>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t RedirectingPartyBCDNumberTLV_digits_descr_ = { "@MobileL3_CC_Types.RedirectingPartyBCDNumberTLV.digits", NULL, &RedirectingPartyBCDNumberTLV_digits_raw_, NULL, &RedirectingPartyBCDNumberTLV_digits_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RedirectingPartyBCDNumberTLV_digits_default_coding("RAW");
UNIVERSAL_CHARSTRING RedirectingPartyBCDNumberTLV_default_coding("RAW");
const XERdescriptor_t       RedirectingPartySubaddressTLV_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int RedirectingPartySubaddressTLV_elementIdentifier_oer_ext_arr_[0] = {};
const int RedirectingPartySubaddressTLV_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t RedirectingPartySubaddressTLV_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, RedirectingPartySubaddressTLV_elementIdentifier_oer_ext_arr_, 0, RedirectingPartySubaddressTLV_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t RedirectingPartySubaddressTLV_elementIdentifier_descr_ = { "@MobileL3_CC_Types.RedirectingPartySubaddressTLV.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &RedirectingPartySubaddressTLV_elementIdentifier_xer_, &OCTETSTRING_json_, &RedirectingPartySubaddressTLV_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RedirectingPartySubaddressTLV_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t RedirectingPartySubaddressTLV_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       RedirectingPartySubaddressTLV_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t RedirectingPartySubaddressTLV_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t RedirectingPartySubaddressTLV_lengthIndicator_descr_ = { "@MobileL3_CC_Types.RedirectingPartySubaddressTLV.lengthIndicator", &INTEGER_ber_, &RedirectingPartySubaddressTLV_lengthIndicator_raw_, &INTEGER_text_, &RedirectingPartySubaddressTLV_lengthIndicator_xer_, &INTEGER_json_, &RedirectingPartySubaddressTLV_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RedirectingPartySubaddressTLV_lengthIndicator_default_coding("RAW");
const TTCN_RAWdescriptor_t RedirectingPartySubaddressTLV_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for RedirectingPartySubaddressTLV
const TTCN_Typedescriptor_t RedirectingPartySubaddressTLV_descr_ = { "@MobileL3_CC_Types.RedirectingPartySubaddressTLV", NULL, &RedirectingPartySubaddressTLV_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       RedirectingPartySubaddressTLV_spare1__3_xer_ = { {"spare1_3>\n", "spare1_3>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t RedirectingPartySubaddressTLV_spare1__3_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t RedirectingPartySubaddressTLV_spare1__3_descr_ = { "@MobileL3_CC_Types.RedirectingPartySubaddressTLV.spare1_3", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &RedirectingPartySubaddressTLV_spare1__3_xer_, &BITSTRING_json_, &RedirectingPartySubaddressTLV_spare1__3_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RedirectingPartySubaddressTLV_spare1__3_default_coding("RAW");
const XERdescriptor_t       RedirectingPartySubaddressTLV_odd__evenIndicator_xer_ = { {"odd_evenIndicator>\n", "odd_evenIndicator>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t RedirectingPartySubaddressTLV_odd__evenIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t RedirectingPartySubaddressTLV_odd__evenIndicator_descr_ = { "@MobileL3_CC_Types.RedirectingPartySubaddressTLV.odd_evenIndicator", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &RedirectingPartySubaddressTLV_odd__evenIndicator_xer_, &BITSTRING_json_, &RedirectingPartySubaddressTLV_odd__evenIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RedirectingPartySubaddressTLV_odd__evenIndicator_default_coding("RAW");
const XERdescriptor_t       RedirectingPartySubaddressTLV_typeOfSubAddress_xer_ = { {"typeOfSubAddress>\n", "typeOfSubAddress>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t RedirectingPartySubaddressTLV_typeOfSubAddress_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t RedirectingPartySubaddressTLV_typeOfSubAddress_descr_ = { "@MobileL3_CC_Types.RedirectingPartySubaddressTLV.typeOfSubAddress", &BITSTRING_ber_, &General__Types::BIT3_raw_, NULL, &RedirectingPartySubaddressTLV_typeOfSubAddress_xer_, &BITSTRING_json_, &RedirectingPartySubaddressTLV_typeOfSubAddress_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RedirectingPartySubaddressTLV_typeOfSubAddress_default_coding("RAW");
const XERdescriptor_t       RedirectingPartySubaddressTLV_ext1_xer_ = { {"ext1>\n", "ext1>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t RedirectingPartySubaddressTLV_ext1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t RedirectingPartySubaddressTLV_ext1_descr_ = { "@MobileL3_CC_Types.RedirectingPartySubaddressTLV.ext1", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &RedirectingPartySubaddressTLV_ext1_xer_, &BITSTRING_json_, &RedirectingPartySubaddressTLV_ext1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RedirectingPartySubaddressTLV_ext1_default_coding("RAW");
const XERdescriptor_t       RedirectingPartySubaddressTLV_subAddressInformation_xer_ = { {"subAddressInformation>\n", "subAddressInformation>\n"}, {23, 23}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int RedirectingPartySubaddressTLV_subAddressInformation_oer_ext_arr_[0] = {};
const int RedirectingPartySubaddressTLV_subAddressInformation_oer_p_[0] = {};
const TTCN_OERdescriptor_t RedirectingPartySubaddressTLV_subAddressInformation_oer_ = { -1, TRUE, -1, FALSE, 0, 0, RedirectingPartySubaddressTLV_subAddressInformation_oer_ext_arr_, 0, RedirectingPartySubaddressTLV_subAddressInformation_oer_p_};
const TTCN_Typedescriptor_t RedirectingPartySubaddressTLV_subAddressInformation_descr_ = { "@MobileL3_CC_Types.RedirectingPartySubaddressTLV.subAddressInformation", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &RedirectingPartySubaddressTLV_subAddressInformation_xer_, &OCTETSTRING_json_, &RedirectingPartySubaddressTLV_subAddressInformation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RedirectingPartySubaddressTLV_subAddressInformation_default_coding("RAW");
UNIVERSAL_CHARSTRING RedirectingPartySubaddressTLV_default_coding("RAW");
const XERdescriptor_t       RepeatIndicator_RepeatIndication_xer_ = { {"RepeatIndication>\n", "RepeatIndication>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t RepeatIndicator_RepeatIndication_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t RepeatIndicator_RepeatIndication_descr_ = { "@MobileL3_CC_Types.RepeatIndicator.RepeatIndication", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &RepeatIndicator_RepeatIndication_xer_, &BITSTRING_json_, &RepeatIndicator_RepeatIndication_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RepeatIndicator_RepeatIndication_default_coding("RAW");
const XERdescriptor_t       RepeatIndicator_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t RepeatIndicator_elementIdentifier_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t RepeatIndicator_elementIdentifier_descr_ = { "@MobileL3_CC_Types.RepeatIndicator.elementIdentifier", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &RepeatIndicator_elementIdentifier_xer_, &BITSTRING_json_, &RepeatIndicator_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RepeatIndicator_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t RepeatIndicator_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for RepeatIndicator
const TTCN_Typedescriptor_t RepeatIndicator_descr_ = { "@MobileL3_CC_Types.RepeatIndicator", NULL, &RepeatIndicator_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING RepeatIndicator_default_coding("RAW");
const XERdescriptor_t       ReverseCallSetupDirection_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ReverseCallSetupDirection_elementIdentifier_oer_ext_arr_[0] = {};
const int ReverseCallSetupDirection_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t ReverseCallSetupDirection_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ReverseCallSetupDirection_elementIdentifier_oer_ext_arr_, 0, ReverseCallSetupDirection_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t ReverseCallSetupDirection_elementIdentifier_descr_ = { "@MobileL3_CC_Types.ReverseCallSetupDirection.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &ReverseCallSetupDirection_elementIdentifier_xer_, &OCTETSTRING_json_, &ReverseCallSetupDirection_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ReverseCallSetupDirection_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t ReverseCallSetupDirection_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for ReverseCallSetupDirection
const TTCN_Typedescriptor_t ReverseCallSetupDirection_descr_ = { "@MobileL3_CC_Types.ReverseCallSetupDirection", NULL, &ReverseCallSetupDirection_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ReverseCallSetupDirection_default_coding("RAW");
const XERdescriptor_t       SetupContatinerCCBS_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int SetupContatinerCCBS_elementIdentifier_oer_ext_arr_[0] = {};
const int SetupContatinerCCBS_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t SetupContatinerCCBS_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, SetupContatinerCCBS_elementIdentifier_oer_ext_arr_, 0, SetupContatinerCCBS_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t SetupContatinerCCBS_elementIdentifier_descr_ = { "@MobileL3_CC_Types.SetupContatinerCCBS.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &SetupContatinerCCBS_elementIdentifier_xer_, &OCTETSTRING_json_, &SetupContatinerCCBS_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SetupContatinerCCBS_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t SetupContatinerCCBS_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       SetupContatinerCCBS_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SetupContatinerCCBS_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SetupContatinerCCBS_lengthIndicator_descr_ = { "@MobileL3_CC_Types.SetupContatinerCCBS.lengthIndicator", &INTEGER_ber_, &SetupContatinerCCBS_lengthIndicator_raw_, &INTEGER_text_, &SetupContatinerCCBS_lengthIndicator_xer_, &INTEGER_json_, &SetupContatinerCCBS_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SetupContatinerCCBS_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       SetupContatinerCCBS_setupMessage_xer_ = { {"setupMessage>\n", "setupMessage>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int SetupContatinerCCBS_setupMessage_oer_ext_arr_[0] = {};
const int SetupContatinerCCBS_setupMessage_oer_p_[0] = {};
const TTCN_OERdescriptor_t SetupContatinerCCBS_setupMessage_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SetupContatinerCCBS_setupMessage_oer_ext_arr_, 0, SetupContatinerCCBS_setupMessage_oer_p_};
const TTCN_Typedescriptor_t SetupContatinerCCBS_setupMessage_descr_ = { "@MobileL3_CC_Types.SetupContatinerCCBS.setupMessage", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &SetupContatinerCCBS_setupMessage_xer_, &OCTETSTRING_json_, &SetupContatinerCCBS_setupMessage_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SetupContatinerCCBS_setupMessage_default_coding("RAW");
const TTCN_RAWdescriptor_t SetupContatinerCCBS_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for SetupContatinerCCBS
const TTCN_Typedescriptor_t SetupContatinerCCBS_descr_ = { "@MobileL3_CC_Types.SetupContatinerCCBS", NULL, &SetupContatinerCCBS_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SetupContatinerCCBS_default_coding("RAW");
const TTCN_RAWdescriptor_t SetupContatinerCCBS__LV_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       SetupContatinerCCBS__LV_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SetupContatinerCCBS__LV_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SetupContatinerCCBS__LV_lengthIndicator_descr_ = { "@MobileL3_CC_Types.SetupContatinerCCBS_LV.lengthIndicator", &INTEGER_ber_, &SetupContatinerCCBS__LV_lengthIndicator_raw_, &INTEGER_text_, &SetupContatinerCCBS__LV_lengthIndicator_xer_, &INTEGER_json_, &SetupContatinerCCBS__LV_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SetupContatinerCCBS__LV_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       SetupContatinerCCBS__LV_setupMessage_xer_ = { {"setupMessage>\n", "setupMessage>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int SetupContatinerCCBS__LV_setupMessage_oer_ext_arr_[0] = {};
const int SetupContatinerCCBS__LV_setupMessage_oer_p_[0] = {};
const TTCN_OERdescriptor_t SetupContatinerCCBS__LV_setupMessage_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SetupContatinerCCBS__LV_setupMessage_oer_ext_arr_, 0, SetupContatinerCCBS__LV_setupMessage_oer_p_};
const TTCN_Typedescriptor_t SetupContatinerCCBS__LV_setupMessage_descr_ = { "@MobileL3_CC_Types.SetupContatinerCCBS_LV.setupMessage", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &SetupContatinerCCBS__LV_setupMessage_xer_, &OCTETSTRING_json_, &SetupContatinerCCBS__LV_setupMessage_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SetupContatinerCCBS__LV_setupMessage_default_coding("RAW");
const TTCN_RAWdescriptor_t SetupContatinerCCBS__LV_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for SetupContatinerCCBS__LV
const TTCN_Typedescriptor_t SetupContatinerCCBS__LV_descr_ = { "@MobileL3_CC_Types.SetupContatinerCCBS_LV", NULL, &SetupContatinerCCBS__LV_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SetupContatinerCCBS__LV_default_coding("RAW");
const XERdescriptor_t       ML3__Signal_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ML3__Signal_elementIdentifier_oer_ext_arr_[0] = {};
const int ML3__Signal_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t ML3__Signal_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ML3__Signal_elementIdentifier_oer_ext_arr_, 0, ML3__Signal_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t ML3__Signal_elementIdentifier_descr_ = { "@MobileL3_CC_Types.ML3_Signal.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &ML3__Signal_elementIdentifier_xer_, &OCTETSTRING_json_, &ML3__Signal_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ML3__Signal_elementIdentifier_default_coding("RAW");
const XERdescriptor_t       ML3__Signal_signalValue_xer_ = { {"signalValue>\n", "signalValue>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ML3__Signal_signalValue_oer_ext_arr_[0] = {};
const int ML3__Signal_signalValue_oer_p_[0] = {};
const TTCN_OERdescriptor_t ML3__Signal_signalValue_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ML3__Signal_signalValue_oer_ext_arr_, 0, ML3__Signal_signalValue_oer_p_};
const TTCN_Typedescriptor_t ML3__Signal_signalValue_descr_ = { "@MobileL3_CC_Types.ML3_Signal.signalValue", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &ML3__Signal_signalValue_xer_, &OCTETSTRING_json_, &ML3__Signal_signalValue_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ML3__Signal_signalValue_default_coding("RAW");
const TTCN_RAWdescriptor_t ML3__Signal_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for ML3__Signal
const TTCN_Typedescriptor_t ML3__Signal_descr_ = { "@MobileL3_CC_Types.ML3_Signal", NULL, &ML3__Signal_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ML3__Signal_default_coding("RAW");
const TTCN_RAWdescriptor_t User__user__LV_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       User__user__LV_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t User__user__LV_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t User__user__LV_lengthIndicator_descr_ = { "@MobileL3_CC_Types.User_user_LV.lengthIndicator", &INTEGER_ber_, &User__user__LV_lengthIndicator_raw_, &INTEGER_text_, &User__user__LV_lengthIndicator_xer_, &INTEGER_json_, &User__user__LV_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING User__user__LV_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       User__user__LV_user__userProtocolDiscriminator_xer_ = { {"user_userProtocolDiscriminator>\n", "user_userProtocolDiscriminator>\n"}, {32, 32}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int User__user__LV_user__userProtocolDiscriminator_oer_ext_arr_[0] = {};
const int User__user__LV_user__userProtocolDiscriminator_oer_p_[0] = {};
const TTCN_OERdescriptor_t User__user__LV_user__userProtocolDiscriminator_oer_ = { -1, TRUE, 1, FALSE, 0, 0, User__user__LV_user__userProtocolDiscriminator_oer_ext_arr_, 0, User__user__LV_user__userProtocolDiscriminator_oer_p_};
const TTCN_Typedescriptor_t User__user__LV_user__userProtocolDiscriminator_descr_ = { "@MobileL3_CC_Types.User_user_LV.user_userProtocolDiscriminator", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &User__user__LV_user__userProtocolDiscriminator_xer_, &OCTETSTRING_json_, &User__user__LV_user__userProtocolDiscriminator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING User__user__LV_user__userProtocolDiscriminator_default_coding("RAW");
const XERdescriptor_t       User__user__LV_user__userInformation_xer_ = { {"user_userInformation>\n", "user_userInformation>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int User__user__LV_user__userInformation_oer_ext_arr_[0] = {};
const int User__user__LV_user__userInformation_oer_p_[0] = {};
const TTCN_OERdescriptor_t User__user__LV_user__userInformation_oer_ = { -1, TRUE, -1, FALSE, 0, 0, User__user__LV_user__userInformation_oer_ext_arr_, 0, User__user__LV_user__userInformation_oer_p_};
const TTCN_Typedescriptor_t User__user__LV_user__userInformation_descr_ = { "@MobileL3_CC_Types.User_user_LV.user_userInformation", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &User__user__LV_user__userInformation_xer_, &OCTETSTRING_json_, &User__user__LV_user__userInformation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING User__user__LV_user__userInformation_default_coding("RAW");
const TTCN_RAWdescriptor_t User__user__LV_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for User__user__LV
const TTCN_Typedescriptor_t User__user__LV_descr_ = { "@MobileL3_CC_Types.User_user_LV", NULL, &User__user__LV_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING User__user__LV_default_coding("RAW");
const XERdescriptor_t       User__user__TLV_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int User__user__TLV_elementIdentifier_oer_ext_arr_[0] = {};
const int User__user__TLV_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t User__user__TLV_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, User__user__TLV_elementIdentifier_oer_ext_arr_, 0, User__user__TLV_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t User__user__TLV_elementIdentifier_descr_ = { "@MobileL3_CC_Types.User_user_TLV.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &User__user__TLV_elementIdentifier_xer_, &OCTETSTRING_json_, &User__user__TLV_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING User__user__TLV_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t User__user__TLV_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       User__user__TLV_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t User__user__TLV_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t User__user__TLV_lengthIndicator_descr_ = { "@MobileL3_CC_Types.User_user_TLV.lengthIndicator", &INTEGER_ber_, &User__user__TLV_lengthIndicator_raw_, &INTEGER_text_, &User__user__TLV_lengthIndicator_xer_, &INTEGER_json_, &User__user__TLV_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING User__user__TLV_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       User__user__TLV_user__userProtocolDiscriminator_xer_ = { {"user_userProtocolDiscriminator>\n", "user_userProtocolDiscriminator>\n"}, {32, 32}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int User__user__TLV_user__userProtocolDiscriminator_oer_ext_arr_[0] = {};
const int User__user__TLV_user__userProtocolDiscriminator_oer_p_[0] = {};
const TTCN_OERdescriptor_t User__user__TLV_user__userProtocolDiscriminator_oer_ = { -1, TRUE, 1, FALSE, 0, 0, User__user__TLV_user__userProtocolDiscriminator_oer_ext_arr_, 0, User__user__TLV_user__userProtocolDiscriminator_oer_p_};
const TTCN_Typedescriptor_t User__user__TLV_user__userProtocolDiscriminator_descr_ = { "@MobileL3_CC_Types.User_user_TLV.user_userProtocolDiscriminator", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &User__user__TLV_user__userProtocolDiscriminator_xer_, &OCTETSTRING_json_, &User__user__TLV_user__userProtocolDiscriminator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING User__user__TLV_user__userProtocolDiscriminator_default_coding("RAW");
const XERdescriptor_t       User__user__TLV_user__userInformation_xer_ = { {"user_userInformation>\n", "user_userInformation>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int User__user__TLV_user__userInformation_oer_ext_arr_[0] = {};
const int User__user__TLV_user__userInformation_oer_p_[0] = {};
const TTCN_OERdescriptor_t User__user__TLV_user__userInformation_oer_ = { -1, TRUE, -1, FALSE, 0, 0, User__user__TLV_user__userInformation_oer_ext_arr_, 0, User__user__TLV_user__userInformation_oer_p_};
const TTCN_Typedescriptor_t User__user__TLV_user__userInformation_descr_ = { "@MobileL3_CC_Types.User_user_TLV.user_userInformation", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &User__user__TLV_user__userInformation_xer_, &OCTETSTRING_json_, &User__user__TLV_user__userInformation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING User__user__TLV_user__userInformation_default_coding("RAW");
const TTCN_RAWdescriptor_t User__user__TLV_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for User__user__TLV
const TTCN_Typedescriptor_t User__user__TLV_descr_ = { "@MobileL3_CC_Types.User_user_TLV", NULL, &User__user__TLV_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING User__user__TLV_default_coding("RAW");
const XERdescriptor_t       User__userShort_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int User__userShort_elementIdentifier_oer_ext_arr_[0] = {};
const int User__userShort_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t User__userShort_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, User__userShort_elementIdentifier_oer_ext_arr_, 0, User__userShort_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t User__userShort_elementIdentifier_descr_ = { "@MobileL3_CC_Types.User_userShort.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &User__userShort_elementIdentifier_xer_, &OCTETSTRING_json_, &User__userShort_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING User__userShort_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t User__userShort_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       User__userShort_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t User__userShort_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t User__userShort_lengthIndicator_descr_ = { "@MobileL3_CC_Types.User_userShort.lengthIndicator", &INTEGER_ber_, &User__userShort_lengthIndicator_raw_, &INTEGER_text_, &User__userShort_lengthIndicator_xer_, &INTEGER_json_, &User__userShort_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING User__userShort_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       User__userShort_user__userProtocolDiscriminator_xer_ = { {"user_userProtocolDiscriminator>\n", "user_userProtocolDiscriminator>\n"}, {32, 32}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int User__userShort_user__userProtocolDiscriminator_oer_ext_arr_[0] = {};
const int User__userShort_user__userProtocolDiscriminator_oer_p_[0] = {};
const TTCN_OERdescriptor_t User__userShort_user__userProtocolDiscriminator_oer_ = { -1, TRUE, 1, FALSE, 0, 0, User__userShort_user__userProtocolDiscriminator_oer_ext_arr_, 0, User__userShort_user__userProtocolDiscriminator_oer_p_};
const TTCN_Typedescriptor_t User__userShort_user__userProtocolDiscriminator_descr_ = { "@MobileL3_CC_Types.User_userShort.user_userProtocolDiscriminator", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &User__userShort_user__userProtocolDiscriminator_xer_, &OCTETSTRING_json_, &User__userShort_user__userProtocolDiscriminator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING User__userShort_user__userProtocolDiscriminator_default_coding("RAW");
const XERdescriptor_t       User__userShort_user__userInformation_xer_ = { {"user_userInformation>\n", "user_userInformation>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int User__userShort_user__userInformation_oer_ext_arr_[0] = {};
const int User__userShort_user__userInformation_oer_p_[0] = {};
const TTCN_OERdescriptor_t User__userShort_user__userInformation_oer_ = { -1, TRUE, -1, FALSE, 0, 0, User__userShort_user__userInformation_oer_ext_arr_, 0, User__userShort_user__userInformation_oer_p_};
const TTCN_Typedescriptor_t User__userShort_user__userInformation_descr_ = { "@MobileL3_CC_Types.User_userShort.user_userInformation", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &User__userShort_user__userInformation_xer_, &OCTETSTRING_json_, &User__userShort_user__userInformation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING User__userShort_user__userInformation_default_coding("RAW");
const TTCN_RAWdescriptor_t User__userShort_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for User__userShort
const TTCN_Typedescriptor_t User__userShort_descr_ = { "@MobileL3_CC_Types.User_userShort", NULL, &User__userShort_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING User__userShort_default_coding("RAW");
const XERdescriptor_t       AlertingPattern_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int AlertingPattern_elementIdentifier_oer_ext_arr_[0] = {};
const int AlertingPattern_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t AlertingPattern_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, AlertingPattern_elementIdentifier_oer_ext_arr_, 0, AlertingPattern_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t AlertingPattern_elementIdentifier_descr_ = { "@MobileL3_CC_Types.AlertingPattern.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &AlertingPattern_elementIdentifier_xer_, &OCTETSTRING_json_, &AlertingPattern_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AlertingPattern_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t AlertingPattern_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       AlertingPattern_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t AlertingPattern_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AlertingPattern_lengthIndicator_descr_ = { "@MobileL3_CC_Types.AlertingPattern.lengthIndicator", &INTEGER_ber_, &AlertingPattern_lengthIndicator_raw_, &INTEGER_text_, &AlertingPattern_lengthIndicator_xer_, &INTEGER_json_, &AlertingPattern_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AlertingPattern_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       AlertingPattern_alertingPattern__FIELD_xer_ = { {"alertingPattern_FIELD>\n", "alertingPattern_FIELD>\n"}, {23, 23}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t AlertingPattern_alertingPattern__FIELD_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AlertingPattern_alertingPattern__FIELD_descr_ = { "@MobileL3_CC_Types.AlertingPattern.alertingPattern_FIELD", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &AlertingPattern_alertingPattern__FIELD_xer_, &BITSTRING_json_, &AlertingPattern_alertingPattern__FIELD_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AlertingPattern_alertingPattern__FIELD_default_coding("RAW");
const XERdescriptor_t       AlertingPattern_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 AlertingPattern_spare_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AlertingPattern_spare_descr_ = { "@MobileL3_CC_Types.AlertingPattern.spare", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &AlertingPattern_spare_xer_, &BITSTRING_json_, &AlertingPattern_spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AlertingPattern_spare_default_coding("RAW");
const TTCN_RAWdescriptor_t AlertingPattern_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for AlertingPattern
const TTCN_Typedescriptor_t AlertingPattern_descr_ = { "@MobileL3_CC_Types.AlertingPattern", NULL, &AlertingPattern_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AlertingPattern_default_coding("RAW");
const XERdescriptor_t       AllowedActions_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int AllowedActions_elementIdentifier_oer_ext_arr_[0] = {};
const int AllowedActions_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t AllowedActions_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, AllowedActions_elementIdentifier_oer_ext_arr_, 0, AllowedActions_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t AllowedActions_elementIdentifier_descr_ = { "@MobileL3_CC_Types.AllowedActions.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &AllowedActions_elementIdentifier_xer_, &OCTETSTRING_json_, &AllowedActions_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AllowedActions_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t AllowedActions_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       AllowedActions_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t AllowedActions_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AllowedActions_lengthIndicator_descr_ = { "@MobileL3_CC_Types.AllowedActions.lengthIndicator", &INTEGER_ber_, &AllowedActions_lengthIndicator_raw_, &INTEGER_text_, &AllowedActions_lengthIndicator_xer_, &INTEGER_json_, &AllowedActions_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AllowedActions_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       AllowedActions_spare__7_xer_ = { {"spare_7>\n", "spare_7>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t AllowedActions_spare__7_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AllowedActions_spare__7_descr_ = { "@MobileL3_CC_Types.AllowedActions.spare_7", &BITSTRING_ber_, &General__Types::BIT7_raw_, NULL, &AllowedActions_spare__7_xer_, &BITSTRING_json_, &AllowedActions_spare__7_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AllowedActions_spare__7_default_coding("RAW");
const XERdescriptor_t       AllowedActions_ccbsActivation_xer_ = { {"ccbsActivation>\n", "ccbsActivation>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t AllowedActions_ccbsActivation_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t AllowedActions_ccbsActivation_descr_ = { "@MobileL3_CC_Types.AllowedActions.ccbsActivation", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &AllowedActions_ccbsActivation_xer_, &BITSTRING_json_, &AllowedActions_ccbsActivation_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AllowedActions_ccbsActivation_default_coding("RAW");
const TTCN_RAWdescriptor_t AllowedActions_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for AllowedActions
const TTCN_Typedescriptor_t AllowedActions_descr_ = { "@MobileL3_CC_Types.AllowedActions", NULL, &AllowedActions_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING AllowedActions_default_coding("RAW");
const XERdescriptor_t       StreamIdentifier_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int StreamIdentifier_elementIdentifier_oer_ext_arr_[0] = {};
const int StreamIdentifier_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t StreamIdentifier_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, StreamIdentifier_elementIdentifier_oer_ext_arr_, 0, StreamIdentifier_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t StreamIdentifier_elementIdentifier_descr_ = { "@MobileL3_CC_Types.StreamIdentifier.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &StreamIdentifier_elementIdentifier_xer_, &OCTETSTRING_json_, &StreamIdentifier_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING StreamIdentifier_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t StreamIdentifier_lengthf_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       StreamIdentifier_lengthf_xer_ = { {"lengthf>\n", "lengthf>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t StreamIdentifier_lengthf_descr_ = { "@MobileL3_CC_Types.StreamIdentifier.lengthf", &INTEGER_ber_, &StreamIdentifier_lengthf_raw_, &INTEGER_text_, &StreamIdentifier_lengthf_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING StreamIdentifier_lengthf_default_coding("RAW");
const XERdescriptor_t       StreamIdentifier_streamIdentifierValue_xer_ = { {"streamIdentifierValue>\n", "streamIdentifierValue>\n"}, {23, 23}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int StreamIdentifier_streamIdentifierValue_oer_ext_arr_[0] = {};
const int StreamIdentifier_streamIdentifierValue_oer_p_[0] = {};
const TTCN_OERdescriptor_t StreamIdentifier_streamIdentifierValue_oer_ = { -1, TRUE, 1, FALSE, 0, 0, StreamIdentifier_streamIdentifierValue_oer_ext_arr_, 0, StreamIdentifier_streamIdentifierValue_oer_p_};
const TTCN_Typedescriptor_t StreamIdentifier_streamIdentifierValue_descr_ = { "@MobileL3_CC_Types.StreamIdentifier.streamIdentifierValue", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &StreamIdentifier_streamIdentifierValue_xer_, &OCTETSTRING_json_, &StreamIdentifier_streamIdentifierValue_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING StreamIdentifier_streamIdentifierValue_default_coding("RAW");
const TTCN_RAWdescriptor_t StreamIdentifier_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for StreamIdentifier
const TTCN_Typedescriptor_t StreamIdentifier_descr_ = { "@MobileL3_CC_Types.StreamIdentifier", NULL, &StreamIdentifier_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING StreamIdentifier_default_coding("RAW");
const XERdescriptor_t       NetworkCallControlCapabilities_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int NetworkCallControlCapabilities_elementIdentifier_oer_ext_arr_[0] = {};
const int NetworkCallControlCapabilities_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t NetworkCallControlCapabilities_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, NetworkCallControlCapabilities_elementIdentifier_oer_ext_arr_, 0, NetworkCallControlCapabilities_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t NetworkCallControlCapabilities_elementIdentifier_descr_ = { "@MobileL3_CC_Types.NetworkCallControlCapabilities.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &NetworkCallControlCapabilities_elementIdentifier_xer_, &OCTETSTRING_json_, &NetworkCallControlCapabilities_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING NetworkCallControlCapabilities_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t NetworkCallControlCapabilities_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       NetworkCallControlCapabilities_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t NetworkCallControlCapabilities_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t NetworkCallControlCapabilities_lengthIndicator_descr_ = { "@MobileL3_CC_Types.NetworkCallControlCapabilities.lengthIndicator", &INTEGER_ber_, &NetworkCallControlCapabilities_lengthIndicator_raw_, &INTEGER_text_, &NetworkCallControlCapabilities_lengthIndicator_xer_, &INTEGER_json_, &NetworkCallControlCapabilities_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING NetworkCallControlCapabilities_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       NetworkCallControlCapabilities_mcs_xer_ = { {"mcs>\n", "mcs>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t NetworkCallControlCapabilities_mcs_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t NetworkCallControlCapabilities_mcs_descr_ = { "@MobileL3_CC_Types.NetworkCallControlCapabilities.mcs", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &NetworkCallControlCapabilities_mcs_xer_, &BITSTRING_json_, &NetworkCallControlCapabilities_mcs_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING NetworkCallControlCapabilities_mcs_default_coding("RAW");
const XERdescriptor_t       NetworkCallControlCapabilities_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 NetworkCallControlCapabilities_spare_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t NetworkCallControlCapabilities_spare_descr_ = { "@MobileL3_CC_Types.NetworkCallControlCapabilities.spare", &BITSTRING_ber_, &General__Types::BIT7_raw_, NULL, &NetworkCallControlCapabilities_spare_xer_, &BITSTRING_json_, &NetworkCallControlCapabilities_spare_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING NetworkCallControlCapabilities_spare_default_coding("RAW");
const TTCN_RAWdescriptor_t NetworkCallControlCapabilities_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for NetworkCallControlCapabilities
const TTCN_Typedescriptor_t NetworkCallControlCapabilities_descr_ = { "@MobileL3_CC_Types.NetworkCallControlCapabilities", NULL, &NetworkCallControlCapabilities_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING NetworkCallControlCapabilities_default_coding("RAW");
const XERdescriptor_t       CauseofNoCli_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int CauseofNoCli_elementIdentifier_oer_ext_arr_[0] = {};
const int CauseofNoCli_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t CauseofNoCli_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, CauseofNoCli_elementIdentifier_oer_ext_arr_, 0, CauseofNoCli_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t CauseofNoCli_elementIdentifier_descr_ = { "@MobileL3_CC_Types.CauseofNoCli.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &CauseofNoCli_elementIdentifier_xer_, &OCTETSTRING_json_, &CauseofNoCli_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CauseofNoCli_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t CauseofNoCli_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       CauseofNoCli_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t CauseofNoCli_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t CauseofNoCli_lengthIndicator_descr_ = { "@MobileL3_CC_Types.CauseofNoCli.lengthIndicator", &INTEGER_ber_, &CauseofNoCli_lengthIndicator_raw_, &INTEGER_text_, &CauseofNoCli_lengthIndicator_xer_, &INTEGER_json_, &CauseofNoCli_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CauseofNoCli_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       CauseofNoCli_causeofNoCli__FIELD_xer_ = { {"causeofNoCli_FIELD>\n", "causeofNoCli_FIELD>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int CauseofNoCli_causeofNoCli__FIELD_oer_ext_arr_[0] = {};
const int CauseofNoCli_causeofNoCli__FIELD_oer_p_[0] = {};
const TTCN_OERdescriptor_t CauseofNoCli_causeofNoCli__FIELD_oer_ = { -1, TRUE, 1, FALSE, 0, 0, CauseofNoCli_causeofNoCli__FIELD_oer_ext_arr_, 0, CauseofNoCli_causeofNoCli__FIELD_oer_p_};
const TTCN_Typedescriptor_t CauseofNoCli_causeofNoCli__FIELD_descr_ = { "@MobileL3_CC_Types.CauseofNoCli.causeofNoCli_FIELD", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &CauseofNoCli_causeofNoCli__FIELD_xer_, &OCTETSTRING_json_, &CauseofNoCli_causeofNoCli__FIELD_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CauseofNoCli_causeofNoCli__FIELD_default_coding("RAW");
const TTCN_RAWdescriptor_t CauseofNoCli_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for CauseofNoCli
const TTCN_Typedescriptor_t CauseofNoCli_descr_ = { "@MobileL3_CC_Types.CauseofNoCli", NULL, &CauseofNoCli_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING CauseofNoCli_default_coding("RAW");
const XERdescriptor_t       ServiceCategory_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ServiceCategory_elementIdentifier_oer_ext_arr_[0] = {};
const int ServiceCategory_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t ServiceCategory_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, ServiceCategory_elementIdentifier_oer_ext_arr_, 0, ServiceCategory_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t ServiceCategory_elementIdentifier_descr_ = { "@MobileL3_CC_Types.ServiceCategory.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &ServiceCategory_elementIdentifier_xer_, &OCTETSTRING_json_, &ServiceCategory_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ServiceCategory_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t ServiceCategory_lengthIndicator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       ServiceCategory_lengthIndicator_xer_ = { {"lengthIndicator>\n", "lengthIndicator>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ServiceCategory_lengthIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ServiceCategory_lengthIndicator_descr_ = { "@MobileL3_CC_Types.ServiceCategory.lengthIndicator", &INTEGER_ber_, &ServiceCategory_lengthIndicator_raw_, &INTEGER_text_, &ServiceCategory_lengthIndicator_xer_, &INTEGER_json_, &ServiceCategory_lengthIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ServiceCategory_lengthIndicator_default_coding("RAW");
const XERdescriptor_t       ServiceCategory_emergencyServiceCategory_xer_ = { {"emergencyServiceCategory>\n", "emergencyServiceCategory>\n"}, {26, 26}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ServiceCategory_emergencyServiceCategory_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ServiceCategory_emergencyServiceCategory_descr_ = { "@MobileL3_CC_Types.ServiceCategory.emergencyServiceCategory", &BITSTRING_ber_, &General__Types::BIT7_raw_, NULL, &ServiceCategory_emergencyServiceCategory_xer_, &BITSTRING_json_, &ServiceCategory_emergencyServiceCategory_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ServiceCategory_emergencyServiceCategory_default_coding("RAW");
const XERdescriptor_t       ServiceCategory_spare__1_xer_ = { {"spare_1>\n", "spare_1>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ServiceCategory_spare__1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ServiceCategory_spare__1_descr_ = { "@MobileL3_CC_Types.ServiceCategory.spare_1", &BITSTRING_ber_, &General__Types::BIT1_raw_, NULL, &ServiceCategory_spare__1_xer_, &BITSTRING_json_, &ServiceCategory_spare__1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ServiceCategory_spare__1_default_coding("RAW");
const TTCN_RAWdescriptor_t ServiceCategory_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for ServiceCategory
const TTCN_Typedescriptor_t ServiceCategory_descr_ = { "@MobileL3_CC_Types.ServiceCategory", NULL, &ServiceCategory_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ServiceCategory_default_coding("RAW");
const TTCN_Typedescriptor_t& Redial_descr_ = MobileL3__CommonIE__Types::Type2_descr_;
UNIVERSAL_CHARSTRING Redial_default_coding("RAW");
const XERdescriptor_t       NetworkInitiatedServiceUpgradeIndicator_elementIdentifier_xer_ = { {"elementIdentifier>\n", "elementIdentifier>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int NetworkInitiatedServiceUpgradeIndicator_elementIdentifier_oer_ext_arr_[0] = {};
const int NetworkInitiatedServiceUpgradeIndicator_elementIdentifier_oer_p_[0] = {};
const TTCN_OERdescriptor_t NetworkInitiatedServiceUpgradeIndicator_elementIdentifier_oer_ = { -1, TRUE, 1, FALSE, 0, 0, NetworkInitiatedServiceUpgradeIndicator_elementIdentifier_oer_ext_arr_, 0, NetworkInitiatedServiceUpgradeIndicator_elementIdentifier_oer_p_};
const TTCN_Typedescriptor_t NetworkInitiatedServiceUpgradeIndicator_elementIdentifier_descr_ = { "@MobileL3_CC_Types.NetworkInitiatedServiceUpgradeIndicator.elementIdentifier", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &NetworkInitiatedServiceUpgradeIndicator_elementIdentifier_xer_, &OCTETSTRING_json_, &NetworkInitiatedServiceUpgradeIndicator_elementIdentifier_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING NetworkInitiatedServiceUpgradeIndicator_elementIdentifier_default_coding("RAW");
const TTCN_RAWdescriptor_t NetworkInitiatedServiceUpgradeIndicator_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for NetworkInitiatedServiceUpgradeIndicator
const TTCN_Typedescriptor_t NetworkInitiatedServiceUpgradeIndicator_descr_ = { "@MobileL3_CC_Types.NetworkInitiatedServiceUpgradeIndicator", NULL, &NetworkInitiatedServiceUpgradeIndicator_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING NetworkInitiatedServiceUpgradeIndicator_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Alerting__NW__MS_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Alerting__NW__MS_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Alerting__NW__MS_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Alerting_NW_MS.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Alerting__NW__MS_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Alerting__NW__MS_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Alerting__NW__MS_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Alerting__NW__MS_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Alerting__NW__MS_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Alerting__NW__MS_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Alerting_NW_MS.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Alerting__NW__MS_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Alerting__NW__MS_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Alerting__NW__MS_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Alerting__NW__MS_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Alerting__NW__MS
const TTCN_Typedescriptor_t PDU__ML3__Alerting__NW__MS_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Alerting_NW_MS", NULL, &PDU__ML3__Alerting__NW__MS_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Alerting__NW__MS_facility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Alerting__NW__MS_progressIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Alerting__NW__MS_user__user_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Alerting__NW__MS_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Alerting__MS__NW_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Alerting__MS__NW_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Alerting__MS__NW_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Alerting_MS_NW.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Alerting__MS__NW_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Alerting__MS__NW_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Alerting__MS__NW_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Alerting__MS__NW_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Alerting__MS__NW_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Alerting__MS__NW_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Alerting_MS_NW.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Alerting__MS__NW_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Alerting__MS__NW_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Alerting__MS__NW_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Alerting__MS__NW_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Alerting__MS__NW
const TTCN_Typedescriptor_t PDU__ML3__Alerting__MS__NW_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Alerting_MS_NW", NULL, &PDU__ML3__Alerting__MS__NW_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Alerting__MS__NW_facility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Alerting__MS__NW_user__user_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Alerting__MS__NW_ss__VersionIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Alerting__MS__NW_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__CallConfirmed_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__CallConfirmed_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__CallConfirmed_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CallConfirmed.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__CallConfirmed_messageType_xer_, &BITSTRING_json_, &PDU__ML3__CallConfirmed_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CallConfirmed_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__CallConfirmed_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__CallConfirmed_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__CallConfirmed_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CallConfirmed.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__CallConfirmed_nsd_xer_, &BITSTRING_json_, &PDU__ML3__CallConfirmed_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CallConfirmed_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__CallConfirmed_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__CallConfirmed
const TTCN_Typedescriptor_t PDU__ML3__CallConfirmed_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CallConfirmed", NULL, &PDU__ML3__CallConfirmed_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CallConfirmed_repeatIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CallConfirmed_bearerCapability1_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CallConfirmed_bearerCapability2_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CallConfirmed_cause_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CallConfirmed_cC__Capabilities_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CallConfirmed_streamIdentifier_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CallConfirmed_supportedCodecs_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CallConfirmed_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__CallProceeding_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__CallProceeding_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__CallProceeding_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CallProceeding.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__CallProceeding_messageType_xer_, &BITSTRING_json_, &PDU__ML3__CallProceeding_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CallProceeding_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__CallProceeding_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__CallProceeding_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__CallProceeding_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CallProceeding.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__CallProceeding_nsd_xer_, &BITSTRING_json_, &PDU__ML3__CallProceeding_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CallProceeding_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__CallProceeding_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__CallProceeding
const TTCN_Typedescriptor_t PDU__ML3__CallProceeding_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CallProceeding", NULL, &PDU__ML3__CallProceeding_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CallProceeding_repeatIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CallProceeding_bearerCapability1_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CallProceeding_bearerCapability2_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CallProceeding_facility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CallProceeding_progressIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CallProceeding_priorityGranted_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CallProceeding_networkCCCapabilities_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CallProceeding_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__CongestionControl_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__CongestionControl_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__CongestionControl_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CongestionControl.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__CongestionControl_messageType_xer_, &BITSTRING_json_, &PDU__ML3__CongestionControl_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CongestionControl_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__CongestionControl_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__CongestionControl_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__CongestionControl_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CongestionControl.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__CongestionControl_nsd_xer_, &BITSTRING_json_, &PDU__ML3__CongestionControl_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CongestionControl_nsd_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__CongestionControl_congestionLevel_xer_ = { {"congestionLevel>\n", "congestionLevel>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__CongestionControl_congestionLevel_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__CongestionControl_congestionLevel_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CongestionControl.congestionLevel", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &PDU__ML3__CongestionControl_congestionLevel_xer_, &BITSTRING_json_, &PDU__ML3__CongestionControl_congestionLevel_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CongestionControl_congestionLevel_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__CongestionControl_spare__4_xer_ = { {"spare_4>\n", "spare_4>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__CongestionControl_spare__4_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__CongestionControl_spare__4_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CongestionControl.spare_4", &BITSTRING_ber_, &General__Types::BIT4_raw_, NULL, &PDU__ML3__CongestionControl_spare__4_xer_, &BITSTRING_json_, &PDU__ML3__CongestionControl_spare__4_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CongestionControl_spare__4_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__CongestionControl_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__CongestionControl
const TTCN_Typedescriptor_t PDU__ML3__CongestionControl_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CongestionControl", NULL, &PDU__ML3__CongestionControl_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CongestionControl_cause_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CongestionControl_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Connect__NW__MS_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Connect__NW__MS_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Connect__NW__MS_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Connect_NW_MS.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Connect__NW__MS_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Connect__NW__MS_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Connect__NW__MS_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Connect__NW__MS_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Connect__NW__MS_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Connect__NW__MS_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Connect_NW_MS.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Connect__NW__MS_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Connect__NW__MS_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Connect__NW__MS_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Connect__NW__MS_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Connect__NW__MS
const TTCN_Typedescriptor_t PDU__ML3__Connect__NW__MS_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Connect_NW_MS", NULL, &PDU__ML3__Connect__NW__MS_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Connect__NW__MS_facility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Connect__NW__MS_progressIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Connect__NW__MS_connectedNumber_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Connect__NW__MS_connectedSubAddress_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Connect__NW__MS_user__user_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Connect__NW__MS_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Connect__MS__NW_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Connect__MS__NW_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Connect__MS__NW_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Connect_MS_NW.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Connect__MS__NW_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Connect__MS__NW_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Connect__MS__NW_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Connect__MS__NW_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Connect__MS__NW_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Connect__MS__NW_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Connect_MS_NW.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Connect__MS__NW_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Connect__MS__NW_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Connect__MS__NW_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Connect__MS__NW_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Connect__MS__NW
const TTCN_Typedescriptor_t PDU__ML3__Connect__MS__NW_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Connect_MS_NW", NULL, &PDU__ML3__Connect__MS__NW_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Connect__MS__NW_facility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Connect__MS__NW_connectedSubAddress_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Connect__MS__NW_user__user_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Connect__MS__NW_ss__VersionIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Connect__MS__NW_streamIdentifier_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Connect__MS__NW_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__ConnectAck_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__ConnectAck_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__ConnectAck_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_ConnectAck.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__ConnectAck_messageType_xer_, &BITSTRING_json_, &PDU__ML3__ConnectAck_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__ConnectAck_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__ConnectAck_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__ConnectAck_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__ConnectAck_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_ConnectAck.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__ConnectAck_nsd_xer_, &BITSTRING_json_, &PDU__ML3__ConnectAck_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__ConnectAck_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__ConnectAck_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__ConnectAck
const TTCN_Typedescriptor_t PDU__ML3__ConnectAck_descr_ = { "@MobileL3_CC_Types.PDU_ML3_ConnectAck", NULL, &PDU__ML3__ConnectAck_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__ConnectAck_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Disconnect__NW__MS_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Disconnect__NW__MS_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Disconnect__NW__MS_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Disconnect_NW_MS.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Disconnect__NW__MS_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Disconnect__NW__MS_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Disconnect__NW__MS_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Disconnect__NW__MS_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Disconnect__NW__MS_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Disconnect__NW__MS_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Disconnect_NW_MS.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Disconnect__NW__MS_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Disconnect__NW__MS_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Disconnect__NW__MS_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Disconnect__NW__MS_cause_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Disconnect__NW__MS_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Disconnect__NW__MS
const TTCN_Typedescriptor_t PDU__ML3__Disconnect__NW__MS_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Disconnect_NW_MS", NULL, &PDU__ML3__Disconnect__NW__MS_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Disconnect__NW__MS_facility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Disconnect__NW__MS_progressIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Disconnect__NW__MS_user__user_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Disconnect__NW__MS_allowedActions_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Disconnect__NW__MS_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Disconnect__MS__NW_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Disconnect__MS__NW_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Disconnect__MS__NW_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Disconnect_MS_NW.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Disconnect__MS__NW_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Disconnect__MS__NW_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Disconnect__MS__NW_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Disconnect__MS__NW_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Disconnect__MS__NW_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Disconnect__MS__NW_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Disconnect_MS_NW.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Disconnect__MS__NW_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Disconnect__MS__NW_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Disconnect__MS__NW_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Disconnect__MS__NW_cause_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Disconnect__MS__NW_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Disconnect__MS__NW
const TTCN_Typedescriptor_t PDU__ML3__Disconnect__MS__NW_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Disconnect_MS_NW", NULL, &PDU__ML3__Disconnect__MS__NW_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Disconnect__MS__NW_facility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Disconnect__MS__NW_user__user_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Disconnect__MS__NW_ss__VersionIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Disconnect__MS__NW_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__EmergencySetup_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__EmergencySetup_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__EmergencySetup_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_EmergencySetup.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__EmergencySetup_messageType_xer_, &BITSTRING_json_, &PDU__ML3__EmergencySetup_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__EmergencySetup_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__EmergencySetup_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__EmergencySetup_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__EmergencySetup_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_EmergencySetup.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__EmergencySetup_nsd_xer_, &BITSTRING_json_, &PDU__ML3__EmergencySetup_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__EmergencySetup_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__EmergencySetup_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__EmergencySetup
const TTCN_Typedescriptor_t PDU__ML3__EmergencySetup_descr_ = { "@MobileL3_CC_Types.PDU_ML3_EmergencySetup", NULL, &PDU__ML3__EmergencySetup_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__EmergencySetup_bearerCapability_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__EmergencySetup_streamIdentifier_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__EmergencySetup_supportedCodecs_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__EmergencySetup_emergencyCategory_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__EmergencySetup_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Facility_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Facility_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Facility_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Facility.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Facility_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Facility_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Facility_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Facility_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Facility_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Facility_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Facility.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Facility_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Facility_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Facility_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Facility_facility_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Facility_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Facility
const TTCN_Typedescriptor_t PDU__ML3__Facility_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Facility", NULL, &PDU__ML3__Facility_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Facility_ss__version_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Facility_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Hold_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Hold_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Hold_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Hold.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Hold_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Hold_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Hold_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Hold_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Hold_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Hold_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Hold.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Hold_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Hold_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Hold_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Hold_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Hold
const TTCN_Typedescriptor_t PDU__ML3__Hold_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Hold", NULL, &PDU__ML3__Hold_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Hold_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__HoldAcknowledge_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__HoldAcknowledge_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__HoldAcknowledge_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_HoldAcknowledge.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__HoldAcknowledge_messageType_xer_, &BITSTRING_json_, &PDU__ML3__HoldAcknowledge_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__HoldAcknowledge_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__HoldAcknowledge_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__HoldAcknowledge_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__HoldAcknowledge_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_HoldAcknowledge.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__HoldAcknowledge_nsd_xer_, &BITSTRING_json_, &PDU__ML3__HoldAcknowledge_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__HoldAcknowledge_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__HoldAcknowledge_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__HoldAcknowledge
const TTCN_Typedescriptor_t PDU__ML3__HoldAcknowledge_descr_ = { "@MobileL3_CC_Types.PDU_ML3_HoldAcknowledge", NULL, &PDU__ML3__HoldAcknowledge_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__HoldAcknowledge_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__HoldReject_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__HoldReject_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__HoldReject_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_HoldReject.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__HoldReject_messageType_xer_, &BITSTRING_json_, &PDU__ML3__HoldReject_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__HoldReject_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__HoldReject_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__HoldReject_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__HoldReject_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_HoldReject.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__HoldReject_nsd_xer_, &BITSTRING_json_, &PDU__ML3__HoldReject_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__HoldReject_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__HoldReject_cause_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__HoldReject_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__HoldReject
const TTCN_Typedescriptor_t PDU__ML3__HoldReject_descr_ = { "@MobileL3_CC_Types.PDU_ML3_HoldReject", NULL, &PDU__ML3__HoldReject_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__HoldReject_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Modify_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Modify_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Modify_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Modify.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Modify_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Modify_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Modify_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Modify_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Modify_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Modify_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Modify.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Modify_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Modify_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Modify_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Modify_bearerCapability_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Modify_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Modify
const TTCN_Typedescriptor_t PDU__ML3__Modify_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Modify", NULL, &PDU__ML3__Modify_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Modify_lowLayerCompatibility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Modify_highLayerCompatibility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Modify_reverseCallSetupDirection_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Modify_networkInitiatedServiceUpgradeIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Modify_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__ModifyComplete_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__ModifyComplete_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__ModifyComplete_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_ModifyComplete.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__ModifyComplete_messageType_xer_, &BITSTRING_json_, &PDU__ML3__ModifyComplete_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__ModifyComplete_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__ModifyComplete_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__ModifyComplete_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__ModifyComplete_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_ModifyComplete.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__ModifyComplete_nsd_xer_, &BITSTRING_json_, &PDU__ML3__ModifyComplete_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__ModifyComplete_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__ModifyComplete_bearerCapability_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__ModifyComplete_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__ModifyComplete
const TTCN_Typedescriptor_t PDU__ML3__ModifyComplete_descr_ = { "@MobileL3_CC_Types.PDU_ML3_ModifyComplete", NULL, &PDU__ML3__ModifyComplete_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__ModifyComplete_lowLayerCompatibility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__ModifyComplete_highLayerCompatibility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__ModifyComplete_reverseCallSetupDirection_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__ModifyComplete_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__ModifyReject_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__ModifyReject_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__ModifyReject_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_ModifyReject.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__ModifyReject_messageType_xer_, &BITSTRING_json_, &PDU__ML3__ModifyReject_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__ModifyReject_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__ModifyReject_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__ModifyReject_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__ModifyReject_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_ModifyReject.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__ModifyReject_nsd_xer_, &BITSTRING_json_, &PDU__ML3__ModifyReject_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__ModifyReject_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__ModifyReject_bearerCapability_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__ModifyReject_cause_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__ModifyReject_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__ModifyReject
const TTCN_Typedescriptor_t PDU__ML3__ModifyReject_descr_ = { "@MobileL3_CC_Types.PDU_ML3_ModifyReject", NULL, &PDU__ML3__ModifyReject_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__ModifyReject_lowLayerCompatibility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__ModifyReject_highLayerCompatibility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__ModifyReject_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Notify_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Notify_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Notify_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Notify.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Notify_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Notify_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Notify_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Notify_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Notify_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Notify_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Notify.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Notify_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Notify_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Notify_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Notify_notificationIndicator_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Notify_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Notify
const TTCN_Typedescriptor_t PDU__ML3__Notify_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Notify", NULL, &PDU__ML3__Notify_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Notify_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Progress_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Progress_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Progress_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Progress.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Progress_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Progress_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Progress_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Progress_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Progress_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Progress_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Progress.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Progress_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Progress_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Progress_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Progress_progressIndicator_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Progress_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Progress
const TTCN_Typedescriptor_t PDU__ML3__Progress_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Progress", NULL, &PDU__ML3__Progress_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Progress_user__user_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Progress_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__CC__Establishment_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__CC__Establishment_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__CC__Establishment_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CC_Establishment.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__CC__Establishment_messageType_xer_, &BITSTRING_json_, &PDU__ML3__CC__Establishment_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CC__Establishment_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__CC__Establishment_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__CC__Establishment_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__CC__Establishment_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CC_Establishment.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__CC__Establishment_nsd_xer_, &BITSTRING_json_, &PDU__ML3__CC__Establishment_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CC__Establishment_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__Establishment_container_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__CC__Establishment_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__CC__Establishment
const TTCN_Typedescriptor_t PDU__ML3__CC__Establishment_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CC_Establishment", NULL, &PDU__ML3__CC__Establishment_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CC__Establishment_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__CC__EstablishmentConf_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__CC__EstablishmentConf_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__CC__EstablishmentConf_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CC_EstablishmentConf.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__CC__EstablishmentConf_messageType_xer_, &BITSTRING_json_, &PDU__ML3__CC__EstablishmentConf_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CC__EstablishmentConf_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__CC__EstablishmentConf_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__CC__EstablishmentConf_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__CC__EstablishmentConf_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CC_EstablishmentConf.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__CC__EstablishmentConf_nsd_xer_, &BITSTRING_json_, &PDU__ML3__CC__EstablishmentConf_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CC__EstablishmentConf_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__EstablishmentConf_bearerCapability1_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__CC__EstablishmentConf_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__CC__EstablishmentConf
const TTCN_Typedescriptor_t PDU__ML3__CC__EstablishmentConf_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CC_EstablishmentConf", NULL, &PDU__ML3__CC__EstablishmentConf_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CC__EstablishmentConf_repeatIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__EstablishmentConf_bearerCapability2_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__EstablishmentConf_cause_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__EstablishmentConf_supportedCodecs_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__EstablishmentConf_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Release__NW__MS_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Release__NW__MS_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Release__NW__MS_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Release_NW_MS.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Release__NW__MS_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Release__NW__MS_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Release__NW__MS_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Release__NW__MS_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Release__NW__MS_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Release__NW__MS_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Release_NW_MS.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Release__NW__MS_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Release__NW__MS_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Release__NW__MS_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Release__NW__MS_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Release__NW__MS
const TTCN_Typedescriptor_t PDU__ML3__Release__NW__MS_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Release_NW_MS", NULL, &PDU__ML3__Release__NW__MS_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Release__NW__MS_cause_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Release__NW__MS_secondCause_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Release__NW__MS_facility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Release__NW__MS_user__user_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Release__NW__MS_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Release__MS__NW_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Release__MS__NW_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Release__MS__NW_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Release_MS_NW.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Release__MS__NW_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Release__MS__NW_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Release__MS__NW_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Release__MS__NW_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Release__MS__NW_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Release__MS__NW_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Release_MS_NW.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Release__MS__NW_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Release__MS__NW_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Release__MS__NW_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Release__MS__NW_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Release__MS__NW
const TTCN_Typedescriptor_t PDU__ML3__Release__MS__NW_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Release_MS_NW", NULL, &PDU__ML3__Release__MS__NW_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Release__MS__NW_cause_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Release__MS__NW_secondCause_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Release__MS__NW_facility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Release__MS__NW_user__user_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Release__MS__NW_ss__VersionIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Release__MS__NW_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Recall_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Recall_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Recall_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Recall.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Recall_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Recall_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Recall_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Recall_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Recall_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Recall_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Recall.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Recall_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Recall_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Recall_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Recall_recallType_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Recall_facility_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Recall_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Recall
const TTCN_Typedescriptor_t PDU__ML3__Recall_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Recall", NULL, &PDU__ML3__Recall_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Recall_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__ReleaseComplete__NW__MS_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__ReleaseComplete__NW__MS_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__ReleaseComplete__NW__MS_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_ReleaseComplete_NW_MS.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__ReleaseComplete__NW__MS_messageType_xer_, &BITSTRING_json_, &PDU__ML3__ReleaseComplete__NW__MS_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__ReleaseComplete__NW__MS_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__ReleaseComplete__NW__MS_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__ReleaseComplete__NW__MS_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__ReleaseComplete__NW__MS_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_ReleaseComplete_NW_MS.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__ReleaseComplete__NW__MS_nsd_xer_, &BITSTRING_json_, &PDU__ML3__ReleaseComplete__NW__MS_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__ReleaseComplete__NW__MS_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__ReleaseComplete__NW__MS_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__ReleaseComplete__NW__MS
const TTCN_Typedescriptor_t PDU__ML3__ReleaseComplete__NW__MS_descr_ = { "@MobileL3_CC_Types.PDU_ML3_ReleaseComplete_NW_MS", NULL, &PDU__ML3__ReleaseComplete__NW__MS_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__ReleaseComplete__NW__MS_cause_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__ReleaseComplete__NW__MS_facility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__ReleaseComplete__NW__MS_user__user_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__ReleaseComplete__NW__MS_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__ReleaseComplete__MS__NW_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__ReleaseComplete__MS__NW_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__ReleaseComplete__MS__NW_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_ReleaseComplete_MS_NW.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__ReleaseComplete__MS__NW_messageType_xer_, &BITSTRING_json_, &PDU__ML3__ReleaseComplete__MS__NW_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__ReleaseComplete__MS__NW_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__ReleaseComplete__MS__NW_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__ReleaseComplete__MS__NW_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__ReleaseComplete__MS__NW_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_ReleaseComplete_MS_NW.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__ReleaseComplete__MS__NW_nsd_xer_, &BITSTRING_json_, &PDU__ML3__ReleaseComplete__MS__NW_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__ReleaseComplete__MS__NW_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__ReleaseComplete__MS__NW_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__ReleaseComplete__MS__NW
const TTCN_Typedescriptor_t PDU__ML3__ReleaseComplete__MS__NW_descr_ = { "@MobileL3_CC_Types.PDU_ML3_ReleaseComplete_MS_NW", NULL, &PDU__ML3__ReleaseComplete__MS__NW_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__ReleaseComplete__MS__NW_cause_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__ReleaseComplete__MS__NW_facility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__ReleaseComplete__MS__NW_user__user_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__ReleaseComplete__MS__NW_ss__VersionIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__ReleaseComplete__MS__NW_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Retrieve_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Retrieve_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Retrieve_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Retrieve.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Retrieve_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Retrieve_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Retrieve_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Retrieve_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Retrieve_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Retrieve_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Retrieve.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Retrieve_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Retrieve_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Retrieve_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Retrieve_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Retrieve
const TTCN_Typedescriptor_t PDU__ML3__Retrieve_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Retrieve", NULL, &PDU__ML3__Retrieve_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Retrieve_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__RetrieveAck_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__RetrieveAck_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__RetrieveAck_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_RetrieveAck.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__RetrieveAck_messageType_xer_, &BITSTRING_json_, &PDU__ML3__RetrieveAck_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__RetrieveAck_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__RetrieveAck_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__RetrieveAck_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__RetrieveAck_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_RetrieveAck.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__RetrieveAck_nsd_xer_, &BITSTRING_json_, &PDU__ML3__RetrieveAck_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__RetrieveAck_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__RetrieveAck_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__RetrieveAck
const TTCN_Typedescriptor_t PDU__ML3__RetrieveAck_descr_ = { "@MobileL3_CC_Types.PDU_ML3_RetrieveAck", NULL, &PDU__ML3__RetrieveAck_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__RetrieveAck_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__RetrieveRej_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__RetrieveRej_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__RetrieveRej_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_RetrieveRej.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__RetrieveRej_messageType_xer_, &BITSTRING_json_, &PDU__ML3__RetrieveRej_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__RetrieveRej_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__RetrieveRej_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__RetrieveRej_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__RetrieveRej_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_RetrieveRej.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__RetrieveRej_nsd_xer_, &BITSTRING_json_, &PDU__ML3__RetrieveRej_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__RetrieveRej_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__RetrieveRej_cause_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__RetrieveRej_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__RetrieveRej
const TTCN_Typedescriptor_t PDU__ML3__RetrieveRej_descr_ = { "@MobileL3_CC_Types.PDU_ML3_RetrieveRej", NULL, &PDU__ML3__RetrieveRej_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__RetrieveRej_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Setup__NW__MS_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Setup__NW__MS_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Setup__NW__MS_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Setup_NW_MS.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Setup__NW__MS_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Setup__NW__MS_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Setup__NW__MS_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Setup__NW__MS_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Setup__NW__MS_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Setup_NW_MS.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Setup__NW__MS_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Setup__NW__MS_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Setup__NW__MS_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Setup__NW__MS
const TTCN_Typedescriptor_t PDU__ML3__Setup__NW__MS_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Setup_NW_MS", NULL, &PDU__ML3__Setup__NW__MS_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_bcRepeatIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_bearerCapability1_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_bearerCapability2_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_facility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_progressIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_signal_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_callingPartyBCD__Number_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_callingPartySubAddress_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_calledPartyBCD__Number_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_calledPartySubAddress_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_redirectingPartyBCDNumber_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_redirectingPartySubaddress_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_llc__RepeatIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_lowLayerCompatibility1_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_lowLayerCompatibility2_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_hlc__RepeatIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_highLayerCompatibility1_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_highLayerCompatibility2_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_user__user_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_priority_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_alert_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_networkCCCapabilities_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_causeofNoCli_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_backupBearerCapacity_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__NW__MS_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Setup__MS__NW_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Setup__MS__NW_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Setup__MS__NW_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Setup_MS_NW.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Setup__MS__NW_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Setup__MS__NW_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Setup__MS__NW_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Setup__MS__NW_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Setup__MS__NW_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Setup_MS_NW.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Setup__MS__NW_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Setup__MS__NW_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_bearerCapability1_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_calledPartyBCD__Number_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Setup__MS__NW_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Setup__MS__NW
const TTCN_Typedescriptor_t PDU__ML3__Setup__MS__NW_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Setup_MS_NW", NULL, &PDU__ML3__Setup__MS__NW_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_bcRepeatIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_bearerCapability2_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_facility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_callingPartySubAddress_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_calledPartySubAddress_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_llc__RepeatIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_lowLayerCompatibility1_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_lowLayerCompatibility2_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_hlc__RepeatIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_highLayerCompatibility1_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_highLayerCompatibility2_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_user__user_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_ss__VersionIndicator_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_clir__Suppression_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_clir__Invocation_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_cC__Capabilities_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_facility__ccbs1_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_facility__ccbs2_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_streamIdentifier_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_supportedCodecs_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_redial_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Setup__MS__NW_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__StartCC_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__StartCC_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__StartCC_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StartCC.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__StartCC_messageType_xer_, &BITSTRING_json_, &PDU__ML3__StartCC_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StartCC_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__StartCC_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__StartCC_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__StartCC_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StartCC.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__StartCC_nsd_xer_, &BITSTRING_json_, &PDU__ML3__StartCC_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StartCC_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__StartCC_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__StartCC
const TTCN_Typedescriptor_t PDU__ML3__StartCC_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StartCC", NULL, &PDU__ML3__StartCC_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StartCC_cC__Capabilities_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__StartCC_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__StartDTMF_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__StartDTMF_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__StartDTMF_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StartDTMF.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__StartDTMF_messageType_xer_, &BITSTRING_json_, &PDU__ML3__StartDTMF_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StartDTMF_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__StartDTMF_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__StartDTMF_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__StartDTMF_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StartDTMF.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__StartDTMF_nsd_xer_, &BITSTRING_json_, &PDU__ML3__StartDTMF_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StartDTMF_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__StartDTMF_keypadFacility_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__StartDTMF_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__StartDTMF
const TTCN_Typedescriptor_t PDU__ML3__StartDTMF_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StartDTMF", NULL, &PDU__ML3__StartDTMF_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StartDTMF_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__StartDTMFAck_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__StartDTMFAck_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__StartDTMFAck_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StartDTMFAck.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__StartDTMFAck_messageType_xer_, &BITSTRING_json_, &PDU__ML3__StartDTMFAck_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StartDTMFAck_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__StartDTMFAck_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__StartDTMFAck_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__StartDTMFAck_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StartDTMFAck.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__StartDTMFAck_nsd_xer_, &BITSTRING_json_, &PDU__ML3__StartDTMFAck_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StartDTMFAck_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__StartDTMFAck_keypadFacility_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__StartDTMFAck_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__StartDTMFAck
const TTCN_Typedescriptor_t PDU__ML3__StartDTMFAck_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StartDTMFAck", NULL, &PDU__ML3__StartDTMFAck_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StartDTMFAck_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__StartDTMFRej_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__StartDTMFRej_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__StartDTMFRej_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StartDTMFRej.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__StartDTMFRej_messageType_xer_, &BITSTRING_json_, &PDU__ML3__StartDTMFRej_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StartDTMFRej_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__StartDTMFRej_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__StartDTMFRej_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__StartDTMFRej_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StartDTMFRej.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__StartDTMFRej_nsd_xer_, &BITSTRING_json_, &PDU__ML3__StartDTMFRej_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StartDTMFRej_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__StartDTMFRej_cause_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__StartDTMFRej_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__StartDTMFRej
const TTCN_Typedescriptor_t PDU__ML3__StartDTMFRej_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StartDTMFRej", NULL, &PDU__ML3__StartDTMFRej_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StartDTMFRej_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Status_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Status_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Status_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Status.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__Status_messageType_xer_, &BITSTRING_json_, &PDU__ML3__Status_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Status_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__Status_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__Status_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__Status_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Status.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__Status_nsd_xer_, &BITSTRING_json_, &PDU__ML3__Status_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Status_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Status_cause_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Status_callState_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__Status_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__Status
const TTCN_Typedescriptor_t PDU__ML3__Status_descr_ = { "@MobileL3_CC_Types.PDU_ML3_Status", NULL, &PDU__ML3__Status_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__Status_auxiliaryStates_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__Status_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__StatusEnquiry_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__StatusEnquiry_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__StatusEnquiry_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StatusEnquiry.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__StatusEnquiry_messageType_xer_, &BITSTRING_json_, &PDU__ML3__StatusEnquiry_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StatusEnquiry_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__StatusEnquiry_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__StatusEnquiry_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__StatusEnquiry_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StatusEnquiry.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__StatusEnquiry_nsd_xer_, &BITSTRING_json_, &PDU__ML3__StatusEnquiry_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StatusEnquiry_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__StatusEnquiry_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__StatusEnquiry
const TTCN_Typedescriptor_t PDU__ML3__StatusEnquiry_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StatusEnquiry", NULL, &PDU__ML3__StatusEnquiry_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StatusEnquiry_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__StopDTMF_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__StopDTMF_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__StopDTMF_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StopDTMF.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__StopDTMF_messageType_xer_, &BITSTRING_json_, &PDU__ML3__StopDTMF_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StopDTMF_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__StopDTMF_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__StopDTMF_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__StopDTMF_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StopDTMF.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__StopDTMF_nsd_xer_, &BITSTRING_json_, &PDU__ML3__StopDTMF_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StopDTMF_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__StopDTMF_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__StopDTMF
const TTCN_Typedescriptor_t PDU__ML3__StopDTMF_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StopDTMF", NULL, &PDU__ML3__StopDTMF_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StopDTMF_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__StopDTMFAck_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__StopDTMFAck_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__StopDTMFAck_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StopDTMFAck.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__StopDTMFAck_messageType_xer_, &BITSTRING_json_, &PDU__ML3__StopDTMFAck_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StopDTMFAck_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__StopDTMFAck_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__StopDTMFAck_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__StopDTMFAck_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StopDTMFAck.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__StopDTMFAck_nsd_xer_, &BITSTRING_json_, &PDU__ML3__StopDTMFAck_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StopDTMFAck_nsd_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__StopDTMFAck_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__StopDTMFAck
const TTCN_Typedescriptor_t PDU__ML3__StopDTMFAck_descr_ = { "@MobileL3_CC_Types.PDU_ML3_StopDTMFAck", NULL, &PDU__ML3__StopDTMFAck_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__StopDTMFAck_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__UserInformation_messageType_xer_ = { {"messageType>\n", "messageType>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__UserInformation_messageType_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__UserInformation_messageType_descr_ = { "@MobileL3_CC_Types.PDU_ML3_UserInformation.messageType", &BITSTRING_ber_, &General__Types::BIT6_raw_, NULL, &PDU__ML3__UserInformation_messageType_xer_, &BITSTRING_json_, &PDU__ML3__UserInformation_messageType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__UserInformation_messageType_default_coding("RAW");
const XERdescriptor_t       PDU__ML3__UserInformation_nsd_xer_ = { {"nsd>\n", "nsd>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t PDU__ML3__UserInformation_nsd_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t PDU__ML3__UserInformation_nsd_descr_ = { "@MobileL3_CC_Types.PDU_ML3_UserInformation.nsd", &BITSTRING_ber_, &General__Types::BIT2_raw_, NULL, &PDU__ML3__UserInformation_nsd_xer_, &BITSTRING_json_, &PDU__ML3__UserInformation_nsd_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__UserInformation_nsd_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__UserInformation_user__user_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__UserInformation_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__UserInformation
const TTCN_Typedescriptor_t PDU__ML3__UserInformation_descr_ = { "@MobileL3_CC_Types.PDU_ML3_UserInformation", NULL, &PDU__ML3__UserInformation_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       PDU__ML3__UserInformation_moreData_xer_ = { {"moreData>\n", "moreData>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int PDU__ML3__UserInformation_moreData_oer_ext_arr_[0] = {};
const int PDU__ML3__UserInformation_moreData_oer_p_[0] = {};
const TTCN_OERdescriptor_t PDU__ML3__UserInformation_moreData_oer_ = { -1, TRUE, 1, FALSE, 0, 0, PDU__ML3__UserInformation_moreData_oer_ext_arr_, 0, PDU__ML3__UserInformation_moreData_oer_p_};
const TTCN_Typedescriptor_t PDU__ML3__UserInformation_moreData_descr_ = { "@MobileL3_CC_Types.PDU_ML3_UserInformation.moreData", &OCTETSTRING_ber_, &General__Types::OCT1_raw_, &OCTETSTRING_text_, &PDU__ML3__UserInformation_moreData_xer_, &OCTETSTRING_json_, &PDU__ML3__UserInformation_moreData_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__UserInformation_moreData_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__UserInformation_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__CC__MS__NW_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__CC__MS__NW
const TTCN_Typedescriptor_t PDU__ML3__CC__MS__NW_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CC_MS_NW", NULL, &PDU__ML3__CC__MS__NW_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_alerting__MS__NW_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_callConfirmed_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_connect__MS__NW_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_connectAck_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_emergencySetup_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_cc__EstablishmentConf_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_startCC_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_setup__MS__NW_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_modify_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_modifyComplete_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_modifyReject_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_userInformation_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_disconnect__MS__NW_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_release__MS__NW_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_releaseComplete__MS__NW_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_facility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_hold_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_retrieve_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_notify_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_startDTMF_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_status_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_statusEnquiry_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_stopDTMF_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__MS__NW_default_coding("RAW");
const TTCN_RAWdescriptor_t PDU__ML3__CC__NW__MS_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_LSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for PDU__ML3__CC__NW__MS
const TTCN_Typedescriptor_t PDU__ML3__CC__NW__MS_descr_ = { "@MobileL3_CC_Types.PDU_ML3_CC_NW_MS", NULL, &PDU__ML3__CC__NW__MS_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_alerting__NW__MS_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_callConfirmed_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_callProceeding_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_connect__NW__MS_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_connectAck_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_progress_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_cc__Establishment_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_setup__NW__MS_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_modify_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_modifyComplete_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_modifyReject_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_userInformation_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_disconnect__NW__MS_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_release__NW__MS_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_releaseComplete__NW__MS_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_facility_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_holdAcknowledge_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_holdReject_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_retrieveAck_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_retrieveRej_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_congestionControl_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_notify_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_startDTMFAck_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_startDTMFRej_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_status_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_statusEnquiry_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_stopDTMFAck_default_coding("RAW");
UNIVERSAL_CHARSTRING PDU__ML3__CC__NW__MS_default_coding("RAW");
TTCN_Module module_object("MobileL3_CC_Types", __DATE__, __TIME__, module_checksum, pre_init_module, "", 0U, 2U, 0U, 99U, "", 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 */

AuxiliaryStates__TLV::AuxiliaryStates__TLV()
{
}

AuxiliaryStates__TLV::AuxiliaryStates__TLV(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const BITSTRING& par_mPTYAuxiliaryState,
    const BITSTRING& par_holdAuxState,
    const BITSTRING& par_spare__3,
    const BITSTRING& par_ext)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_mPTYAuxiliaryState(par_mPTYAuxiliaryState),
  field_holdAuxState(par_holdAuxState),
  field_spare__3(par_spare__3),
  field_ext(par_ext)
{
}

AuxiliaryStates__TLV::AuxiliaryStates__TLV(const AuxiliaryStates__TLV& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.AuxiliaryStates_TLV.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.mPTYAuxiliaryState().is_bound()) field_mPTYAuxiliaryState = other_value.mPTYAuxiliaryState();
else field_mPTYAuxiliaryState.clean_up();
if (other_value.holdAuxState().is_bound()) field_holdAuxState = other_value.holdAuxState();
else field_holdAuxState.clean_up();
if (other_value.spare__3().is_bound()) field_spare__3 = other_value.spare__3();
else field_spare__3.clean_up();
if (other_value.ext().is_bound()) field_ext = other_value.ext();
else field_ext.clean_up();
}

void AuxiliaryStates__TLV::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_mPTYAuxiliaryState.clean_up();
field_holdAuxState.clean_up();
field_spare__3.clean_up();
field_ext.clean_up();
}

const TTCN_Typedescriptor_t* AuxiliaryStates__TLV::get_descriptor() const { return &AuxiliaryStates__TLV_descr_; }
AuxiliaryStates__TLV& AuxiliaryStates__TLV::operator=(const AuxiliaryStates__TLV& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.AuxiliaryStates_TLV.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.mPTYAuxiliaryState().is_bound()) field_mPTYAuxiliaryState = other_value.mPTYAuxiliaryState();
  else field_mPTYAuxiliaryState.clean_up();
  if (other_value.holdAuxState().is_bound()) field_holdAuxState = other_value.holdAuxState();
  else field_holdAuxState.clean_up();
  if (other_value.spare__3().is_bound()) field_spare__3 = other_value.spare__3();
  else field_spare__3.clean_up();
  if (other_value.ext().is_bound()) field_ext = other_value.ext();
  else field_ext.clean_up();
}
return *this;
}

boolean AuxiliaryStates__TLV::operator==(const AuxiliaryStates__TLV& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_mPTYAuxiliaryState==other_value.field_mPTYAuxiliaryState
  && field_holdAuxState==other_value.field_holdAuxState
  && field_spare__3==other_value.field_spare__3
  && field_ext==other_value.field_ext;
}

boolean AuxiliaryStates__TLV::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (field_mPTYAuxiliaryState.is_bound())
  || (field_holdAuxState.is_bound())
  || (field_spare__3.is_bound())
  || (field_ext.is_bound());
}
boolean AuxiliaryStates__TLV::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && field_mPTYAuxiliaryState.is_value()
  && field_holdAuxState.is_value()
  && field_spare__3.is_value()
  && field_ext.is_value();
}
void AuxiliaryStates__TLV::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", mPTYAuxiliaryState := ");
field_mPTYAuxiliaryState.log();
TTCN_Logger::log_event_str(", holdAuxState := ");
field_holdAuxState.log();
TTCN_Logger::log_event_str(", spare_3 := ");
field_spare__3.log();
TTCN_Logger::log_event_str(", ext := ");
field_ext.log();
TTCN_Logger::log_event_str(" }");
}

void AuxiliaryStates__TLV::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (mPTYAuxiliaryState().is_bound()) mPTYAuxiliaryState().set_implicit_omit();
if (holdAuxState().is_bound()) holdAuxState().set_implicit_omit();
if (spare__3().is_bound()) spare__3().set_implicit_omit();
if (ext().is_bound()) ext().set_implicit_omit();
}

void AuxiliaryStates__TLV::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 @MobileL3_CC_Types.AuxiliaryStates_TLV 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) mPTYAuxiliaryState().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) holdAuxState().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) spare__3().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) ext().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mPTYAuxiliaryState")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mPTYAuxiliaryState().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "holdAuxState")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          holdAuxState().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          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 @MobileL3_CC_Types.AuxiliaryStates_TLV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.AuxiliaryStates_TLV");
  }
}

void AuxiliaryStates__TLV::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_mPTYAuxiliaryState.encode_text(text_buf);
field_holdAuxState.encode_text(text_buf);
field_spare__3.encode_text(text_buf);
field_ext.encode_text(text_buf);
}

void AuxiliaryStates__TLV::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_mPTYAuxiliaryState.decode_text(text_buf);
field_holdAuxState.decode_text(text_buf);
field_spare__3.decode_text(text_buf);
field_ext.decode_text(text_buf);
}

void AuxiliaryStates__TLV::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 AuxiliaryStates__TLV::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 AuxiliaryStates__TLV::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, AuxiliaryStates__TLV_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(AuxiliaryStates__TLV_lengthIndicator_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_lengthIndicator.convert_to_Integer(AuxiliaryStates__TLV_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  RAW_Force_Omit field_2_force_omit(2, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_mPTYAuxiliaryState.RAW_decode(General__Types::BIT2_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;
  RAW_Force_Omit field_3_force_omit(3, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_holdAuxState.RAW_decode(General__Types::BIT2_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), 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());
  value_of_length_field1 -= decoded_field_length;
  RAW_Force_Omit field_4_force_omit(4, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_spare__3.RAW_decode(General__Types::BIT3_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), 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());
  value_of_length_field1 -= decoded_field_length;
  RAW_Force_Omit field_5_force_omit(5, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_ext.RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), 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());
  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 AuxiliaryStates__TLV::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, AuxiliaryStates__TLV_lengthIndicator_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT3_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, General__Types::BIT1_descr_.raw);
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &AuxiliaryStates__TLV_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 4;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(4);
  myleaf.body.node.nodes[1]->length = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[2]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[2]->curr_pos.pos;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = myleaf.body.node.nodes[4]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = myleaf.body.node.nodes[4]->curr_pos.pos;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = myleaf.body.node.nodes[5]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = myleaf.body.node.nodes[5]->curr_pos.pos;
  encoded_length += field_mPTYAuxiliaryState.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_holdAuxState.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_spare__3.RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_ext.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[5]);
  return myleaf.length = encoded_length;
}

struct AuxiliaryStates__TLV_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
BITSTRING_template field_mPTYAuxiliaryState;
BITSTRING_template field_holdAuxState;
BITSTRING_template field_spare__3;
BITSTRING_template field_ext;
};

void AuxiliaryStates__TLV_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_mPTYAuxiliaryState = ANY_VALUE;
single_value->field_holdAuxState = ANY_VALUE;
single_value->field_spare__3 = ANY_VALUE;
single_value->field_ext = ANY_VALUE;
}
}
}

void AuxiliaryStates__TLV_template::copy_value(const AuxiliaryStates__TLV& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.mPTYAuxiliaryState().is_bound()) {
  single_value->field_mPTYAuxiliaryState = other_value.mPTYAuxiliaryState();
} else {
  single_value->field_mPTYAuxiliaryState.clean_up();
}
if (other_value.holdAuxState().is_bound()) {
  single_value->field_holdAuxState = other_value.holdAuxState();
} else {
  single_value->field_holdAuxState.clean_up();
}
if (other_value.spare__3().is_bound()) {
  single_value->field_spare__3 = other_value.spare__3();
} else {
  single_value->field_spare__3.clean_up();
}
if (other_value.ext().is_bound()) {
  single_value->field_ext = other_value.ext();
} else {
  single_value->field_ext.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void AuxiliaryStates__TLV_template::copy_template(const AuxiliaryStates__TLV_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mPTYAuxiliaryState().get_selection()) {
single_value->field_mPTYAuxiliaryState = other_value.mPTYAuxiliaryState();
} else {
single_value->field_mPTYAuxiliaryState.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.holdAuxState().get_selection()) {
single_value->field_holdAuxState = other_value.holdAuxState();
} else {
single_value->field_holdAuxState.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare__3().get_selection()) {
single_value->field_spare__3 = other_value.spare__3();
} else {
single_value->field_spare__3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext().get_selection()) {
single_value->field_ext = other_value.ext();
} else {
single_value->field_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 AuxiliaryStates__TLV_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 AuxiliaryStates__TLV_template(*other_value.implication_.precondition);
implication_.implied_template = new AuxiliaryStates__TLV_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 @MobileL3_CC_Types.AuxiliaryStates_TLV.");
break;
}
set_selection(other_value);
}

AuxiliaryStates__TLV_template::AuxiliaryStates__TLV_template()
{
}

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

AuxiliaryStates__TLV_template::AuxiliaryStates__TLV_template(const AuxiliaryStates__TLV& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean AuxiliaryStates__TLV_template::match(const AuxiliaryStates__TLV& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.mPTYAuxiliaryState().is_bound()) return FALSE;
if(!single_value->field_mPTYAuxiliaryState.match(other_value.mPTYAuxiliaryState(), legacy))return FALSE;
if(!other_value.holdAuxState().is_bound()) return FALSE;
if(!single_value->field_holdAuxState.match(other_value.holdAuxState(), legacy))return FALSE;
if(!other_value.spare__3().is_bound()) return FALSE;
if(!single_value->field_spare__3.match(other_value.spare__3(), legacy))return FALSE;
if(!other_value.ext().is_bound()) return FALSE;
if(!single_value->field_ext.match(other_value.ext(), 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 @MobileL3_CC_Types.AuxiliaryStates_TLV.");
}
return FALSE;
}

boolean AuxiliaryStates__TLV_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || single_value->field_mPTYAuxiliaryState.is_bound()
 || single_value->field_holdAuxState.is_bound()
 || single_value->field_spare__3.is_bound()
 || single_value->field_ext.is_bound();
}

boolean AuxiliaryStates__TLV_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && single_value->field_mPTYAuxiliaryState.is_value()
 && single_value->field_holdAuxState.is_value()
 && single_value->field_spare__3.is_value()
 && single_value->field_ext.is_value();
}

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

AuxiliaryStates__TLV AuxiliaryStates__TLV_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 @MobileL3_CC_Types.AuxiliaryStates_TLV.");
AuxiliaryStates__TLV ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_mPTYAuxiliaryState.is_bound()) {
ret_val.mPTYAuxiliaryState() = single_value->field_mPTYAuxiliaryState.valueof();
}
if (single_value->field_holdAuxState.is_bound()) {
ret_val.holdAuxState() = single_value->field_holdAuxState.valueof();
}
if (single_value->field_spare__3.is_bound()) {
ret_val.spare__3() = single_value->field_spare__3.valueof();
}
if (single_value->field_ext.is_bound()) {
ret_val.ext() = single_value->field_ext.valueof();
}
return ret_val;
}

void AuxiliaryStates__TLV_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 @MobileL3_CC_Types.AuxiliaryStates_TLV.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new AuxiliaryStates__TLV_template[list_length];
}

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

OCTETSTRING_template& AuxiliaryStates__TLV_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& AuxiliaryStates__TLV_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.AuxiliaryStates_TLV.");
return single_value->field_elementIdentifier;
}

INTEGER_template& AuxiliaryStates__TLV_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& AuxiliaryStates__TLV_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.AuxiliaryStates_TLV.");
return single_value->field_lengthIndicator;
}

BITSTRING_template& AuxiliaryStates__TLV_template::mPTYAuxiliaryState()
{
set_specific();
return single_value->field_mPTYAuxiliaryState;
}

const BITSTRING_template& AuxiliaryStates__TLV_template::mPTYAuxiliaryState() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mPTYAuxiliaryState of a non-specific template of type @MobileL3_CC_Types.AuxiliaryStates_TLV.");
return single_value->field_mPTYAuxiliaryState;
}

BITSTRING_template& AuxiliaryStates__TLV_template::holdAuxState()
{
set_specific();
return single_value->field_holdAuxState;
}

const BITSTRING_template& AuxiliaryStates__TLV_template::holdAuxState() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field holdAuxState of a non-specific template of type @MobileL3_CC_Types.AuxiliaryStates_TLV.");
return single_value->field_holdAuxState;
}

BITSTRING_template& AuxiliaryStates__TLV_template::spare__3()
{
set_specific();
return single_value->field_spare__3;
}

const BITSTRING_template& AuxiliaryStates__TLV_template::spare__3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare_3 of a non-specific template of type @MobileL3_CC_Types.AuxiliaryStates_TLV.");
return single_value->field_spare__3;
}

BITSTRING_template& AuxiliaryStates__TLV_template::ext()
{
set_specific();
return single_value->field_ext;
}

const BITSTRING_template& AuxiliaryStates__TLV_template::ext() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext of a non-specific template of type @MobileL3_CC_Types.AuxiliaryStates_TLV.");
return single_value->field_ext;
}

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

void AuxiliaryStates__TLV_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", mPTYAuxiliaryState := ");
single_value->field_mPTYAuxiliaryState.log();
TTCN_Logger::log_event_str(", holdAuxState := ");
single_value->field_holdAuxState.log();
TTCN_Logger::log_event_str(", spare_3 := ");
single_value->field_spare__3.log();
TTCN_Logger::log_event_str(", ext := ");
single_value->field_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 AuxiliaryStates__TLV_template::log_match(const AuxiliaryStates__TLV& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mPTYAuxiliaryState.match(match_value.mPTYAuxiliaryState(), legacy)){
TTCN_Logger::log_logmatch_info(".mPTYAuxiliaryState");
single_value->field_mPTYAuxiliaryState.log_match(match_value.mPTYAuxiliaryState(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_holdAuxState.match(match_value.holdAuxState(), legacy)){
TTCN_Logger::log_logmatch_info(".holdAuxState");
single_value->field_holdAuxState.log_match(match_value.holdAuxState(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare__3.match(match_value.spare__3(), legacy)){
TTCN_Logger::log_logmatch_info(".spare_3");
single_value->field_spare__3.log_match(match_value.spare__3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ext.match(match_value.ext(), legacy)){
TTCN_Logger::log_logmatch_info(".ext");
single_value->field_ext.log_match(match_value.ext(), 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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", mPTYAuxiliaryState := ");
single_value->field_mPTYAuxiliaryState.log_match(match_value.mPTYAuxiliaryState(), legacy);
TTCN_Logger::log_event_str(", holdAuxState := ");
single_value->field_holdAuxState.log_match(match_value.holdAuxState(), legacy);
TTCN_Logger::log_event_str(", spare_3 := ");
single_value->field_spare__3.log_match(match_value.spare__3(), legacy);
TTCN_Logger::log_event_str(", ext := ");
single_value->field_ext.log_match(match_value.ext(), 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 AuxiliaryStates__TLV_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (mPTYAuxiliaryState().is_bound()) mPTYAuxiliaryState().set_implicit_omit();
if (holdAuxState().is_bound()) holdAuxState().set_implicit_omit();
if (spare__3().is_bound()) spare__3().set_implicit_omit();
if (ext().is_bound()) ext().set_implicit_omit();
}

void AuxiliaryStates__TLV_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_mPTYAuxiliaryState.encode_text(text_buf);
single_value->field_holdAuxState.encode_text(text_buf);
single_value->field_spare__3.encode_text(text_buf);
single_value->field_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 @MobileL3_CC_Types.AuxiliaryStates_TLV.");
}
}

void AuxiliaryStates__TLV_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_mPTYAuxiliaryState.decode_text(text_buf);
single_value->field_holdAuxState.decode_text(text_buf);
single_value->field_spare__3.decode_text(text_buf);
single_value->field_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 AuxiliaryStates__TLV_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 @MobileL3_CC_Types.AuxiliaryStates_TLV.");
}
}

void AuxiliaryStates__TLV_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: {
    AuxiliaryStates__TLV_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 @MobileL3_CC_Types.AuxiliaryStates_TLV 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) mPTYAuxiliaryState().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) holdAuxState().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) spare__3().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) ext().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mPTYAuxiliaryState")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mPTYAuxiliaryState().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "holdAuxState")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          holdAuxState().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          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 @MobileL3_CC_Types.AuxiliaryStates_TLV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    AuxiliaryStates__TLV_template* precondition = new AuxiliaryStates__TLV_template;
    precondition->set_param(*param.get_elem(0));
    AuxiliaryStates__TLV_template* implied_template = new AuxiliaryStates__TLV_template;
    implied_template->set_param(*param.get_elem(1));
    *this = AuxiliaryStates__TLV_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.AuxiliaryStates_TLV");
  }
  is_ifpresent = param.get_ifpresent();
}

void AuxiliaryStates__TLV_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.AuxiliaryStates_TLV");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.AuxiliaryStates_TLV");
single_value->field_mPTYAuxiliaryState.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.AuxiliaryStates_TLV");
single_value->field_holdAuxState.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.AuxiliaryStates_TLV");
single_value->field_spare__3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.AuxiliaryStates_TLV");
single_value->field_ext.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.AuxiliaryStates_TLV");
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 : "@MobileL3_CC_Types.AuxiliaryStates_TLV");
}

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

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

AuxiliaryStates__LV::AuxiliaryStates__LV()
{
}

AuxiliaryStates__LV::AuxiliaryStates__LV(const INTEGER& par_lengthIndicator,
    const BITSTRING& par_mPTYAuxState,
    const BITSTRING& par_holdAuxiliaryState,
    const BITSTRING& par_spare__3,
    const BITSTRING& par_ext)
  :   field_lengthIndicator(par_lengthIndicator),
  field_mPTYAuxState(par_mPTYAuxState),
  field_holdAuxiliaryState(par_holdAuxiliaryState),
  field_spare__3(par_spare__3),
  field_ext(par_ext)
{
}

AuxiliaryStates__LV::AuxiliaryStates__LV(const AuxiliaryStates__LV& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.AuxiliaryStates_LV.");
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.mPTYAuxState().is_bound()) field_mPTYAuxState = other_value.mPTYAuxState();
else field_mPTYAuxState.clean_up();
if (other_value.holdAuxiliaryState().is_bound()) field_holdAuxiliaryState = other_value.holdAuxiliaryState();
else field_holdAuxiliaryState.clean_up();
if (other_value.spare__3().is_bound()) field_spare__3 = other_value.spare__3();
else field_spare__3.clean_up();
if (other_value.ext().is_bound()) field_ext = other_value.ext();
else field_ext.clean_up();
}

void AuxiliaryStates__LV::clean_up()
{
field_lengthIndicator.clean_up();
field_mPTYAuxState.clean_up();
field_holdAuxiliaryState.clean_up();
field_spare__3.clean_up();
field_ext.clean_up();
}

const TTCN_Typedescriptor_t* AuxiliaryStates__LV::get_descriptor() const { return &AuxiliaryStates__LV_descr_; }
AuxiliaryStates__LV& AuxiliaryStates__LV::operator=(const AuxiliaryStates__LV& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.AuxiliaryStates_LV.");
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.mPTYAuxState().is_bound()) field_mPTYAuxState = other_value.mPTYAuxState();
  else field_mPTYAuxState.clean_up();
  if (other_value.holdAuxiliaryState().is_bound()) field_holdAuxiliaryState = other_value.holdAuxiliaryState();
  else field_holdAuxiliaryState.clean_up();
  if (other_value.spare__3().is_bound()) field_spare__3 = other_value.spare__3();
  else field_spare__3.clean_up();
  if (other_value.ext().is_bound()) field_ext = other_value.ext();
  else field_ext.clean_up();
}
return *this;
}

boolean AuxiliaryStates__LV::operator==(const AuxiliaryStates__LV& other_value) const
{
return field_lengthIndicator==other_value.field_lengthIndicator
  && field_mPTYAuxState==other_value.field_mPTYAuxState
  && field_holdAuxiliaryState==other_value.field_holdAuxiliaryState
  && field_spare__3==other_value.field_spare__3
  && field_ext==other_value.field_ext;
}

boolean AuxiliaryStates__LV::is_bound() const
{
return (field_lengthIndicator.is_bound())
  || (field_mPTYAuxState.is_bound())
  || (field_holdAuxiliaryState.is_bound())
  || (field_spare__3.is_bound())
  || (field_ext.is_bound());
}
boolean AuxiliaryStates__LV::is_value() const
{
return field_lengthIndicator.is_value()
  && field_mPTYAuxState.is_value()
  && field_holdAuxiliaryState.is_value()
  && field_spare__3.is_value()
  && field_ext.is_value();
}
void AuxiliaryStates__LV::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", mPTYAuxState := ");
field_mPTYAuxState.log();
TTCN_Logger::log_event_str(", holdAuxiliaryState := ");
field_holdAuxiliaryState.log();
TTCN_Logger::log_event_str(", spare_3 := ");
field_spare__3.log();
TTCN_Logger::log_event_str(", ext := ");
field_ext.log();
TTCN_Logger::log_event_str(" }");
}

void AuxiliaryStates__LV::set_implicit_omit()
{
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (mPTYAuxState().is_bound()) mPTYAuxState().set_implicit_omit();
if (holdAuxiliaryState().is_bound()) holdAuxiliaryState().set_implicit_omit();
if (spare__3().is_bound()) spare__3().set_implicit_omit();
if (ext().is_bound()) ext().set_implicit_omit();
}

void AuxiliaryStates__LV::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (5<param.get_size()) {
      param.error("record value of type @MobileL3_CC_Types.AuxiliaryStates_LV has 5 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) mPTYAuxState().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) holdAuxiliaryState().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) spare__3().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ext().set_param(*param.get_elem(4));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mPTYAuxState")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mPTYAuxState().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "holdAuxiliaryState")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          holdAuxiliaryState().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          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 @MobileL3_CC_Types.AuxiliaryStates_LV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.AuxiliaryStates_LV");
  }
}

void AuxiliaryStates__LV::encode_text(Text_Buf& text_buf) const
{
field_lengthIndicator.encode_text(text_buf);
field_mPTYAuxState.encode_text(text_buf);
field_holdAuxiliaryState.encode_text(text_buf);
field_spare__3.encode_text(text_buf);
field_ext.encode_text(text_buf);
}

void AuxiliaryStates__LV::decode_text(Text_Buf& text_buf)
{
field_lengthIndicator.decode_text(text_buf);
field_mPTYAuxState.decode_text(text_buf);
field_holdAuxiliaryState.decode_text(text_buf);
field_spare__3.decode_text(text_buf);
field_ext.decode_text(text_buf);
}

void AuxiliaryStates__LV::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 AuxiliaryStates__LV::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 AuxiliaryStates__LV::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_field0 = 0;
  RAW_Force_Omit field_0_force_omit(0, force_omit, AuxiliaryStates__LV_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(AuxiliaryStates__LV_lengthIndicator_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());
  INTEGER tmp0 = field_lengthIndicator.convert_to_Integer(AuxiliaryStates__LV_lengthIndicator_descr_);
  field_lengthIndicator = tmp0;
  value_of_length_field0 += tmp0.get_long_long_val() * 8;
  RAW_Force_Omit field_1_force_omit(1, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_mPTYAuxState.RAW_decode(General__Types::BIT2_descr_, p_buf, min_of_ints(2, limit, value_of_length_field0), 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());
  value_of_length_field0 -= decoded_field_length;
  RAW_Force_Omit field_2_force_omit(2, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_holdAuxiliaryState.RAW_decode(General__Types::BIT2_descr_, p_buf, min_of_ints(2, limit, value_of_length_field0), 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_field0 -= decoded_field_length;
  RAW_Force_Omit field_3_force_omit(3, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_spare__3.RAW_decode(General__Types::BIT3_descr_, p_buf, min_of_ints(2, limit, value_of_length_field0), 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());
  value_of_length_field0 -= decoded_field_length;
  RAW_Force_Omit field_4_force_omit(4, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_ext.RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field0), 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());
  value_of_length_field0 -= 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 AuxiliaryStates__LV::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 5;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(5);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, AuxiliaryStates__LV_lengthIndicator_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT3_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT1_descr_.raw);
  encoded_length += 8;
  myleaf.body.node.nodes[0]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[0]->coding_descr = &AuxiliaryStates__LV_lengthIndicator_descr_;
  myleaf.body.node.nodes[0]->calcof.lengthto.num_of_fields = 4;
  myleaf.body.node.nodes[0]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[0]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields = init_lengthto_fields_list(4);
  myleaf.body.node.nodes[0]->length = 8;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[1]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[1]->curr_pos.pos;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[2]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[2]->curr_pos.pos;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[2].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[2].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[3].level = myleaf.body.node.nodes[4]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[3].pos = myleaf.body.node.nodes[4]->curr_pos.pos;
  encoded_length += field_mPTYAuxState.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_holdAuxiliaryState.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_spare__3.RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_ext.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[4]);
  return myleaf.length = encoded_length;
}

struct AuxiliaryStates__LV_template::single_value_struct {
INTEGER_template field_lengthIndicator;
BITSTRING_template field_mPTYAuxState;
BITSTRING_template field_holdAuxiliaryState;
BITSTRING_template field_spare__3;
BITSTRING_template field_ext;
};

void AuxiliaryStates__LV_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_lengthIndicator = ANY_VALUE;
single_value->field_mPTYAuxState = ANY_VALUE;
single_value->field_holdAuxiliaryState = ANY_VALUE;
single_value->field_spare__3 = ANY_VALUE;
single_value->field_ext = ANY_VALUE;
}
}
}

void AuxiliaryStates__LV_template::copy_value(const AuxiliaryStates__LV& other_value)
{
single_value = new single_value_struct;
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.mPTYAuxState().is_bound()) {
  single_value->field_mPTYAuxState = other_value.mPTYAuxState();
} else {
  single_value->field_mPTYAuxState.clean_up();
}
if (other_value.holdAuxiliaryState().is_bound()) {
  single_value->field_holdAuxiliaryState = other_value.holdAuxiliaryState();
} else {
  single_value->field_holdAuxiliaryState.clean_up();
}
if (other_value.spare__3().is_bound()) {
  single_value->field_spare__3 = other_value.spare__3();
} else {
  single_value->field_spare__3.clean_up();
}
if (other_value.ext().is_bound()) {
  single_value->field_ext = other_value.ext();
} else {
  single_value->field_ext.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void AuxiliaryStates__LV_template::copy_template(const AuxiliaryStates__LV_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mPTYAuxState().get_selection()) {
single_value->field_mPTYAuxState = other_value.mPTYAuxState();
} else {
single_value->field_mPTYAuxState.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.holdAuxiliaryState().get_selection()) {
single_value->field_holdAuxiliaryState = other_value.holdAuxiliaryState();
} else {
single_value->field_holdAuxiliaryState.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare__3().get_selection()) {
single_value->field_spare__3 = other_value.spare__3();
} else {
single_value->field_spare__3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext().get_selection()) {
single_value->field_ext = other_value.ext();
} else {
single_value->field_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 AuxiliaryStates__LV_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 AuxiliaryStates__LV_template(*other_value.implication_.precondition);
implication_.implied_template = new AuxiliaryStates__LV_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 @MobileL3_CC_Types.AuxiliaryStates_LV.");
break;
}
set_selection(other_value);
}

AuxiliaryStates__LV_template::AuxiliaryStates__LV_template()
{
}

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

AuxiliaryStates__LV_template::AuxiliaryStates__LV_template(const AuxiliaryStates__LV& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean AuxiliaryStates__LV_template::match(const AuxiliaryStates__LV& 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.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.mPTYAuxState().is_bound()) return FALSE;
if(!single_value->field_mPTYAuxState.match(other_value.mPTYAuxState(), legacy))return FALSE;
if(!other_value.holdAuxiliaryState().is_bound()) return FALSE;
if(!single_value->field_holdAuxiliaryState.match(other_value.holdAuxiliaryState(), legacy))return FALSE;
if(!other_value.spare__3().is_bound()) return FALSE;
if(!single_value->field_spare__3.match(other_value.spare__3(), legacy))return FALSE;
if(!other_value.ext().is_bound()) return FALSE;
if(!single_value->field_ext.match(other_value.ext(), 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 @MobileL3_CC_Types.AuxiliaryStates_LV.");
}
return FALSE;
}

boolean AuxiliaryStates__LV_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_lengthIndicator.is_bound()
 || single_value->field_mPTYAuxState.is_bound()
 || single_value->field_holdAuxiliaryState.is_bound()
 || single_value->field_spare__3.is_bound()
 || single_value->field_ext.is_bound();
}

boolean AuxiliaryStates__LV_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_lengthIndicator.is_value()
 && single_value->field_mPTYAuxState.is_value()
 && single_value->field_holdAuxiliaryState.is_value()
 && single_value->field_spare__3.is_value()
 && single_value->field_ext.is_value();
}

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

AuxiliaryStates__LV AuxiliaryStates__LV_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 @MobileL3_CC_Types.AuxiliaryStates_LV.");
AuxiliaryStates__LV ret_val;
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_mPTYAuxState.is_bound()) {
ret_val.mPTYAuxState() = single_value->field_mPTYAuxState.valueof();
}
if (single_value->field_holdAuxiliaryState.is_bound()) {
ret_val.holdAuxiliaryState() = single_value->field_holdAuxiliaryState.valueof();
}
if (single_value->field_spare__3.is_bound()) {
ret_val.spare__3() = single_value->field_spare__3.valueof();
}
if (single_value->field_ext.is_bound()) {
ret_val.ext() = single_value->field_ext.valueof();
}
return ret_val;
}

void AuxiliaryStates__LV_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 @MobileL3_CC_Types.AuxiliaryStates_LV.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new AuxiliaryStates__LV_template[list_length];
}

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

INTEGER_template& AuxiliaryStates__LV_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& AuxiliaryStates__LV_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.AuxiliaryStates_LV.");
return single_value->field_lengthIndicator;
}

BITSTRING_template& AuxiliaryStates__LV_template::mPTYAuxState()
{
set_specific();
return single_value->field_mPTYAuxState;
}

const BITSTRING_template& AuxiliaryStates__LV_template::mPTYAuxState() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mPTYAuxState of a non-specific template of type @MobileL3_CC_Types.AuxiliaryStates_LV.");
return single_value->field_mPTYAuxState;
}

BITSTRING_template& AuxiliaryStates__LV_template::holdAuxiliaryState()
{
set_specific();
return single_value->field_holdAuxiliaryState;
}

const BITSTRING_template& AuxiliaryStates__LV_template::holdAuxiliaryState() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field holdAuxiliaryState of a non-specific template of type @MobileL3_CC_Types.AuxiliaryStates_LV.");
return single_value->field_holdAuxiliaryState;
}

BITSTRING_template& AuxiliaryStates__LV_template::spare__3()
{
set_specific();
return single_value->field_spare__3;
}

const BITSTRING_template& AuxiliaryStates__LV_template::spare__3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare_3 of a non-specific template of type @MobileL3_CC_Types.AuxiliaryStates_LV.");
return single_value->field_spare__3;
}

BITSTRING_template& AuxiliaryStates__LV_template::ext()
{
set_specific();
return single_value->field_ext;
}

const BITSTRING_template& AuxiliaryStates__LV_template::ext() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext of a non-specific template of type @MobileL3_CC_Types.AuxiliaryStates_LV.");
return single_value->field_ext;
}

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

void AuxiliaryStates__LV_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", mPTYAuxState := ");
single_value->field_mPTYAuxState.log();
TTCN_Logger::log_event_str(", holdAuxiliaryState := ");
single_value->field_holdAuxiliaryState.log();
TTCN_Logger::log_event_str(", spare_3 := ");
single_value->field_spare__3.log();
TTCN_Logger::log_event_str(", ext := ");
single_value->field_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 AuxiliaryStates__LV_template::log_match(const AuxiliaryStates__LV& 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_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mPTYAuxState.match(match_value.mPTYAuxState(), legacy)){
TTCN_Logger::log_logmatch_info(".mPTYAuxState");
single_value->field_mPTYAuxState.log_match(match_value.mPTYAuxState(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_holdAuxiliaryState.match(match_value.holdAuxiliaryState(), legacy)){
TTCN_Logger::log_logmatch_info(".holdAuxiliaryState");
single_value->field_holdAuxiliaryState.log_match(match_value.holdAuxiliaryState(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare__3.match(match_value.spare__3(), legacy)){
TTCN_Logger::log_logmatch_info(".spare_3");
single_value->field_spare__3.log_match(match_value.spare__3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ext.match(match_value.ext(), legacy)){
TTCN_Logger::log_logmatch_info(".ext");
single_value->field_ext.log_match(match_value.ext(), 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("{ lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", mPTYAuxState := ");
single_value->field_mPTYAuxState.log_match(match_value.mPTYAuxState(), legacy);
TTCN_Logger::log_event_str(", holdAuxiliaryState := ");
single_value->field_holdAuxiliaryState.log_match(match_value.holdAuxiliaryState(), legacy);
TTCN_Logger::log_event_str(", spare_3 := ");
single_value->field_spare__3.log_match(match_value.spare__3(), legacy);
TTCN_Logger::log_event_str(", ext := ");
single_value->field_ext.log_match(match_value.ext(), 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 AuxiliaryStates__LV_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (mPTYAuxState().is_bound()) mPTYAuxState().set_implicit_omit();
if (holdAuxiliaryState().is_bound()) holdAuxiliaryState().set_implicit_omit();
if (spare__3().is_bound()) spare__3().set_implicit_omit();
if (ext().is_bound()) ext().set_implicit_omit();
}

void AuxiliaryStates__LV_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_mPTYAuxState.encode_text(text_buf);
single_value->field_holdAuxiliaryState.encode_text(text_buf);
single_value->field_spare__3.encode_text(text_buf);
single_value->field_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 @MobileL3_CC_Types.AuxiliaryStates_LV.");
}
}

void AuxiliaryStates__LV_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_lengthIndicator.decode_text(text_buf);
single_value->field_mPTYAuxState.decode_text(text_buf);
single_value->field_holdAuxiliaryState.decode_text(text_buf);
single_value->field_spare__3.decode_text(text_buf);
single_value->field_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 AuxiliaryStates__LV_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 @MobileL3_CC_Types.AuxiliaryStates_LV.");
}
}

void AuxiliaryStates__LV_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: {
    AuxiliaryStates__LV_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (5<param.get_size()) {
      param.error("record template of type @MobileL3_CC_Types.AuxiliaryStates_LV has 5 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) mPTYAuxState().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) holdAuxiliaryState().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) spare__3().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ext().set_param(*param.get_elem(4));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mPTYAuxState")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mPTYAuxState().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "holdAuxiliaryState")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          holdAuxiliaryState().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          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 @MobileL3_CC_Types.AuxiliaryStates_LV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    AuxiliaryStates__LV_template* precondition = new AuxiliaryStates__LV_template;
    precondition->set_param(*param.get_elem(0));
    AuxiliaryStates__LV_template* implied_template = new AuxiliaryStates__LV_template;
    implied_template->set_param(*param.get_elem(1));
    *this = AuxiliaryStates__LV_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.AuxiliaryStates_LV");
  }
  is_ifpresent = param.get_ifpresent();
}

void AuxiliaryStates__LV_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_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.AuxiliaryStates_LV");
single_value->field_mPTYAuxState.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.AuxiliaryStates_LV");
single_value->field_holdAuxiliaryState.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.AuxiliaryStates_LV");
single_value->field_spare__3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.AuxiliaryStates_LV");
single_value->field_ext.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.AuxiliaryStates_LV");
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 : "@MobileL3_CC_Types.AuxiliaryStates_LV");
}

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

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

BBC__octet3::BBC__octet3()
{
}

BBC__octet3::BBC__octet3(const BITSTRING& par_informationTransferCapability,
    const BITSTRING& par_transferMode,
    const BITSTRING& par_codingStandard,
    const BITSTRING& par_radioChannelRequirement,
    const BITSTRING& par_extension__octet__3)
  :   field_informationTransferCapability(par_informationTransferCapability),
  field_transferMode(par_transferMode),
  field_codingStandard(par_codingStandard),
  field_radioChannelRequirement(par_radioChannelRequirement),
  field_extension__octet__3(par_extension__octet__3)
{
}

BBC__octet3::BBC__octet3(const BBC__octet3& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.BBC_octet3.");
if (other_value.informationTransferCapability().is_bound()) field_informationTransferCapability = other_value.informationTransferCapability();
else field_informationTransferCapability.clean_up();
if (other_value.transferMode().is_bound()) field_transferMode = other_value.transferMode();
else field_transferMode.clean_up();
if (other_value.codingStandard().is_bound()) field_codingStandard = other_value.codingStandard();
else field_codingStandard.clean_up();
if (other_value.radioChannelRequirement().is_bound()) field_radioChannelRequirement = other_value.radioChannelRequirement();
else field_radioChannelRequirement.clean_up();
if (other_value.extension__octet__3().is_bound()) field_extension__octet__3 = other_value.extension__octet__3();
else field_extension__octet__3.clean_up();
}

void BBC__octet3::clean_up()
{
field_informationTransferCapability.clean_up();
field_transferMode.clean_up();
field_codingStandard.clean_up();
field_radioChannelRequirement.clean_up();
field_extension__octet__3.clean_up();
}

const TTCN_Typedescriptor_t* BBC__octet3::get_descriptor() const { return &BBC__octet3_descr_; }
BBC__octet3& BBC__octet3::operator=(const BBC__octet3& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.BBC_octet3.");
  if (other_value.informationTransferCapability().is_bound()) field_informationTransferCapability = other_value.informationTransferCapability();
  else field_informationTransferCapability.clean_up();
  if (other_value.transferMode().is_bound()) field_transferMode = other_value.transferMode();
  else field_transferMode.clean_up();
  if (other_value.codingStandard().is_bound()) field_codingStandard = other_value.codingStandard();
  else field_codingStandard.clean_up();
  if (other_value.radioChannelRequirement().is_bound()) field_radioChannelRequirement = other_value.radioChannelRequirement();
  else field_radioChannelRequirement.clean_up();
  if (other_value.extension__octet__3().is_bound()) field_extension__octet__3 = other_value.extension__octet__3();
  else field_extension__octet__3.clean_up();
}
return *this;
}

boolean BBC__octet3::operator==(const BBC__octet3& other_value) const
{
return field_informationTransferCapability==other_value.field_informationTransferCapability
  && field_transferMode==other_value.field_transferMode
  && field_codingStandard==other_value.field_codingStandard
  && field_radioChannelRequirement==other_value.field_radioChannelRequirement
  && field_extension__octet__3==other_value.field_extension__octet__3;
}

boolean BBC__octet3::is_bound() const
{
return (field_informationTransferCapability.is_bound())
  || (field_transferMode.is_bound())
  || (field_codingStandard.is_bound())
  || (field_radioChannelRequirement.is_bound())
  || (field_extension__octet__3.is_bound());
}
boolean BBC__octet3::is_value() const
{
return field_informationTransferCapability.is_value()
  && field_transferMode.is_value()
  && field_codingStandard.is_value()
  && field_radioChannelRequirement.is_value()
  && field_extension__octet__3.is_value();
}
void BBC__octet3::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ informationTransferCapability := ");
field_informationTransferCapability.log();
TTCN_Logger::log_event_str(", transferMode := ");
field_transferMode.log();
TTCN_Logger::log_event_str(", codingStandard := ");
field_codingStandard.log();
TTCN_Logger::log_event_str(", radioChannelRequirement := ");
field_radioChannelRequirement.log();
TTCN_Logger::log_event_str(", extension_octet_3 := ");
field_extension__octet__3.log();
TTCN_Logger::log_event_str(" }");
}

void BBC__octet3::set_implicit_omit()
{
if (informationTransferCapability().is_bound()) informationTransferCapability().set_implicit_omit();
if (transferMode().is_bound()) transferMode().set_implicit_omit();
if (codingStandard().is_bound()) codingStandard().set_implicit_omit();
if (radioChannelRequirement().is_bound()) radioChannelRequirement().set_implicit_omit();
if (extension__octet__3().is_bound()) extension__octet__3().set_implicit_omit();
}

void BBC__octet3::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (5<param.get_size()) {
      param.error("record value of type @MobileL3_CC_Types.BBC_octet3 has 5 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) informationTransferCapability().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) transferMode().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) codingStandard().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) radioChannelRequirement().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) extension__octet__3().set_param(*param.get_elem(4));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "informationTransferCapability")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          informationTransferCapability().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "transferMode")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          transferMode().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "codingStandard")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          codingStandard().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "radioChannelRequirement")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          radioChannelRequirement().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__3().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 @MobileL3_CC_Types.BBC_octet3: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.BBC_octet3");
  }
}

void BBC__octet3::encode_text(Text_Buf& text_buf) const
{
field_informationTransferCapability.encode_text(text_buf);
field_transferMode.encode_text(text_buf);
field_codingStandard.encode_text(text_buf);
field_radioChannelRequirement.encode_text(text_buf);
field_extension__octet__3.encode_text(text_buf);
}

void BBC__octet3::decode_text(Text_Buf& text_buf)
{
field_informationTransferCapability.decode_text(text_buf);
field_transferMode.decode_text(text_buf);
field_codingStandard.decode_text(text_buf);
field_radioChannelRequirement.decode_text(text_buf);
field_extension__octet__3.decode_text(text_buf);
}

void BBC__octet3::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 BBC__octet3::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 BBC__octet3::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;
  {
  cbyte* data=p_buf.get_read_data();
  int count=1;
  unsigned mask = 1 << (local_top_order==ORDER_LSB ? 0 : 7);
  if(p_td.raw->extension_bit==EXT_BIT_YES){
    while((data[count-1] & mask)==0 && count*8<(int)limit) count++;
  }
  else{
    while((data[count-1] & mask)!=0 && count*8<(int)limit) count++;
  }
  if(limit) limit=count*8;
  }
  RAW_Force_Omit field_0_force_omit(0, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_informationTransferCapability.RAW_decode(General__Types::BIT3_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_transferMode.RAW_decode(General__Types::BIT1_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_codingStandard.RAW_decode(General__Types::BIT1_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, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_radioChannelRequirement.RAW_decode(General__Types::BIT2_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__3.RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int BBC__octet3::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 5;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(5);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, General__Types::BIT3_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT1_descr_.raw);
  encoded_length += field_informationTransferCapability.RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_transferMode.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_codingStandard.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_radioChannelRequirement.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_extension__octet__3.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[4]);
  return myleaf.length = encoded_length;
}

struct BBC__octet3_template::single_value_struct {
BITSTRING_template field_informationTransferCapability;
BITSTRING_template field_transferMode;
BITSTRING_template field_codingStandard;
BITSTRING_template field_radioChannelRequirement;
BITSTRING_template field_extension__octet__3;
};

void BBC__octet3_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_informationTransferCapability = ANY_VALUE;
single_value->field_transferMode = ANY_VALUE;
single_value->field_codingStandard = ANY_VALUE;
single_value->field_radioChannelRequirement = ANY_VALUE;
single_value->field_extension__octet__3 = ANY_VALUE;
}
}
}

void BBC__octet3_template::copy_value(const BBC__octet3& other_value)
{
single_value = new single_value_struct;
if (other_value.informationTransferCapability().is_bound()) {
  single_value->field_informationTransferCapability = other_value.informationTransferCapability();
} else {
  single_value->field_informationTransferCapability.clean_up();
}
if (other_value.transferMode().is_bound()) {
  single_value->field_transferMode = other_value.transferMode();
} else {
  single_value->field_transferMode.clean_up();
}
if (other_value.codingStandard().is_bound()) {
  single_value->field_codingStandard = other_value.codingStandard();
} else {
  single_value->field_codingStandard.clean_up();
}
if (other_value.radioChannelRequirement().is_bound()) {
  single_value->field_radioChannelRequirement = other_value.radioChannelRequirement();
} else {
  single_value->field_radioChannelRequirement.clean_up();
}
if (other_value.extension__octet__3().is_bound()) {
  single_value->field_extension__octet__3 = other_value.extension__octet__3();
} else {
  single_value->field_extension__octet__3.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void BBC__octet3_template::copy_template(const BBC__octet3_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.informationTransferCapability().get_selection()) {
single_value->field_informationTransferCapability = other_value.informationTransferCapability();
} else {
single_value->field_informationTransferCapability.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.transferMode().get_selection()) {
single_value->field_transferMode = other_value.transferMode();
} else {
single_value->field_transferMode.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.codingStandard().get_selection()) {
single_value->field_codingStandard = other_value.codingStandard();
} else {
single_value->field_codingStandard.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.radioChannelRequirement().get_selection()) {
single_value->field_radioChannelRequirement = other_value.radioChannelRequirement();
} else {
single_value->field_radioChannelRequirement.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__3().get_selection()) {
single_value->field_extension__octet__3 = other_value.extension__octet__3();
} else {
single_value->field_extension__octet__3.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 BBC__octet3_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 BBC__octet3_template(*other_value.implication_.precondition);
implication_.implied_template = new BBC__octet3_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 @MobileL3_CC_Types.BBC_octet3.");
break;
}
set_selection(other_value);
}

BBC__octet3_template::BBC__octet3_template()
{
}

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

BBC__octet3_template::BBC__octet3_template(const BBC__octet3& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean BBC__octet3_template::match(const BBC__octet3& 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.informationTransferCapability().is_bound()) return FALSE;
if(!single_value->field_informationTransferCapability.match(other_value.informationTransferCapability(), legacy))return FALSE;
if(!other_value.transferMode().is_bound()) return FALSE;
if(!single_value->field_transferMode.match(other_value.transferMode(), legacy))return FALSE;
if(!other_value.codingStandard().is_bound()) return FALSE;
if(!single_value->field_codingStandard.match(other_value.codingStandard(), legacy))return FALSE;
if(!other_value.radioChannelRequirement().is_bound()) return FALSE;
if(!single_value->field_radioChannelRequirement.match(other_value.radioChannelRequirement(), legacy))return FALSE;
if(!other_value.extension__octet__3().is_bound()) return FALSE;
if(!single_value->field_extension__octet__3.match(other_value.extension__octet__3(), 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 @MobileL3_CC_Types.BBC_octet3.");
}
return FALSE;
}

boolean BBC__octet3_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_informationTransferCapability.is_bound()
 || single_value->field_transferMode.is_bound()
 || single_value->field_codingStandard.is_bound()
 || single_value->field_radioChannelRequirement.is_bound()
 || single_value->field_extension__octet__3.is_bound();
}

boolean BBC__octet3_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_informationTransferCapability.is_value()
 && single_value->field_transferMode.is_value()
 && single_value->field_codingStandard.is_value()
 && single_value->field_radioChannelRequirement.is_value()
 && single_value->field_extension__octet__3.is_value();
}

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

BBC__octet3 BBC__octet3_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 @MobileL3_CC_Types.BBC_octet3.");
BBC__octet3 ret_val;
if (single_value->field_informationTransferCapability.is_bound()) {
ret_val.informationTransferCapability() = single_value->field_informationTransferCapability.valueof();
}
if (single_value->field_transferMode.is_bound()) {
ret_val.transferMode() = single_value->field_transferMode.valueof();
}
if (single_value->field_codingStandard.is_bound()) {
ret_val.codingStandard() = single_value->field_codingStandard.valueof();
}
if (single_value->field_radioChannelRequirement.is_bound()) {
ret_val.radioChannelRequirement() = single_value->field_radioChannelRequirement.valueof();
}
if (single_value->field_extension__octet__3.is_bound()) {
ret_val.extension__octet__3() = single_value->field_extension__octet__3.valueof();
}
return ret_val;
}

void BBC__octet3_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 @MobileL3_CC_Types.BBC_octet3.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new BBC__octet3_template[list_length];
}

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

BITSTRING_template& BBC__octet3_template::informationTransferCapability()
{
set_specific();
return single_value->field_informationTransferCapability;
}

const BITSTRING_template& BBC__octet3_template::informationTransferCapability() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field informationTransferCapability of a non-specific template of type @MobileL3_CC_Types.BBC_octet3.");
return single_value->field_informationTransferCapability;
}

BITSTRING_template& BBC__octet3_template::transferMode()
{
set_specific();
return single_value->field_transferMode;
}

const BITSTRING_template& BBC__octet3_template::transferMode() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field transferMode of a non-specific template of type @MobileL3_CC_Types.BBC_octet3.");
return single_value->field_transferMode;
}

BITSTRING_template& BBC__octet3_template::codingStandard()
{
set_specific();
return single_value->field_codingStandard;
}

const BITSTRING_template& BBC__octet3_template::codingStandard() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field codingStandard of a non-specific template of type @MobileL3_CC_Types.BBC_octet3.");
return single_value->field_codingStandard;
}

BITSTRING_template& BBC__octet3_template::radioChannelRequirement()
{
set_specific();
return single_value->field_radioChannelRequirement;
}

const BITSTRING_template& BBC__octet3_template::radioChannelRequirement() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field radioChannelRequirement of a non-specific template of type @MobileL3_CC_Types.BBC_octet3.");
return single_value->field_radioChannelRequirement;
}

BITSTRING_template& BBC__octet3_template::extension__octet__3()
{
set_specific();
return single_value->field_extension__octet__3;
}

const BITSTRING_template& BBC__octet3_template::extension__octet__3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_3 of a non-specific template of type @MobileL3_CC_Types.BBC_octet3.");
return single_value->field_extension__octet__3;
}

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

void BBC__octet3_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ informationTransferCapability := ");
single_value->field_informationTransferCapability.log();
TTCN_Logger::log_event_str(", transferMode := ");
single_value->field_transferMode.log();
TTCN_Logger::log_event_str(", codingStandard := ");
single_value->field_codingStandard.log();
TTCN_Logger::log_event_str(", radioChannelRequirement := ");
single_value->field_radioChannelRequirement.log();
TTCN_Logger::log_event_str(", extension_octet_3 := ");
single_value->field_extension__octet__3.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 BBC__octet3_template::log_match(const BBC__octet3& 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_informationTransferCapability.match(match_value.informationTransferCapability(), legacy)){
TTCN_Logger::log_logmatch_info(".informationTransferCapability");
single_value->field_informationTransferCapability.log_match(match_value.informationTransferCapability(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_transferMode.match(match_value.transferMode(), legacy)){
TTCN_Logger::log_logmatch_info(".transferMode");
single_value->field_transferMode.log_match(match_value.transferMode(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_codingStandard.match(match_value.codingStandard(), legacy)){
TTCN_Logger::log_logmatch_info(".codingStandard");
single_value->field_codingStandard.log_match(match_value.codingStandard(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_radioChannelRequirement.match(match_value.radioChannelRequirement(), legacy)){
TTCN_Logger::log_logmatch_info(".radioChannelRequirement");
single_value->field_radioChannelRequirement.log_match(match_value.radioChannelRequirement(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_extension__octet__3.match(match_value.extension__octet__3(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_3");
single_value->field_extension__octet__3.log_match(match_value.extension__octet__3(), 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("{ informationTransferCapability := ");
single_value->field_informationTransferCapability.log_match(match_value.informationTransferCapability(), legacy);
TTCN_Logger::log_event_str(", transferMode := ");
single_value->field_transferMode.log_match(match_value.transferMode(), legacy);
TTCN_Logger::log_event_str(", codingStandard := ");
single_value->field_codingStandard.log_match(match_value.codingStandard(), legacy);
TTCN_Logger::log_event_str(", radioChannelRequirement := ");
single_value->field_radioChannelRequirement.log_match(match_value.radioChannelRequirement(), legacy);
TTCN_Logger::log_event_str(", extension_octet_3 := ");
single_value->field_extension__octet__3.log_match(match_value.extension__octet__3(), 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 BBC__octet3_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (informationTransferCapability().is_bound()) informationTransferCapability().set_implicit_omit();
if (transferMode().is_bound()) transferMode().set_implicit_omit();
if (codingStandard().is_bound()) codingStandard().set_implicit_omit();
if (radioChannelRequirement().is_bound()) radioChannelRequirement().set_implicit_omit();
if (extension__octet__3().is_bound()) extension__octet__3().set_implicit_omit();
}

void BBC__octet3_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_informationTransferCapability.encode_text(text_buf);
single_value->field_transferMode.encode_text(text_buf);
single_value->field_codingStandard.encode_text(text_buf);
single_value->field_radioChannelRequirement.encode_text(text_buf);
single_value->field_extension__octet__3.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 @MobileL3_CC_Types.BBC_octet3.");
}
}

void BBC__octet3_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_informationTransferCapability.decode_text(text_buf);
single_value->field_transferMode.decode_text(text_buf);
single_value->field_codingStandard.decode_text(text_buf);
single_value->field_radioChannelRequirement.decode_text(text_buf);
single_value->field_extension__octet__3.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 BBC__octet3_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 @MobileL3_CC_Types.BBC_octet3.");
}
}

void BBC__octet3_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: {
    BBC__octet3_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (5<param.get_size()) {
      param.error("record template of type @MobileL3_CC_Types.BBC_octet3 has 5 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) informationTransferCapability().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) transferMode().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) codingStandard().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) radioChannelRequirement().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) extension__octet__3().set_param(*param.get_elem(4));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "informationTransferCapability")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          informationTransferCapability().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "transferMode")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          transferMode().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "codingStandard")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          codingStandard().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "radioChannelRequirement")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          radioChannelRequirement().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__3().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 @MobileL3_CC_Types.BBC_octet3: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    BBC__octet3_template* precondition = new BBC__octet3_template;
    precondition->set_param(*param.get_elem(0));
    BBC__octet3_template* implied_template = new BBC__octet3_template;
    implied_template->set_param(*param.get_elem(1));
    *this = BBC__octet3_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.BBC_octet3");
  }
  is_ifpresent = param.get_ifpresent();
}

void BBC__octet3_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_informationTransferCapability.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BBC_octet3");
single_value->field_transferMode.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BBC_octet3");
single_value->field_codingStandard.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BBC_octet3");
single_value->field_radioChannelRequirement.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BBC_octet3");
single_value->field_extension__octet__3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BBC_octet3");
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 : "@MobileL3_CC_Types.BBC_octet3");
}

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

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

BBC__octet5::BBC__octet5()
{
}

BBC__octet5::BBC__octet5(const BITSTRING& par_signallingAccessProtocol,
    const BITSTRING& par_rateAdaptation,
    const BITSTRING& par_accessId,
    const BITSTRING& par_extension__octet__5,
    const OPTIONAL< BITSTRING >& par_spare2__3,
    const OPTIONAL< BITSTRING >& par_otherRateAdaptation,
    const OPTIONAL< BITSTRING >& par_otherInformationTransferCapability,
    const OPTIONAL< BITSTRING >& par_extension__octet__5a)
  :   field_signallingAccessProtocol(par_signallingAccessProtocol),
  field_rateAdaptation(par_rateAdaptation),
  field_accessId(par_accessId),
  field_extension__octet__5(par_extension__octet__5),
  field_spare2__3(par_spare2__3),
  field_otherRateAdaptation(par_otherRateAdaptation),
  field_otherInformationTransferCapability(par_otherInformationTransferCapability),
  field_extension__octet__5a(par_extension__octet__5a)
{
}

BBC__octet5::BBC__octet5(const BBC__octet5& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.BBC_octet5.");
if (other_value.signallingAccessProtocol().is_bound()) field_signallingAccessProtocol = other_value.signallingAccessProtocol();
else field_signallingAccessProtocol.clean_up();
if (other_value.rateAdaptation().is_bound()) field_rateAdaptation = other_value.rateAdaptation();
else field_rateAdaptation.clean_up();
if (other_value.accessId().is_bound()) field_accessId = other_value.accessId();
else field_accessId.clean_up();
if (other_value.extension__octet__5().is_bound()) field_extension__octet__5 = other_value.extension__octet__5();
else field_extension__octet__5.clean_up();
if (other_value.spare2__3().is_bound()) field_spare2__3 = other_value.spare2__3();
else field_spare2__3.clean_up();
if (other_value.otherRateAdaptation().is_bound()) field_otherRateAdaptation = other_value.otherRateAdaptation();
else field_otherRateAdaptation.clean_up();
if (other_value.otherInformationTransferCapability().is_bound()) field_otherInformationTransferCapability = other_value.otherInformationTransferCapability();
else field_otherInformationTransferCapability.clean_up();
if (other_value.extension__octet__5a().is_bound()) field_extension__octet__5a = other_value.extension__octet__5a();
else field_extension__octet__5a.clean_up();
}

void BBC__octet5::clean_up()
{
field_signallingAccessProtocol.clean_up();
field_rateAdaptation.clean_up();
field_accessId.clean_up();
field_extension__octet__5.clean_up();
field_spare2__3.clean_up();
field_otherRateAdaptation.clean_up();
field_otherInformationTransferCapability.clean_up();
field_extension__octet__5a.clean_up();
}

const TTCN_Typedescriptor_t* BBC__octet5::get_descriptor() const { return &BBC__octet5_descr_; }
BBC__octet5& BBC__octet5::operator=(const BBC__octet5& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.BBC_octet5.");
  if (other_value.signallingAccessProtocol().is_bound()) field_signallingAccessProtocol = other_value.signallingAccessProtocol();
  else field_signallingAccessProtocol.clean_up();
  if (other_value.rateAdaptation().is_bound()) field_rateAdaptation = other_value.rateAdaptation();
  else field_rateAdaptation.clean_up();
  if (other_value.accessId().is_bound()) field_accessId = other_value.accessId();
  else field_accessId.clean_up();
  if (other_value.extension__octet__5().is_bound()) field_extension__octet__5 = other_value.extension__octet__5();
  else field_extension__octet__5.clean_up();
  if (other_value.spare2__3().is_bound()) field_spare2__3 = other_value.spare2__3();
  else field_spare2__3.clean_up();
  if (other_value.otherRateAdaptation().is_bound()) field_otherRateAdaptation = other_value.otherRateAdaptation();
  else field_otherRateAdaptation.clean_up();
  if (other_value.otherInformationTransferCapability().is_bound()) field_otherInformationTransferCapability = other_value.otherInformationTransferCapability();
  else field_otherInformationTransferCapability.clean_up();
  if (other_value.extension__octet__5a().is_bound()) field_extension__octet__5a = other_value.extension__octet__5a();
  else field_extension__octet__5a.clean_up();
}
return *this;
}

boolean BBC__octet5::operator==(const BBC__octet5& other_value) const
{
return field_signallingAccessProtocol==other_value.field_signallingAccessProtocol
  && field_rateAdaptation==other_value.field_rateAdaptation
  && field_accessId==other_value.field_accessId
  && field_extension__octet__5==other_value.field_extension__octet__5
  && field_spare2__3==other_value.field_spare2__3
  && field_otherRateAdaptation==other_value.field_otherRateAdaptation
  && field_otherInformationTransferCapability==other_value.field_otherInformationTransferCapability
  && field_extension__octet__5a==other_value.field_extension__octet__5a;
}

boolean BBC__octet5::is_bound() const
{
return (field_signallingAccessProtocol.is_bound())
  || (field_rateAdaptation.is_bound())
  || (field_accessId.is_bound())
  || (field_extension__octet__5.is_bound())
  || (OPTIONAL_OMIT == field_spare2__3.get_selection() || field_spare2__3.is_bound())
  || (OPTIONAL_OMIT == field_otherRateAdaptation.get_selection() || field_otherRateAdaptation.is_bound())
  || (OPTIONAL_OMIT == field_otherInformationTransferCapability.get_selection() || field_otherInformationTransferCapability.is_bound())
  || (OPTIONAL_OMIT == field_extension__octet__5a.get_selection() || field_extension__octet__5a.is_bound());
}
boolean BBC__octet5::is_value() const
{
return field_signallingAccessProtocol.is_value()
  && field_rateAdaptation.is_value()
  && field_accessId.is_value()
  && field_extension__octet__5.is_value()
  && (OPTIONAL_OMIT == field_spare2__3.get_selection() || field_spare2__3.is_value())
  && (OPTIONAL_OMIT == field_otherRateAdaptation.get_selection() || field_otherRateAdaptation.is_value())
  && (OPTIONAL_OMIT == field_otherInformationTransferCapability.get_selection() || field_otherInformationTransferCapability.is_value())
  && (OPTIONAL_OMIT == field_extension__octet__5a.get_selection() || field_extension__octet__5a.is_value());
}
int BBC__octet5::size_of() const
{
  int ret_val = 4;
  if (field_spare2__3.ispresent()) ret_val++;
  if (field_otherRateAdaptation.ispresent()) ret_val++;
  if (field_otherInformationTransferCapability.ispresent()) ret_val++;
  if (field_extension__octet__5a.ispresent()) ret_val++;
  return ret_val;
}

void BBC__octet5::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ signallingAccessProtocol := ");
field_signallingAccessProtocol.log();
TTCN_Logger::log_event_str(", rateAdaptation := ");
field_rateAdaptation.log();
TTCN_Logger::log_event_str(", accessId := ");
field_accessId.log();
TTCN_Logger::log_event_str(", extension_octet_5 := ");
field_extension__octet__5.log();
TTCN_Logger::log_event_str(", spare2_3 := ");
field_spare2__3.log();
TTCN_Logger::log_event_str(", otherRateAdaptation := ");
field_otherRateAdaptation.log();
TTCN_Logger::log_event_str(", otherInformationTransferCapability := ");
field_otherInformationTransferCapability.log();
TTCN_Logger::log_event_str(", extension_octet_5a := ");
field_extension__octet__5a.log();
TTCN_Logger::log_event_str(" }");
}

void BBC__octet5::set_implicit_omit()
{
if (signallingAccessProtocol().is_bound()) signallingAccessProtocol().set_implicit_omit();
if (rateAdaptation().is_bound()) rateAdaptation().set_implicit_omit();
if (accessId().is_bound()) accessId().set_implicit_omit();
if (extension__octet__5().is_bound()) extension__octet__5().set_implicit_omit();
if (!spare2__3().is_bound()) spare2__3() = OMIT_VALUE;
else spare2__3().set_implicit_omit();
if (!otherRateAdaptation().is_bound()) otherRateAdaptation() = OMIT_VALUE;
else otherRateAdaptation().set_implicit_omit();
if (!otherInformationTransferCapability().is_bound()) otherInformationTransferCapability() = OMIT_VALUE;
else otherInformationTransferCapability().set_implicit_omit();
if (!extension__octet__5a().is_bound()) extension__octet__5a() = OMIT_VALUE;
else extension__octet__5a().set_implicit_omit();
}

void BBC__octet5::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (8<param.get_size()) {
      param.error("record value of type @MobileL3_CC_Types.BBC_octet5 has 8 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) signallingAccessProtocol().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) rateAdaptation().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) accessId().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) extension__octet__5().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) spare2__3().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) otherRateAdaptation().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) otherInformationTransferCapability().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) extension__octet__5a().set_param(*param.get_elem(7));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "signallingAccessProtocol")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          signallingAccessProtocol().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rateAdaptation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rateAdaptation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "accessId")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          accessId().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_5")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__5().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare2__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "otherRateAdaptation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          otherRateAdaptation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "otherInformationTransferCapability")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          otherInformationTransferCapability().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_5a")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__5a().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 @MobileL3_CC_Types.BBC_octet5: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.BBC_octet5");
  }
}

void BBC__octet5::encode_text(Text_Buf& text_buf) const
{
field_signallingAccessProtocol.encode_text(text_buf);
field_rateAdaptation.encode_text(text_buf);
field_accessId.encode_text(text_buf);
field_extension__octet__5.encode_text(text_buf);
field_spare2__3.encode_text(text_buf);
field_otherRateAdaptation.encode_text(text_buf);
field_otherInformationTransferCapability.encode_text(text_buf);
field_extension__octet__5a.encode_text(text_buf);
}

void BBC__octet5::decode_text(Text_Buf& text_buf)
{
field_signallingAccessProtocol.decode_text(text_buf);
field_rateAdaptation.decode_text(text_buf);
field_accessId.decode_text(text_buf);
field_extension__octet__5.decode_text(text_buf);
field_spare2__3.decode_text(text_buf);
field_otherRateAdaptation.decode_text(text_buf);
field_otherInformationTransferCapability.decode_text(text_buf);
field_extension__octet__5a.decode_text(text_buf);
}

void BBC__octet5::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 BBC__octet5::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 BBC__octet5::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;
  {
  cbyte* data=p_buf.get_read_data();
  int count=1;
  unsigned mask = 1 << (local_top_order==ORDER_LSB ? 0 : 7);
  if(p_td.raw->extension_bit==EXT_BIT_YES){
    while((data[count-1] & mask)==0 && count*8<(int)limit) count++;
  }
  else{
    while((data[count-1] & mask)!=0 && count*8<(int)limit) count++;
  }
  if(limit) limit=count*8;
  }
  RAW_Force_Omit field_0_force_omit(0, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_signallingAccessProtocol.RAW_decode(General__Types::BIT3_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, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_rateAdaptation.RAW_decode(General__Types::BIT2_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, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_accessId.RAW_decode(General__Types::BIT2_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__5.RAW_decode(General__Types::BIT1_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());
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_spare2__3 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_spare2__3().RAW_decode(General__Types::BIT3_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_spare2__3 = 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_spare2__3=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_otherRateAdaptation = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_otherRateAdaptation().RAW_decode(General__Types::BIT2_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_otherRateAdaptation = 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_otherRateAdaptation=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_otherInformationTransferCapability = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_otherInformationTransferCapability().RAW_decode(General__Types::BIT2_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_otherInformationTransferCapability = 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_otherInformationTransferCapability=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(7)) {
    field_extension__octet__5a = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_7_force_omit(7, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__5a().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 1) {
  field_extension__octet__5a = 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_extension__octet__5a=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int BBC__octet5::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 8;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(8);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, General__Types::BIT3_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT1_descr_.raw);
  if (field_spare2__3.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT3_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_otherRateAdaptation.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, General__Types::BIT2_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_otherInformationTransferCapability.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, General__Types::BIT2_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  if (field_extension__octet__5a.ispresent()) {
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[7] = NULL;
  encoded_length += field_signallingAccessProtocol.RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_rateAdaptation.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_accessId.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_extension__octet__5.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[3]);
  if (field_spare2__3.ispresent()) {
  encoded_length += field_spare2__3().RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_otherRateAdaptation.ispresent()) {
  encoded_length += field_otherRateAdaptation().RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_otherInformationTransferCapability.ispresent()) {
  encoded_length += field_otherInformationTransferCapability().RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[6]);
  }
  if (field_extension__octet__5a.ispresent()) {
  encoded_length += field_extension__octet__5a().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[7]);
  }
  return myleaf.length = encoded_length;
}

struct BBC__octet5_template::single_value_struct {
BITSTRING_template field_signallingAccessProtocol;
BITSTRING_template field_rateAdaptation;
BITSTRING_template field_accessId;
BITSTRING_template field_extension__octet__5;
BITSTRING_template field_spare2__3;
BITSTRING_template field_otherRateAdaptation;
BITSTRING_template field_otherInformationTransferCapability;
BITSTRING_template field_extension__octet__5a;
};

void BBC__octet5_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_signallingAccessProtocol = ANY_VALUE;
single_value->field_rateAdaptation = ANY_VALUE;
single_value->field_accessId = ANY_VALUE;
single_value->field_extension__octet__5 = ANY_VALUE;
single_value->field_spare2__3 = ANY_OR_OMIT;
single_value->field_otherRateAdaptation = ANY_OR_OMIT;
single_value->field_otherInformationTransferCapability = ANY_OR_OMIT;
single_value->field_extension__octet__5a = ANY_OR_OMIT;
}
}
}

void BBC__octet5_template::copy_value(const BBC__octet5& other_value)
{
single_value = new single_value_struct;
if (other_value.signallingAccessProtocol().is_bound()) {
  single_value->field_signallingAccessProtocol = other_value.signallingAccessProtocol();
} else {
  single_value->field_signallingAccessProtocol.clean_up();
}
if (other_value.rateAdaptation().is_bound()) {
  single_value->field_rateAdaptation = other_value.rateAdaptation();
} else {
  single_value->field_rateAdaptation.clean_up();
}
if (other_value.accessId().is_bound()) {
  single_value->field_accessId = other_value.accessId();
} else {
  single_value->field_accessId.clean_up();
}
if (other_value.extension__octet__5().is_bound()) {
  single_value->field_extension__octet__5 = other_value.extension__octet__5();
} else {
  single_value->field_extension__octet__5.clean_up();
}
if (other_value.spare2__3().is_bound()) {
  if (other_value.spare2__3().ispresent()) single_value->field_spare2__3 = other_value.spare2__3()();
  else single_value->field_spare2__3 = OMIT_VALUE;
} else {
  single_value->field_spare2__3.clean_up();
}
if (other_value.otherRateAdaptation().is_bound()) {
  if (other_value.otherRateAdaptation().ispresent()) single_value->field_otherRateAdaptation = other_value.otherRateAdaptation()();
  else single_value->field_otherRateAdaptation = OMIT_VALUE;
} else {
  single_value->field_otherRateAdaptation.clean_up();
}
if (other_value.otherInformationTransferCapability().is_bound()) {
  if (other_value.otherInformationTransferCapability().ispresent()) single_value->field_otherInformationTransferCapability = other_value.otherInformationTransferCapability()();
  else single_value->field_otherInformationTransferCapability = OMIT_VALUE;
} else {
  single_value->field_otherInformationTransferCapability.clean_up();
}
if (other_value.extension__octet__5a().is_bound()) {
  if (other_value.extension__octet__5a().ispresent()) single_value->field_extension__octet__5a = other_value.extension__octet__5a()();
  else single_value->field_extension__octet__5a = OMIT_VALUE;
} else {
  single_value->field_extension__octet__5a.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void BBC__octet5_template::copy_template(const BBC__octet5_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.signallingAccessProtocol().get_selection()) {
single_value->field_signallingAccessProtocol = other_value.signallingAccessProtocol();
} else {
single_value->field_signallingAccessProtocol.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.rateAdaptation().get_selection()) {
single_value->field_rateAdaptation = other_value.rateAdaptation();
} else {
single_value->field_rateAdaptation.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.accessId().get_selection()) {
single_value->field_accessId = other_value.accessId();
} else {
single_value->field_accessId.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__5().get_selection()) {
single_value->field_extension__octet__5 = other_value.extension__octet__5();
} else {
single_value->field_extension__octet__5.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare2__3().get_selection()) {
single_value->field_spare2__3 = other_value.spare2__3();
} else {
single_value->field_spare2__3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.otherRateAdaptation().get_selection()) {
single_value->field_otherRateAdaptation = other_value.otherRateAdaptation();
} else {
single_value->field_otherRateAdaptation.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.otherInformationTransferCapability().get_selection()) {
single_value->field_otherInformationTransferCapability = other_value.otherInformationTransferCapability();
} else {
single_value->field_otherInformationTransferCapability.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__5a().get_selection()) {
single_value->field_extension__octet__5a = other_value.extension__octet__5a();
} else {
single_value->field_extension__octet__5a.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 BBC__octet5_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 BBC__octet5_template(*other_value.implication_.precondition);
implication_.implied_template = new BBC__octet5_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 @MobileL3_CC_Types.BBC_octet5.");
break;
}
set_selection(other_value);
}

BBC__octet5_template::BBC__octet5_template()
{
}

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

BBC__octet5_template::BBC__octet5_template(const BBC__octet5& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean BBC__octet5_template::match(const BBC__octet5& 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.signallingAccessProtocol().is_bound()) return FALSE;
if(!single_value->field_signallingAccessProtocol.match(other_value.signallingAccessProtocol(), legacy))return FALSE;
if(!other_value.rateAdaptation().is_bound()) return FALSE;
if(!single_value->field_rateAdaptation.match(other_value.rateAdaptation(), legacy))return FALSE;
if(!other_value.accessId().is_bound()) return FALSE;
if(!single_value->field_accessId.match(other_value.accessId(), legacy))return FALSE;
if(!other_value.extension__octet__5().is_bound()) return FALSE;
if(!single_value->field_extension__octet__5.match(other_value.extension__octet__5(), legacy))return FALSE;
if(!other_value.spare2__3().is_bound()) return FALSE;
if((other_value.spare2__3().ispresent() ? !single_value->field_spare2__3.match((const BITSTRING&)other_value.spare2__3(), legacy) : !single_value->field_spare2__3.match_omit(legacy)))return FALSE;
if(!other_value.otherRateAdaptation().is_bound()) return FALSE;
if((other_value.otherRateAdaptation().ispresent() ? !single_value->field_otherRateAdaptation.match((const BITSTRING&)other_value.otherRateAdaptation(), legacy) : !single_value->field_otherRateAdaptation.match_omit(legacy)))return FALSE;
if(!other_value.otherInformationTransferCapability().is_bound()) return FALSE;
if((other_value.otherInformationTransferCapability().ispresent() ? !single_value->field_otherInformationTransferCapability.match((const BITSTRING&)other_value.otherInformationTransferCapability(), legacy) : !single_value->field_otherInformationTransferCapability.match_omit(legacy)))return FALSE;
if(!other_value.extension__octet__5a().is_bound()) return FALSE;
if((other_value.extension__octet__5a().ispresent() ? !single_value->field_extension__octet__5a.match((const BITSTRING&)other_value.extension__octet__5a(), legacy) : !single_value->field_extension__octet__5a.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 @MobileL3_CC_Types.BBC_octet5.");
}
return FALSE;
}

boolean BBC__octet5_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_signallingAccessProtocol.is_bound()
 || single_value->field_rateAdaptation.is_bound()
 || single_value->field_accessId.is_bound()
 || single_value->field_extension__octet__5.is_bound()
 || (single_value->field_spare2__3.is_omit() || single_value->field_spare2__3.is_bound())
 || (single_value->field_otherRateAdaptation.is_omit() || single_value->field_otherRateAdaptation.is_bound())
 || (single_value->field_otherInformationTransferCapability.is_omit() || single_value->field_otherInformationTransferCapability.is_bound())
 || (single_value->field_extension__octet__5a.is_omit() || single_value->field_extension__octet__5a.is_bound());
}

boolean BBC__octet5_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_signallingAccessProtocol.is_value()
 && single_value->field_rateAdaptation.is_value()
 && single_value->field_accessId.is_value()
 && single_value->field_extension__octet__5.is_value()
 && (single_value->field_spare2__3.is_omit() || single_value->field_spare2__3.is_value())
 && (single_value->field_otherRateAdaptation.is_omit() || single_value->field_otherRateAdaptation.is_value())
 && (single_value->field_otherInformationTransferCapability.is_omit() || single_value->field_otherInformationTransferCapability.is_value())
 && (single_value->field_extension__octet__5a.is_omit() || single_value->field_extension__octet__5a.is_value());
}

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

BBC__octet5 BBC__octet5_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 @MobileL3_CC_Types.BBC_octet5.");
BBC__octet5 ret_val;
if (single_value->field_signallingAccessProtocol.is_bound()) {
ret_val.signallingAccessProtocol() = single_value->field_signallingAccessProtocol.valueof();
}
if (single_value->field_rateAdaptation.is_bound()) {
ret_val.rateAdaptation() = single_value->field_rateAdaptation.valueof();
}
if (single_value->field_accessId.is_bound()) {
ret_val.accessId() = single_value->field_accessId.valueof();
}
if (single_value->field_extension__octet__5.is_bound()) {
ret_val.extension__octet__5() = single_value->field_extension__octet__5.valueof();
}
if (single_value->field_spare2__3.is_omit()) ret_val.spare2__3() = OMIT_VALUE;
else if (single_value->field_spare2__3.is_bound()) {
ret_val.spare2__3() = single_value->field_spare2__3.valueof();
}
if (single_value->field_otherRateAdaptation.is_omit()) ret_val.otherRateAdaptation() = OMIT_VALUE;
else if (single_value->field_otherRateAdaptation.is_bound()) {
ret_val.otherRateAdaptation() = single_value->field_otherRateAdaptation.valueof();
}
if (single_value->field_otherInformationTransferCapability.is_omit()) ret_val.otherInformationTransferCapability() = OMIT_VALUE;
else if (single_value->field_otherInformationTransferCapability.is_bound()) {
ret_val.otherInformationTransferCapability() = single_value->field_otherInformationTransferCapability.valueof();
}
if (single_value->field_extension__octet__5a.is_omit()) ret_val.extension__octet__5a() = OMIT_VALUE;
else if (single_value->field_extension__octet__5a.is_bound()) {
ret_val.extension__octet__5a() = single_value->field_extension__octet__5a.valueof();
}
return ret_val;
}

void BBC__octet5_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 @MobileL3_CC_Types.BBC_octet5.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new BBC__octet5_template[list_length];
}

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

BITSTRING_template& BBC__octet5_template::signallingAccessProtocol()
{
set_specific();
return single_value->field_signallingAccessProtocol;
}

const BITSTRING_template& BBC__octet5_template::signallingAccessProtocol() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field signallingAccessProtocol of a non-specific template of type @MobileL3_CC_Types.BBC_octet5.");
return single_value->field_signallingAccessProtocol;
}

BITSTRING_template& BBC__octet5_template::rateAdaptation()
{
set_specific();
return single_value->field_rateAdaptation;
}

const BITSTRING_template& BBC__octet5_template::rateAdaptation() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field rateAdaptation of a non-specific template of type @MobileL3_CC_Types.BBC_octet5.");
return single_value->field_rateAdaptation;
}

BITSTRING_template& BBC__octet5_template::accessId()
{
set_specific();
return single_value->field_accessId;
}

const BITSTRING_template& BBC__octet5_template::accessId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field accessId of a non-specific template of type @MobileL3_CC_Types.BBC_octet5.");
return single_value->field_accessId;
}

BITSTRING_template& BBC__octet5_template::extension__octet__5()
{
set_specific();
return single_value->field_extension__octet__5;
}

const BITSTRING_template& BBC__octet5_template::extension__octet__5() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_5 of a non-specific template of type @MobileL3_CC_Types.BBC_octet5.");
return single_value->field_extension__octet__5;
}

BITSTRING_template& BBC__octet5_template::spare2__3()
{
set_specific();
return single_value->field_spare2__3;
}

const BITSTRING_template& BBC__octet5_template::spare2__3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare2_3 of a non-specific template of type @MobileL3_CC_Types.BBC_octet5.");
return single_value->field_spare2__3;
}

BITSTRING_template& BBC__octet5_template::otherRateAdaptation()
{
set_specific();
return single_value->field_otherRateAdaptation;
}

const BITSTRING_template& BBC__octet5_template::otherRateAdaptation() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field otherRateAdaptation of a non-specific template of type @MobileL3_CC_Types.BBC_octet5.");
return single_value->field_otherRateAdaptation;
}

BITSTRING_template& BBC__octet5_template::otherInformationTransferCapability()
{
set_specific();
return single_value->field_otherInformationTransferCapability;
}

const BITSTRING_template& BBC__octet5_template::otherInformationTransferCapability() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field otherInformationTransferCapability of a non-specific template of type @MobileL3_CC_Types.BBC_octet5.");
return single_value->field_otherInformationTransferCapability;
}

BITSTRING_template& BBC__octet5_template::extension__octet__5a()
{
set_specific();
return single_value->field_extension__octet__5a;
}

const BITSTRING_template& BBC__octet5_template::extension__octet__5a() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_5a of a non-specific template of type @MobileL3_CC_Types.BBC_octet5.");
return single_value->field_extension__octet__5a;
}

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

void BBC__octet5_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ signallingAccessProtocol := ");
single_value->field_signallingAccessProtocol.log();
TTCN_Logger::log_event_str(", rateAdaptation := ");
single_value->field_rateAdaptation.log();
TTCN_Logger::log_event_str(", accessId := ");
single_value->field_accessId.log();
TTCN_Logger::log_event_str(", extension_octet_5 := ");
single_value->field_extension__octet__5.log();
TTCN_Logger::log_event_str(", spare2_3 := ");
single_value->field_spare2__3.log();
TTCN_Logger::log_event_str(", otherRateAdaptation := ");
single_value->field_otherRateAdaptation.log();
TTCN_Logger::log_event_str(", otherInformationTransferCapability := ");
single_value->field_otherInformationTransferCapability.log();
TTCN_Logger::log_event_str(", extension_octet_5a := ");
single_value->field_extension__octet__5a.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 BBC__octet5_template::log_match(const BBC__octet5& 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_signallingAccessProtocol.match(match_value.signallingAccessProtocol(), legacy)){
TTCN_Logger::log_logmatch_info(".signallingAccessProtocol");
single_value->field_signallingAccessProtocol.log_match(match_value.signallingAccessProtocol(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_rateAdaptation.match(match_value.rateAdaptation(), legacy)){
TTCN_Logger::log_logmatch_info(".rateAdaptation");
single_value->field_rateAdaptation.log_match(match_value.rateAdaptation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_accessId.match(match_value.accessId(), legacy)){
TTCN_Logger::log_logmatch_info(".accessId");
single_value->field_accessId.log_match(match_value.accessId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_extension__octet__5.match(match_value.extension__octet__5(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_5");
single_value->field_extension__octet__5.log_match(match_value.extension__octet__5(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.spare2__3().ispresent()){
if(!single_value->field_spare2__3.match(match_value.spare2__3(), legacy)){
TTCN_Logger::log_logmatch_info(".spare2_3");
single_value->field_spare2__3.log_match(match_value.spare2__3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_spare2__3.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".spare2_3 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_spare2__3.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.otherRateAdaptation().ispresent()){
if(!single_value->field_otherRateAdaptation.match(match_value.otherRateAdaptation(), legacy)){
TTCN_Logger::log_logmatch_info(".otherRateAdaptation");
single_value->field_otherRateAdaptation.log_match(match_value.otherRateAdaptation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_otherRateAdaptation.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".otherRateAdaptation := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_otherRateAdaptation.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.otherInformationTransferCapability().ispresent()){
if(!single_value->field_otherInformationTransferCapability.match(match_value.otherInformationTransferCapability(), legacy)){
TTCN_Logger::log_logmatch_info(".otherInformationTransferCapability");
single_value->field_otherInformationTransferCapability.log_match(match_value.otherInformationTransferCapability(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_otherInformationTransferCapability.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".otherInformationTransferCapability := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_otherInformationTransferCapability.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.extension__octet__5a().ispresent()){
if(!single_value->field_extension__octet__5a.match(match_value.extension__octet__5a(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_5a");
single_value->field_extension__octet__5a.log_match(match_value.extension__octet__5a(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_extension__octet__5a.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".extension_octet_5a := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_extension__octet__5a.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("{ signallingAccessProtocol := ");
single_value->field_signallingAccessProtocol.log_match(match_value.signallingAccessProtocol(), legacy);
TTCN_Logger::log_event_str(", rateAdaptation := ");
single_value->field_rateAdaptation.log_match(match_value.rateAdaptation(), legacy);
TTCN_Logger::log_event_str(", accessId := ");
single_value->field_accessId.log_match(match_value.accessId(), legacy);
TTCN_Logger::log_event_str(", extension_octet_5 := ");
single_value->field_extension__octet__5.log_match(match_value.extension__octet__5(), legacy);
TTCN_Logger::log_event_str(", spare2_3 := ");
if (match_value.spare2__3().ispresent()) {
single_value->field_spare2__3.log_match(match_value.spare2__3(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_spare2__3.log();
if (single_value->field_spare2__3.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", otherRateAdaptation := ");
if (match_value.otherRateAdaptation().ispresent()) {
single_value->field_otherRateAdaptation.log_match(match_value.otherRateAdaptation(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_otherRateAdaptation.log();
if (single_value->field_otherRateAdaptation.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", otherInformationTransferCapability := ");
if (match_value.otherInformationTransferCapability().ispresent()) {
single_value->field_otherInformationTransferCapability.log_match(match_value.otherInformationTransferCapability(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_otherInformationTransferCapability.log();
if (single_value->field_otherInformationTransferCapability.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", extension_octet_5a := ");
if (match_value.extension__octet__5a().ispresent()) {
single_value->field_extension__octet__5a.log_match(match_value.extension__octet__5a(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_extension__octet__5a.log();
if (single_value->field_extension__octet__5a.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 BBC__octet5_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (signallingAccessProtocol().is_bound()) signallingAccessProtocol().set_implicit_omit();
if (rateAdaptation().is_bound()) rateAdaptation().set_implicit_omit();
if (accessId().is_bound()) accessId().set_implicit_omit();
if (extension__octet__5().is_bound()) extension__octet__5().set_implicit_omit();
if (!spare2__3().is_bound()) spare2__3() = OMIT_VALUE;
else spare2__3().set_implicit_omit();
if (!otherRateAdaptation().is_bound()) otherRateAdaptation() = OMIT_VALUE;
else otherRateAdaptation().set_implicit_omit();
if (!otherInformationTransferCapability().is_bound()) otherInformationTransferCapability() = OMIT_VALUE;
else otherInformationTransferCapability().set_implicit_omit();
if (!extension__octet__5a().is_bound()) extension__octet__5a() = OMIT_VALUE;
else extension__octet__5a().set_implicit_omit();
}

void BBC__octet5_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_signallingAccessProtocol.encode_text(text_buf);
single_value->field_rateAdaptation.encode_text(text_buf);
single_value->field_accessId.encode_text(text_buf);
single_value->field_extension__octet__5.encode_text(text_buf);
single_value->field_spare2__3.encode_text(text_buf);
single_value->field_otherRateAdaptation.encode_text(text_buf);
single_value->field_otherInformationTransferCapability.encode_text(text_buf);
single_value->field_extension__octet__5a.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 @MobileL3_CC_Types.BBC_octet5.");
}
}

void BBC__octet5_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_signallingAccessProtocol.decode_text(text_buf);
single_value->field_rateAdaptation.decode_text(text_buf);
single_value->field_accessId.decode_text(text_buf);
single_value->field_extension__octet__5.decode_text(text_buf);
single_value->field_spare2__3.decode_text(text_buf);
single_value->field_otherRateAdaptation.decode_text(text_buf);
single_value->field_otherInformationTransferCapability.decode_text(text_buf);
single_value->field_extension__octet__5a.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 BBC__octet5_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 @MobileL3_CC_Types.BBC_octet5.");
}
}

void BBC__octet5_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: {
    BBC__octet5_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (8<param.get_size()) {
      param.error("record template of type @MobileL3_CC_Types.BBC_octet5 has 8 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) signallingAccessProtocol().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) rateAdaptation().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) accessId().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) extension__octet__5().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) spare2__3().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) otherRateAdaptation().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) otherInformationTransferCapability().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) extension__octet__5a().set_param(*param.get_elem(7));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "signallingAccessProtocol")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          signallingAccessProtocol().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rateAdaptation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rateAdaptation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "accessId")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          accessId().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_5")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__5().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare2__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "otherRateAdaptation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          otherRateAdaptation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "otherInformationTransferCapability")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          otherInformationTransferCapability().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_5a")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__5a().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 @MobileL3_CC_Types.BBC_octet5: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    BBC__octet5_template* precondition = new BBC__octet5_template;
    precondition->set_param(*param.get_elem(0));
    BBC__octet5_template* implied_template = new BBC__octet5_template;
    implied_template->set_param(*param.get_elem(1));
    *this = BBC__octet5_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.BBC_octet5");
  }
  is_ifpresent = param.get_ifpresent();
}

void BBC__octet5_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_signallingAccessProtocol.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BBC_octet5");
single_value->field_rateAdaptation.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BBC_octet5");
single_value->field_accessId.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BBC_octet5");
single_value->field_extension__octet__5.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BBC_octet5");
single_value->field_spare2__3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BBC_octet5");
single_value->field_otherRateAdaptation.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BBC_octet5");
single_value->field_otherInformationTransferCapability.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BBC_octet5");
single_value->field_extension__octet__5a.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BBC_octet5");
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 : "@MobileL3_CC_Types.BBC_octet5");
}

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

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

BackupBearerCapacity::BackupBearerCapacity()
{
}

BackupBearerCapacity::BackupBearerCapacity(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const BBC__octet3& par_octet3,
    const OPTIONAL< BC__octet4 >& par_octet4,
    const OPTIONAL< BBC__octet5 >& par_octet5,
    const OPTIONAL< BC__octet6 >& par_octet6,
    const OPTIONAL< BC__octet7 >& par_octet7)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_octet3(par_octet3),
  field_octet4(par_octet4),
  field_octet5(par_octet5),
  field_octet6(par_octet6),
  field_octet7(par_octet7)
{
}

BackupBearerCapacity::BackupBearerCapacity(const BackupBearerCapacity& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.BackupBearerCapacity.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.octet3().is_bound()) field_octet3 = other_value.octet3();
else field_octet3.clean_up();
if (other_value.octet4().is_bound()) field_octet4 = other_value.octet4();
else field_octet4.clean_up();
if (other_value.octet5().is_bound()) field_octet5 = other_value.octet5();
else field_octet5.clean_up();
if (other_value.octet6().is_bound()) field_octet6 = other_value.octet6();
else field_octet6.clean_up();
if (other_value.octet7().is_bound()) field_octet7 = other_value.octet7();
else field_octet7.clean_up();
}

void BackupBearerCapacity::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_octet3.clean_up();
field_octet4.clean_up();
field_octet5.clean_up();
field_octet6.clean_up();
field_octet7.clean_up();
}

const TTCN_Typedescriptor_t* BackupBearerCapacity::get_descriptor() const { return &BackupBearerCapacity_descr_; }
BackupBearerCapacity& BackupBearerCapacity::operator=(const BackupBearerCapacity& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.BackupBearerCapacity.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.octet3().is_bound()) field_octet3 = other_value.octet3();
  else field_octet3.clean_up();
  if (other_value.octet4().is_bound()) field_octet4 = other_value.octet4();
  else field_octet4.clean_up();
  if (other_value.octet5().is_bound()) field_octet5 = other_value.octet5();
  else field_octet5.clean_up();
  if (other_value.octet6().is_bound()) field_octet6 = other_value.octet6();
  else field_octet6.clean_up();
  if (other_value.octet7().is_bound()) field_octet7 = other_value.octet7();
  else field_octet7.clean_up();
}
return *this;
}

boolean BackupBearerCapacity::operator==(const BackupBearerCapacity& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_octet3==other_value.field_octet3
  && field_octet4==other_value.field_octet4
  && field_octet5==other_value.field_octet5
  && field_octet6==other_value.field_octet6
  && field_octet7==other_value.field_octet7;
}

boolean BackupBearerCapacity::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (field_octet3.is_bound())
  || (OPTIONAL_OMIT == field_octet4.get_selection() || field_octet4.is_bound())
  || (OPTIONAL_OMIT == field_octet5.get_selection() || field_octet5.is_bound())
  || (OPTIONAL_OMIT == field_octet6.get_selection() || field_octet6.is_bound())
  || (OPTIONAL_OMIT == field_octet7.get_selection() || field_octet7.is_bound());
}
boolean BackupBearerCapacity::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && field_octet3.is_value()
  && (OPTIONAL_OMIT == field_octet4.get_selection() || field_octet4.is_value())
  && (OPTIONAL_OMIT == field_octet5.get_selection() || field_octet5.is_value())
  && (OPTIONAL_OMIT == field_octet6.get_selection() || field_octet6.is_value())
  && (OPTIONAL_OMIT == field_octet7.get_selection() || field_octet7.is_value());
}
int BackupBearerCapacity::size_of() const
{
  int ret_val = 3;
  if (field_octet4.ispresent()) ret_val++;
  if (field_octet5.ispresent()) ret_val++;
  if (field_octet6.ispresent()) ret_val++;
  if (field_octet7.ispresent()) ret_val++;
  return ret_val;
}

void BackupBearerCapacity::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", octet3 := ");
field_octet3.log();
TTCN_Logger::log_event_str(", octet4 := ");
field_octet4.log();
TTCN_Logger::log_event_str(", octet5 := ");
field_octet5.log();
TTCN_Logger::log_event_str(", octet6 := ");
field_octet6.log();
TTCN_Logger::log_event_str(", octet7 := ");
field_octet7.log();
TTCN_Logger::log_event_str(" }");
}

void BackupBearerCapacity::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (octet3().is_bound()) octet3().set_implicit_omit();
if (!octet4().is_bound()) octet4() = OMIT_VALUE;
else octet4().set_implicit_omit();
if (!octet5().is_bound()) octet5() = OMIT_VALUE;
else octet5().set_implicit_omit();
if (!octet6().is_bound()) octet6() = OMIT_VALUE;
else octet6().set_implicit_omit();
if (!octet7().is_bound()) octet7() = OMIT_VALUE;
else octet7().set_implicit_omit();
}

void BackupBearerCapacity::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 @MobileL3_CC_Types.BackupBearerCapacity 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) octet3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) octet4().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) octet5().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) octet6().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) octet7().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet4().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet5")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet5().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet6")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet6().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet7")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet7().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 @MobileL3_CC_Types.BackupBearerCapacity: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.BackupBearerCapacity");
  }
}

void BackupBearerCapacity::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_octet3.encode_text(text_buf);
field_octet4.encode_text(text_buf);
field_octet5.encode_text(text_buf);
field_octet6.encode_text(text_buf);
field_octet7.encode_text(text_buf);
}

void BackupBearerCapacity::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_octet3.decode_text(text_buf);
field_octet4.decode_text(text_buf);
field_octet5.decode_text(text_buf);
field_octet6.decode_text(text_buf);
field_octet7.decode_text(text_buf);
}

void BackupBearerCapacity::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 BackupBearerCapacity::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 BackupBearerCapacity::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, BackupBearerCapacity_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(BackupBearerCapacity_lengthIndicator_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_lengthIndicator.convert_to_Integer(BackupBearerCapacity_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  RAW_Force_Omit field_2_force_omit(2, force_omit, BBC__octet3_descr_.raw->forceomit);
  decoded_field_length = field_octet3.RAW_decode(BBC__octet3_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;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_octet4 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, BC__octet4_descr_.raw->forceomit);
  decoded_field_length = field_octet4().RAW_decode(BC__octet4_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_octet4 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_octet4=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_octet5 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, BBC__octet5_descr_.raw->forceomit);
  decoded_field_length = field_octet5().RAW_decode(BBC__octet5_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_octet5 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_octet5=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_octet6 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, BC__octet6_descr_.raw->forceomit);
  decoded_field_length = field_octet6().RAW_decode(BC__octet6_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_octet6 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_octet6=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_octet7 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, BC__octet7_descr_.raw->forceomit);
  decoded_field_length = field_octet7().RAW_decode(BC__octet7_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_octet7 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_octet7=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int BackupBearerCapacity::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, BackupBearerCapacity_lengthIndicator_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, BBC__octet3_descr_.raw);
  if (field_octet4.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, BC__octet4_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_octet5.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, BBC__octet5_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_octet6.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, BC__octet6_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_octet7.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, BC__octet7_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &BackupBearerCapacity_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 5;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(5);
  myleaf.body.node.nodes[1]->length = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[2]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[2]->curr_pos.pos;
  if (field_octet4.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = 0;
  }
  if (field_octet5.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = myleaf.body.node.nodes[4]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = myleaf.body.node.nodes[4]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = 0;
  }
  if (field_octet6.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = myleaf.body.node.nodes[5]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = myleaf.body.node.nodes[5]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = 0;
  }
  if (field_octet7.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].level = myleaf.body.node.nodes[6]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].pos = myleaf.body.node.nodes[6]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].pos = 0;
  }
  encoded_length += field_octet3.RAW_encode(BBC__octet3_descr_, *myleaf.body.node.nodes[2]);
  if (field_octet4.ispresent()) {
  encoded_length += field_octet4().RAW_encode(BC__octet4_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_octet5.ispresent()) {
  encoded_length += field_octet5().RAW_encode(BBC__octet5_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_octet6.ispresent()) {
  encoded_length += field_octet6().RAW_encode(BC__octet6_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_octet7.ispresent()) {
  encoded_length += field_octet7().RAW_encode(BC__octet7_descr_, *myleaf.body.node.nodes[6]);
  }
  return myleaf.length = encoded_length;
}

struct BackupBearerCapacity_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
BBC__octet3_template field_octet3;
BC__octet4_template field_octet4;
BBC__octet5_template field_octet5;
BC__octet6_template field_octet6;
BC__octet7_template field_octet7;
};

void BackupBearerCapacity_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_octet3 = ANY_VALUE;
single_value->field_octet4 = ANY_OR_OMIT;
single_value->field_octet5 = ANY_OR_OMIT;
single_value->field_octet6 = ANY_OR_OMIT;
single_value->field_octet7 = ANY_OR_OMIT;
}
}
}

void BackupBearerCapacity_template::copy_value(const BackupBearerCapacity& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.octet3().is_bound()) {
  single_value->field_octet3 = other_value.octet3();
} else {
  single_value->field_octet3.clean_up();
}
if (other_value.octet4().is_bound()) {
  if (other_value.octet4().ispresent()) single_value->field_octet4 = other_value.octet4()();
  else single_value->field_octet4 = OMIT_VALUE;
} else {
  single_value->field_octet4.clean_up();
}
if (other_value.octet5().is_bound()) {
  if (other_value.octet5().ispresent()) single_value->field_octet5 = other_value.octet5()();
  else single_value->field_octet5 = OMIT_VALUE;
} else {
  single_value->field_octet5.clean_up();
}
if (other_value.octet6().is_bound()) {
  if (other_value.octet6().ispresent()) single_value->field_octet6 = other_value.octet6()();
  else single_value->field_octet6 = OMIT_VALUE;
} else {
  single_value->field_octet6.clean_up();
}
if (other_value.octet7().is_bound()) {
  if (other_value.octet7().ispresent()) single_value->field_octet7 = other_value.octet7()();
  else single_value->field_octet7 = OMIT_VALUE;
} else {
  single_value->field_octet7.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void BackupBearerCapacity_template::copy_template(const BackupBearerCapacity_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet3().get_selection()) {
single_value->field_octet3 = other_value.octet3();
} else {
single_value->field_octet3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet4().get_selection()) {
single_value->field_octet4 = other_value.octet4();
} else {
single_value->field_octet4.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet5().get_selection()) {
single_value->field_octet5 = other_value.octet5();
} else {
single_value->field_octet5.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet6().get_selection()) {
single_value->field_octet6 = other_value.octet6();
} else {
single_value->field_octet6.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet7().get_selection()) {
single_value->field_octet7 = other_value.octet7();
} else {
single_value->field_octet7.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 BackupBearerCapacity_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 BackupBearerCapacity_template(*other_value.implication_.precondition);
implication_.implied_template = new BackupBearerCapacity_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 @MobileL3_CC_Types.BackupBearerCapacity.");
break;
}
set_selection(other_value);
}

BackupBearerCapacity_template::BackupBearerCapacity_template()
{
}

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

BackupBearerCapacity_template::BackupBearerCapacity_template(const BackupBearerCapacity& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean BackupBearerCapacity_template::match(const BackupBearerCapacity& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.octet3().is_bound()) return FALSE;
if(!single_value->field_octet3.match(other_value.octet3(), legacy))return FALSE;
if(!other_value.octet4().is_bound()) return FALSE;
if((other_value.octet4().ispresent() ? !single_value->field_octet4.match((const BC__octet4&)other_value.octet4(), legacy) : !single_value->field_octet4.match_omit(legacy)))return FALSE;
if(!other_value.octet5().is_bound()) return FALSE;
if((other_value.octet5().ispresent() ? !single_value->field_octet5.match((const BBC__octet5&)other_value.octet5(), legacy) : !single_value->field_octet5.match_omit(legacy)))return FALSE;
if(!other_value.octet6().is_bound()) return FALSE;
if((other_value.octet6().ispresent() ? !single_value->field_octet6.match((const BC__octet6&)other_value.octet6(), legacy) : !single_value->field_octet6.match_omit(legacy)))return FALSE;
if(!other_value.octet7().is_bound()) return FALSE;
if((other_value.octet7().ispresent() ? !single_value->field_octet7.match((const BC__octet7&)other_value.octet7(), legacy) : !single_value->field_octet7.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 @MobileL3_CC_Types.BackupBearerCapacity.");
}
return FALSE;
}

boolean BackupBearerCapacity_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || single_value->field_octet3.is_bound()
 || (single_value->field_octet4.is_omit() || single_value->field_octet4.is_bound())
 || (single_value->field_octet5.is_omit() || single_value->field_octet5.is_bound())
 || (single_value->field_octet6.is_omit() || single_value->field_octet6.is_bound())
 || (single_value->field_octet7.is_omit() || single_value->field_octet7.is_bound());
}

boolean BackupBearerCapacity_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && single_value->field_octet3.is_value()
 && (single_value->field_octet4.is_omit() || single_value->field_octet4.is_value())
 && (single_value->field_octet5.is_omit() || single_value->field_octet5.is_value())
 && (single_value->field_octet6.is_omit() || single_value->field_octet6.is_value())
 && (single_value->field_octet7.is_omit() || single_value->field_octet7.is_value());
}

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

BackupBearerCapacity BackupBearerCapacity_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 @MobileL3_CC_Types.BackupBearerCapacity.");
BackupBearerCapacity ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_octet3.is_bound()) {
ret_val.octet3() = single_value->field_octet3.valueof();
}
if (single_value->field_octet4.is_omit()) ret_val.octet4() = OMIT_VALUE;
else if (single_value->field_octet4.is_bound()) {
ret_val.octet4() = single_value->field_octet4.valueof();
}
if (single_value->field_octet5.is_omit()) ret_val.octet5() = OMIT_VALUE;
else if (single_value->field_octet5.is_bound()) {
ret_val.octet5() = single_value->field_octet5.valueof();
}
if (single_value->field_octet6.is_omit()) ret_val.octet6() = OMIT_VALUE;
else if (single_value->field_octet6.is_bound()) {
ret_val.octet6() = single_value->field_octet6.valueof();
}
if (single_value->field_octet7.is_omit()) ret_val.octet7() = OMIT_VALUE;
else if (single_value->field_octet7.is_bound()) {
ret_val.octet7() = single_value->field_octet7.valueof();
}
return ret_val;
}

void BackupBearerCapacity_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 @MobileL3_CC_Types.BackupBearerCapacity.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new BackupBearerCapacity_template[list_length];
}

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

OCTETSTRING_template& BackupBearerCapacity_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& BackupBearerCapacity_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.BackupBearerCapacity.");
return single_value->field_elementIdentifier;
}

INTEGER_template& BackupBearerCapacity_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& BackupBearerCapacity_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.BackupBearerCapacity.");
return single_value->field_lengthIndicator;
}

BBC__octet3_template& BackupBearerCapacity_template::octet3()
{
set_specific();
return single_value->field_octet3;
}

const BBC__octet3_template& BackupBearerCapacity_template::octet3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet3 of a non-specific template of type @MobileL3_CC_Types.BackupBearerCapacity.");
return single_value->field_octet3;
}

BC__octet4_template& BackupBearerCapacity_template::octet4()
{
set_specific();
return single_value->field_octet4;
}

const BC__octet4_template& BackupBearerCapacity_template::octet4() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet4 of a non-specific template of type @MobileL3_CC_Types.BackupBearerCapacity.");
return single_value->field_octet4;
}

BBC__octet5_template& BackupBearerCapacity_template::octet5()
{
set_specific();
return single_value->field_octet5;
}

const BBC__octet5_template& BackupBearerCapacity_template::octet5() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet5 of a non-specific template of type @MobileL3_CC_Types.BackupBearerCapacity.");
return single_value->field_octet5;
}

BC__octet6_template& BackupBearerCapacity_template::octet6()
{
set_specific();
return single_value->field_octet6;
}

const BC__octet6_template& BackupBearerCapacity_template::octet6() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet6 of a non-specific template of type @MobileL3_CC_Types.BackupBearerCapacity.");
return single_value->field_octet6;
}

BC__octet7_template& BackupBearerCapacity_template::octet7()
{
set_specific();
return single_value->field_octet7;
}

const BC__octet7_template& BackupBearerCapacity_template::octet7() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet7 of a non-specific template of type @MobileL3_CC_Types.BackupBearerCapacity.");
return single_value->field_octet7;
}

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

void BackupBearerCapacity_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", octet3 := ");
single_value->field_octet3.log();
TTCN_Logger::log_event_str(", octet4 := ");
single_value->field_octet4.log();
TTCN_Logger::log_event_str(", octet5 := ");
single_value->field_octet5.log();
TTCN_Logger::log_event_str(", octet6 := ");
single_value->field_octet6.log();
TTCN_Logger::log_event_str(", octet7 := ");
single_value->field_octet7.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 BackupBearerCapacity_template::log_match(const BackupBearerCapacity& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_octet3.match(match_value.octet3(), legacy)){
TTCN_Logger::log_logmatch_info(".octet3");
single_value->field_octet3.log_match(match_value.octet3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.octet4().ispresent()){
if(!single_value->field_octet4.match(match_value.octet4(), legacy)){
TTCN_Logger::log_logmatch_info(".octet4");
single_value->field_octet4.log_match(match_value.octet4(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_octet4.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".octet4 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_octet4.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.octet5().ispresent()){
if(!single_value->field_octet5.match(match_value.octet5(), legacy)){
TTCN_Logger::log_logmatch_info(".octet5");
single_value->field_octet5.log_match(match_value.octet5(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_octet5.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".octet5 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_octet5.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.octet6().ispresent()){
if(!single_value->field_octet6.match(match_value.octet6(), legacy)){
TTCN_Logger::log_logmatch_info(".octet6");
single_value->field_octet6.log_match(match_value.octet6(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_octet6.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".octet6 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_octet6.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.octet7().ispresent()){
if(!single_value->field_octet7.match(match_value.octet7(), legacy)){
TTCN_Logger::log_logmatch_info(".octet7");
single_value->field_octet7.log_match(match_value.octet7(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_octet7.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".octet7 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_octet7.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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", octet3 := ");
single_value->field_octet3.log_match(match_value.octet3(), legacy);
TTCN_Logger::log_event_str(", octet4 := ");
if (match_value.octet4().ispresent()) {
single_value->field_octet4.log_match(match_value.octet4(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_octet4.log();
if (single_value->field_octet4.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", octet5 := ");
if (match_value.octet5().ispresent()) {
single_value->field_octet5.log_match(match_value.octet5(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_octet5.log();
if (single_value->field_octet5.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", octet6 := ");
if (match_value.octet6().ispresent()) {
single_value->field_octet6.log_match(match_value.octet6(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_octet6.log();
if (single_value->field_octet6.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", octet7 := ");
if (match_value.octet7().ispresent()) {
single_value->field_octet7.log_match(match_value.octet7(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_octet7.log();
if (single_value->field_octet7.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 BackupBearerCapacity_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (octet3().is_bound()) octet3().set_implicit_omit();
if (!octet4().is_bound()) octet4() = OMIT_VALUE;
else octet4().set_implicit_omit();
if (!octet5().is_bound()) octet5() = OMIT_VALUE;
else octet5().set_implicit_omit();
if (!octet6().is_bound()) octet6() = OMIT_VALUE;
else octet6().set_implicit_omit();
if (!octet7().is_bound()) octet7() = OMIT_VALUE;
else octet7().set_implicit_omit();
}

void BackupBearerCapacity_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_octet3.encode_text(text_buf);
single_value->field_octet4.encode_text(text_buf);
single_value->field_octet5.encode_text(text_buf);
single_value->field_octet6.encode_text(text_buf);
single_value->field_octet7.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 @MobileL3_CC_Types.BackupBearerCapacity.");
}
}

void BackupBearerCapacity_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_octet3.decode_text(text_buf);
single_value->field_octet4.decode_text(text_buf);
single_value->field_octet5.decode_text(text_buf);
single_value->field_octet6.decode_text(text_buf);
single_value->field_octet7.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 BackupBearerCapacity_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 @MobileL3_CC_Types.BackupBearerCapacity.");
}
}

void BackupBearerCapacity_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: {
    BackupBearerCapacity_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 @MobileL3_CC_Types.BackupBearerCapacity 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) octet3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) octet4().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) octet5().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) octet6().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) octet7().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet4().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet5")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet5().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet6")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet6().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet7")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet7().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 @MobileL3_CC_Types.BackupBearerCapacity: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    BackupBearerCapacity_template* precondition = new BackupBearerCapacity_template;
    precondition->set_param(*param.get_elem(0));
    BackupBearerCapacity_template* implied_template = new BackupBearerCapacity_template;
    implied_template->set_param(*param.get_elem(1));
    *this = BackupBearerCapacity_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.BackupBearerCapacity");
  }
  is_ifpresent = param.get_ifpresent();
}

void BackupBearerCapacity_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BackupBearerCapacity");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BackupBearerCapacity");
single_value->field_octet3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BackupBearerCapacity");
single_value->field_octet4.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BackupBearerCapacity");
single_value->field_octet5.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BackupBearerCapacity");
single_value->field_octet6.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BackupBearerCapacity");
single_value->field_octet7.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BackupBearerCapacity");
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 : "@MobileL3_CC_Types.BackupBearerCapacity");
}

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

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

BC__octet4::BC__octet4()
{
}

BC__octet4::BC__octet4(const BITSTRING& par_establishment,
    const BITSTRING& par_nirr,
    const BITSTRING& par_configuration,
    const BITSTRING& par_duplexMode,
    const BITSTRING& par_structure,
    const BITSTRING& par_compression,
    const BITSTRING& par_extension__octet__4)
  :   field_establishment(par_establishment),
  field_nirr(par_nirr),
  field_configuration(par_configuration),
  field_duplexMode(par_duplexMode),
  field_structure(par_structure),
  field_compression(par_compression),
  field_extension__octet__4(par_extension__octet__4)
{
}

BC__octet4::BC__octet4(const BC__octet4& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.BC_octet4.");
if (other_value.establishment().is_bound()) field_establishment = other_value.establishment();
else field_establishment.clean_up();
if (other_value.nirr().is_bound()) field_nirr = other_value.nirr();
else field_nirr.clean_up();
if (other_value.configuration().is_bound()) field_configuration = other_value.configuration();
else field_configuration.clean_up();
if (other_value.duplexMode().is_bound()) field_duplexMode = other_value.duplexMode();
else field_duplexMode.clean_up();
if (other_value.structure().is_bound()) field_structure = other_value.structure();
else field_structure.clean_up();
if (other_value.compression().is_bound()) field_compression = other_value.compression();
else field_compression.clean_up();
if (other_value.extension__octet__4().is_bound()) field_extension__octet__4 = other_value.extension__octet__4();
else field_extension__octet__4.clean_up();
}

void BC__octet4::clean_up()
{
field_establishment.clean_up();
field_nirr.clean_up();
field_configuration.clean_up();
field_duplexMode.clean_up();
field_structure.clean_up();
field_compression.clean_up();
field_extension__octet__4.clean_up();
}

const TTCN_Typedescriptor_t* BC__octet4::get_descriptor() const { return &BC__octet4_descr_; }
BC__octet4& BC__octet4::operator=(const BC__octet4& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.BC_octet4.");
  if (other_value.establishment().is_bound()) field_establishment = other_value.establishment();
  else field_establishment.clean_up();
  if (other_value.nirr().is_bound()) field_nirr = other_value.nirr();
  else field_nirr.clean_up();
  if (other_value.configuration().is_bound()) field_configuration = other_value.configuration();
  else field_configuration.clean_up();
  if (other_value.duplexMode().is_bound()) field_duplexMode = other_value.duplexMode();
  else field_duplexMode.clean_up();
  if (other_value.structure().is_bound()) field_structure = other_value.structure();
  else field_structure.clean_up();
  if (other_value.compression().is_bound()) field_compression = other_value.compression();
  else field_compression.clean_up();
  if (other_value.extension__octet__4().is_bound()) field_extension__octet__4 = other_value.extension__octet__4();
  else field_extension__octet__4.clean_up();
}
return *this;
}

boolean BC__octet4::operator==(const BC__octet4& other_value) const
{
return field_establishment==other_value.field_establishment
  && field_nirr==other_value.field_nirr
  && field_configuration==other_value.field_configuration
  && field_duplexMode==other_value.field_duplexMode
  && field_structure==other_value.field_structure
  && field_compression==other_value.field_compression
  && field_extension__octet__4==other_value.field_extension__octet__4;
}

boolean BC__octet4::is_bound() const
{
return (field_establishment.is_bound())
  || (field_nirr.is_bound())
  || (field_configuration.is_bound())
  || (field_duplexMode.is_bound())
  || (field_structure.is_bound())
  || (field_compression.is_bound())
  || (field_extension__octet__4.is_bound());
}
boolean BC__octet4::is_value() const
{
return field_establishment.is_value()
  && field_nirr.is_value()
  && field_configuration.is_value()
  && field_duplexMode.is_value()
  && field_structure.is_value()
  && field_compression.is_value()
  && field_extension__octet__4.is_value();
}
void BC__octet4::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ establishment := ");
field_establishment.log();
TTCN_Logger::log_event_str(", nirr := ");
field_nirr.log();
TTCN_Logger::log_event_str(", configuration := ");
field_configuration.log();
TTCN_Logger::log_event_str(", duplexMode := ");
field_duplexMode.log();
TTCN_Logger::log_event_str(", structure := ");
field_structure.log();
TTCN_Logger::log_event_str(", compression := ");
field_compression.log();
TTCN_Logger::log_event_str(", extension_octet_4 := ");
field_extension__octet__4.log();
TTCN_Logger::log_event_str(" }");
}

void BC__octet4::set_implicit_omit()
{
if (establishment().is_bound()) establishment().set_implicit_omit();
if (nirr().is_bound()) nirr().set_implicit_omit();
if (configuration().is_bound()) configuration().set_implicit_omit();
if (duplexMode().is_bound()) duplexMode().set_implicit_omit();
if (structure().is_bound()) structure().set_implicit_omit();
if (compression().is_bound()) compression().set_implicit_omit();
if (extension__octet__4().is_bound()) extension__octet__4().set_implicit_omit();
}

void BC__octet4::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 @MobileL3_CC_Types.BC_octet4 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) establishment().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) nirr().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) configuration().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) duplexMode().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) structure().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) compression().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) extension__octet__4().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(), "establishment")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          establishment().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nirr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nirr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "configuration")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          configuration().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "duplexMode")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          duplexMode().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "structure")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          structure().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "compression")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          compression().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__4().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 @MobileL3_CC_Types.BC_octet4: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.BC_octet4");
  }
}

void BC__octet4::encode_text(Text_Buf& text_buf) const
{
field_establishment.encode_text(text_buf);
field_nirr.encode_text(text_buf);
field_configuration.encode_text(text_buf);
field_duplexMode.encode_text(text_buf);
field_structure.encode_text(text_buf);
field_compression.encode_text(text_buf);
field_extension__octet__4.encode_text(text_buf);
}

void BC__octet4::decode_text(Text_Buf& text_buf)
{
field_establishment.decode_text(text_buf);
field_nirr.decode_text(text_buf);
field_configuration.decode_text(text_buf);
field_duplexMode.decode_text(text_buf);
field_structure.decode_text(text_buf);
field_compression.decode_text(text_buf);
field_extension__octet__4.decode_text(text_buf);
}

void BC__octet4::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 BC__octet4::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 BC__octet4::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;
  {
  cbyte* data=p_buf.get_read_data();
  int count=1;
  unsigned mask = 1 << (local_top_order==ORDER_LSB ? 0 : 7);
  if(p_td.raw->extension_bit==EXT_BIT_YES){
    while((data[count-1] & mask)==0 && count*8<(int)limit) count++;
  }
  else{
    while((data[count-1] & mask)!=0 && count*8<(int)limit) count++;
  }
  if(limit) limit=count*8;
  }
  RAW_Force_Omit field_0_force_omit(0, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_establishment.RAW_decode(General__Types::BIT1_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_nirr.RAW_decode(General__Types::BIT1_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_configuration.RAW_decode(General__Types::BIT1_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_duplexMode.RAW_decode(General__Types::BIT1_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, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_structure.RAW_decode(General__Types::BIT2_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_compression.RAW_decode(General__Types::BIT1_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__4.RAW_decode(General__Types::BIT1_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 BC__octet4::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, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, General__Types::BIT1_descr_.raw);
  encoded_length += field_establishment.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_nirr.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_configuration.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_duplexMode.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_structure.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_compression.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_extension__octet__4.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[6]);
  return myleaf.length = encoded_length;
}

struct BC__octet4_template::single_value_struct {
BITSTRING_template field_establishment;
BITSTRING_template field_nirr;
BITSTRING_template field_configuration;
BITSTRING_template field_duplexMode;
BITSTRING_template field_structure;
BITSTRING_template field_compression;
BITSTRING_template field_extension__octet__4;
};

void BC__octet4_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_establishment = ANY_VALUE;
single_value->field_nirr = ANY_VALUE;
single_value->field_configuration = ANY_VALUE;
single_value->field_duplexMode = ANY_VALUE;
single_value->field_structure = ANY_VALUE;
single_value->field_compression = ANY_VALUE;
single_value->field_extension__octet__4 = ANY_VALUE;
}
}
}

void BC__octet4_template::copy_value(const BC__octet4& other_value)
{
single_value = new single_value_struct;
if (other_value.establishment().is_bound()) {
  single_value->field_establishment = other_value.establishment();
} else {
  single_value->field_establishment.clean_up();
}
if (other_value.nirr().is_bound()) {
  single_value->field_nirr = other_value.nirr();
} else {
  single_value->field_nirr.clean_up();
}
if (other_value.configuration().is_bound()) {
  single_value->field_configuration = other_value.configuration();
} else {
  single_value->field_configuration.clean_up();
}
if (other_value.duplexMode().is_bound()) {
  single_value->field_duplexMode = other_value.duplexMode();
} else {
  single_value->field_duplexMode.clean_up();
}
if (other_value.structure().is_bound()) {
  single_value->field_structure = other_value.structure();
} else {
  single_value->field_structure.clean_up();
}
if (other_value.compression().is_bound()) {
  single_value->field_compression = other_value.compression();
} else {
  single_value->field_compression.clean_up();
}
if (other_value.extension__octet__4().is_bound()) {
  single_value->field_extension__octet__4 = other_value.extension__octet__4();
} else {
  single_value->field_extension__octet__4.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void BC__octet4_template::copy_template(const BC__octet4_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.establishment().get_selection()) {
single_value->field_establishment = other_value.establishment();
} else {
single_value->field_establishment.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nirr().get_selection()) {
single_value->field_nirr = other_value.nirr();
} else {
single_value->field_nirr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.configuration().get_selection()) {
single_value->field_configuration = other_value.configuration();
} else {
single_value->field_configuration.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.duplexMode().get_selection()) {
single_value->field_duplexMode = other_value.duplexMode();
} else {
single_value->field_duplexMode.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.structure().get_selection()) {
single_value->field_structure = other_value.structure();
} else {
single_value->field_structure.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.compression().get_selection()) {
single_value->field_compression = other_value.compression();
} else {
single_value->field_compression.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__4().get_selection()) {
single_value->field_extension__octet__4 = other_value.extension__octet__4();
} else {
single_value->field_extension__octet__4.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 BC__octet4_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 BC__octet4_template(*other_value.implication_.precondition);
implication_.implied_template = new BC__octet4_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 @MobileL3_CC_Types.BC_octet4.");
break;
}
set_selection(other_value);
}

BC__octet4_template::BC__octet4_template()
{
}

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

BC__octet4_template::BC__octet4_template(const BC__octet4& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean BC__octet4_template::match(const BC__octet4& 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.establishment().is_bound()) return FALSE;
if(!single_value->field_establishment.match(other_value.establishment(), legacy))return FALSE;
if(!other_value.nirr().is_bound()) return FALSE;
if(!single_value->field_nirr.match(other_value.nirr(), legacy))return FALSE;
if(!other_value.configuration().is_bound()) return FALSE;
if(!single_value->field_configuration.match(other_value.configuration(), legacy))return FALSE;
if(!other_value.duplexMode().is_bound()) return FALSE;
if(!single_value->field_duplexMode.match(other_value.duplexMode(), legacy))return FALSE;
if(!other_value.structure().is_bound()) return FALSE;
if(!single_value->field_structure.match(other_value.structure(), legacy))return FALSE;
if(!other_value.compression().is_bound()) return FALSE;
if(!single_value->field_compression.match(other_value.compression(), legacy))return FALSE;
if(!other_value.extension__octet__4().is_bound()) return FALSE;
if(!single_value->field_extension__octet__4.match(other_value.extension__octet__4(), 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 @MobileL3_CC_Types.BC_octet4.");
}
return FALSE;
}

boolean BC__octet4_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_establishment.is_bound()
 || single_value->field_nirr.is_bound()
 || single_value->field_configuration.is_bound()
 || single_value->field_duplexMode.is_bound()
 || single_value->field_structure.is_bound()
 || single_value->field_compression.is_bound()
 || single_value->field_extension__octet__4.is_bound();
}

boolean BC__octet4_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_establishment.is_value()
 && single_value->field_nirr.is_value()
 && single_value->field_configuration.is_value()
 && single_value->field_duplexMode.is_value()
 && single_value->field_structure.is_value()
 && single_value->field_compression.is_value()
 && single_value->field_extension__octet__4.is_value();
}

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

BC__octet4 BC__octet4_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 @MobileL3_CC_Types.BC_octet4.");
BC__octet4 ret_val;
if (single_value->field_establishment.is_bound()) {
ret_val.establishment() = single_value->field_establishment.valueof();
}
if (single_value->field_nirr.is_bound()) {
ret_val.nirr() = single_value->field_nirr.valueof();
}
if (single_value->field_configuration.is_bound()) {
ret_val.configuration() = single_value->field_configuration.valueof();
}
if (single_value->field_duplexMode.is_bound()) {
ret_val.duplexMode() = single_value->field_duplexMode.valueof();
}
if (single_value->field_structure.is_bound()) {
ret_val.structure() = single_value->field_structure.valueof();
}
if (single_value->field_compression.is_bound()) {
ret_val.compression() = single_value->field_compression.valueof();
}
if (single_value->field_extension__octet__4.is_bound()) {
ret_val.extension__octet__4() = single_value->field_extension__octet__4.valueof();
}
return ret_val;
}

void BC__octet4_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 @MobileL3_CC_Types.BC_octet4.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new BC__octet4_template[list_length];
}

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

BITSTRING_template& BC__octet4_template::establishment()
{
set_specific();
return single_value->field_establishment;
}

const BITSTRING_template& BC__octet4_template::establishment() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field establishment of a non-specific template of type @MobileL3_CC_Types.BC_octet4.");
return single_value->field_establishment;
}

BITSTRING_template& BC__octet4_template::nirr()
{
set_specific();
return single_value->field_nirr;
}

const BITSTRING_template& BC__octet4_template::nirr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nirr of a non-specific template of type @MobileL3_CC_Types.BC_octet4.");
return single_value->field_nirr;
}

BITSTRING_template& BC__octet4_template::configuration()
{
set_specific();
return single_value->field_configuration;
}

const BITSTRING_template& BC__octet4_template::configuration() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field configuration of a non-specific template of type @MobileL3_CC_Types.BC_octet4.");
return single_value->field_configuration;
}

BITSTRING_template& BC__octet4_template::duplexMode()
{
set_specific();
return single_value->field_duplexMode;
}

const BITSTRING_template& BC__octet4_template::duplexMode() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field duplexMode of a non-specific template of type @MobileL3_CC_Types.BC_octet4.");
return single_value->field_duplexMode;
}

BITSTRING_template& BC__octet4_template::structure()
{
set_specific();
return single_value->field_structure;
}

const BITSTRING_template& BC__octet4_template::structure() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field structure of a non-specific template of type @MobileL3_CC_Types.BC_octet4.");
return single_value->field_structure;
}

BITSTRING_template& BC__octet4_template::compression()
{
set_specific();
return single_value->field_compression;
}

const BITSTRING_template& BC__octet4_template::compression() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field compression of a non-specific template of type @MobileL3_CC_Types.BC_octet4.");
return single_value->field_compression;
}

BITSTRING_template& BC__octet4_template::extension__octet__4()
{
set_specific();
return single_value->field_extension__octet__4;
}

const BITSTRING_template& BC__octet4_template::extension__octet__4() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_4 of a non-specific template of type @MobileL3_CC_Types.BC_octet4.");
return single_value->field_extension__octet__4;
}

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

void BC__octet4_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ establishment := ");
single_value->field_establishment.log();
TTCN_Logger::log_event_str(", nirr := ");
single_value->field_nirr.log();
TTCN_Logger::log_event_str(", configuration := ");
single_value->field_configuration.log();
TTCN_Logger::log_event_str(", duplexMode := ");
single_value->field_duplexMode.log();
TTCN_Logger::log_event_str(", structure := ");
single_value->field_structure.log();
TTCN_Logger::log_event_str(", compression := ");
single_value->field_compression.log();
TTCN_Logger::log_event_str(", extension_octet_4 := ");
single_value->field_extension__octet__4.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 BC__octet4_template::log_match(const BC__octet4& 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_establishment.match(match_value.establishment(), legacy)){
TTCN_Logger::log_logmatch_info(".establishment");
single_value->field_establishment.log_match(match_value.establishment(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_nirr.match(match_value.nirr(), legacy)){
TTCN_Logger::log_logmatch_info(".nirr");
single_value->field_nirr.log_match(match_value.nirr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_configuration.match(match_value.configuration(), legacy)){
TTCN_Logger::log_logmatch_info(".configuration");
single_value->field_configuration.log_match(match_value.configuration(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_duplexMode.match(match_value.duplexMode(), legacy)){
TTCN_Logger::log_logmatch_info(".duplexMode");
single_value->field_duplexMode.log_match(match_value.duplexMode(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_structure.match(match_value.structure(), legacy)){
TTCN_Logger::log_logmatch_info(".structure");
single_value->field_structure.log_match(match_value.structure(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_compression.match(match_value.compression(), legacy)){
TTCN_Logger::log_logmatch_info(".compression");
single_value->field_compression.log_match(match_value.compression(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_extension__octet__4.match(match_value.extension__octet__4(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_4");
single_value->field_extension__octet__4.log_match(match_value.extension__octet__4(), 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("{ establishment := ");
single_value->field_establishment.log_match(match_value.establishment(), legacy);
TTCN_Logger::log_event_str(", nirr := ");
single_value->field_nirr.log_match(match_value.nirr(), legacy);
TTCN_Logger::log_event_str(", configuration := ");
single_value->field_configuration.log_match(match_value.configuration(), legacy);
TTCN_Logger::log_event_str(", duplexMode := ");
single_value->field_duplexMode.log_match(match_value.duplexMode(), legacy);
TTCN_Logger::log_event_str(", structure := ");
single_value->field_structure.log_match(match_value.structure(), legacy);
TTCN_Logger::log_event_str(", compression := ");
single_value->field_compression.log_match(match_value.compression(), legacy);
TTCN_Logger::log_event_str(", extension_octet_4 := ");
single_value->field_extension__octet__4.log_match(match_value.extension__octet__4(), 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 BC__octet4_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (establishment().is_bound()) establishment().set_implicit_omit();
if (nirr().is_bound()) nirr().set_implicit_omit();
if (configuration().is_bound()) configuration().set_implicit_omit();
if (duplexMode().is_bound()) duplexMode().set_implicit_omit();
if (structure().is_bound()) structure().set_implicit_omit();
if (compression().is_bound()) compression().set_implicit_omit();
if (extension__octet__4().is_bound()) extension__octet__4().set_implicit_omit();
}

void BC__octet4_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_establishment.encode_text(text_buf);
single_value->field_nirr.encode_text(text_buf);
single_value->field_configuration.encode_text(text_buf);
single_value->field_duplexMode.encode_text(text_buf);
single_value->field_structure.encode_text(text_buf);
single_value->field_compression.encode_text(text_buf);
single_value->field_extension__octet__4.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 @MobileL3_CC_Types.BC_octet4.");
}
}

void BC__octet4_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_establishment.decode_text(text_buf);
single_value->field_nirr.decode_text(text_buf);
single_value->field_configuration.decode_text(text_buf);
single_value->field_duplexMode.decode_text(text_buf);
single_value->field_structure.decode_text(text_buf);
single_value->field_compression.decode_text(text_buf);
single_value->field_extension__octet__4.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 BC__octet4_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 @MobileL3_CC_Types.BC_octet4.");
}
}

void BC__octet4_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: {
    BC__octet4_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 @MobileL3_CC_Types.BC_octet4 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) establishment().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) nirr().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) configuration().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) duplexMode().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) structure().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) compression().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) extension__octet__4().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(), "establishment")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          establishment().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nirr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nirr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "configuration")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          configuration().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "duplexMode")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          duplexMode().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "structure")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          structure().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "compression")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          compression().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__4().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 @MobileL3_CC_Types.BC_octet4: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    BC__octet4_template* precondition = new BC__octet4_template;
    precondition->set_param(*param.get_elem(0));
    BC__octet4_template* implied_template = new BC__octet4_template;
    implied_template->set_param(*param.get_elem(1));
    *this = BC__octet4_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.BC_octet4");
  }
  is_ifpresent = param.get_ifpresent();
}

void BC__octet4_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_establishment.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet4");
single_value->field_nirr.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet4");
single_value->field_configuration.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet4");
single_value->field_duplexMode.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet4");
single_value->field_structure.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet4");
single_value->field_compression.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet4");
single_value->field_extension__octet__4.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet4");
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 : "@MobileL3_CC_Types.BC_octet4");
}

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

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

BC__octet6::BC__octet6()
{
}

BC__octet6::BC__octet6(const BITSTRING& par_synchronous__asynchronous,
    const BITSTRING& par_userInformationLayer1Protocol,
    const BITSTRING& par_layer1Id,
    const BITSTRING& par_extension__octet__6,
    const OPTIONAL< BITSTRING >& par_userRate,
    const OPTIONAL< BITSTRING >& par_numberDataBits,
    const OPTIONAL< BITSTRING >& par_negotiation,
    const OPTIONAL< BITSTRING >& par_numberStopBits,
    const OPTIONAL< BITSTRING >& par_extension__octet__6a,
    const OPTIONAL< BITSTRING >& par_parity,
    const OPTIONAL< BITSTRING >& par_nicOnRX,
    const OPTIONAL< BITSTRING >& par_nicOnTX,
    const OPTIONAL< BITSTRING >& par_intermediateRate,
    const OPTIONAL< BITSTRING >& par_extension__octet__6b,
    const OPTIONAL< BITSTRING >& par_modemType,
    const OPTIONAL< BITSTRING >& par_connectionElement,
    const OPTIONAL< BITSTRING >& par_extension__octet__6c,
    const OPTIONAL< BITSTRING >& par_fixedNetworkUserRate,
    const OPTIONAL< BITSTRING >& par_otherModemType,
    const OPTIONAL< BITSTRING >& par_extension__octet__6d,
    const OPTIONAL< BITSTRING >& par_maxNumberOfTrafficChannels,
    const OPTIONAL< BITSTRING >& par_acceptableChannelCodings,
    const OPTIONAL< BITSTRING >& par_extension__octet__6e,
    const OPTIONAL< BITSTRING >& par_wantedAirInterfaceUserRate,
    const OPTIONAL< BITSTRING >& par_uimi,
    const OPTIONAL< BITSTRING >& par_extension__octet__6f,
    const OPTIONAL< BITSTRING >& par_spare,
    const OPTIONAL< BITSTRING >& par_asymetryIndication,
    const OPTIONAL< BITSTRING >& par_acceptableChannelCodingsExt,
    const OPTIONAL< BITSTRING >& par_extension__octet__6g)
  :   field_synchronous__asynchronous(par_synchronous__asynchronous),
  field_userInformationLayer1Protocol(par_userInformationLayer1Protocol),
  field_layer1Id(par_layer1Id),
  field_extension__octet__6(par_extension__octet__6),
  field_userRate(par_userRate),
  field_numberDataBits(par_numberDataBits),
  field_negotiation(par_negotiation),
  field_numberStopBits(par_numberStopBits),
  field_extension__octet__6a(par_extension__octet__6a),
  field_parity(par_parity),
  field_nicOnRX(par_nicOnRX),
  field_nicOnTX(par_nicOnTX),
  field_intermediateRate(par_intermediateRate),
  field_extension__octet__6b(par_extension__octet__6b),
  field_modemType(par_modemType),
  field_connectionElement(par_connectionElement),
  field_extension__octet__6c(par_extension__octet__6c),
  field_fixedNetworkUserRate(par_fixedNetworkUserRate),
  field_otherModemType(par_otherModemType),
  field_extension__octet__6d(par_extension__octet__6d),
  field_maxNumberOfTrafficChannels(par_maxNumberOfTrafficChannels),
  field_acceptableChannelCodings(par_acceptableChannelCodings),
  field_extension__octet__6e(par_extension__octet__6e),
  field_wantedAirInterfaceUserRate(par_wantedAirInterfaceUserRate),
  field_uimi(par_uimi),
  field_extension__octet__6f(par_extension__octet__6f),
  field_spare(par_spare),
  field_asymetryIndication(par_asymetryIndication),
  field_acceptableChannelCodingsExt(par_acceptableChannelCodingsExt),
  field_extension__octet__6g(par_extension__octet__6g)
{
}

BC__octet6::BC__octet6(const BC__octet6& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.BC_octet6.");
if (other_value.synchronous__asynchronous().is_bound()) field_synchronous__asynchronous = other_value.synchronous__asynchronous();
else field_synchronous__asynchronous.clean_up();
if (other_value.userInformationLayer1Protocol().is_bound()) field_userInformationLayer1Protocol = other_value.userInformationLayer1Protocol();
else field_userInformationLayer1Protocol.clean_up();
if (other_value.layer1Id().is_bound()) field_layer1Id = other_value.layer1Id();
else field_layer1Id.clean_up();
if (other_value.extension__octet__6().is_bound()) field_extension__octet__6 = other_value.extension__octet__6();
else field_extension__octet__6.clean_up();
if (other_value.userRate().is_bound()) field_userRate = other_value.userRate();
else field_userRate.clean_up();
if (other_value.numberDataBits().is_bound()) field_numberDataBits = other_value.numberDataBits();
else field_numberDataBits.clean_up();
if (other_value.negotiation().is_bound()) field_negotiation = other_value.negotiation();
else field_negotiation.clean_up();
if (other_value.numberStopBits().is_bound()) field_numberStopBits = other_value.numberStopBits();
else field_numberStopBits.clean_up();
if (other_value.extension__octet__6a().is_bound()) field_extension__octet__6a = other_value.extension__octet__6a();
else field_extension__octet__6a.clean_up();
if (other_value.parity().is_bound()) field_parity = other_value.parity();
else field_parity.clean_up();
if (other_value.nicOnRX().is_bound()) field_nicOnRX = other_value.nicOnRX();
else field_nicOnRX.clean_up();
if (other_value.nicOnTX().is_bound()) field_nicOnTX = other_value.nicOnTX();
else field_nicOnTX.clean_up();
if (other_value.intermediateRate().is_bound()) field_intermediateRate = other_value.intermediateRate();
else field_intermediateRate.clean_up();
if (other_value.extension__octet__6b().is_bound()) field_extension__octet__6b = other_value.extension__octet__6b();
else field_extension__octet__6b.clean_up();
if (other_value.modemType().is_bound()) field_modemType = other_value.modemType();
else field_modemType.clean_up();
if (other_value.connectionElement().is_bound()) field_connectionElement = other_value.connectionElement();
else field_connectionElement.clean_up();
if (other_value.extension__octet__6c().is_bound()) field_extension__octet__6c = other_value.extension__octet__6c();
else field_extension__octet__6c.clean_up();
if (other_value.fixedNetworkUserRate().is_bound()) field_fixedNetworkUserRate = other_value.fixedNetworkUserRate();
else field_fixedNetworkUserRate.clean_up();
if (other_value.otherModemType().is_bound()) field_otherModemType = other_value.otherModemType();
else field_otherModemType.clean_up();
if (other_value.extension__octet__6d().is_bound()) field_extension__octet__6d = other_value.extension__octet__6d();
else field_extension__octet__6d.clean_up();
if (other_value.maxNumberOfTrafficChannels().is_bound()) field_maxNumberOfTrafficChannels = other_value.maxNumberOfTrafficChannels();
else field_maxNumberOfTrafficChannels.clean_up();
if (other_value.acceptableChannelCodings().is_bound()) field_acceptableChannelCodings = other_value.acceptableChannelCodings();
else field_acceptableChannelCodings.clean_up();
if (other_value.extension__octet__6e().is_bound()) field_extension__octet__6e = other_value.extension__octet__6e();
else field_extension__octet__6e.clean_up();
if (other_value.wantedAirInterfaceUserRate().is_bound()) field_wantedAirInterfaceUserRate = other_value.wantedAirInterfaceUserRate();
else field_wantedAirInterfaceUserRate.clean_up();
if (other_value.uimi().is_bound()) field_uimi = other_value.uimi();
else field_uimi.clean_up();
if (other_value.extension__octet__6f().is_bound()) field_extension__octet__6f = other_value.extension__octet__6f();
else field_extension__octet__6f.clean_up();
if (other_value.spare().is_bound()) field_spare = other_value.spare();
else field_spare.clean_up();
if (other_value.asymetryIndication().is_bound()) field_asymetryIndication = other_value.asymetryIndication();
else field_asymetryIndication.clean_up();
if (other_value.acceptableChannelCodingsExt().is_bound()) field_acceptableChannelCodingsExt = other_value.acceptableChannelCodingsExt();
else field_acceptableChannelCodingsExt.clean_up();
if (other_value.extension__octet__6g().is_bound()) field_extension__octet__6g = other_value.extension__octet__6g();
else field_extension__octet__6g.clean_up();
}

void BC__octet6::clean_up()
{
field_synchronous__asynchronous.clean_up();
field_userInformationLayer1Protocol.clean_up();
field_layer1Id.clean_up();
field_extension__octet__6.clean_up();
field_userRate.clean_up();
field_numberDataBits.clean_up();
field_negotiation.clean_up();
field_numberStopBits.clean_up();
field_extension__octet__6a.clean_up();
field_parity.clean_up();
field_nicOnRX.clean_up();
field_nicOnTX.clean_up();
field_intermediateRate.clean_up();
field_extension__octet__6b.clean_up();
field_modemType.clean_up();
field_connectionElement.clean_up();
field_extension__octet__6c.clean_up();
field_fixedNetworkUserRate.clean_up();
field_otherModemType.clean_up();
field_extension__octet__6d.clean_up();
field_maxNumberOfTrafficChannels.clean_up();
field_acceptableChannelCodings.clean_up();
field_extension__octet__6e.clean_up();
field_wantedAirInterfaceUserRate.clean_up();
field_uimi.clean_up();
field_extension__octet__6f.clean_up();
field_spare.clean_up();
field_asymetryIndication.clean_up();
field_acceptableChannelCodingsExt.clean_up();
field_extension__octet__6g.clean_up();
}

const TTCN_Typedescriptor_t* BC__octet6::get_descriptor() const { return &BC__octet6_descr_; }
BC__octet6& BC__octet6::operator=(const BC__octet6& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.BC_octet6.");
  if (other_value.synchronous__asynchronous().is_bound()) field_synchronous__asynchronous = other_value.synchronous__asynchronous();
  else field_synchronous__asynchronous.clean_up();
  if (other_value.userInformationLayer1Protocol().is_bound()) field_userInformationLayer1Protocol = other_value.userInformationLayer1Protocol();
  else field_userInformationLayer1Protocol.clean_up();
  if (other_value.layer1Id().is_bound()) field_layer1Id = other_value.layer1Id();
  else field_layer1Id.clean_up();
  if (other_value.extension__octet__6().is_bound()) field_extension__octet__6 = other_value.extension__octet__6();
  else field_extension__octet__6.clean_up();
  if (other_value.userRate().is_bound()) field_userRate = other_value.userRate();
  else field_userRate.clean_up();
  if (other_value.numberDataBits().is_bound()) field_numberDataBits = other_value.numberDataBits();
  else field_numberDataBits.clean_up();
  if (other_value.negotiation().is_bound()) field_negotiation = other_value.negotiation();
  else field_negotiation.clean_up();
  if (other_value.numberStopBits().is_bound()) field_numberStopBits = other_value.numberStopBits();
  else field_numberStopBits.clean_up();
  if (other_value.extension__octet__6a().is_bound()) field_extension__octet__6a = other_value.extension__octet__6a();
  else field_extension__octet__6a.clean_up();
  if (other_value.parity().is_bound()) field_parity = other_value.parity();
  else field_parity.clean_up();
  if (other_value.nicOnRX().is_bound()) field_nicOnRX = other_value.nicOnRX();
  else field_nicOnRX.clean_up();
  if (other_value.nicOnTX().is_bound()) field_nicOnTX = other_value.nicOnTX();
  else field_nicOnTX.clean_up();
  if (other_value.intermediateRate().is_bound()) field_intermediateRate = other_value.intermediateRate();
  else field_intermediateRate.clean_up();
  if (other_value.extension__octet__6b().is_bound()) field_extension__octet__6b = other_value.extension__octet__6b();
  else field_extension__octet__6b.clean_up();
  if (other_value.modemType().is_bound()) field_modemType = other_value.modemType();
  else field_modemType.clean_up();
  if (other_value.connectionElement().is_bound()) field_connectionElement = other_value.connectionElement();
  else field_connectionElement.clean_up();
  if (other_value.extension__octet__6c().is_bound()) field_extension__octet__6c = other_value.extension__octet__6c();
  else field_extension__octet__6c.clean_up();
  if (other_value.fixedNetworkUserRate().is_bound()) field_fixedNetworkUserRate = other_value.fixedNetworkUserRate();
  else field_fixedNetworkUserRate.clean_up();
  if (other_value.otherModemType().is_bound()) field_otherModemType = other_value.otherModemType();
  else field_otherModemType.clean_up();
  if (other_value.extension__octet__6d().is_bound()) field_extension__octet__6d = other_value.extension__octet__6d();
  else field_extension__octet__6d.clean_up();
  if (other_value.maxNumberOfTrafficChannels().is_bound()) field_maxNumberOfTrafficChannels = other_value.maxNumberOfTrafficChannels();
  else field_maxNumberOfTrafficChannels.clean_up();
  if (other_value.acceptableChannelCodings().is_bound()) field_acceptableChannelCodings = other_value.acceptableChannelCodings();
  else field_acceptableChannelCodings.clean_up();
  if (other_value.extension__octet__6e().is_bound()) field_extension__octet__6e = other_value.extension__octet__6e();
  else field_extension__octet__6e.clean_up();
  if (other_value.wantedAirInterfaceUserRate().is_bound()) field_wantedAirInterfaceUserRate = other_value.wantedAirInterfaceUserRate();
  else field_wantedAirInterfaceUserRate.clean_up();
  if (other_value.uimi().is_bound()) field_uimi = other_value.uimi();
  else field_uimi.clean_up();
  if (other_value.extension__octet__6f().is_bound()) field_extension__octet__6f = other_value.extension__octet__6f();
  else field_extension__octet__6f.clean_up();
  if (other_value.spare().is_bound()) field_spare = other_value.spare();
  else field_spare.clean_up();
  if (other_value.asymetryIndication().is_bound()) field_asymetryIndication = other_value.asymetryIndication();
  else field_asymetryIndication.clean_up();
  if (other_value.acceptableChannelCodingsExt().is_bound()) field_acceptableChannelCodingsExt = other_value.acceptableChannelCodingsExt();
  else field_acceptableChannelCodingsExt.clean_up();
  if (other_value.extension__octet__6g().is_bound()) field_extension__octet__6g = other_value.extension__octet__6g();
  else field_extension__octet__6g.clean_up();
}
return *this;
}

boolean BC__octet6::operator==(const BC__octet6& other_value) const
{
return field_synchronous__asynchronous==other_value.field_synchronous__asynchronous
  && field_userInformationLayer1Protocol==other_value.field_userInformationLayer1Protocol
  && field_layer1Id==other_value.field_layer1Id
  && field_extension__octet__6==other_value.field_extension__octet__6
  && field_userRate==other_value.field_userRate
  && field_numberDataBits==other_value.field_numberDataBits
  && field_negotiation==other_value.field_negotiation
  && field_numberStopBits==other_value.field_numberStopBits
  && field_extension__octet__6a==other_value.field_extension__octet__6a
  && field_parity==other_value.field_parity
  && field_nicOnRX==other_value.field_nicOnRX
  && field_nicOnTX==other_value.field_nicOnTX
  && field_intermediateRate==other_value.field_intermediateRate
  && field_extension__octet__6b==other_value.field_extension__octet__6b
  && field_modemType==other_value.field_modemType
  && field_connectionElement==other_value.field_connectionElement
  && field_extension__octet__6c==other_value.field_extension__octet__6c
  && field_fixedNetworkUserRate==other_value.field_fixedNetworkUserRate
  && field_otherModemType==other_value.field_otherModemType
  && field_extension__octet__6d==other_value.field_extension__octet__6d
  && field_maxNumberOfTrafficChannels==other_value.field_maxNumberOfTrafficChannels
  && field_acceptableChannelCodings==other_value.field_acceptableChannelCodings
  && field_extension__octet__6e==other_value.field_extension__octet__6e
  && field_wantedAirInterfaceUserRate==other_value.field_wantedAirInterfaceUserRate
  && field_uimi==other_value.field_uimi
  && field_extension__octet__6f==other_value.field_extension__octet__6f
  && field_spare==other_value.field_spare
  && field_asymetryIndication==other_value.field_asymetryIndication
  && field_acceptableChannelCodingsExt==other_value.field_acceptableChannelCodingsExt
  && field_extension__octet__6g==other_value.field_extension__octet__6g;
}

boolean BC__octet6::is_bound() const
{
return (field_synchronous__asynchronous.is_bound())
  || (field_userInformationLayer1Protocol.is_bound())
  || (field_layer1Id.is_bound())
  || (field_extension__octet__6.is_bound())
  || (OPTIONAL_OMIT == field_userRate.get_selection() || field_userRate.is_bound())
  || (OPTIONAL_OMIT == field_numberDataBits.get_selection() || field_numberDataBits.is_bound())
  || (OPTIONAL_OMIT == field_negotiation.get_selection() || field_negotiation.is_bound())
  || (OPTIONAL_OMIT == field_numberStopBits.get_selection() || field_numberStopBits.is_bound())
  || (OPTIONAL_OMIT == field_extension__octet__6a.get_selection() || field_extension__octet__6a.is_bound())
  || (OPTIONAL_OMIT == field_parity.get_selection() || field_parity.is_bound())
  || (OPTIONAL_OMIT == field_nicOnRX.get_selection() || field_nicOnRX.is_bound())
  || (OPTIONAL_OMIT == field_nicOnTX.get_selection() || field_nicOnTX.is_bound())
  || (OPTIONAL_OMIT == field_intermediateRate.get_selection() || field_intermediateRate.is_bound())
  || (OPTIONAL_OMIT == field_extension__octet__6b.get_selection() || field_extension__octet__6b.is_bound())
  || (OPTIONAL_OMIT == field_modemType.get_selection() || field_modemType.is_bound())
  || (OPTIONAL_OMIT == field_connectionElement.get_selection() || field_connectionElement.is_bound())
  || (OPTIONAL_OMIT == field_extension__octet__6c.get_selection() || field_extension__octet__6c.is_bound())
  || (OPTIONAL_OMIT == field_fixedNetworkUserRate.get_selection() || field_fixedNetworkUserRate.is_bound())
  || (OPTIONAL_OMIT == field_otherModemType.get_selection() || field_otherModemType.is_bound())
  || (OPTIONAL_OMIT == field_extension__octet__6d.get_selection() || field_extension__octet__6d.is_bound())
  || (OPTIONAL_OMIT == field_maxNumberOfTrafficChannels.get_selection() || field_maxNumberOfTrafficChannels.is_bound())
  || (OPTIONAL_OMIT == field_acceptableChannelCodings.get_selection() || field_acceptableChannelCodings.is_bound())
  || (OPTIONAL_OMIT == field_extension__octet__6e.get_selection() || field_extension__octet__6e.is_bound())
  || (OPTIONAL_OMIT == field_wantedAirInterfaceUserRate.get_selection() || field_wantedAirInterfaceUserRate.is_bound())
  || (OPTIONAL_OMIT == field_uimi.get_selection() || field_uimi.is_bound())
  || (OPTIONAL_OMIT == field_extension__octet__6f.get_selection() || field_extension__octet__6f.is_bound())
  || (OPTIONAL_OMIT == field_spare.get_selection() || field_spare.is_bound())
  || (OPTIONAL_OMIT == field_asymetryIndication.get_selection() || field_asymetryIndication.is_bound())
  || (OPTIONAL_OMIT == field_acceptableChannelCodingsExt.get_selection() || field_acceptableChannelCodingsExt.is_bound())
  || (OPTIONAL_OMIT == field_extension__octet__6g.get_selection() || field_extension__octet__6g.is_bound());
}
boolean BC__octet6::is_value() const
{
return field_synchronous__asynchronous.is_value()
  && field_userInformationLayer1Protocol.is_value()
  && field_layer1Id.is_value()
  && field_extension__octet__6.is_value()
  && (OPTIONAL_OMIT == field_userRate.get_selection() || field_userRate.is_value())
  && (OPTIONAL_OMIT == field_numberDataBits.get_selection() || field_numberDataBits.is_value())
  && (OPTIONAL_OMIT == field_negotiation.get_selection() || field_negotiation.is_value())
  && (OPTIONAL_OMIT == field_numberStopBits.get_selection() || field_numberStopBits.is_value())
  && (OPTIONAL_OMIT == field_extension__octet__6a.get_selection() || field_extension__octet__6a.is_value())
  && (OPTIONAL_OMIT == field_parity.get_selection() || field_parity.is_value())
  && (OPTIONAL_OMIT == field_nicOnRX.get_selection() || field_nicOnRX.is_value())
  && (OPTIONAL_OMIT == field_nicOnTX.get_selection() || field_nicOnTX.is_value())
  && (OPTIONAL_OMIT == field_intermediateRate.get_selection() || field_intermediateRate.is_value())
  && (OPTIONAL_OMIT == field_extension__octet__6b.get_selection() || field_extension__octet__6b.is_value())
  && (OPTIONAL_OMIT == field_modemType.get_selection() || field_modemType.is_value())
  && (OPTIONAL_OMIT == field_connectionElement.get_selection() || field_connectionElement.is_value())
  && (OPTIONAL_OMIT == field_extension__octet__6c.get_selection() || field_extension__octet__6c.is_value())
  && (OPTIONAL_OMIT == field_fixedNetworkUserRate.get_selection() || field_fixedNetworkUserRate.is_value())
  && (OPTIONAL_OMIT == field_otherModemType.get_selection() || field_otherModemType.is_value())
  && (OPTIONAL_OMIT == field_extension__octet__6d.get_selection() || field_extension__octet__6d.is_value())
  && (OPTIONAL_OMIT == field_maxNumberOfTrafficChannels.get_selection() || field_maxNumberOfTrafficChannels.is_value())
  && (OPTIONAL_OMIT == field_acceptableChannelCodings.get_selection() || field_acceptableChannelCodings.is_value())
  && (OPTIONAL_OMIT == field_extension__octet__6e.get_selection() || field_extension__octet__6e.is_value())
  && (OPTIONAL_OMIT == field_wantedAirInterfaceUserRate.get_selection() || field_wantedAirInterfaceUserRate.is_value())
  && (OPTIONAL_OMIT == field_uimi.get_selection() || field_uimi.is_value())
  && (OPTIONAL_OMIT == field_extension__octet__6f.get_selection() || field_extension__octet__6f.is_value())
  && (OPTIONAL_OMIT == field_spare.get_selection() || field_spare.is_value())
  && (OPTIONAL_OMIT == field_asymetryIndication.get_selection() || field_asymetryIndication.is_value())
  && (OPTIONAL_OMIT == field_acceptableChannelCodingsExt.get_selection() || field_acceptableChannelCodingsExt.is_value())
  && (OPTIONAL_OMIT == field_extension__octet__6g.get_selection() || field_extension__octet__6g.is_value());
}
int BC__octet6::size_of() const
{
  int ret_val = 4;
  if (field_userRate.ispresent()) ret_val++;
  if (field_numberDataBits.ispresent()) ret_val++;
  if (field_negotiation.ispresent()) ret_val++;
  if (field_numberStopBits.ispresent()) ret_val++;
  if (field_extension__octet__6a.ispresent()) ret_val++;
  if (field_parity.ispresent()) ret_val++;
  if (field_nicOnRX.ispresent()) ret_val++;
  if (field_nicOnTX.ispresent()) ret_val++;
  if (field_intermediateRate.ispresent()) ret_val++;
  if (field_extension__octet__6b.ispresent()) ret_val++;
  if (field_modemType.ispresent()) ret_val++;
  if (field_connectionElement.ispresent()) ret_val++;
  if (field_extension__octet__6c.ispresent()) ret_val++;
  if (field_fixedNetworkUserRate.ispresent()) ret_val++;
  if (field_otherModemType.ispresent()) ret_val++;
  if (field_extension__octet__6d.ispresent()) ret_val++;
  if (field_maxNumberOfTrafficChannels.ispresent()) ret_val++;
  if (field_acceptableChannelCodings.ispresent()) ret_val++;
  if (field_extension__octet__6e.ispresent()) ret_val++;
  if (field_wantedAirInterfaceUserRate.ispresent()) ret_val++;
  if (field_uimi.ispresent()) ret_val++;
  if (field_extension__octet__6f.ispresent()) ret_val++;
  if (field_spare.ispresent()) ret_val++;
  if (field_asymetryIndication.ispresent()) ret_val++;
  if (field_acceptableChannelCodingsExt.ispresent()) ret_val++;
  if (field_extension__octet__6g.ispresent()) ret_val++;
  return ret_val;
}

void BC__octet6::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ synchronous_asynchronous := ");
field_synchronous__asynchronous.log();
TTCN_Logger::log_event_str(", userInformationLayer1Protocol := ");
field_userInformationLayer1Protocol.log();
TTCN_Logger::log_event_str(", layer1Id := ");
field_layer1Id.log();
TTCN_Logger::log_event_str(", extension_octet_6 := ");
field_extension__octet__6.log();
TTCN_Logger::log_event_str(", userRate := ");
field_userRate.log();
TTCN_Logger::log_event_str(", numberDataBits := ");
field_numberDataBits.log();
TTCN_Logger::log_event_str(", negotiation := ");
field_negotiation.log();
TTCN_Logger::log_event_str(", numberStopBits := ");
field_numberStopBits.log();
TTCN_Logger::log_event_str(", extension_octet_6a := ");
field_extension__octet__6a.log();
TTCN_Logger::log_event_str(", parity := ");
field_parity.log();
TTCN_Logger::log_event_str(", nicOnRX := ");
field_nicOnRX.log();
TTCN_Logger::log_event_str(", nicOnTX := ");
field_nicOnTX.log();
TTCN_Logger::log_event_str(", intermediateRate := ");
field_intermediateRate.log();
TTCN_Logger::log_event_str(", extension_octet_6b := ");
field_extension__octet__6b.log();
TTCN_Logger::log_event_str(", modemType := ");
field_modemType.log();
TTCN_Logger::log_event_str(", connectionElement := ");
field_connectionElement.log();
TTCN_Logger::log_event_str(", extension_octet_6c := ");
field_extension__octet__6c.log();
TTCN_Logger::log_event_str(", fixedNetworkUserRate := ");
field_fixedNetworkUserRate.log();
TTCN_Logger::log_event_str(", otherModemType := ");
field_otherModemType.log();
TTCN_Logger::log_event_str(", extension_octet_6d := ");
field_extension__octet__6d.log();
TTCN_Logger::log_event_str(", maxNumberOfTrafficChannels := ");
field_maxNumberOfTrafficChannels.log();
TTCN_Logger::log_event_str(", acceptableChannelCodings := ");
field_acceptableChannelCodings.log();
TTCN_Logger::log_event_str(", extension_octet_6e := ");
field_extension__octet__6e.log();
TTCN_Logger::log_event_str(", wantedAirInterfaceUserRate := ");
field_wantedAirInterfaceUserRate.log();
TTCN_Logger::log_event_str(", uimi := ");
field_uimi.log();
TTCN_Logger::log_event_str(", extension_octet_6f := ");
field_extension__octet__6f.log();
TTCN_Logger::log_event_str(", spare := ");
field_spare.log();
TTCN_Logger::log_event_str(", asymetryIndication := ");
field_asymetryIndication.log();
TTCN_Logger::log_event_str(", acceptableChannelCodingsExt := ");
field_acceptableChannelCodingsExt.log();
TTCN_Logger::log_event_str(", extension_octet_6g := ");
field_extension__octet__6g.log();
TTCN_Logger::log_event_str(" }");
}

void BC__octet6::set_implicit_omit()
{
if (synchronous__asynchronous().is_bound()) synchronous__asynchronous().set_implicit_omit();
if (userInformationLayer1Protocol().is_bound()) userInformationLayer1Protocol().set_implicit_omit();
if (layer1Id().is_bound()) layer1Id().set_implicit_omit();
if (extension__octet__6().is_bound()) extension__octet__6().set_implicit_omit();
if (!userRate().is_bound()) userRate() = OMIT_VALUE;
else userRate().set_implicit_omit();
if (!numberDataBits().is_bound()) numberDataBits() = OMIT_VALUE;
else numberDataBits().set_implicit_omit();
if (!negotiation().is_bound()) negotiation() = OMIT_VALUE;
else negotiation().set_implicit_omit();
if (!numberStopBits().is_bound()) numberStopBits() = OMIT_VALUE;
else numberStopBits().set_implicit_omit();
if (!extension__octet__6a().is_bound()) extension__octet__6a() = OMIT_VALUE;
else extension__octet__6a().set_implicit_omit();
if (!parity().is_bound()) parity() = OMIT_VALUE;
else parity().set_implicit_omit();
if (!nicOnRX().is_bound()) nicOnRX() = OMIT_VALUE;
else nicOnRX().set_implicit_omit();
if (!nicOnTX().is_bound()) nicOnTX() = OMIT_VALUE;
else nicOnTX().set_implicit_omit();
if (!intermediateRate().is_bound()) intermediateRate() = OMIT_VALUE;
else intermediateRate().set_implicit_omit();
if (!extension__octet__6b().is_bound()) extension__octet__6b() = OMIT_VALUE;
else extension__octet__6b().set_implicit_omit();
if (!modemType().is_bound()) modemType() = OMIT_VALUE;
else modemType().set_implicit_omit();
if (!connectionElement().is_bound()) connectionElement() = OMIT_VALUE;
else connectionElement().set_implicit_omit();
if (!extension__octet__6c().is_bound()) extension__octet__6c() = OMIT_VALUE;
else extension__octet__6c().set_implicit_omit();
if (!fixedNetworkUserRate().is_bound()) fixedNetworkUserRate() = OMIT_VALUE;
else fixedNetworkUserRate().set_implicit_omit();
if (!otherModemType().is_bound()) otherModemType() = OMIT_VALUE;
else otherModemType().set_implicit_omit();
if (!extension__octet__6d().is_bound()) extension__octet__6d() = OMIT_VALUE;
else extension__octet__6d().set_implicit_omit();
if (!maxNumberOfTrafficChannels().is_bound()) maxNumberOfTrafficChannels() = OMIT_VALUE;
else maxNumberOfTrafficChannels().set_implicit_omit();
if (!acceptableChannelCodings().is_bound()) acceptableChannelCodings() = OMIT_VALUE;
else acceptableChannelCodings().set_implicit_omit();
if (!extension__octet__6e().is_bound()) extension__octet__6e() = OMIT_VALUE;
else extension__octet__6e().set_implicit_omit();
if (!wantedAirInterfaceUserRate().is_bound()) wantedAirInterfaceUserRate() = OMIT_VALUE;
else wantedAirInterfaceUserRate().set_implicit_omit();
if (!uimi().is_bound()) uimi() = OMIT_VALUE;
else uimi().set_implicit_omit();
if (!extension__octet__6f().is_bound()) extension__octet__6f() = OMIT_VALUE;
else extension__octet__6f().set_implicit_omit();
if (!spare().is_bound()) spare() = OMIT_VALUE;
else spare().set_implicit_omit();
if (!asymetryIndication().is_bound()) asymetryIndication() = OMIT_VALUE;
else asymetryIndication().set_implicit_omit();
if (!acceptableChannelCodingsExt().is_bound()) acceptableChannelCodingsExt() = OMIT_VALUE;
else acceptableChannelCodingsExt().set_implicit_omit();
if (!extension__octet__6g().is_bound()) extension__octet__6g() = OMIT_VALUE;
else extension__octet__6g().set_implicit_omit();
}

void BC__octet6::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (30<param.get_size()) {
      param.error("record value of type @MobileL3_CC_Types.BC_octet6 has 30 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) synchronous__asynchronous().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) userInformationLayer1Protocol().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) layer1Id().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) userRate().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) numberDataBits().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) negotiation().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) numberStopBits().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6a().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) parity().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) nicOnRX().set_param(*param.get_elem(10));
    if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) nicOnTX().set_param(*param.get_elem(11));
    if (param.get_size()>12 && param.get_elem(12)->get_type()!=Module_Param::MP_NotUsed) intermediateRate().set_param(*param.get_elem(12));
    if (param.get_size()>13 && param.get_elem(13)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6b().set_param(*param.get_elem(13));
    if (param.get_size()>14 && param.get_elem(14)->get_type()!=Module_Param::MP_NotUsed) modemType().set_param(*param.get_elem(14));
    if (param.get_size()>15 && param.get_elem(15)->get_type()!=Module_Param::MP_NotUsed) connectionElement().set_param(*param.get_elem(15));
    if (param.get_size()>16 && param.get_elem(16)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6c().set_param(*param.get_elem(16));
    if (param.get_size()>17 && param.get_elem(17)->get_type()!=Module_Param::MP_NotUsed) fixedNetworkUserRate().set_param(*param.get_elem(17));
    if (param.get_size()>18 && param.get_elem(18)->get_type()!=Module_Param::MP_NotUsed) otherModemType().set_param(*param.get_elem(18));
    if (param.get_size()>19 && param.get_elem(19)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6d().set_param(*param.get_elem(19));
    if (param.get_size()>20 && param.get_elem(20)->get_type()!=Module_Param::MP_NotUsed) maxNumberOfTrafficChannels().set_param(*param.get_elem(20));
    if (param.get_size()>21 && param.get_elem(21)->get_type()!=Module_Param::MP_NotUsed) acceptableChannelCodings().set_param(*param.get_elem(21));
    if (param.get_size()>22 && param.get_elem(22)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6e().set_param(*param.get_elem(22));
    if (param.get_size()>23 && param.get_elem(23)->get_type()!=Module_Param::MP_NotUsed) wantedAirInterfaceUserRate().set_param(*param.get_elem(23));
    if (param.get_size()>24 && param.get_elem(24)->get_type()!=Module_Param::MP_NotUsed) uimi().set_param(*param.get_elem(24));
    if (param.get_size()>25 && param.get_elem(25)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6f().set_param(*param.get_elem(25));
    if (param.get_size()>26 && param.get_elem(26)->get_type()!=Module_Param::MP_NotUsed) spare().set_param(*param.get_elem(26));
    if (param.get_size()>27 && param.get_elem(27)->get_type()!=Module_Param::MP_NotUsed) asymetryIndication().set_param(*param.get_elem(27));
    if (param.get_size()>28 && param.get_elem(28)->get_type()!=Module_Param::MP_NotUsed) acceptableChannelCodingsExt().set_param(*param.get_elem(28));
    if (param.get_size()>29 && param.get_elem(29)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6g().set_param(*param.get_elem(29));
    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(), "synchronous_asynchronous")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          synchronous__asynchronous().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "userInformationLayer1Protocol")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          userInformationLayer1Protocol().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "layer1Id")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          layer1Id().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "userRate")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          userRate().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "numberDataBits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberDataBits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "negotiation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          negotiation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "numberStopBits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberStopBits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6a")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6a().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "parity")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          parity().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nicOnRX")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nicOnRX().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nicOnTX")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nicOnTX().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "intermediateRate")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          intermediateRate().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6b")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6b().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "modemType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          modemType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "connectionElement")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          connectionElement().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6c")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6c().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "fixedNetworkUserRate")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          fixedNetworkUserRate().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "otherModemType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          otherModemType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6d")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6d().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "maxNumberOfTrafficChannels")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          maxNumberOfTrafficChannels().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "acceptableChannelCodings")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          acceptableChannelCodings().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6e")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6e().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "wantedAirInterfaceUserRate")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          wantedAirInterfaceUserRate().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "uimi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          uimi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6f")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6f().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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(), "asymetryIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          asymetryIndication().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "acceptableChannelCodingsExt")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          acceptableChannelCodingsExt().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6g")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6g().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 @MobileL3_CC_Types.BC_octet6: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.BC_octet6");
  }
}

void BC__octet6::encode_text(Text_Buf& text_buf) const
{
field_synchronous__asynchronous.encode_text(text_buf);
field_userInformationLayer1Protocol.encode_text(text_buf);
field_layer1Id.encode_text(text_buf);
field_extension__octet__6.encode_text(text_buf);
field_userRate.encode_text(text_buf);
field_numberDataBits.encode_text(text_buf);
field_negotiation.encode_text(text_buf);
field_numberStopBits.encode_text(text_buf);
field_extension__octet__6a.encode_text(text_buf);
field_parity.encode_text(text_buf);
field_nicOnRX.encode_text(text_buf);
field_nicOnTX.encode_text(text_buf);
field_intermediateRate.encode_text(text_buf);
field_extension__octet__6b.encode_text(text_buf);
field_modemType.encode_text(text_buf);
field_connectionElement.encode_text(text_buf);
field_extension__octet__6c.encode_text(text_buf);
field_fixedNetworkUserRate.encode_text(text_buf);
field_otherModemType.encode_text(text_buf);
field_extension__octet__6d.encode_text(text_buf);
field_maxNumberOfTrafficChannels.encode_text(text_buf);
field_acceptableChannelCodings.encode_text(text_buf);
field_extension__octet__6e.encode_text(text_buf);
field_wantedAirInterfaceUserRate.encode_text(text_buf);
field_uimi.encode_text(text_buf);
field_extension__octet__6f.encode_text(text_buf);
field_spare.encode_text(text_buf);
field_asymetryIndication.encode_text(text_buf);
field_acceptableChannelCodingsExt.encode_text(text_buf);
field_extension__octet__6g.encode_text(text_buf);
}

void BC__octet6::decode_text(Text_Buf& text_buf)
{
field_synchronous__asynchronous.decode_text(text_buf);
field_userInformationLayer1Protocol.decode_text(text_buf);
field_layer1Id.decode_text(text_buf);
field_extension__octet__6.decode_text(text_buf);
field_userRate.decode_text(text_buf);
field_numberDataBits.decode_text(text_buf);
field_negotiation.decode_text(text_buf);
field_numberStopBits.decode_text(text_buf);
field_extension__octet__6a.decode_text(text_buf);
field_parity.decode_text(text_buf);
field_nicOnRX.decode_text(text_buf);
field_nicOnTX.decode_text(text_buf);
field_intermediateRate.decode_text(text_buf);
field_extension__octet__6b.decode_text(text_buf);
field_modemType.decode_text(text_buf);
field_connectionElement.decode_text(text_buf);
field_extension__octet__6c.decode_text(text_buf);
field_fixedNetworkUserRate.decode_text(text_buf);
field_otherModemType.decode_text(text_buf);
field_extension__octet__6d.decode_text(text_buf);
field_maxNumberOfTrafficChannels.decode_text(text_buf);
field_acceptableChannelCodings.decode_text(text_buf);
field_extension__octet__6e.decode_text(text_buf);
field_wantedAirInterfaceUserRate.decode_text(text_buf);
field_uimi.decode_text(text_buf);
field_extension__octet__6f.decode_text(text_buf);
field_spare.decode_text(text_buf);
field_asymetryIndication.decode_text(text_buf);
field_acceptableChannelCodingsExt.decode_text(text_buf);
field_extension__octet__6g.decode_text(text_buf);
}

void BC__octet6::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 BC__octet6::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 BC__octet6::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;
  {
  cbyte* data=p_buf.get_read_data();
  int count=1;
  unsigned mask = 1 << (local_top_order==ORDER_LSB ? 0 : 7);
  if(p_td.raw->extension_bit==EXT_BIT_YES){
    while((data[count-1] & mask)==0 && count*8<(int)limit) count++;
  }
  else{
    while((data[count-1] & mask)!=0 && count*8<(int)limit) count++;
  }
  if(limit) limit=count*8;
  }
  RAW_Force_Omit field_0_force_omit(0, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_synchronous__asynchronous.RAW_decode(General__Types::BIT1_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, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_userInformationLayer1Protocol.RAW_decode(General__Types::BIT4_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, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_layer1Id.RAW_decode(General__Types::BIT2_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__6.RAW_decode(General__Types::BIT1_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());
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_userRate = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_userRate().RAW_decode(General__Types::BIT4_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_userRate = 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_userRate=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_numberDataBits = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_numberDataBits().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_numberDataBits = 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_numberDataBits=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_negotiation = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_negotiation().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_negotiation = 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_negotiation=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(7)) {
    field_numberStopBits = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_7_force_omit(7, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_numberStopBits().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 1) {
  field_numberStopBits = 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_numberStopBits=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(8)) {
    field_extension__octet__6a = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_8_force_omit(8, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__6a().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_8_force_omit);
  if (decoded_field_length < 1) {
  field_extension__octet__6a = 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_extension__octet__6a=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(9)) {
    field_parity = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_9_force_omit(9, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_parity().RAW_decode(General__Types::BIT3_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_9_force_omit);
  if (decoded_field_length < 1) {
  field_parity = 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_parity=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(10)) {
    field_nicOnRX = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_10_force_omit(10, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_nicOnRX().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_10_force_omit);
  if (decoded_field_length < 1) {
  field_nicOnRX = 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_nicOnRX=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(11)) {
    field_nicOnTX = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_11_force_omit(11, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_nicOnTX().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_11_force_omit);
  if (decoded_field_length < 1) {
  field_nicOnTX = 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_nicOnTX=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(12)) {
    field_intermediateRate = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_12_force_omit(12, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_intermediateRate().RAW_decode(General__Types::BIT2_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_12_force_omit);
  if (decoded_field_length < 1) {
  field_intermediateRate = 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_intermediateRate=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(13)) {
    field_extension__octet__6b = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_13_force_omit(13, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__6b().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_13_force_omit);
  if (decoded_field_length < 1) {
  field_extension__octet__6b = 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_extension__octet__6b=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(14)) {
    field_modemType = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_14_force_omit(14, force_omit, General__Types::BIT5_descr_.raw->forceomit);
  decoded_field_length = field_modemType().RAW_decode(General__Types::BIT5_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_14_force_omit);
  if (decoded_field_length < 1) {
  field_modemType = 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_modemType=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(15)) {
    field_connectionElement = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_15_force_omit(15, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_connectionElement().RAW_decode(General__Types::BIT2_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_15_force_omit);
  if (decoded_field_length < 1) {
  field_connectionElement = 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_connectionElement=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(16)) {
    field_extension__octet__6c = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_16_force_omit(16, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__6c().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_16_force_omit);
  if (decoded_field_length < 1) {
  field_extension__octet__6c = 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_extension__octet__6c=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(17)) {
    field_fixedNetworkUserRate = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_17_force_omit(17, force_omit, General__Types::BIT5_descr_.raw->forceomit);
  decoded_field_length = field_fixedNetworkUserRate().RAW_decode(General__Types::BIT5_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_17_force_omit);
  if (decoded_field_length < 1) {
  field_fixedNetworkUserRate = 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_fixedNetworkUserRate=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(18)) {
    field_otherModemType = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_18_force_omit(18, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_otherModemType().RAW_decode(General__Types::BIT2_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_18_force_omit);
  if (decoded_field_length < 1) {
  field_otherModemType = 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_otherModemType=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(19)) {
    field_extension__octet__6d = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_19_force_omit(19, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__6d().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_19_force_omit);
  if (decoded_field_length < 1) {
  field_extension__octet__6d = 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_extension__octet__6d=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(20)) {
    field_maxNumberOfTrafficChannels = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_20_force_omit(20, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_maxNumberOfTrafficChannels().RAW_decode(General__Types::BIT3_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_20_force_omit);
  if (decoded_field_length < 1) {
  field_maxNumberOfTrafficChannels = 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_maxNumberOfTrafficChannels=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(21)) {
    field_acceptableChannelCodings = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_21_force_omit(21, force_omit, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_acceptableChannelCodings().RAW_decode(General__Types::BIT4_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_21_force_omit);
  if (decoded_field_length < 1) {
  field_acceptableChannelCodings = 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_acceptableChannelCodings=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(22)) {
    field_extension__octet__6e = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_22_force_omit(22, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__6e().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_22_force_omit);
  if (decoded_field_length < 1) {
  field_extension__octet__6e = 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_extension__octet__6e=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(23)) {
    field_wantedAirInterfaceUserRate = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_23_force_omit(23, force_omit, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_wantedAirInterfaceUserRate().RAW_decode(General__Types::BIT4_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_23_force_omit);
  if (decoded_field_length < 1) {
  field_wantedAirInterfaceUserRate = 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_wantedAirInterfaceUserRate=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(24)) {
    field_uimi = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_24_force_omit(24, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_uimi().RAW_decode(General__Types::BIT3_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_24_force_omit);
  if (decoded_field_length < 1) {
  field_uimi = 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_uimi=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(25)) {
    field_extension__octet__6f = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_25_force_omit(25, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__6f().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_25_force_omit);
  if (decoded_field_length < 1) {
  field_extension__octet__6f = 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_extension__octet__6f=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(26)) {
    field_spare = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_26_force_omit(26, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_spare().RAW_decode(General__Types::BIT2_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_26_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;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(27)) {
    field_asymetryIndication = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_27_force_omit(27, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_asymetryIndication().RAW_decode(General__Types::BIT2_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_27_force_omit);
  if (decoded_field_length < 1) {
  field_asymetryIndication = 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_asymetryIndication=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(28)) {
    field_acceptableChannelCodingsExt = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_28_force_omit(28, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_acceptableChannelCodingsExt().RAW_decode(General__Types::BIT3_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_28_force_omit);
  if (decoded_field_length < 1) {
  field_acceptableChannelCodingsExt = 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_acceptableChannelCodingsExt=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(29)) {
    field_extension__octet__6g = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_29_force_omit(29, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__6g().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_29_force_omit);
  if (decoded_field_length < 1) {
  field_extension__octet__6g = 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_extension__octet__6g=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int BC__octet6::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 = 30;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(30);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT4_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT1_descr_.raw);
  if (field_userRate.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT4_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_numberDataBits.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_negotiation.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  if (field_numberStopBits.ispresent()) {
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[7] = NULL;
  if (field_extension__octet__6a.ispresent()) {
  myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 8, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[8] = NULL;
  if (field_parity.ispresent()) {
  myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 9, General__Types::BIT3_descr_.raw);
  }
  else myleaf.body.node.nodes[9] = NULL;
  if (field_nicOnRX.ispresent()) {
  myleaf.body.node.nodes[10] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 10, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[10] = NULL;
  if (field_nicOnTX.ispresent()) {
  myleaf.body.node.nodes[11] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 11, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[11] = NULL;
  if (field_intermediateRate.ispresent()) {
  myleaf.body.node.nodes[12] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 12, General__Types::BIT2_descr_.raw);
  }
  else myleaf.body.node.nodes[12] = NULL;
  if (field_extension__octet__6b.ispresent()) {
  myleaf.body.node.nodes[13] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 13, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[13] = NULL;
  if (field_modemType.ispresent()) {
  myleaf.body.node.nodes[14] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 14, General__Types::BIT5_descr_.raw);
  }
  else myleaf.body.node.nodes[14] = NULL;
  if (field_connectionElement.ispresent()) {
  myleaf.body.node.nodes[15] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 15, General__Types::BIT2_descr_.raw);
  }
  else myleaf.body.node.nodes[15] = NULL;
  if (field_extension__octet__6c.ispresent()) {
  myleaf.body.node.nodes[16] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 16, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[16] = NULL;
  if (field_fixedNetworkUserRate.ispresent()) {
  myleaf.body.node.nodes[17] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 17, General__Types::BIT5_descr_.raw);
  }
  else myleaf.body.node.nodes[17] = NULL;
  if (field_otherModemType.ispresent()) {
  myleaf.body.node.nodes[18] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 18, General__Types::BIT2_descr_.raw);
  }
  else myleaf.body.node.nodes[18] = NULL;
  if (field_extension__octet__6d.ispresent()) {
  myleaf.body.node.nodes[19] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 19, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[19] = NULL;
  if (field_maxNumberOfTrafficChannels.ispresent()) {
  myleaf.body.node.nodes[20] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 20, General__Types::BIT3_descr_.raw);
  }
  else myleaf.body.node.nodes[20] = NULL;
  if (field_acceptableChannelCodings.ispresent()) {
  myleaf.body.node.nodes[21] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 21, General__Types::BIT4_descr_.raw);
  }
  else myleaf.body.node.nodes[21] = NULL;
  if (field_extension__octet__6e.ispresent()) {
  myleaf.body.node.nodes[22] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 22, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[22] = NULL;
  if (field_wantedAirInterfaceUserRate.ispresent()) {
  myleaf.body.node.nodes[23] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 23, General__Types::BIT4_descr_.raw);
  }
  else myleaf.body.node.nodes[23] = NULL;
  if (field_uimi.ispresent()) {
  myleaf.body.node.nodes[24] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 24, General__Types::BIT3_descr_.raw);
  }
  else myleaf.body.node.nodes[24] = NULL;
  if (field_extension__octet__6f.ispresent()) {
  myleaf.body.node.nodes[25] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 25, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[25] = NULL;
  if (field_spare.ispresent()) {
  myleaf.body.node.nodes[26] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 26, General__Types::BIT2_descr_.raw);
  }
  else myleaf.body.node.nodes[26] = NULL;
  if (field_asymetryIndication.ispresent()) {
  myleaf.body.node.nodes[27] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 27, General__Types::BIT2_descr_.raw);
  }
  else myleaf.body.node.nodes[27] = NULL;
  if (field_acceptableChannelCodingsExt.ispresent()) {
  myleaf.body.node.nodes[28] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 28, General__Types::BIT3_descr_.raw);
  }
  else myleaf.body.node.nodes[28] = NULL;
  if (field_extension__octet__6g.ispresent()) {
  myleaf.body.node.nodes[29] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 29, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[29] = NULL;
  encoded_length += field_synchronous__asynchronous.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_userInformationLayer1Protocol.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_layer1Id.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_extension__octet__6.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[3]);
  if (field_userRate.ispresent()) {
  encoded_length += field_userRate().RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_numberDataBits.ispresent()) {
  encoded_length += field_numberDataBits().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_negotiation.ispresent()) {
  encoded_length += field_negotiation().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[6]);
  }
  if (field_numberStopBits.ispresent()) {
  encoded_length += field_numberStopBits().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[7]);
  }
  if (field_extension__octet__6a.ispresent()) {
  encoded_length += field_extension__octet__6a().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[8]);
  }
  if (field_parity.ispresent()) {
  encoded_length += field_parity().RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[9]);
  }
  if (field_nicOnRX.ispresent()) {
  encoded_length += field_nicOnRX().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[10]);
  }
  if (field_nicOnTX.ispresent()) {
  encoded_length += field_nicOnTX().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[11]);
  }
  if (field_intermediateRate.ispresent()) {
  encoded_length += field_intermediateRate().RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[12]);
  }
  if (field_extension__octet__6b.ispresent()) {
  encoded_length += field_extension__octet__6b().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[13]);
  }
  if (field_modemType.ispresent()) {
  encoded_length += field_modemType().RAW_encode(General__Types::BIT5_descr_, *myleaf.body.node.nodes[14]);
  }
  if (field_connectionElement.ispresent()) {
  encoded_length += field_connectionElement().RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[15]);
  }
  if (field_extension__octet__6c.ispresent()) {
  encoded_length += field_extension__octet__6c().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[16]);
  }
  if (field_fixedNetworkUserRate.ispresent()) {
  encoded_length += field_fixedNetworkUserRate().RAW_encode(General__Types::BIT5_descr_, *myleaf.body.node.nodes[17]);
  }
  if (field_otherModemType.ispresent()) {
  encoded_length += field_otherModemType().RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[18]);
  }
  if (field_extension__octet__6d.ispresent()) {
  encoded_length += field_extension__octet__6d().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[19]);
  }
  if (field_maxNumberOfTrafficChannels.ispresent()) {
  encoded_length += field_maxNumberOfTrafficChannels().RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[20]);
  }
  if (field_acceptableChannelCodings.ispresent()) {
  encoded_length += field_acceptableChannelCodings().RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[21]);
  }
  if (field_extension__octet__6e.ispresent()) {
  encoded_length += field_extension__octet__6e().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[22]);
  }
  if (field_wantedAirInterfaceUserRate.ispresent()) {
  encoded_length += field_wantedAirInterfaceUserRate().RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[23]);
  }
  if (field_uimi.ispresent()) {
  encoded_length += field_uimi().RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[24]);
  }
  if (field_extension__octet__6f.ispresent()) {
  encoded_length += field_extension__octet__6f().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[25]);
  }
  if (field_spare.ispresent()) {
  encoded_length += field_spare().RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[26]);
  }
  if (field_asymetryIndication.ispresent()) {
  encoded_length += field_asymetryIndication().RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[27]);
  }
  if (field_acceptableChannelCodingsExt.ispresent()) {
  encoded_length += field_acceptableChannelCodingsExt().RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[28]);
  }
  if (field_extension__octet__6g.ispresent()) {
  encoded_length += field_extension__octet__6g().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[29]);
  }
  return myleaf.length = encoded_length;
}

struct BC__octet6_template::single_value_struct {
BITSTRING_template field_synchronous__asynchronous;
BITSTRING_template field_userInformationLayer1Protocol;
BITSTRING_template field_layer1Id;
BITSTRING_template field_extension__octet__6;
BITSTRING_template field_userRate;
BITSTRING_template field_numberDataBits;
BITSTRING_template field_negotiation;
BITSTRING_template field_numberStopBits;
BITSTRING_template field_extension__octet__6a;
BITSTRING_template field_parity;
BITSTRING_template field_nicOnRX;
BITSTRING_template field_nicOnTX;
BITSTRING_template field_intermediateRate;
BITSTRING_template field_extension__octet__6b;
BITSTRING_template field_modemType;
BITSTRING_template field_connectionElement;
BITSTRING_template field_extension__octet__6c;
BITSTRING_template field_fixedNetworkUserRate;
BITSTRING_template field_otherModemType;
BITSTRING_template field_extension__octet__6d;
BITSTRING_template field_maxNumberOfTrafficChannels;
BITSTRING_template field_acceptableChannelCodings;
BITSTRING_template field_extension__octet__6e;
BITSTRING_template field_wantedAirInterfaceUserRate;
BITSTRING_template field_uimi;
BITSTRING_template field_extension__octet__6f;
BITSTRING_template field_spare;
BITSTRING_template field_asymetryIndication;
BITSTRING_template field_acceptableChannelCodingsExt;
BITSTRING_template field_extension__octet__6g;
};

void BC__octet6_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_synchronous__asynchronous = ANY_VALUE;
single_value->field_userInformationLayer1Protocol = ANY_VALUE;
single_value->field_layer1Id = ANY_VALUE;
single_value->field_extension__octet__6 = ANY_VALUE;
single_value->field_userRate = ANY_OR_OMIT;
single_value->field_numberDataBits = ANY_OR_OMIT;
single_value->field_negotiation = ANY_OR_OMIT;
single_value->field_numberStopBits = ANY_OR_OMIT;
single_value->field_extension__octet__6a = ANY_OR_OMIT;
single_value->field_parity = ANY_OR_OMIT;
single_value->field_nicOnRX = ANY_OR_OMIT;
single_value->field_nicOnTX = ANY_OR_OMIT;
single_value->field_intermediateRate = ANY_OR_OMIT;
single_value->field_extension__octet__6b = ANY_OR_OMIT;
single_value->field_modemType = ANY_OR_OMIT;
single_value->field_connectionElement = ANY_OR_OMIT;
single_value->field_extension__octet__6c = ANY_OR_OMIT;
single_value->field_fixedNetworkUserRate = ANY_OR_OMIT;
single_value->field_otherModemType = ANY_OR_OMIT;
single_value->field_extension__octet__6d = ANY_OR_OMIT;
single_value->field_maxNumberOfTrafficChannels = ANY_OR_OMIT;
single_value->field_acceptableChannelCodings = ANY_OR_OMIT;
single_value->field_extension__octet__6e = ANY_OR_OMIT;
single_value->field_wantedAirInterfaceUserRate = ANY_OR_OMIT;
single_value->field_uimi = ANY_OR_OMIT;
single_value->field_extension__octet__6f = ANY_OR_OMIT;
single_value->field_spare = ANY_OR_OMIT;
single_value->field_asymetryIndication = ANY_OR_OMIT;
single_value->field_acceptableChannelCodingsExt = ANY_OR_OMIT;
single_value->field_extension__octet__6g = ANY_OR_OMIT;
}
}
}

void BC__octet6_template::copy_value(const BC__octet6& other_value)
{
single_value = new single_value_struct;
if (other_value.synchronous__asynchronous().is_bound()) {
  single_value->field_synchronous__asynchronous = other_value.synchronous__asynchronous();
} else {
  single_value->field_synchronous__asynchronous.clean_up();
}
if (other_value.userInformationLayer1Protocol().is_bound()) {
  single_value->field_userInformationLayer1Protocol = other_value.userInformationLayer1Protocol();
} else {
  single_value->field_userInformationLayer1Protocol.clean_up();
}
if (other_value.layer1Id().is_bound()) {
  single_value->field_layer1Id = other_value.layer1Id();
} else {
  single_value->field_layer1Id.clean_up();
}
if (other_value.extension__octet__6().is_bound()) {
  single_value->field_extension__octet__6 = other_value.extension__octet__6();
} else {
  single_value->field_extension__octet__6.clean_up();
}
if (other_value.userRate().is_bound()) {
  if (other_value.userRate().ispresent()) single_value->field_userRate = other_value.userRate()();
  else single_value->field_userRate = OMIT_VALUE;
} else {
  single_value->field_userRate.clean_up();
}
if (other_value.numberDataBits().is_bound()) {
  if (other_value.numberDataBits().ispresent()) single_value->field_numberDataBits = other_value.numberDataBits()();
  else single_value->field_numberDataBits = OMIT_VALUE;
} else {
  single_value->field_numberDataBits.clean_up();
}
if (other_value.negotiation().is_bound()) {
  if (other_value.negotiation().ispresent()) single_value->field_negotiation = other_value.negotiation()();
  else single_value->field_negotiation = OMIT_VALUE;
} else {
  single_value->field_negotiation.clean_up();
}
if (other_value.numberStopBits().is_bound()) {
  if (other_value.numberStopBits().ispresent()) single_value->field_numberStopBits = other_value.numberStopBits()();
  else single_value->field_numberStopBits = OMIT_VALUE;
} else {
  single_value->field_numberStopBits.clean_up();
}
if (other_value.extension__octet__6a().is_bound()) {
  if (other_value.extension__octet__6a().ispresent()) single_value->field_extension__octet__6a = other_value.extension__octet__6a()();
  else single_value->field_extension__octet__6a = OMIT_VALUE;
} else {
  single_value->field_extension__octet__6a.clean_up();
}
if (other_value.parity().is_bound()) {
  if (other_value.parity().ispresent()) single_value->field_parity = other_value.parity()();
  else single_value->field_parity = OMIT_VALUE;
} else {
  single_value->field_parity.clean_up();
}
if (other_value.nicOnRX().is_bound()) {
  if (other_value.nicOnRX().ispresent()) single_value->field_nicOnRX = other_value.nicOnRX()();
  else single_value->field_nicOnRX = OMIT_VALUE;
} else {
  single_value->field_nicOnRX.clean_up();
}
if (other_value.nicOnTX().is_bound()) {
  if (other_value.nicOnTX().ispresent()) single_value->field_nicOnTX = other_value.nicOnTX()();
  else single_value->field_nicOnTX = OMIT_VALUE;
} else {
  single_value->field_nicOnTX.clean_up();
}
if (other_value.intermediateRate().is_bound()) {
  if (other_value.intermediateRate().ispresent()) single_value->field_intermediateRate = other_value.intermediateRate()();
  else single_value->field_intermediateRate = OMIT_VALUE;
} else {
  single_value->field_intermediateRate.clean_up();
}
if (other_value.extension__octet__6b().is_bound()) {
  if (other_value.extension__octet__6b().ispresent()) single_value->field_extension__octet__6b = other_value.extension__octet__6b()();
  else single_value->field_extension__octet__6b = OMIT_VALUE;
} else {
  single_value->field_extension__octet__6b.clean_up();
}
if (other_value.modemType().is_bound()) {
  if (other_value.modemType().ispresent()) single_value->field_modemType = other_value.modemType()();
  else single_value->field_modemType = OMIT_VALUE;
} else {
  single_value->field_modemType.clean_up();
}
if (other_value.connectionElement().is_bound()) {
  if (other_value.connectionElement().ispresent()) single_value->field_connectionElement = other_value.connectionElement()();
  else single_value->field_connectionElement = OMIT_VALUE;
} else {
  single_value->field_connectionElement.clean_up();
}
if (other_value.extension__octet__6c().is_bound()) {
  if (other_value.extension__octet__6c().ispresent()) single_value->field_extension__octet__6c = other_value.extension__octet__6c()();
  else single_value->field_extension__octet__6c = OMIT_VALUE;
} else {
  single_value->field_extension__octet__6c.clean_up();
}
if (other_value.fixedNetworkUserRate().is_bound()) {
  if (other_value.fixedNetworkUserRate().ispresent()) single_value->field_fixedNetworkUserRate = other_value.fixedNetworkUserRate()();
  else single_value->field_fixedNetworkUserRate = OMIT_VALUE;
} else {
  single_value->field_fixedNetworkUserRate.clean_up();
}
if (other_value.otherModemType().is_bound()) {
  if (other_value.otherModemType().ispresent()) single_value->field_otherModemType = other_value.otherModemType()();
  else single_value->field_otherModemType = OMIT_VALUE;
} else {
  single_value->field_otherModemType.clean_up();
}
if (other_value.extension__octet__6d().is_bound()) {
  if (other_value.extension__octet__6d().ispresent()) single_value->field_extension__octet__6d = other_value.extension__octet__6d()();
  else single_value->field_extension__octet__6d = OMIT_VALUE;
} else {
  single_value->field_extension__octet__6d.clean_up();
}
if (other_value.maxNumberOfTrafficChannels().is_bound()) {
  if (other_value.maxNumberOfTrafficChannels().ispresent()) single_value->field_maxNumberOfTrafficChannels = other_value.maxNumberOfTrafficChannels()();
  else single_value->field_maxNumberOfTrafficChannels = OMIT_VALUE;
} else {
  single_value->field_maxNumberOfTrafficChannels.clean_up();
}
if (other_value.acceptableChannelCodings().is_bound()) {
  if (other_value.acceptableChannelCodings().ispresent()) single_value->field_acceptableChannelCodings = other_value.acceptableChannelCodings()();
  else single_value->field_acceptableChannelCodings = OMIT_VALUE;
} else {
  single_value->field_acceptableChannelCodings.clean_up();
}
if (other_value.extension__octet__6e().is_bound()) {
  if (other_value.extension__octet__6e().ispresent()) single_value->field_extension__octet__6e = other_value.extension__octet__6e()();
  else single_value->field_extension__octet__6e = OMIT_VALUE;
} else {
  single_value->field_extension__octet__6e.clean_up();
}
if (other_value.wantedAirInterfaceUserRate().is_bound()) {
  if (other_value.wantedAirInterfaceUserRate().ispresent()) single_value->field_wantedAirInterfaceUserRate = other_value.wantedAirInterfaceUserRate()();
  else single_value->field_wantedAirInterfaceUserRate = OMIT_VALUE;
} else {
  single_value->field_wantedAirInterfaceUserRate.clean_up();
}
if (other_value.uimi().is_bound()) {
  if (other_value.uimi().ispresent()) single_value->field_uimi = other_value.uimi()();
  else single_value->field_uimi = OMIT_VALUE;
} else {
  single_value->field_uimi.clean_up();
}
if (other_value.extension__octet__6f().is_bound()) {
  if (other_value.extension__octet__6f().ispresent()) single_value->field_extension__octet__6f = other_value.extension__octet__6f()();
  else single_value->field_extension__octet__6f = OMIT_VALUE;
} else {
  single_value->field_extension__octet__6f.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();
}
if (other_value.asymetryIndication().is_bound()) {
  if (other_value.asymetryIndication().ispresent()) single_value->field_asymetryIndication = other_value.asymetryIndication()();
  else single_value->field_asymetryIndication = OMIT_VALUE;
} else {
  single_value->field_asymetryIndication.clean_up();
}
if (other_value.acceptableChannelCodingsExt().is_bound()) {
  if (other_value.acceptableChannelCodingsExt().ispresent()) single_value->field_acceptableChannelCodingsExt = other_value.acceptableChannelCodingsExt()();
  else single_value->field_acceptableChannelCodingsExt = OMIT_VALUE;
} else {
  single_value->field_acceptableChannelCodingsExt.clean_up();
}
if (other_value.extension__octet__6g().is_bound()) {
  if (other_value.extension__octet__6g().ispresent()) single_value->field_extension__octet__6g = other_value.extension__octet__6g()();
  else single_value->field_extension__octet__6g = OMIT_VALUE;
} else {
  single_value->field_extension__octet__6g.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void BC__octet6_template::copy_template(const BC__octet6_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.synchronous__asynchronous().get_selection()) {
single_value->field_synchronous__asynchronous = other_value.synchronous__asynchronous();
} else {
single_value->field_synchronous__asynchronous.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.userInformationLayer1Protocol().get_selection()) {
single_value->field_userInformationLayer1Protocol = other_value.userInformationLayer1Protocol();
} else {
single_value->field_userInformationLayer1Protocol.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.layer1Id().get_selection()) {
single_value->field_layer1Id = other_value.layer1Id();
} else {
single_value->field_layer1Id.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__6().get_selection()) {
single_value->field_extension__octet__6 = other_value.extension__octet__6();
} else {
single_value->field_extension__octet__6.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.userRate().get_selection()) {
single_value->field_userRate = other_value.userRate();
} else {
single_value->field_userRate.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.numberDataBits().get_selection()) {
single_value->field_numberDataBits = other_value.numberDataBits();
} else {
single_value->field_numberDataBits.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.negotiation().get_selection()) {
single_value->field_negotiation = other_value.negotiation();
} else {
single_value->field_negotiation.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.numberStopBits().get_selection()) {
single_value->field_numberStopBits = other_value.numberStopBits();
} else {
single_value->field_numberStopBits.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__6a().get_selection()) {
single_value->field_extension__octet__6a = other_value.extension__octet__6a();
} else {
single_value->field_extension__octet__6a.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.parity().get_selection()) {
single_value->field_parity = other_value.parity();
} else {
single_value->field_parity.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nicOnRX().get_selection()) {
single_value->field_nicOnRX = other_value.nicOnRX();
} else {
single_value->field_nicOnRX.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nicOnTX().get_selection()) {
single_value->field_nicOnTX = other_value.nicOnTX();
} else {
single_value->field_nicOnTX.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.intermediateRate().get_selection()) {
single_value->field_intermediateRate = other_value.intermediateRate();
} else {
single_value->field_intermediateRate.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__6b().get_selection()) {
single_value->field_extension__octet__6b = other_value.extension__octet__6b();
} else {
single_value->field_extension__octet__6b.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.modemType().get_selection()) {
single_value->field_modemType = other_value.modemType();
} else {
single_value->field_modemType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.connectionElement().get_selection()) {
single_value->field_connectionElement = other_value.connectionElement();
} else {
single_value->field_connectionElement.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__6c().get_selection()) {
single_value->field_extension__octet__6c = other_value.extension__octet__6c();
} else {
single_value->field_extension__octet__6c.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.fixedNetworkUserRate().get_selection()) {
single_value->field_fixedNetworkUserRate = other_value.fixedNetworkUserRate();
} else {
single_value->field_fixedNetworkUserRate.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.otherModemType().get_selection()) {
single_value->field_otherModemType = other_value.otherModemType();
} else {
single_value->field_otherModemType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__6d().get_selection()) {
single_value->field_extension__octet__6d = other_value.extension__octet__6d();
} else {
single_value->field_extension__octet__6d.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.maxNumberOfTrafficChannels().get_selection()) {
single_value->field_maxNumberOfTrafficChannels = other_value.maxNumberOfTrafficChannels();
} else {
single_value->field_maxNumberOfTrafficChannels.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.acceptableChannelCodings().get_selection()) {
single_value->field_acceptableChannelCodings = other_value.acceptableChannelCodings();
} else {
single_value->field_acceptableChannelCodings.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__6e().get_selection()) {
single_value->field_extension__octet__6e = other_value.extension__octet__6e();
} else {
single_value->field_extension__octet__6e.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.wantedAirInterfaceUserRate().get_selection()) {
single_value->field_wantedAirInterfaceUserRate = other_value.wantedAirInterfaceUserRate();
} else {
single_value->field_wantedAirInterfaceUserRate.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.uimi().get_selection()) {
single_value->field_uimi = other_value.uimi();
} else {
single_value->field_uimi.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__6f().get_selection()) {
single_value->field_extension__octet__6f = other_value.extension__octet__6f();
} else {
single_value->field_extension__octet__6f.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.asymetryIndication().get_selection()) {
single_value->field_asymetryIndication = other_value.asymetryIndication();
} else {
single_value->field_asymetryIndication.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.acceptableChannelCodingsExt().get_selection()) {
single_value->field_acceptableChannelCodingsExt = other_value.acceptableChannelCodingsExt();
} else {
single_value->field_acceptableChannelCodingsExt.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__6g().get_selection()) {
single_value->field_extension__octet__6g = other_value.extension__octet__6g();
} else {
single_value->field_extension__octet__6g.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 BC__octet6_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 BC__octet6_template(*other_value.implication_.precondition);
implication_.implied_template = new BC__octet6_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 @MobileL3_CC_Types.BC_octet6.");
break;
}
set_selection(other_value);
}

BC__octet6_template::BC__octet6_template()
{
}

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

BC__octet6_template::BC__octet6_template(const BC__octet6& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean BC__octet6_template::match(const BC__octet6& 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.synchronous__asynchronous().is_bound()) return FALSE;
if(!single_value->field_synchronous__asynchronous.match(other_value.synchronous__asynchronous(), legacy))return FALSE;
if(!other_value.userInformationLayer1Protocol().is_bound()) return FALSE;
if(!single_value->field_userInformationLayer1Protocol.match(other_value.userInformationLayer1Protocol(), legacy))return FALSE;
if(!other_value.layer1Id().is_bound()) return FALSE;
if(!single_value->field_layer1Id.match(other_value.layer1Id(), legacy))return FALSE;
if(!other_value.extension__octet__6().is_bound()) return FALSE;
if(!single_value->field_extension__octet__6.match(other_value.extension__octet__6(), legacy))return FALSE;
if(!other_value.userRate().is_bound()) return FALSE;
if((other_value.userRate().ispresent() ? !single_value->field_userRate.match((const BITSTRING&)other_value.userRate(), legacy) : !single_value->field_userRate.match_omit(legacy)))return FALSE;
if(!other_value.numberDataBits().is_bound()) return FALSE;
if((other_value.numberDataBits().ispresent() ? !single_value->field_numberDataBits.match((const BITSTRING&)other_value.numberDataBits(), legacy) : !single_value->field_numberDataBits.match_omit(legacy)))return FALSE;
if(!other_value.negotiation().is_bound()) return FALSE;
if((other_value.negotiation().ispresent() ? !single_value->field_negotiation.match((const BITSTRING&)other_value.negotiation(), legacy) : !single_value->field_negotiation.match_omit(legacy)))return FALSE;
if(!other_value.numberStopBits().is_bound()) return FALSE;
if((other_value.numberStopBits().ispresent() ? !single_value->field_numberStopBits.match((const BITSTRING&)other_value.numberStopBits(), legacy) : !single_value->field_numberStopBits.match_omit(legacy)))return FALSE;
if(!other_value.extension__octet__6a().is_bound()) return FALSE;
if((other_value.extension__octet__6a().ispresent() ? !single_value->field_extension__octet__6a.match((const BITSTRING&)other_value.extension__octet__6a(), legacy) : !single_value->field_extension__octet__6a.match_omit(legacy)))return FALSE;
if(!other_value.parity().is_bound()) return FALSE;
if((other_value.parity().ispresent() ? !single_value->field_parity.match((const BITSTRING&)other_value.parity(), legacy) : !single_value->field_parity.match_omit(legacy)))return FALSE;
if(!other_value.nicOnRX().is_bound()) return FALSE;
if((other_value.nicOnRX().ispresent() ? !single_value->field_nicOnRX.match((const BITSTRING&)other_value.nicOnRX(), legacy) : !single_value->field_nicOnRX.match_omit(legacy)))return FALSE;
if(!other_value.nicOnTX().is_bound()) return FALSE;
if((other_value.nicOnTX().ispresent() ? !single_value->field_nicOnTX.match((const BITSTRING&)other_value.nicOnTX(), legacy) : !single_value->field_nicOnTX.match_omit(legacy)))return FALSE;
if(!other_value.intermediateRate().is_bound()) return FALSE;
if((other_value.intermediateRate().ispresent() ? !single_value->field_intermediateRate.match((const BITSTRING&)other_value.intermediateRate(), legacy) : !single_value->field_intermediateRate.match_omit(legacy)))return FALSE;
if(!other_value.extension__octet__6b().is_bound()) return FALSE;
if((other_value.extension__octet__6b().ispresent() ? !single_value->field_extension__octet__6b.match((const BITSTRING&)other_value.extension__octet__6b(), legacy) : !single_value->field_extension__octet__6b.match_omit(legacy)))return FALSE;
if(!other_value.modemType().is_bound()) return FALSE;
if((other_value.modemType().ispresent() ? !single_value->field_modemType.match((const BITSTRING&)other_value.modemType(), legacy) : !single_value->field_modemType.match_omit(legacy)))return FALSE;
if(!other_value.connectionElement().is_bound()) return FALSE;
if((other_value.connectionElement().ispresent() ? !single_value->field_connectionElement.match((const BITSTRING&)other_value.connectionElement(), legacy) : !single_value->field_connectionElement.match_omit(legacy)))return FALSE;
if(!other_value.extension__octet__6c().is_bound()) return FALSE;
if((other_value.extension__octet__6c().ispresent() ? !single_value->field_extension__octet__6c.match((const BITSTRING&)other_value.extension__octet__6c(), legacy) : !single_value->field_extension__octet__6c.match_omit(legacy)))return FALSE;
if(!other_value.fixedNetworkUserRate().is_bound()) return FALSE;
if((other_value.fixedNetworkUserRate().ispresent() ? !single_value->field_fixedNetworkUserRate.match((const BITSTRING&)other_value.fixedNetworkUserRate(), legacy) : !single_value->field_fixedNetworkUserRate.match_omit(legacy)))return FALSE;
if(!other_value.otherModemType().is_bound()) return FALSE;
if((other_value.otherModemType().ispresent() ? !single_value->field_otherModemType.match((const BITSTRING&)other_value.otherModemType(), legacy) : !single_value->field_otherModemType.match_omit(legacy)))return FALSE;
if(!other_value.extension__octet__6d().is_bound()) return FALSE;
if((other_value.extension__octet__6d().ispresent() ? !single_value->field_extension__octet__6d.match((const BITSTRING&)other_value.extension__octet__6d(), legacy) : !single_value->field_extension__octet__6d.match_omit(legacy)))return FALSE;
if(!other_value.maxNumberOfTrafficChannels().is_bound()) return FALSE;
if((other_value.maxNumberOfTrafficChannels().ispresent() ? !single_value->field_maxNumberOfTrafficChannels.match((const BITSTRING&)other_value.maxNumberOfTrafficChannels(), legacy) : !single_value->field_maxNumberOfTrafficChannels.match_omit(legacy)))return FALSE;
if(!other_value.acceptableChannelCodings().is_bound()) return FALSE;
if((other_value.acceptableChannelCodings().ispresent() ? !single_value->field_acceptableChannelCodings.match((const BITSTRING&)other_value.acceptableChannelCodings(), legacy) : !single_value->field_acceptableChannelCodings.match_omit(legacy)))return FALSE;
if(!other_value.extension__octet__6e().is_bound()) return FALSE;
if((other_value.extension__octet__6e().ispresent() ? !single_value->field_extension__octet__6e.match((const BITSTRING&)other_value.extension__octet__6e(), legacy) : !single_value->field_extension__octet__6e.match_omit(legacy)))return FALSE;
if(!other_value.wantedAirInterfaceUserRate().is_bound()) return FALSE;
if((other_value.wantedAirInterfaceUserRate().ispresent() ? !single_value->field_wantedAirInterfaceUserRate.match((const BITSTRING&)other_value.wantedAirInterfaceUserRate(), legacy) : !single_value->field_wantedAirInterfaceUserRate.match_omit(legacy)))return FALSE;
if(!other_value.uimi().is_bound()) return FALSE;
if((other_value.uimi().ispresent() ? !single_value->field_uimi.match((const BITSTRING&)other_value.uimi(), legacy) : !single_value->field_uimi.match_omit(legacy)))return FALSE;
if(!other_value.extension__octet__6f().is_bound()) return FALSE;
if((other_value.extension__octet__6f().ispresent() ? !single_value->field_extension__octet__6f.match((const BITSTRING&)other_value.extension__octet__6f(), legacy) : !single_value->field_extension__octet__6f.match_omit(legacy)))return FALSE;
if(!other_value.spare().is_bound()) return FALSE;
if((other_value.spare().ispresent() ? !single_value->field_spare.match((const BITSTRING&)other_value.spare(), legacy) : !single_value->field_spare.match_omit(legacy)))return FALSE;
if(!other_value.asymetryIndication().is_bound()) return FALSE;
if((other_value.asymetryIndication().ispresent() ? !single_value->field_asymetryIndication.match((const BITSTRING&)other_value.asymetryIndication(), legacy) : !single_value->field_asymetryIndication.match_omit(legacy)))return FALSE;
if(!other_value.acceptableChannelCodingsExt().is_bound()) return FALSE;
if((other_value.acceptableChannelCodingsExt().ispresent() ? !single_value->field_acceptableChannelCodingsExt.match((const BITSTRING&)other_value.acceptableChannelCodingsExt(), legacy) : !single_value->field_acceptableChannelCodingsExt.match_omit(legacy)))return FALSE;
if(!other_value.extension__octet__6g().is_bound()) return FALSE;
if((other_value.extension__octet__6g().ispresent() ? !single_value->field_extension__octet__6g.match((const BITSTRING&)other_value.extension__octet__6g(), legacy) : !single_value->field_extension__octet__6g.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 @MobileL3_CC_Types.BC_octet6.");
}
return FALSE;
}

boolean BC__octet6_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_synchronous__asynchronous.is_bound()
 || single_value->field_userInformationLayer1Protocol.is_bound()
 || single_value->field_layer1Id.is_bound()
 || single_value->field_extension__octet__6.is_bound()
 || (single_value->field_userRate.is_omit() || single_value->field_userRate.is_bound())
 || (single_value->field_numberDataBits.is_omit() || single_value->field_numberDataBits.is_bound())
 || (single_value->field_negotiation.is_omit() || single_value->field_negotiation.is_bound())
 || (single_value->field_numberStopBits.is_omit() || single_value->field_numberStopBits.is_bound())
 || (single_value->field_extension__octet__6a.is_omit() || single_value->field_extension__octet__6a.is_bound())
 || (single_value->field_parity.is_omit() || single_value->field_parity.is_bound())
 || (single_value->field_nicOnRX.is_omit() || single_value->field_nicOnRX.is_bound())
 || (single_value->field_nicOnTX.is_omit() || single_value->field_nicOnTX.is_bound())
 || (single_value->field_intermediateRate.is_omit() || single_value->field_intermediateRate.is_bound())
 || (single_value->field_extension__octet__6b.is_omit() || single_value->field_extension__octet__6b.is_bound())
 || (single_value->field_modemType.is_omit() || single_value->field_modemType.is_bound())
 || (single_value->field_connectionElement.is_omit() || single_value->field_connectionElement.is_bound())
 || (single_value->field_extension__octet__6c.is_omit() || single_value->field_extension__octet__6c.is_bound())
 || (single_value->field_fixedNetworkUserRate.is_omit() || single_value->field_fixedNetworkUserRate.is_bound())
 || (single_value->field_otherModemType.is_omit() || single_value->field_otherModemType.is_bound())
 || (single_value->field_extension__octet__6d.is_omit() || single_value->field_extension__octet__6d.is_bound())
 || (single_value->field_maxNumberOfTrafficChannels.is_omit() || single_value->field_maxNumberOfTrafficChannels.is_bound())
 || (single_value->field_acceptableChannelCodings.is_omit() || single_value->field_acceptableChannelCodings.is_bound())
 || (single_value->field_extension__octet__6e.is_omit() || single_value->field_extension__octet__6e.is_bound())
 || (single_value->field_wantedAirInterfaceUserRate.is_omit() || single_value->field_wantedAirInterfaceUserRate.is_bound())
 || (single_value->field_uimi.is_omit() || single_value->field_uimi.is_bound())
 || (single_value->field_extension__octet__6f.is_omit() || single_value->field_extension__octet__6f.is_bound())
 || (single_value->field_spare.is_omit() || single_value->field_spare.is_bound())
 || (single_value->field_asymetryIndication.is_omit() || single_value->field_asymetryIndication.is_bound())
 || (single_value->field_acceptableChannelCodingsExt.is_omit() || single_value->field_acceptableChannelCodingsExt.is_bound())
 || (single_value->field_extension__octet__6g.is_omit() || single_value->field_extension__octet__6g.is_bound());
}

boolean BC__octet6_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_synchronous__asynchronous.is_value()
 && single_value->field_userInformationLayer1Protocol.is_value()
 && single_value->field_layer1Id.is_value()
 && single_value->field_extension__octet__6.is_value()
 && (single_value->field_userRate.is_omit() || single_value->field_userRate.is_value())
 && (single_value->field_numberDataBits.is_omit() || single_value->field_numberDataBits.is_value())
 && (single_value->field_negotiation.is_omit() || single_value->field_negotiation.is_value())
 && (single_value->field_numberStopBits.is_omit() || single_value->field_numberStopBits.is_value())
 && (single_value->field_extension__octet__6a.is_omit() || single_value->field_extension__octet__6a.is_value())
 && (single_value->field_parity.is_omit() || single_value->field_parity.is_value())
 && (single_value->field_nicOnRX.is_omit() || single_value->field_nicOnRX.is_value())
 && (single_value->field_nicOnTX.is_omit() || single_value->field_nicOnTX.is_value())
 && (single_value->field_intermediateRate.is_omit() || single_value->field_intermediateRate.is_value())
 && (single_value->field_extension__octet__6b.is_omit() || single_value->field_extension__octet__6b.is_value())
 && (single_value->field_modemType.is_omit() || single_value->field_modemType.is_value())
 && (single_value->field_connectionElement.is_omit() || single_value->field_connectionElement.is_value())
 && (single_value->field_extension__octet__6c.is_omit() || single_value->field_extension__octet__6c.is_value())
 && (single_value->field_fixedNetworkUserRate.is_omit() || single_value->field_fixedNetworkUserRate.is_value())
 && (single_value->field_otherModemType.is_omit() || single_value->field_otherModemType.is_value())
 && (single_value->field_extension__octet__6d.is_omit() || single_value->field_extension__octet__6d.is_value())
 && (single_value->field_maxNumberOfTrafficChannels.is_omit() || single_value->field_maxNumberOfTrafficChannels.is_value())
 && (single_value->field_acceptableChannelCodings.is_omit() || single_value->field_acceptableChannelCodings.is_value())
 && (single_value->field_extension__octet__6e.is_omit() || single_value->field_extension__octet__6e.is_value())
 && (single_value->field_wantedAirInterfaceUserRate.is_omit() || single_value->field_wantedAirInterfaceUserRate.is_value())
 && (single_value->field_uimi.is_omit() || single_value->field_uimi.is_value())
 && (single_value->field_extension__octet__6f.is_omit() || single_value->field_extension__octet__6f.is_value())
 && (single_value->field_spare.is_omit() || single_value->field_spare.is_value())
 && (single_value->field_asymetryIndication.is_omit() || single_value->field_asymetryIndication.is_value())
 && (single_value->field_acceptableChannelCodingsExt.is_omit() || single_value->field_acceptableChannelCodingsExt.is_value())
 && (single_value->field_extension__octet__6g.is_omit() || single_value->field_extension__octet__6g.is_value());
}

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

BC__octet6 BC__octet6_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 @MobileL3_CC_Types.BC_octet6.");
BC__octet6 ret_val;
if (single_value->field_synchronous__asynchronous.is_bound()) {
ret_val.synchronous__asynchronous() = single_value->field_synchronous__asynchronous.valueof();
}
if (single_value->field_userInformationLayer1Protocol.is_bound()) {
ret_val.userInformationLayer1Protocol() = single_value->field_userInformationLayer1Protocol.valueof();
}
if (single_value->field_layer1Id.is_bound()) {
ret_val.layer1Id() = single_value->field_layer1Id.valueof();
}
if (single_value->field_extension__octet__6.is_bound()) {
ret_val.extension__octet__6() = single_value->field_extension__octet__6.valueof();
}
if (single_value->field_userRate.is_omit()) ret_val.userRate() = OMIT_VALUE;
else if (single_value->field_userRate.is_bound()) {
ret_val.userRate() = single_value->field_userRate.valueof();
}
if (single_value->field_numberDataBits.is_omit()) ret_val.numberDataBits() = OMIT_VALUE;
else if (single_value->field_numberDataBits.is_bound()) {
ret_val.numberDataBits() = single_value->field_numberDataBits.valueof();
}
if (single_value->field_negotiation.is_omit()) ret_val.negotiation() = OMIT_VALUE;
else if (single_value->field_negotiation.is_bound()) {
ret_val.negotiation() = single_value->field_negotiation.valueof();
}
if (single_value->field_numberStopBits.is_omit()) ret_val.numberStopBits() = OMIT_VALUE;
else if (single_value->field_numberStopBits.is_bound()) {
ret_val.numberStopBits() = single_value->field_numberStopBits.valueof();
}
if (single_value->field_extension__octet__6a.is_omit()) ret_val.extension__octet__6a() = OMIT_VALUE;
else if (single_value->field_extension__octet__6a.is_bound()) {
ret_val.extension__octet__6a() = single_value->field_extension__octet__6a.valueof();
}
if (single_value->field_parity.is_omit()) ret_val.parity() = OMIT_VALUE;
else if (single_value->field_parity.is_bound()) {
ret_val.parity() = single_value->field_parity.valueof();
}
if (single_value->field_nicOnRX.is_omit()) ret_val.nicOnRX() = OMIT_VALUE;
else if (single_value->field_nicOnRX.is_bound()) {
ret_val.nicOnRX() = single_value->field_nicOnRX.valueof();
}
if (single_value->field_nicOnTX.is_omit()) ret_val.nicOnTX() = OMIT_VALUE;
else if (single_value->field_nicOnTX.is_bound()) {
ret_val.nicOnTX() = single_value->field_nicOnTX.valueof();
}
if (single_value->field_intermediateRate.is_omit()) ret_val.intermediateRate() = OMIT_VALUE;
else if (single_value->field_intermediateRate.is_bound()) {
ret_val.intermediateRate() = single_value->field_intermediateRate.valueof();
}
if (single_value->field_extension__octet__6b.is_omit()) ret_val.extension__octet__6b() = OMIT_VALUE;
else if (single_value->field_extension__octet__6b.is_bound()) {
ret_val.extension__octet__6b() = single_value->field_extension__octet__6b.valueof();
}
if (single_value->field_modemType.is_omit()) ret_val.modemType() = OMIT_VALUE;
else if (single_value->field_modemType.is_bound()) {
ret_val.modemType() = single_value->field_modemType.valueof();
}
if (single_value->field_connectionElement.is_omit()) ret_val.connectionElement() = OMIT_VALUE;
else if (single_value->field_connectionElement.is_bound()) {
ret_val.connectionElement() = single_value->field_connectionElement.valueof();
}
if (single_value->field_extension__octet__6c.is_omit()) ret_val.extension__octet__6c() = OMIT_VALUE;
else if (single_value->field_extension__octet__6c.is_bound()) {
ret_val.extension__octet__6c() = single_value->field_extension__octet__6c.valueof();
}
if (single_value->field_fixedNetworkUserRate.is_omit()) ret_val.fixedNetworkUserRate() = OMIT_VALUE;
else if (single_value->field_fixedNetworkUserRate.is_bound()) {
ret_val.fixedNetworkUserRate() = single_value->field_fixedNetworkUserRate.valueof();
}
if (single_value->field_otherModemType.is_omit()) ret_val.otherModemType() = OMIT_VALUE;
else if (single_value->field_otherModemType.is_bound()) {
ret_val.otherModemType() = single_value->field_otherModemType.valueof();
}
if (single_value->field_extension__octet__6d.is_omit()) ret_val.extension__octet__6d() = OMIT_VALUE;
else if (single_value->field_extension__octet__6d.is_bound()) {
ret_val.extension__octet__6d() = single_value->field_extension__octet__6d.valueof();
}
if (single_value->field_maxNumberOfTrafficChannels.is_omit()) ret_val.maxNumberOfTrafficChannels() = OMIT_VALUE;
else if (single_value->field_maxNumberOfTrafficChannels.is_bound()) {
ret_val.maxNumberOfTrafficChannels() = single_value->field_maxNumberOfTrafficChannels.valueof();
}
if (single_value->field_acceptableChannelCodings.is_omit()) ret_val.acceptableChannelCodings() = OMIT_VALUE;
else if (single_value->field_acceptableChannelCodings.is_bound()) {
ret_val.acceptableChannelCodings() = single_value->field_acceptableChannelCodings.valueof();
}
if (single_value->field_extension__octet__6e.is_omit()) ret_val.extension__octet__6e() = OMIT_VALUE;
else if (single_value->field_extension__octet__6e.is_bound()) {
ret_val.extension__octet__6e() = single_value->field_extension__octet__6e.valueof();
}
if (single_value->field_wantedAirInterfaceUserRate.is_omit()) ret_val.wantedAirInterfaceUserRate() = OMIT_VALUE;
else if (single_value->field_wantedAirInterfaceUserRate.is_bound()) {
ret_val.wantedAirInterfaceUserRate() = single_value->field_wantedAirInterfaceUserRate.valueof();
}
if (single_value->field_uimi.is_omit()) ret_val.uimi() = OMIT_VALUE;
else if (single_value->field_uimi.is_bound()) {
ret_val.uimi() = single_value->field_uimi.valueof();
}
if (single_value->field_extension__octet__6f.is_omit()) ret_val.extension__octet__6f() = OMIT_VALUE;
else if (single_value->field_extension__octet__6f.is_bound()) {
ret_val.extension__octet__6f() = single_value->field_extension__octet__6f.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();
}
if (single_value->field_asymetryIndication.is_omit()) ret_val.asymetryIndication() = OMIT_VALUE;
else if (single_value->field_asymetryIndication.is_bound()) {
ret_val.asymetryIndication() = single_value->field_asymetryIndication.valueof();
}
if (single_value->field_acceptableChannelCodingsExt.is_omit()) ret_val.acceptableChannelCodingsExt() = OMIT_VALUE;
else if (single_value->field_acceptableChannelCodingsExt.is_bound()) {
ret_val.acceptableChannelCodingsExt() = single_value->field_acceptableChannelCodingsExt.valueof();
}
if (single_value->field_extension__octet__6g.is_omit()) ret_val.extension__octet__6g() = OMIT_VALUE;
else if (single_value->field_extension__octet__6g.is_bound()) {
ret_val.extension__octet__6g() = single_value->field_extension__octet__6g.valueof();
}
return ret_val;
}

void BC__octet6_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 @MobileL3_CC_Types.BC_octet6.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new BC__octet6_template[list_length];
}

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

BITSTRING_template& BC__octet6_template::synchronous__asynchronous()
{
set_specific();
return single_value->field_synchronous__asynchronous;
}

const BITSTRING_template& BC__octet6_template::synchronous__asynchronous() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field synchronous_asynchronous of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_synchronous__asynchronous;
}

BITSTRING_template& BC__octet6_template::userInformationLayer1Protocol()
{
set_specific();
return single_value->field_userInformationLayer1Protocol;
}

const BITSTRING_template& BC__octet6_template::userInformationLayer1Protocol() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field userInformationLayer1Protocol of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_userInformationLayer1Protocol;
}

BITSTRING_template& BC__octet6_template::layer1Id()
{
set_specific();
return single_value->field_layer1Id;
}

const BITSTRING_template& BC__octet6_template::layer1Id() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field layer1Id of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_layer1Id;
}

BITSTRING_template& BC__octet6_template::extension__octet__6()
{
set_specific();
return single_value->field_extension__octet__6;
}

const BITSTRING_template& BC__octet6_template::extension__octet__6() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_6 of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_extension__octet__6;
}

BITSTRING_template& BC__octet6_template::userRate()
{
set_specific();
return single_value->field_userRate;
}

const BITSTRING_template& BC__octet6_template::userRate() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field userRate of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_userRate;
}

BITSTRING_template& BC__octet6_template::numberDataBits()
{
set_specific();
return single_value->field_numberDataBits;
}

const BITSTRING_template& BC__octet6_template::numberDataBits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field numberDataBits of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_numberDataBits;
}

BITSTRING_template& BC__octet6_template::negotiation()
{
set_specific();
return single_value->field_negotiation;
}

const BITSTRING_template& BC__octet6_template::negotiation() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field negotiation of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_negotiation;
}

BITSTRING_template& BC__octet6_template::numberStopBits()
{
set_specific();
return single_value->field_numberStopBits;
}

const BITSTRING_template& BC__octet6_template::numberStopBits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field numberStopBits of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_numberStopBits;
}

BITSTRING_template& BC__octet6_template::extension__octet__6a()
{
set_specific();
return single_value->field_extension__octet__6a;
}

const BITSTRING_template& BC__octet6_template::extension__octet__6a() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_6a of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_extension__octet__6a;
}

BITSTRING_template& BC__octet6_template::parity()
{
set_specific();
return single_value->field_parity;
}

const BITSTRING_template& BC__octet6_template::parity() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field parity of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_parity;
}

BITSTRING_template& BC__octet6_template::nicOnRX()
{
set_specific();
return single_value->field_nicOnRX;
}

const BITSTRING_template& BC__octet6_template::nicOnRX() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nicOnRX of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_nicOnRX;
}

BITSTRING_template& BC__octet6_template::nicOnTX()
{
set_specific();
return single_value->field_nicOnTX;
}

const BITSTRING_template& BC__octet6_template::nicOnTX() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nicOnTX of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_nicOnTX;
}

BITSTRING_template& BC__octet6_template::intermediateRate()
{
set_specific();
return single_value->field_intermediateRate;
}

const BITSTRING_template& BC__octet6_template::intermediateRate() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field intermediateRate of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_intermediateRate;
}

BITSTRING_template& BC__octet6_template::extension__octet__6b()
{
set_specific();
return single_value->field_extension__octet__6b;
}

const BITSTRING_template& BC__octet6_template::extension__octet__6b() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_6b of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_extension__octet__6b;
}

BITSTRING_template& BC__octet6_template::modemType()
{
set_specific();
return single_value->field_modemType;
}

const BITSTRING_template& BC__octet6_template::modemType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field modemType of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_modemType;
}

BITSTRING_template& BC__octet6_template::connectionElement()
{
set_specific();
return single_value->field_connectionElement;
}

const BITSTRING_template& BC__octet6_template::connectionElement() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field connectionElement of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_connectionElement;
}

BITSTRING_template& BC__octet6_template::extension__octet__6c()
{
set_specific();
return single_value->field_extension__octet__6c;
}

const BITSTRING_template& BC__octet6_template::extension__octet__6c() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_6c of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_extension__octet__6c;
}

BITSTRING_template& BC__octet6_template::fixedNetworkUserRate()
{
set_specific();
return single_value->field_fixedNetworkUserRate;
}

const BITSTRING_template& BC__octet6_template::fixedNetworkUserRate() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field fixedNetworkUserRate of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_fixedNetworkUserRate;
}

BITSTRING_template& BC__octet6_template::otherModemType()
{
set_specific();
return single_value->field_otherModemType;
}

const BITSTRING_template& BC__octet6_template::otherModemType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field otherModemType of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_otherModemType;
}

BITSTRING_template& BC__octet6_template::extension__octet__6d()
{
set_specific();
return single_value->field_extension__octet__6d;
}

const BITSTRING_template& BC__octet6_template::extension__octet__6d() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_6d of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_extension__octet__6d;
}

BITSTRING_template& BC__octet6_template::maxNumberOfTrafficChannels()
{
set_specific();
return single_value->field_maxNumberOfTrafficChannels;
}

const BITSTRING_template& BC__octet6_template::maxNumberOfTrafficChannels() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field maxNumberOfTrafficChannels of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_maxNumberOfTrafficChannels;
}

BITSTRING_template& BC__octet6_template::acceptableChannelCodings()
{
set_specific();
return single_value->field_acceptableChannelCodings;
}

const BITSTRING_template& BC__octet6_template::acceptableChannelCodings() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field acceptableChannelCodings of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_acceptableChannelCodings;
}

BITSTRING_template& BC__octet6_template::extension__octet__6e()
{
set_specific();
return single_value->field_extension__octet__6e;
}

const BITSTRING_template& BC__octet6_template::extension__octet__6e() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_6e of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_extension__octet__6e;
}

BITSTRING_template& BC__octet6_template::wantedAirInterfaceUserRate()
{
set_specific();
return single_value->field_wantedAirInterfaceUserRate;
}

const BITSTRING_template& BC__octet6_template::wantedAirInterfaceUserRate() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field wantedAirInterfaceUserRate of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_wantedAirInterfaceUserRate;
}

BITSTRING_template& BC__octet6_template::uimi()
{
set_specific();
return single_value->field_uimi;
}

const BITSTRING_template& BC__octet6_template::uimi() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field uimi of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_uimi;
}

BITSTRING_template& BC__octet6_template::extension__octet__6f()
{
set_specific();
return single_value->field_extension__octet__6f;
}

const BITSTRING_template& BC__octet6_template::extension__octet__6f() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_6f of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_extension__octet__6f;
}

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

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

BITSTRING_template& BC__octet6_template::asymetryIndication()
{
set_specific();
return single_value->field_asymetryIndication;
}

const BITSTRING_template& BC__octet6_template::asymetryIndication() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field asymetryIndication of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_asymetryIndication;
}

BITSTRING_template& BC__octet6_template::acceptableChannelCodingsExt()
{
set_specific();
return single_value->field_acceptableChannelCodingsExt;
}

const BITSTRING_template& BC__octet6_template::acceptableChannelCodingsExt() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field acceptableChannelCodingsExt of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_acceptableChannelCodingsExt;
}

BITSTRING_template& BC__octet6_template::extension__octet__6g()
{
set_specific();
return single_value->field_extension__octet__6g;
}

const BITSTRING_template& BC__octet6_template::extension__octet__6g() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_6g of a non-specific template of type @MobileL3_CC_Types.BC_octet6.");
return single_value->field_extension__octet__6g;
}

int BC__octet6_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @MobileL3_CC_Types.BC_octet6 which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
  {    int ret_val = 4;
      if (single_value->field_userRate.is_present()) ret_val++;
      if (single_value->field_numberDataBits.is_present()) ret_val++;
      if (single_value->field_negotiation.is_present()) ret_val++;
      if (single_value->field_numberStopBits.is_present()) ret_val++;
      if (single_value->field_extension__octet__6a.is_present()) ret_val++;
      if (single_value->field_parity.is_present()) ret_val++;
      if (single_value->field_nicOnRX.is_present()) ret_val++;
      if (single_value->field_nicOnTX.is_present()) ret_val++;
      if (single_value->field_intermediateRate.is_present()) ret_val++;
      if (single_value->field_extension__octet__6b.is_present()) ret_val++;
      if (single_value->field_modemType.is_present()) ret_val++;
      if (single_value->field_connectionElement.is_present()) ret_val++;
      if (single_value->field_extension__octet__6c.is_present()) ret_val++;
      if (single_value->field_fixedNetworkUserRate.is_present()) ret_val++;
      if (single_value->field_otherModemType.is_present()) ret_val++;
      if (single_value->field_extension__octet__6d.is_present()) ret_val++;
      if (single_value->field_maxNumberOfTrafficChannels.is_present()) ret_val++;
      if (single_value->field_acceptableChannelCodings.is_present()) ret_val++;
      if (single_value->field_extension__octet__6e.is_present()) ret_val++;
      if (single_value->field_wantedAirInterfaceUserRate.is_present()) ret_val++;
      if (single_value->field_uimi.is_present()) ret_val++;
      if (single_value->field_extension__octet__6f.is_present()) ret_val++;
      if (single_value->field_spare.is_present()) ret_val++;
      if (single_value->field_asymetryIndication.is_present()) ret_val++;
      if (single_value->field_acceptableChannelCodingsExt.is_present()) ret_val++;
      if (single_value->field_extension__octet__6g.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 @MobileL3_CC_Types.BC_octet6 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 @MobileL3_CC_Types.BC_octet6 containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_CC_Types.BC_octet6 containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_CC_Types.BC_octet6 containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_CC_Types.BC_octet6 containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_CC_Types.BC_octet6 containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_CC_Types.BC_octet6 containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_CC_Types.BC_octet6 containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @MobileL3_CC_Types.BC_octet6.");
  }
  return 0;
}

void BC__octet6_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ synchronous_asynchronous := ");
single_value->field_synchronous__asynchronous.log();
TTCN_Logger::log_event_str(", userInformationLayer1Protocol := ");
single_value->field_userInformationLayer1Protocol.log();
TTCN_Logger::log_event_str(", layer1Id := ");
single_value->field_layer1Id.log();
TTCN_Logger::log_event_str(", extension_octet_6 := ");
single_value->field_extension__octet__6.log();
TTCN_Logger::log_event_str(", userRate := ");
single_value->field_userRate.log();
TTCN_Logger::log_event_str(", numberDataBits := ");
single_value->field_numberDataBits.log();
TTCN_Logger::log_event_str(", negotiation := ");
single_value->field_negotiation.log();
TTCN_Logger::log_event_str(", numberStopBits := ");
single_value->field_numberStopBits.log();
TTCN_Logger::log_event_str(", extension_octet_6a := ");
single_value->field_extension__octet__6a.log();
TTCN_Logger::log_event_str(", parity := ");
single_value->field_parity.log();
TTCN_Logger::log_event_str(", nicOnRX := ");
single_value->field_nicOnRX.log();
TTCN_Logger::log_event_str(", nicOnTX := ");
single_value->field_nicOnTX.log();
TTCN_Logger::log_event_str(", intermediateRate := ");
single_value->field_intermediateRate.log();
TTCN_Logger::log_event_str(", extension_octet_6b := ");
single_value->field_extension__octet__6b.log();
TTCN_Logger::log_event_str(", modemType := ");
single_value->field_modemType.log();
TTCN_Logger::log_event_str(", connectionElement := ");
single_value->field_connectionElement.log();
TTCN_Logger::log_event_str(", extension_octet_6c := ");
single_value->field_extension__octet__6c.log();
TTCN_Logger::log_event_str(", fixedNetworkUserRate := ");
single_value->field_fixedNetworkUserRate.log();
TTCN_Logger::log_event_str(", otherModemType := ");
single_value->field_otherModemType.log();
TTCN_Logger::log_event_str(", extension_octet_6d := ");
single_value->field_extension__octet__6d.log();
TTCN_Logger::log_event_str(", maxNumberOfTrafficChannels := ");
single_value->field_maxNumberOfTrafficChannels.log();
TTCN_Logger::log_event_str(", acceptableChannelCodings := ");
single_value->field_acceptableChannelCodings.log();
TTCN_Logger::log_event_str(", extension_octet_6e := ");
single_value->field_extension__octet__6e.log();
TTCN_Logger::log_event_str(", wantedAirInterfaceUserRate := ");
single_value->field_wantedAirInterfaceUserRate.log();
TTCN_Logger::log_event_str(", uimi := ");
single_value->field_uimi.log();
TTCN_Logger::log_event_str(", extension_octet_6f := ");
single_value->field_extension__octet__6f.log();
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log();
TTCN_Logger::log_event_str(", asymetryIndication := ");
single_value->field_asymetryIndication.log();
TTCN_Logger::log_event_str(", acceptableChannelCodingsExt := ");
single_value->field_acceptableChannelCodingsExt.log();
TTCN_Logger::log_event_str(", extension_octet_6g := ");
single_value->field_extension__octet__6g.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 BC__octet6_template::log_match(const BC__octet6& 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_synchronous__asynchronous.match(match_value.synchronous__asynchronous(), legacy)){
TTCN_Logger::log_logmatch_info(".synchronous_asynchronous");
single_value->field_synchronous__asynchronous.log_match(match_value.synchronous__asynchronous(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_userInformationLayer1Protocol.match(match_value.userInformationLayer1Protocol(), legacy)){
TTCN_Logger::log_logmatch_info(".userInformationLayer1Protocol");
single_value->field_userInformationLayer1Protocol.log_match(match_value.userInformationLayer1Protocol(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_layer1Id.match(match_value.layer1Id(), legacy)){
TTCN_Logger::log_logmatch_info(".layer1Id");
single_value->field_layer1Id.log_match(match_value.layer1Id(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_extension__octet__6.match(match_value.extension__octet__6(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_6");
single_value->field_extension__octet__6.log_match(match_value.extension__octet__6(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.userRate().ispresent()){
if(!single_value->field_userRate.match(match_value.userRate(), legacy)){
TTCN_Logger::log_logmatch_info(".userRate");
single_value->field_userRate.log_match(match_value.userRate(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_userRate.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".userRate := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_userRate.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.numberDataBits().ispresent()){
if(!single_value->field_numberDataBits.match(match_value.numberDataBits(), legacy)){
TTCN_Logger::log_logmatch_info(".numberDataBits");
single_value->field_numberDataBits.log_match(match_value.numberDataBits(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_numberDataBits.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".numberDataBits := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_numberDataBits.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.negotiation().ispresent()){
if(!single_value->field_negotiation.match(match_value.negotiation(), legacy)){
TTCN_Logger::log_logmatch_info(".negotiation");
single_value->field_negotiation.log_match(match_value.negotiation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_negotiation.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".negotiation := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_negotiation.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.numberStopBits().ispresent()){
if(!single_value->field_numberStopBits.match(match_value.numberStopBits(), legacy)){
TTCN_Logger::log_logmatch_info(".numberStopBits");
single_value->field_numberStopBits.log_match(match_value.numberStopBits(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_numberStopBits.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".numberStopBits := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_numberStopBits.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.extension__octet__6a().ispresent()){
if(!single_value->field_extension__octet__6a.match(match_value.extension__octet__6a(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_6a");
single_value->field_extension__octet__6a.log_match(match_value.extension__octet__6a(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_extension__octet__6a.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".extension_octet_6a := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_extension__octet__6a.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.parity().ispresent()){
if(!single_value->field_parity.match(match_value.parity(), legacy)){
TTCN_Logger::log_logmatch_info(".parity");
single_value->field_parity.log_match(match_value.parity(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_parity.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".parity := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_parity.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nicOnRX().ispresent()){
if(!single_value->field_nicOnRX.match(match_value.nicOnRX(), legacy)){
TTCN_Logger::log_logmatch_info(".nicOnRX");
single_value->field_nicOnRX.log_match(match_value.nicOnRX(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nicOnRX.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nicOnRX := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nicOnRX.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nicOnTX().ispresent()){
if(!single_value->field_nicOnTX.match(match_value.nicOnTX(), legacy)){
TTCN_Logger::log_logmatch_info(".nicOnTX");
single_value->field_nicOnTX.log_match(match_value.nicOnTX(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nicOnTX.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nicOnTX := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nicOnTX.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.intermediateRate().ispresent()){
if(!single_value->field_intermediateRate.match(match_value.intermediateRate(), legacy)){
TTCN_Logger::log_logmatch_info(".intermediateRate");
single_value->field_intermediateRate.log_match(match_value.intermediateRate(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_intermediateRate.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".intermediateRate := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_intermediateRate.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.extension__octet__6b().ispresent()){
if(!single_value->field_extension__octet__6b.match(match_value.extension__octet__6b(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_6b");
single_value->field_extension__octet__6b.log_match(match_value.extension__octet__6b(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_extension__octet__6b.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".extension_octet_6b := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_extension__octet__6b.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.modemType().ispresent()){
if(!single_value->field_modemType.match(match_value.modemType(), legacy)){
TTCN_Logger::log_logmatch_info(".modemType");
single_value->field_modemType.log_match(match_value.modemType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_modemType.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".modemType := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_modemType.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.connectionElement().ispresent()){
if(!single_value->field_connectionElement.match(match_value.connectionElement(), legacy)){
TTCN_Logger::log_logmatch_info(".connectionElement");
single_value->field_connectionElement.log_match(match_value.connectionElement(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_connectionElement.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".connectionElement := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_connectionElement.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.extension__octet__6c().ispresent()){
if(!single_value->field_extension__octet__6c.match(match_value.extension__octet__6c(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_6c");
single_value->field_extension__octet__6c.log_match(match_value.extension__octet__6c(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_extension__octet__6c.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".extension_octet_6c := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_extension__octet__6c.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.fixedNetworkUserRate().ispresent()){
if(!single_value->field_fixedNetworkUserRate.match(match_value.fixedNetworkUserRate(), legacy)){
TTCN_Logger::log_logmatch_info(".fixedNetworkUserRate");
single_value->field_fixedNetworkUserRate.log_match(match_value.fixedNetworkUserRate(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_fixedNetworkUserRate.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".fixedNetworkUserRate := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_fixedNetworkUserRate.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.otherModemType().ispresent()){
if(!single_value->field_otherModemType.match(match_value.otherModemType(), legacy)){
TTCN_Logger::log_logmatch_info(".otherModemType");
single_value->field_otherModemType.log_match(match_value.otherModemType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_otherModemType.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".otherModemType := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_otherModemType.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.extension__octet__6d().ispresent()){
if(!single_value->field_extension__octet__6d.match(match_value.extension__octet__6d(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_6d");
single_value->field_extension__octet__6d.log_match(match_value.extension__octet__6d(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_extension__octet__6d.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".extension_octet_6d := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_extension__octet__6d.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.maxNumberOfTrafficChannels().ispresent()){
if(!single_value->field_maxNumberOfTrafficChannels.match(match_value.maxNumberOfTrafficChannels(), legacy)){
TTCN_Logger::log_logmatch_info(".maxNumberOfTrafficChannels");
single_value->field_maxNumberOfTrafficChannels.log_match(match_value.maxNumberOfTrafficChannels(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_maxNumberOfTrafficChannels.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".maxNumberOfTrafficChannels := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_maxNumberOfTrafficChannels.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.acceptableChannelCodings().ispresent()){
if(!single_value->field_acceptableChannelCodings.match(match_value.acceptableChannelCodings(), legacy)){
TTCN_Logger::log_logmatch_info(".acceptableChannelCodings");
single_value->field_acceptableChannelCodings.log_match(match_value.acceptableChannelCodings(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_acceptableChannelCodings.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".acceptableChannelCodings := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_acceptableChannelCodings.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.extension__octet__6e().ispresent()){
if(!single_value->field_extension__octet__6e.match(match_value.extension__octet__6e(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_6e");
single_value->field_extension__octet__6e.log_match(match_value.extension__octet__6e(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_extension__octet__6e.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".extension_octet_6e := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_extension__octet__6e.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.wantedAirInterfaceUserRate().ispresent()){
if(!single_value->field_wantedAirInterfaceUserRate.match(match_value.wantedAirInterfaceUserRate(), legacy)){
TTCN_Logger::log_logmatch_info(".wantedAirInterfaceUserRate");
single_value->field_wantedAirInterfaceUserRate.log_match(match_value.wantedAirInterfaceUserRate(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_wantedAirInterfaceUserRate.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".wantedAirInterfaceUserRate := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_wantedAirInterfaceUserRate.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.uimi().ispresent()){
if(!single_value->field_uimi.match(match_value.uimi(), legacy)){
TTCN_Logger::log_logmatch_info(".uimi");
single_value->field_uimi.log_match(match_value.uimi(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_uimi.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".uimi := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_uimi.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.extension__octet__6f().ispresent()){
if(!single_value->field_extension__octet__6f.match(match_value.extension__octet__6f(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_6f");
single_value->field_extension__octet__6f.log_match(match_value.extension__octet__6f(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_extension__octet__6f.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".extension_octet_6f := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_extension__octet__6f.log();
TTCN_Logger::log_event_str(" unmatched");
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);
}
}
if (match_value.asymetryIndication().ispresent()){
if(!single_value->field_asymetryIndication.match(match_value.asymetryIndication(), legacy)){
TTCN_Logger::log_logmatch_info(".asymetryIndication");
single_value->field_asymetryIndication.log_match(match_value.asymetryIndication(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_asymetryIndication.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".asymetryIndication := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_asymetryIndication.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.acceptableChannelCodingsExt().ispresent()){
if(!single_value->field_acceptableChannelCodingsExt.match(match_value.acceptableChannelCodingsExt(), legacy)){
TTCN_Logger::log_logmatch_info(".acceptableChannelCodingsExt");
single_value->field_acceptableChannelCodingsExt.log_match(match_value.acceptableChannelCodingsExt(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_acceptableChannelCodingsExt.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".acceptableChannelCodingsExt := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_acceptableChannelCodingsExt.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.extension__octet__6g().ispresent()){
if(!single_value->field_extension__octet__6g.match(match_value.extension__octet__6g(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_6g");
single_value->field_extension__octet__6g.log_match(match_value.extension__octet__6g(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_extension__octet__6g.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".extension_octet_6g := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_extension__octet__6g.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("{ synchronous_asynchronous := ");
single_value->field_synchronous__asynchronous.log_match(match_value.synchronous__asynchronous(), legacy);
TTCN_Logger::log_event_str(", userInformationLayer1Protocol := ");
single_value->field_userInformationLayer1Protocol.log_match(match_value.userInformationLayer1Protocol(), legacy);
TTCN_Logger::log_event_str(", layer1Id := ");
single_value->field_layer1Id.log_match(match_value.layer1Id(), legacy);
TTCN_Logger::log_event_str(", extension_octet_6 := ");
single_value->field_extension__octet__6.log_match(match_value.extension__octet__6(), legacy);
TTCN_Logger::log_event_str(", userRate := ");
if (match_value.userRate().ispresent()) {
single_value->field_userRate.log_match(match_value.userRate(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_userRate.log();
if (single_value->field_userRate.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", numberDataBits := ");
if (match_value.numberDataBits().ispresent()) {
single_value->field_numberDataBits.log_match(match_value.numberDataBits(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_numberDataBits.log();
if (single_value->field_numberDataBits.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", negotiation := ");
if (match_value.negotiation().ispresent()) {
single_value->field_negotiation.log_match(match_value.negotiation(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_negotiation.log();
if (single_value->field_negotiation.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", numberStopBits := ");
if (match_value.numberStopBits().ispresent()) {
single_value->field_numberStopBits.log_match(match_value.numberStopBits(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_numberStopBits.log();
if (single_value->field_numberStopBits.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", extension_octet_6a := ");
if (match_value.extension__octet__6a().ispresent()) {
single_value->field_extension__octet__6a.log_match(match_value.extension__octet__6a(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_extension__octet__6a.log();
if (single_value->field_extension__octet__6a.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", parity := ");
if (match_value.parity().ispresent()) {
single_value->field_parity.log_match(match_value.parity(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_parity.log();
if (single_value->field_parity.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nicOnRX := ");
if (match_value.nicOnRX().ispresent()) {
single_value->field_nicOnRX.log_match(match_value.nicOnRX(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nicOnRX.log();
if (single_value->field_nicOnRX.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nicOnTX := ");
if (match_value.nicOnTX().ispresent()) {
single_value->field_nicOnTX.log_match(match_value.nicOnTX(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nicOnTX.log();
if (single_value->field_nicOnTX.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", intermediateRate := ");
if (match_value.intermediateRate().ispresent()) {
single_value->field_intermediateRate.log_match(match_value.intermediateRate(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_intermediateRate.log();
if (single_value->field_intermediateRate.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", extension_octet_6b := ");
if (match_value.extension__octet__6b().ispresent()) {
single_value->field_extension__octet__6b.log_match(match_value.extension__octet__6b(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_extension__octet__6b.log();
if (single_value->field_extension__octet__6b.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", modemType := ");
if (match_value.modemType().ispresent()) {
single_value->field_modemType.log_match(match_value.modemType(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_modemType.log();
if (single_value->field_modemType.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", connectionElement := ");
if (match_value.connectionElement().ispresent()) {
single_value->field_connectionElement.log_match(match_value.connectionElement(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_connectionElement.log();
if (single_value->field_connectionElement.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", extension_octet_6c := ");
if (match_value.extension__octet__6c().ispresent()) {
single_value->field_extension__octet__6c.log_match(match_value.extension__octet__6c(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_extension__octet__6c.log();
if (single_value->field_extension__octet__6c.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", fixedNetworkUserRate := ");
if (match_value.fixedNetworkUserRate().ispresent()) {
single_value->field_fixedNetworkUserRate.log_match(match_value.fixedNetworkUserRate(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_fixedNetworkUserRate.log();
if (single_value->field_fixedNetworkUserRate.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", otherModemType := ");
if (match_value.otherModemType().ispresent()) {
single_value->field_otherModemType.log_match(match_value.otherModemType(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_otherModemType.log();
if (single_value->field_otherModemType.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", extension_octet_6d := ");
if (match_value.extension__octet__6d().ispresent()) {
single_value->field_extension__octet__6d.log_match(match_value.extension__octet__6d(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_extension__octet__6d.log();
if (single_value->field_extension__octet__6d.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", maxNumberOfTrafficChannels := ");
if (match_value.maxNumberOfTrafficChannels().ispresent()) {
single_value->field_maxNumberOfTrafficChannels.log_match(match_value.maxNumberOfTrafficChannels(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_maxNumberOfTrafficChannels.log();
if (single_value->field_maxNumberOfTrafficChannels.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", acceptableChannelCodings := ");
if (match_value.acceptableChannelCodings().ispresent()) {
single_value->field_acceptableChannelCodings.log_match(match_value.acceptableChannelCodings(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_acceptableChannelCodings.log();
if (single_value->field_acceptableChannelCodings.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", extension_octet_6e := ");
if (match_value.extension__octet__6e().ispresent()) {
single_value->field_extension__octet__6e.log_match(match_value.extension__octet__6e(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_extension__octet__6e.log();
if (single_value->field_extension__octet__6e.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", wantedAirInterfaceUserRate := ");
if (match_value.wantedAirInterfaceUserRate().ispresent()) {
single_value->field_wantedAirInterfaceUserRate.log_match(match_value.wantedAirInterfaceUserRate(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_wantedAirInterfaceUserRate.log();
if (single_value->field_wantedAirInterfaceUserRate.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", uimi := ");
if (match_value.uimi().ispresent()) {
single_value->field_uimi.log_match(match_value.uimi(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_uimi.log();
if (single_value->field_uimi.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", extension_octet_6f := ");
if (match_value.extension__octet__6f().ispresent()) {
single_value->field_extension__octet__6f.log_match(match_value.extension__octet__6f(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_extension__octet__6f.log();
if (single_value->field_extension__octet__6f.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
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(", asymetryIndication := ");
if (match_value.asymetryIndication().ispresent()) {
single_value->field_asymetryIndication.log_match(match_value.asymetryIndication(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_asymetryIndication.log();
if (single_value->field_asymetryIndication.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", acceptableChannelCodingsExt := ");
if (match_value.acceptableChannelCodingsExt().ispresent()) {
single_value->field_acceptableChannelCodingsExt.log_match(match_value.acceptableChannelCodingsExt(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_acceptableChannelCodingsExt.log();
if (single_value->field_acceptableChannelCodingsExt.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", extension_octet_6g := ");
if (match_value.extension__octet__6g().ispresent()) {
single_value->field_extension__octet__6g.log_match(match_value.extension__octet__6g(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_extension__octet__6g.log();
if (single_value->field_extension__octet__6g.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 BC__octet6_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (synchronous__asynchronous().is_bound()) synchronous__asynchronous().set_implicit_omit();
if (userInformationLayer1Protocol().is_bound()) userInformationLayer1Protocol().set_implicit_omit();
if (layer1Id().is_bound()) layer1Id().set_implicit_omit();
if (extension__octet__6().is_bound()) extension__octet__6().set_implicit_omit();
if (!userRate().is_bound()) userRate() = OMIT_VALUE;
else userRate().set_implicit_omit();
if (!numberDataBits().is_bound()) numberDataBits() = OMIT_VALUE;
else numberDataBits().set_implicit_omit();
if (!negotiation().is_bound()) negotiation() = OMIT_VALUE;
else negotiation().set_implicit_omit();
if (!numberStopBits().is_bound()) numberStopBits() = OMIT_VALUE;
else numberStopBits().set_implicit_omit();
if (!extension__octet__6a().is_bound()) extension__octet__6a() = OMIT_VALUE;
else extension__octet__6a().set_implicit_omit();
if (!parity().is_bound()) parity() = OMIT_VALUE;
else parity().set_implicit_omit();
if (!nicOnRX().is_bound()) nicOnRX() = OMIT_VALUE;
else nicOnRX().set_implicit_omit();
if (!nicOnTX().is_bound()) nicOnTX() = OMIT_VALUE;
else nicOnTX().set_implicit_omit();
if (!intermediateRate().is_bound()) intermediateRate() = OMIT_VALUE;
else intermediateRate().set_implicit_omit();
if (!extension__octet__6b().is_bound()) extension__octet__6b() = OMIT_VALUE;
else extension__octet__6b().set_implicit_omit();
if (!modemType().is_bound()) modemType() = OMIT_VALUE;
else modemType().set_implicit_omit();
if (!connectionElement().is_bound()) connectionElement() = OMIT_VALUE;
else connectionElement().set_implicit_omit();
if (!extension__octet__6c().is_bound()) extension__octet__6c() = OMIT_VALUE;
else extension__octet__6c().set_implicit_omit();
if (!fixedNetworkUserRate().is_bound()) fixedNetworkUserRate() = OMIT_VALUE;
else fixedNetworkUserRate().set_implicit_omit();
if (!otherModemType().is_bound()) otherModemType() = OMIT_VALUE;
else otherModemType().set_implicit_omit();
if (!extension__octet__6d().is_bound()) extension__octet__6d() = OMIT_VALUE;
else extension__octet__6d().set_implicit_omit();
if (!maxNumberOfTrafficChannels().is_bound()) maxNumberOfTrafficChannels() = OMIT_VALUE;
else maxNumberOfTrafficChannels().set_implicit_omit();
if (!acceptableChannelCodings().is_bound()) acceptableChannelCodings() = OMIT_VALUE;
else acceptableChannelCodings().set_implicit_omit();
if (!extension__octet__6e().is_bound()) extension__octet__6e() = OMIT_VALUE;
else extension__octet__6e().set_implicit_omit();
if (!wantedAirInterfaceUserRate().is_bound()) wantedAirInterfaceUserRate() = OMIT_VALUE;
else wantedAirInterfaceUserRate().set_implicit_omit();
if (!uimi().is_bound()) uimi() = OMIT_VALUE;
else uimi().set_implicit_omit();
if (!extension__octet__6f().is_bound()) extension__octet__6f() = OMIT_VALUE;
else extension__octet__6f().set_implicit_omit();
if (!spare().is_bound()) spare() = OMIT_VALUE;
else spare().set_implicit_omit();
if (!asymetryIndication().is_bound()) asymetryIndication() = OMIT_VALUE;
else asymetryIndication().set_implicit_omit();
if (!acceptableChannelCodingsExt().is_bound()) acceptableChannelCodingsExt() = OMIT_VALUE;
else acceptableChannelCodingsExt().set_implicit_omit();
if (!extension__octet__6g().is_bound()) extension__octet__6g() = OMIT_VALUE;
else extension__octet__6g().set_implicit_omit();
}

void BC__octet6_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_synchronous__asynchronous.encode_text(text_buf);
single_value->field_userInformationLayer1Protocol.encode_text(text_buf);
single_value->field_layer1Id.encode_text(text_buf);
single_value->field_extension__octet__6.encode_text(text_buf);
single_value->field_userRate.encode_text(text_buf);
single_value->field_numberDataBits.encode_text(text_buf);
single_value->field_negotiation.encode_text(text_buf);
single_value->field_numberStopBits.encode_text(text_buf);
single_value->field_extension__octet__6a.encode_text(text_buf);
single_value->field_parity.encode_text(text_buf);
single_value->field_nicOnRX.encode_text(text_buf);
single_value->field_nicOnTX.encode_text(text_buf);
single_value->field_intermediateRate.encode_text(text_buf);
single_value->field_extension__octet__6b.encode_text(text_buf);
single_value->field_modemType.encode_text(text_buf);
single_value->field_connectionElement.encode_text(text_buf);
single_value->field_extension__octet__6c.encode_text(text_buf);
single_value->field_fixedNetworkUserRate.encode_text(text_buf);
single_value->field_otherModemType.encode_text(text_buf);
single_value->field_extension__octet__6d.encode_text(text_buf);
single_value->field_maxNumberOfTrafficChannels.encode_text(text_buf);
single_value->field_acceptableChannelCodings.encode_text(text_buf);
single_value->field_extension__octet__6e.encode_text(text_buf);
single_value->field_wantedAirInterfaceUserRate.encode_text(text_buf);
single_value->field_uimi.encode_text(text_buf);
single_value->field_extension__octet__6f.encode_text(text_buf);
single_value->field_spare.encode_text(text_buf);
single_value->field_asymetryIndication.encode_text(text_buf);
single_value->field_acceptableChannelCodingsExt.encode_text(text_buf);
single_value->field_extension__octet__6g.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 @MobileL3_CC_Types.BC_octet6.");
}
}

void BC__octet6_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_synchronous__asynchronous.decode_text(text_buf);
single_value->field_userInformationLayer1Protocol.decode_text(text_buf);
single_value->field_layer1Id.decode_text(text_buf);
single_value->field_extension__octet__6.decode_text(text_buf);
single_value->field_userRate.decode_text(text_buf);
single_value->field_numberDataBits.decode_text(text_buf);
single_value->field_negotiation.decode_text(text_buf);
single_value->field_numberStopBits.decode_text(text_buf);
single_value->field_extension__octet__6a.decode_text(text_buf);
single_value->field_parity.decode_text(text_buf);
single_value->field_nicOnRX.decode_text(text_buf);
single_value->field_nicOnTX.decode_text(text_buf);
single_value->field_intermediateRate.decode_text(text_buf);
single_value->field_extension__octet__6b.decode_text(text_buf);
single_value->field_modemType.decode_text(text_buf);
single_value->field_connectionElement.decode_text(text_buf);
single_value->field_extension__octet__6c.decode_text(text_buf);
single_value->field_fixedNetworkUserRate.decode_text(text_buf);
single_value->field_otherModemType.decode_text(text_buf);
single_value->field_extension__octet__6d.decode_text(text_buf);
single_value->field_maxNumberOfTrafficChannels.decode_text(text_buf);
single_value->field_acceptableChannelCodings.decode_text(text_buf);
single_value->field_extension__octet__6e.decode_text(text_buf);
single_value->field_wantedAirInterfaceUserRate.decode_text(text_buf);
single_value->field_uimi.decode_text(text_buf);
single_value->field_extension__octet__6f.decode_text(text_buf);
single_value->field_spare.decode_text(text_buf);
single_value->field_asymetryIndication.decode_text(text_buf);
single_value->field_acceptableChannelCodingsExt.decode_text(text_buf);
single_value->field_extension__octet__6g.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 BC__octet6_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 @MobileL3_CC_Types.BC_octet6.");
}
}

void BC__octet6_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: {
    BC__octet6_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 (30<param.get_size()) {
      param.error("record template of type @MobileL3_CC_Types.BC_octet6 has 30 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) synchronous__asynchronous().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) userInformationLayer1Protocol().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) layer1Id().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) userRate().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) numberDataBits().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) negotiation().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) numberStopBits().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6a().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) parity().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) nicOnRX().set_param(*param.get_elem(10));
    if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) nicOnTX().set_param(*param.get_elem(11));
    if (param.get_size()>12 && param.get_elem(12)->get_type()!=Module_Param::MP_NotUsed) intermediateRate().set_param(*param.get_elem(12));
    if (param.get_size()>13 && param.get_elem(13)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6b().set_param(*param.get_elem(13));
    if (param.get_size()>14 && param.get_elem(14)->get_type()!=Module_Param::MP_NotUsed) modemType().set_param(*param.get_elem(14));
    if (param.get_size()>15 && param.get_elem(15)->get_type()!=Module_Param::MP_NotUsed) connectionElement().set_param(*param.get_elem(15));
    if (param.get_size()>16 && param.get_elem(16)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6c().set_param(*param.get_elem(16));
    if (param.get_size()>17 && param.get_elem(17)->get_type()!=Module_Param::MP_NotUsed) fixedNetworkUserRate().set_param(*param.get_elem(17));
    if (param.get_size()>18 && param.get_elem(18)->get_type()!=Module_Param::MP_NotUsed) otherModemType().set_param(*param.get_elem(18));
    if (param.get_size()>19 && param.get_elem(19)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6d().set_param(*param.get_elem(19));
    if (param.get_size()>20 && param.get_elem(20)->get_type()!=Module_Param::MP_NotUsed) maxNumberOfTrafficChannels().set_param(*param.get_elem(20));
    if (param.get_size()>21 && param.get_elem(21)->get_type()!=Module_Param::MP_NotUsed) acceptableChannelCodings().set_param(*param.get_elem(21));
    if (param.get_size()>22 && param.get_elem(22)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6e().set_param(*param.get_elem(22));
    if (param.get_size()>23 && param.get_elem(23)->get_type()!=Module_Param::MP_NotUsed) wantedAirInterfaceUserRate().set_param(*param.get_elem(23));
    if (param.get_size()>24 && param.get_elem(24)->get_type()!=Module_Param::MP_NotUsed) uimi().set_param(*param.get_elem(24));
    if (param.get_size()>25 && param.get_elem(25)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6f().set_param(*param.get_elem(25));
    if (param.get_size()>26 && param.get_elem(26)->get_type()!=Module_Param::MP_NotUsed) spare().set_param(*param.get_elem(26));
    if (param.get_size()>27 && param.get_elem(27)->get_type()!=Module_Param::MP_NotUsed) asymetryIndication().set_param(*param.get_elem(27));
    if (param.get_size()>28 && param.get_elem(28)->get_type()!=Module_Param::MP_NotUsed) acceptableChannelCodingsExt().set_param(*param.get_elem(28));
    if (param.get_size()>29 && param.get_elem(29)->get_type()!=Module_Param::MP_NotUsed) extension__octet__6g().set_param(*param.get_elem(29));
    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(), "synchronous_asynchronous")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          synchronous__asynchronous().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "userInformationLayer1Protocol")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          userInformationLayer1Protocol().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "layer1Id")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          layer1Id().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "userRate")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          userRate().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "numberDataBits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberDataBits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "negotiation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          negotiation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "numberStopBits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberStopBits().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6a")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6a().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "parity")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          parity().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nicOnRX")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nicOnRX().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nicOnTX")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nicOnTX().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "intermediateRate")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          intermediateRate().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6b")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6b().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "modemType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          modemType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "connectionElement")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          connectionElement().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6c")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6c().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "fixedNetworkUserRate")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          fixedNetworkUserRate().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "otherModemType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          otherModemType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6d")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6d().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "maxNumberOfTrafficChannels")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          maxNumberOfTrafficChannels().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "acceptableChannelCodings")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          acceptableChannelCodings().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6e")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6e().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "wantedAirInterfaceUserRate")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          wantedAirInterfaceUserRate().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "uimi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          uimi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6f")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6f().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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(), "asymetryIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          asymetryIndication().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "acceptableChannelCodingsExt")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          acceptableChannelCodingsExt().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_6g")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__6g().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 @MobileL3_CC_Types.BC_octet6: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    BC__octet6_template* precondition = new BC__octet6_template;
    precondition->set_param(*param.get_elem(0));
    BC__octet6_template* implied_template = new BC__octet6_template;
    implied_template->set_param(*param.get_elem(1));
    *this = BC__octet6_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.BC_octet6");
  }
  is_ifpresent = param.get_ifpresent();
}

void BC__octet6_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_synchronous__asynchronous.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_userInformationLayer1Protocol.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_layer1Id.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_extension__octet__6.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_userRate.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_numberDataBits.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_negotiation.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_numberStopBits.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_extension__octet__6a.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_parity.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_nicOnRX.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_nicOnTX.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_intermediateRate.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_extension__octet__6b.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_modemType.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_connectionElement.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_extension__octet__6c.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_fixedNetworkUserRate.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_otherModemType.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_extension__octet__6d.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_maxNumberOfTrafficChannels.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_acceptableChannelCodings.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_extension__octet__6e.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_wantedAirInterfaceUserRate.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_uimi.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_extension__octet__6f.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_spare.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_asymetryIndication.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_acceptableChannelCodingsExt.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
single_value->field_extension__octet__6g.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet6");
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 : "@MobileL3_CC_Types.BC_octet6");
}

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

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

BC__octet7::BC__octet7()
{
}

BC__octet7::BC__octet7(const BITSTRING& par_userInformationLayer2Protocol,
    const BITSTRING& par_layer2Id,
    const BITSTRING& par_extension__octet__7)
  :   field_userInformationLayer2Protocol(par_userInformationLayer2Protocol),
  field_layer2Id(par_layer2Id),
  field_extension__octet__7(par_extension__octet__7)
{
}

BC__octet7::BC__octet7(const BC__octet7& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.BC_octet7.");
if (other_value.userInformationLayer2Protocol().is_bound()) field_userInformationLayer2Protocol = other_value.userInformationLayer2Protocol();
else field_userInformationLayer2Protocol.clean_up();
if (other_value.layer2Id().is_bound()) field_layer2Id = other_value.layer2Id();
else field_layer2Id.clean_up();
if (other_value.extension__octet__7().is_bound()) field_extension__octet__7 = other_value.extension__octet__7();
else field_extension__octet__7.clean_up();
}

void BC__octet7::clean_up()
{
field_userInformationLayer2Protocol.clean_up();
field_layer2Id.clean_up();
field_extension__octet__7.clean_up();
}

const TTCN_Typedescriptor_t* BC__octet7::get_descriptor() const { return &BC__octet7_descr_; }
BC__octet7& BC__octet7::operator=(const BC__octet7& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.BC_octet7.");
  if (other_value.userInformationLayer2Protocol().is_bound()) field_userInformationLayer2Protocol = other_value.userInformationLayer2Protocol();
  else field_userInformationLayer2Protocol.clean_up();
  if (other_value.layer2Id().is_bound()) field_layer2Id = other_value.layer2Id();
  else field_layer2Id.clean_up();
  if (other_value.extension__octet__7().is_bound()) field_extension__octet__7 = other_value.extension__octet__7();
  else field_extension__octet__7.clean_up();
}
return *this;
}

boolean BC__octet7::operator==(const BC__octet7& other_value) const
{
return field_userInformationLayer2Protocol==other_value.field_userInformationLayer2Protocol
  && field_layer2Id==other_value.field_layer2Id
  && field_extension__octet__7==other_value.field_extension__octet__7;
}

boolean BC__octet7::is_bound() const
{
return (field_userInformationLayer2Protocol.is_bound())
  || (field_layer2Id.is_bound())
  || (field_extension__octet__7.is_bound());
}
boolean BC__octet7::is_value() const
{
return field_userInformationLayer2Protocol.is_value()
  && field_layer2Id.is_value()
  && field_extension__octet__7.is_value();
}
void BC__octet7::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ userInformationLayer2Protocol := ");
field_userInformationLayer2Protocol.log();
TTCN_Logger::log_event_str(", layer2Id := ");
field_layer2Id.log();
TTCN_Logger::log_event_str(", extension_octet_7 := ");
field_extension__octet__7.log();
TTCN_Logger::log_event_str(" }");
}

void BC__octet7::set_implicit_omit()
{
if (userInformationLayer2Protocol().is_bound()) userInformationLayer2Protocol().set_implicit_omit();
if (layer2Id().is_bound()) layer2Id().set_implicit_omit();
if (extension__octet__7().is_bound()) extension__octet__7().set_implicit_omit();
}

void BC__octet7::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 @MobileL3_CC_Types.BC_octet7 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) userInformationLayer2Protocol().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) layer2Id().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) extension__octet__7().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(), "userInformationLayer2Protocol")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          userInformationLayer2Protocol().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "layer2Id")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          layer2Id().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_7")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__7().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 @MobileL3_CC_Types.BC_octet7: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.BC_octet7");
  }
}

void BC__octet7::encode_text(Text_Buf& text_buf) const
{
field_userInformationLayer2Protocol.encode_text(text_buf);
field_layer2Id.encode_text(text_buf);
field_extension__octet__7.encode_text(text_buf);
}

void BC__octet7::decode_text(Text_Buf& text_buf)
{
field_userInformationLayer2Protocol.decode_text(text_buf);
field_layer2Id.decode_text(text_buf);
field_extension__octet__7.decode_text(text_buf);
}

void BC__octet7::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 BC__octet7::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 BC__octet7::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;
  {
  cbyte* data=p_buf.get_read_data();
  int count=1;
  unsigned mask = 1 << (local_top_order==ORDER_LSB ? 0 : 7);
  if(p_td.raw->extension_bit==EXT_BIT_YES){
    while((data[count-1] & mask)==0 && count*8<(int)limit) count++;
  }
  else{
    while((data[count-1] & mask)!=0 && count*8<(int)limit) count++;
  }
  if(limit) limit=count*8;
  }
  RAW_Force_Omit field_0_force_omit(0, force_omit, General__Types::BIT5_descr_.raw->forceomit);
  decoded_field_length = field_userInformationLayer2Protocol.RAW_decode(General__Types::BIT5_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, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_layer2Id.RAW_decode(General__Types::BIT2_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__7.RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int BC__octet7::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, General__Types::BIT5_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT1_descr_.raw);
  encoded_length += field_userInformationLayer2Protocol.RAW_encode(General__Types::BIT5_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_layer2Id.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_extension__octet__7.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[2]);
  return myleaf.length = encoded_length;
}

struct BC__octet7_template::single_value_struct {
BITSTRING_template field_userInformationLayer2Protocol;
BITSTRING_template field_layer2Id;
BITSTRING_template field_extension__octet__7;
};

void BC__octet7_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_userInformationLayer2Protocol = ANY_VALUE;
single_value->field_layer2Id = ANY_VALUE;
single_value->field_extension__octet__7 = ANY_VALUE;
}
}
}

void BC__octet7_template::copy_value(const BC__octet7& other_value)
{
single_value = new single_value_struct;
if (other_value.userInformationLayer2Protocol().is_bound()) {
  single_value->field_userInformationLayer2Protocol = other_value.userInformationLayer2Protocol();
} else {
  single_value->field_userInformationLayer2Protocol.clean_up();
}
if (other_value.layer2Id().is_bound()) {
  single_value->field_layer2Id = other_value.layer2Id();
} else {
  single_value->field_layer2Id.clean_up();
}
if (other_value.extension__octet__7().is_bound()) {
  single_value->field_extension__octet__7 = other_value.extension__octet__7();
} else {
  single_value->field_extension__octet__7.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void BC__octet7_template::copy_template(const BC__octet7_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.userInformationLayer2Protocol().get_selection()) {
single_value->field_userInformationLayer2Protocol = other_value.userInformationLayer2Protocol();
} else {
single_value->field_userInformationLayer2Protocol.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.layer2Id().get_selection()) {
single_value->field_layer2Id = other_value.layer2Id();
} else {
single_value->field_layer2Id.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__7().get_selection()) {
single_value->field_extension__octet__7 = other_value.extension__octet__7();
} else {
single_value->field_extension__octet__7.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 BC__octet7_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 BC__octet7_template(*other_value.implication_.precondition);
implication_.implied_template = new BC__octet7_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 @MobileL3_CC_Types.BC_octet7.");
break;
}
set_selection(other_value);
}

BC__octet7_template::BC__octet7_template()
{
}

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

BC__octet7_template::BC__octet7_template(const BC__octet7& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean BC__octet7_template::match(const BC__octet7& 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.userInformationLayer2Protocol().is_bound()) return FALSE;
if(!single_value->field_userInformationLayer2Protocol.match(other_value.userInformationLayer2Protocol(), legacy))return FALSE;
if(!other_value.layer2Id().is_bound()) return FALSE;
if(!single_value->field_layer2Id.match(other_value.layer2Id(), legacy))return FALSE;
if(!other_value.extension__octet__7().is_bound()) return FALSE;
if(!single_value->field_extension__octet__7.match(other_value.extension__octet__7(), 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 @MobileL3_CC_Types.BC_octet7.");
}
return FALSE;
}

boolean BC__octet7_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_userInformationLayer2Protocol.is_bound()
 || single_value->field_layer2Id.is_bound()
 || single_value->field_extension__octet__7.is_bound();
}

boolean BC__octet7_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_userInformationLayer2Protocol.is_value()
 && single_value->field_layer2Id.is_value()
 && single_value->field_extension__octet__7.is_value();
}

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

BC__octet7 BC__octet7_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 @MobileL3_CC_Types.BC_octet7.");
BC__octet7 ret_val;
if (single_value->field_userInformationLayer2Protocol.is_bound()) {
ret_val.userInformationLayer2Protocol() = single_value->field_userInformationLayer2Protocol.valueof();
}
if (single_value->field_layer2Id.is_bound()) {
ret_val.layer2Id() = single_value->field_layer2Id.valueof();
}
if (single_value->field_extension__octet__7.is_bound()) {
ret_val.extension__octet__7() = single_value->field_extension__octet__7.valueof();
}
return ret_val;
}

void BC__octet7_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 @MobileL3_CC_Types.BC_octet7.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new BC__octet7_template[list_length];
}

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

BITSTRING_template& BC__octet7_template::userInformationLayer2Protocol()
{
set_specific();
return single_value->field_userInformationLayer2Protocol;
}

const BITSTRING_template& BC__octet7_template::userInformationLayer2Protocol() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field userInformationLayer2Protocol of a non-specific template of type @MobileL3_CC_Types.BC_octet7.");
return single_value->field_userInformationLayer2Protocol;
}

BITSTRING_template& BC__octet7_template::layer2Id()
{
set_specific();
return single_value->field_layer2Id;
}

const BITSTRING_template& BC__octet7_template::layer2Id() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field layer2Id of a non-specific template of type @MobileL3_CC_Types.BC_octet7.");
return single_value->field_layer2Id;
}

BITSTRING_template& BC__octet7_template::extension__octet__7()
{
set_specific();
return single_value->field_extension__octet__7;
}

const BITSTRING_template& BC__octet7_template::extension__octet__7() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_7 of a non-specific template of type @MobileL3_CC_Types.BC_octet7.");
return single_value->field_extension__octet__7;
}

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

void BC__octet7_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ userInformationLayer2Protocol := ");
single_value->field_userInformationLayer2Protocol.log();
TTCN_Logger::log_event_str(", layer2Id := ");
single_value->field_layer2Id.log();
TTCN_Logger::log_event_str(", extension_octet_7 := ");
single_value->field_extension__octet__7.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 BC__octet7_template::log_match(const BC__octet7& 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_userInformationLayer2Protocol.match(match_value.userInformationLayer2Protocol(), legacy)){
TTCN_Logger::log_logmatch_info(".userInformationLayer2Protocol");
single_value->field_userInformationLayer2Protocol.log_match(match_value.userInformationLayer2Protocol(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_layer2Id.match(match_value.layer2Id(), legacy)){
TTCN_Logger::log_logmatch_info(".layer2Id");
single_value->field_layer2Id.log_match(match_value.layer2Id(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_extension__octet__7.match(match_value.extension__octet__7(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_7");
single_value->field_extension__octet__7.log_match(match_value.extension__octet__7(), 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("{ userInformationLayer2Protocol := ");
single_value->field_userInformationLayer2Protocol.log_match(match_value.userInformationLayer2Protocol(), legacy);
TTCN_Logger::log_event_str(", layer2Id := ");
single_value->field_layer2Id.log_match(match_value.layer2Id(), legacy);
TTCN_Logger::log_event_str(", extension_octet_7 := ");
single_value->field_extension__octet__7.log_match(match_value.extension__octet__7(), 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 BC__octet7_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (userInformationLayer2Protocol().is_bound()) userInformationLayer2Protocol().set_implicit_omit();
if (layer2Id().is_bound()) layer2Id().set_implicit_omit();
if (extension__octet__7().is_bound()) extension__octet__7().set_implicit_omit();
}

void BC__octet7_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_userInformationLayer2Protocol.encode_text(text_buf);
single_value->field_layer2Id.encode_text(text_buf);
single_value->field_extension__octet__7.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 @MobileL3_CC_Types.BC_octet7.");
}
}

void BC__octet7_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_userInformationLayer2Protocol.decode_text(text_buf);
single_value->field_layer2Id.decode_text(text_buf);
single_value->field_extension__octet__7.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 BC__octet7_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 @MobileL3_CC_Types.BC_octet7.");
}
}

void BC__octet7_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: {
    BC__octet7_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 @MobileL3_CC_Types.BC_octet7 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) userInformationLayer2Protocol().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) layer2Id().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) extension__octet__7().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(), "userInformationLayer2Protocol")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          userInformationLayer2Protocol().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "layer2Id")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          layer2Id().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_7")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__7().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 @MobileL3_CC_Types.BC_octet7: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    BC__octet7_template* precondition = new BC__octet7_template;
    precondition->set_param(*param.get_elem(0));
    BC__octet7_template* implied_template = new BC__octet7_template;
    implied_template->set_param(*param.get_elem(1));
    *this = BC__octet7_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.BC_octet7");
  }
  is_ifpresent = param.get_ifpresent();
}

void BC__octet7_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_userInformationLayer2Protocol.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet7");
single_value->field_layer2Id.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet7");
single_value->field_extension__octet__7.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet7");
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 : "@MobileL3_CC_Types.BC_octet7");
}

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

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

BC__octet5::BC__octet5()
{
}

BC__octet5::BC__octet5(const BITSTRING& par_signallingAccessProtocol,
    const BITSTRING& par_rateAdaptation,
    const BITSTRING& par_accessId,
    const BITSTRING& par_extension__octet__5,
    const OPTIONAL< BITSTRING >& par_spare2__3,
    const OPTIONAL< BITSTRING >& par_otherRateAdaptation,
    const OPTIONAL< BITSTRING >& par_otherInformationTransferCapability,
    const OPTIONAL< BITSTRING >& par_extension__octet__5a,
    const OPTIONAL< BITSTRING >& par_spare3__1,
    const OPTIONAL< BITSTRING >& par_inbandNegotiation,
    const OPTIONAL< BITSTRING >& par_assignor__assignee,
    const OPTIONAL< BITSTRING >& par_lli,
    const OPTIONAL< BITSTRING >& par_mode,
    const OPTIONAL< BITSTRING >& par_multiframe,
    const OPTIONAL< BITSTRING >& par_hdrNohdr,
    const OPTIONAL< BITSTRING >& par_extension__octet__5b)
  :   field_signallingAccessProtocol(par_signallingAccessProtocol),
  field_rateAdaptation(par_rateAdaptation),
  field_accessId(par_accessId),
  field_extension__octet__5(par_extension__octet__5),
  field_spare2__3(par_spare2__3),
  field_otherRateAdaptation(par_otherRateAdaptation),
  field_otherInformationTransferCapability(par_otherInformationTransferCapability),
  field_extension__octet__5a(par_extension__octet__5a),
  field_spare3__1(par_spare3__1),
  field_inbandNegotiation(par_inbandNegotiation),
  field_assignor__assignee(par_assignor__assignee),
  field_lli(par_lli),
  field_mode(par_mode),
  field_multiframe(par_multiframe),
  field_hdrNohdr(par_hdrNohdr),
  field_extension__octet__5b(par_extension__octet__5b)
{
}

BC__octet5::BC__octet5(const BC__octet5& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.BC_octet5.");
if (other_value.signallingAccessProtocol().is_bound()) field_signallingAccessProtocol = other_value.signallingAccessProtocol();
else field_signallingAccessProtocol.clean_up();
if (other_value.rateAdaptation().is_bound()) field_rateAdaptation = other_value.rateAdaptation();
else field_rateAdaptation.clean_up();
if (other_value.accessId().is_bound()) field_accessId = other_value.accessId();
else field_accessId.clean_up();
if (other_value.extension__octet__5().is_bound()) field_extension__octet__5 = other_value.extension__octet__5();
else field_extension__octet__5.clean_up();
if (other_value.spare2__3().is_bound()) field_spare2__3 = other_value.spare2__3();
else field_spare2__3.clean_up();
if (other_value.otherRateAdaptation().is_bound()) field_otherRateAdaptation = other_value.otherRateAdaptation();
else field_otherRateAdaptation.clean_up();
if (other_value.otherInformationTransferCapability().is_bound()) field_otherInformationTransferCapability = other_value.otherInformationTransferCapability();
else field_otherInformationTransferCapability.clean_up();
if (other_value.extension__octet__5a().is_bound()) field_extension__octet__5a = other_value.extension__octet__5a();
else field_extension__octet__5a.clean_up();
if (other_value.spare3__1().is_bound()) field_spare3__1 = other_value.spare3__1();
else field_spare3__1.clean_up();
if (other_value.inbandNegotiation().is_bound()) field_inbandNegotiation = other_value.inbandNegotiation();
else field_inbandNegotiation.clean_up();
if (other_value.assignor__assignee().is_bound()) field_assignor__assignee = other_value.assignor__assignee();
else field_assignor__assignee.clean_up();
if (other_value.lli().is_bound()) field_lli = other_value.lli();
else field_lli.clean_up();
if (other_value.mode().is_bound()) field_mode = other_value.mode();
else field_mode.clean_up();
if (other_value.multiframe().is_bound()) field_multiframe = other_value.multiframe();
else field_multiframe.clean_up();
if (other_value.hdrNohdr().is_bound()) field_hdrNohdr = other_value.hdrNohdr();
else field_hdrNohdr.clean_up();
if (other_value.extension__octet__5b().is_bound()) field_extension__octet__5b = other_value.extension__octet__5b();
else field_extension__octet__5b.clean_up();
}

void BC__octet5::clean_up()
{
field_signallingAccessProtocol.clean_up();
field_rateAdaptation.clean_up();
field_accessId.clean_up();
field_extension__octet__5.clean_up();
field_spare2__3.clean_up();
field_otherRateAdaptation.clean_up();
field_otherInformationTransferCapability.clean_up();
field_extension__octet__5a.clean_up();
field_spare3__1.clean_up();
field_inbandNegotiation.clean_up();
field_assignor__assignee.clean_up();
field_lli.clean_up();
field_mode.clean_up();
field_multiframe.clean_up();
field_hdrNohdr.clean_up();
field_extension__octet__5b.clean_up();
}

const TTCN_Typedescriptor_t* BC__octet5::get_descriptor() const { return &BC__octet5_descr_; }
BC__octet5& BC__octet5::operator=(const BC__octet5& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.BC_octet5.");
  if (other_value.signallingAccessProtocol().is_bound()) field_signallingAccessProtocol = other_value.signallingAccessProtocol();
  else field_signallingAccessProtocol.clean_up();
  if (other_value.rateAdaptation().is_bound()) field_rateAdaptation = other_value.rateAdaptation();
  else field_rateAdaptation.clean_up();
  if (other_value.accessId().is_bound()) field_accessId = other_value.accessId();
  else field_accessId.clean_up();
  if (other_value.extension__octet__5().is_bound()) field_extension__octet__5 = other_value.extension__octet__5();
  else field_extension__octet__5.clean_up();
  if (other_value.spare2__3().is_bound()) field_spare2__3 = other_value.spare2__3();
  else field_spare2__3.clean_up();
  if (other_value.otherRateAdaptation().is_bound()) field_otherRateAdaptation = other_value.otherRateAdaptation();
  else field_otherRateAdaptation.clean_up();
  if (other_value.otherInformationTransferCapability().is_bound()) field_otherInformationTransferCapability = other_value.otherInformationTransferCapability();
  else field_otherInformationTransferCapability.clean_up();
  if (other_value.extension__octet__5a().is_bound()) field_extension__octet__5a = other_value.extension__octet__5a();
  else field_extension__octet__5a.clean_up();
  if (other_value.spare3__1().is_bound()) field_spare3__1 = other_value.spare3__1();
  else field_spare3__1.clean_up();
  if (other_value.inbandNegotiation().is_bound()) field_inbandNegotiation = other_value.inbandNegotiation();
  else field_inbandNegotiation.clean_up();
  if (other_value.assignor__assignee().is_bound()) field_assignor__assignee = other_value.assignor__assignee();
  else field_assignor__assignee.clean_up();
  if (other_value.lli().is_bound()) field_lli = other_value.lli();
  else field_lli.clean_up();
  if (other_value.mode().is_bound()) field_mode = other_value.mode();
  else field_mode.clean_up();
  if (other_value.multiframe().is_bound()) field_multiframe = other_value.multiframe();
  else field_multiframe.clean_up();
  if (other_value.hdrNohdr().is_bound()) field_hdrNohdr = other_value.hdrNohdr();
  else field_hdrNohdr.clean_up();
  if (other_value.extension__octet__5b().is_bound()) field_extension__octet__5b = other_value.extension__octet__5b();
  else field_extension__octet__5b.clean_up();
}
return *this;
}

boolean BC__octet5::operator==(const BC__octet5& other_value) const
{
return field_signallingAccessProtocol==other_value.field_signallingAccessProtocol
  && field_rateAdaptation==other_value.field_rateAdaptation
  && field_accessId==other_value.field_accessId
  && field_extension__octet__5==other_value.field_extension__octet__5
  && field_spare2__3==other_value.field_spare2__3
  && field_otherRateAdaptation==other_value.field_otherRateAdaptation
  && field_otherInformationTransferCapability==other_value.field_otherInformationTransferCapability
  && field_extension__octet__5a==other_value.field_extension__octet__5a
  && field_spare3__1==other_value.field_spare3__1
  && field_inbandNegotiation==other_value.field_inbandNegotiation
  && field_assignor__assignee==other_value.field_assignor__assignee
  && field_lli==other_value.field_lli
  && field_mode==other_value.field_mode
  && field_multiframe==other_value.field_multiframe
  && field_hdrNohdr==other_value.field_hdrNohdr
  && field_extension__octet__5b==other_value.field_extension__octet__5b;
}

boolean BC__octet5::is_bound() const
{
return (field_signallingAccessProtocol.is_bound())
  || (field_rateAdaptation.is_bound())
  || (field_accessId.is_bound())
  || (field_extension__octet__5.is_bound())
  || (OPTIONAL_OMIT == field_spare2__3.get_selection() || field_spare2__3.is_bound())
  || (OPTIONAL_OMIT == field_otherRateAdaptation.get_selection() || field_otherRateAdaptation.is_bound())
  || (OPTIONAL_OMIT == field_otherInformationTransferCapability.get_selection() || field_otherInformationTransferCapability.is_bound())
  || (OPTIONAL_OMIT == field_extension__octet__5a.get_selection() || field_extension__octet__5a.is_bound())
  || (OPTIONAL_OMIT == field_spare3__1.get_selection() || field_spare3__1.is_bound())
  || (OPTIONAL_OMIT == field_inbandNegotiation.get_selection() || field_inbandNegotiation.is_bound())
  || (OPTIONAL_OMIT == field_assignor__assignee.get_selection() || field_assignor__assignee.is_bound())
  || (OPTIONAL_OMIT == field_lli.get_selection() || field_lli.is_bound())
  || (OPTIONAL_OMIT == field_mode.get_selection() || field_mode.is_bound())
  || (OPTIONAL_OMIT == field_multiframe.get_selection() || field_multiframe.is_bound())
  || (OPTIONAL_OMIT == field_hdrNohdr.get_selection() || field_hdrNohdr.is_bound())
  || (OPTIONAL_OMIT == field_extension__octet__5b.get_selection() || field_extension__octet__5b.is_bound());
}
boolean BC__octet5::is_value() const
{
return field_signallingAccessProtocol.is_value()
  && field_rateAdaptation.is_value()
  && field_accessId.is_value()
  && field_extension__octet__5.is_value()
  && (OPTIONAL_OMIT == field_spare2__3.get_selection() || field_spare2__3.is_value())
  && (OPTIONAL_OMIT == field_otherRateAdaptation.get_selection() || field_otherRateAdaptation.is_value())
  && (OPTIONAL_OMIT == field_otherInformationTransferCapability.get_selection() || field_otherInformationTransferCapability.is_value())
  && (OPTIONAL_OMIT == field_extension__octet__5a.get_selection() || field_extension__octet__5a.is_value())
  && (OPTIONAL_OMIT == field_spare3__1.get_selection() || field_spare3__1.is_value())
  && (OPTIONAL_OMIT == field_inbandNegotiation.get_selection() || field_inbandNegotiation.is_value())
  && (OPTIONAL_OMIT == field_assignor__assignee.get_selection() || field_assignor__assignee.is_value())
  && (OPTIONAL_OMIT == field_lli.get_selection() || field_lli.is_value())
  && (OPTIONAL_OMIT == field_mode.get_selection() || field_mode.is_value())
  && (OPTIONAL_OMIT == field_multiframe.get_selection() || field_multiframe.is_value())
  && (OPTIONAL_OMIT == field_hdrNohdr.get_selection() || field_hdrNohdr.is_value())
  && (OPTIONAL_OMIT == field_extension__octet__5b.get_selection() || field_extension__octet__5b.is_value());
}
int BC__octet5::size_of() const
{
  int ret_val = 4;
  if (field_spare2__3.ispresent()) ret_val++;
  if (field_otherRateAdaptation.ispresent()) ret_val++;
  if (field_otherInformationTransferCapability.ispresent()) ret_val++;
  if (field_extension__octet__5a.ispresent()) ret_val++;
  if (field_spare3__1.ispresent()) ret_val++;
  if (field_inbandNegotiation.ispresent()) ret_val++;
  if (field_assignor__assignee.ispresent()) ret_val++;
  if (field_lli.ispresent()) ret_val++;
  if (field_mode.ispresent()) ret_val++;
  if (field_multiframe.ispresent()) ret_val++;
  if (field_hdrNohdr.ispresent()) ret_val++;
  if (field_extension__octet__5b.ispresent()) ret_val++;
  return ret_val;
}

void BC__octet5::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ signallingAccessProtocol := ");
field_signallingAccessProtocol.log();
TTCN_Logger::log_event_str(", rateAdaptation := ");
field_rateAdaptation.log();
TTCN_Logger::log_event_str(", accessId := ");
field_accessId.log();
TTCN_Logger::log_event_str(", extension_octet_5 := ");
field_extension__octet__5.log();
TTCN_Logger::log_event_str(", spare2_3 := ");
field_spare2__3.log();
TTCN_Logger::log_event_str(", otherRateAdaptation := ");
field_otherRateAdaptation.log();
TTCN_Logger::log_event_str(", otherInformationTransferCapability := ");
field_otherInformationTransferCapability.log();
TTCN_Logger::log_event_str(", extension_octet_5a := ");
field_extension__octet__5a.log();
TTCN_Logger::log_event_str(", spare3_1 := ");
field_spare3__1.log();
TTCN_Logger::log_event_str(", inbandNegotiation := ");
field_inbandNegotiation.log();
TTCN_Logger::log_event_str(", assignor_assignee := ");
field_assignor__assignee.log();
TTCN_Logger::log_event_str(", lli := ");
field_lli.log();
TTCN_Logger::log_event_str(", mode := ");
field_mode.log();
TTCN_Logger::log_event_str(", multiframe := ");
field_multiframe.log();
TTCN_Logger::log_event_str(", hdrNohdr := ");
field_hdrNohdr.log();
TTCN_Logger::log_event_str(", extension_octet_5b := ");
field_extension__octet__5b.log();
TTCN_Logger::log_event_str(" }");
}

void BC__octet5::set_implicit_omit()
{
if (signallingAccessProtocol().is_bound()) signallingAccessProtocol().set_implicit_omit();
if (rateAdaptation().is_bound()) rateAdaptation().set_implicit_omit();
if (accessId().is_bound()) accessId().set_implicit_omit();
if (extension__octet__5().is_bound()) extension__octet__5().set_implicit_omit();
if (!spare2__3().is_bound()) spare2__3() = OMIT_VALUE;
else spare2__3().set_implicit_omit();
if (!otherRateAdaptation().is_bound()) otherRateAdaptation() = OMIT_VALUE;
else otherRateAdaptation().set_implicit_omit();
if (!otherInformationTransferCapability().is_bound()) otherInformationTransferCapability() = OMIT_VALUE;
else otherInformationTransferCapability().set_implicit_omit();
if (!extension__octet__5a().is_bound()) extension__octet__5a() = OMIT_VALUE;
else extension__octet__5a().set_implicit_omit();
if (!spare3__1().is_bound()) spare3__1() = OMIT_VALUE;
else spare3__1().set_implicit_omit();
if (!inbandNegotiation().is_bound()) inbandNegotiation() = OMIT_VALUE;
else inbandNegotiation().set_implicit_omit();
if (!assignor__assignee().is_bound()) assignor__assignee() = OMIT_VALUE;
else assignor__assignee().set_implicit_omit();
if (!lli().is_bound()) lli() = OMIT_VALUE;
else lli().set_implicit_omit();
if (!mode().is_bound()) mode() = OMIT_VALUE;
else mode().set_implicit_omit();
if (!multiframe().is_bound()) multiframe() = OMIT_VALUE;
else multiframe().set_implicit_omit();
if (!hdrNohdr().is_bound()) hdrNohdr() = OMIT_VALUE;
else hdrNohdr().set_implicit_omit();
if (!extension__octet__5b().is_bound()) extension__octet__5b() = OMIT_VALUE;
else extension__octet__5b().set_implicit_omit();
}

void BC__octet5::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 (16<param.get_size()) {
      param.error("record value of type @MobileL3_CC_Types.BC_octet5 has 16 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) signallingAccessProtocol().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) rateAdaptation().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) accessId().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) extension__octet__5().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) spare2__3().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) otherRateAdaptation().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) otherInformationTransferCapability().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) extension__octet__5a().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) spare3__1().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) inbandNegotiation().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) assignor__assignee().set_param(*param.get_elem(10));
    if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) lli().set_param(*param.get_elem(11));
    if (param.get_size()>12 && param.get_elem(12)->get_type()!=Module_Param::MP_NotUsed) mode().set_param(*param.get_elem(12));
    if (param.get_size()>13 && param.get_elem(13)->get_type()!=Module_Param::MP_NotUsed) multiframe().set_param(*param.get_elem(13));
    if (param.get_size()>14 && param.get_elem(14)->get_type()!=Module_Param::MP_NotUsed) hdrNohdr().set_param(*param.get_elem(14));
    if (param.get_size()>15 && param.get_elem(15)->get_type()!=Module_Param::MP_NotUsed) extension__octet__5b().set_param(*param.get_elem(15));
    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(), "signallingAccessProtocol")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          signallingAccessProtocol().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rateAdaptation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rateAdaptation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "accessId")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          accessId().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_5")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__5().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare2__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "otherRateAdaptation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          otherRateAdaptation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "otherInformationTransferCapability")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          otherInformationTransferCapability().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_5a")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__5a().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare3_1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare3__1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "inbandNegotiation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          inbandNegotiation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "assignor_assignee")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          assignor__assignee().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lli")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lli().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mode")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mode().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "multiframe")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          multiframe().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "hdrNohdr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          hdrNohdr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_5b")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__5b().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 @MobileL3_CC_Types.BC_octet5: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.BC_octet5");
  }
}

void BC__octet5::encode_text(Text_Buf& text_buf) const
{
field_signallingAccessProtocol.encode_text(text_buf);
field_rateAdaptation.encode_text(text_buf);
field_accessId.encode_text(text_buf);
field_extension__octet__5.encode_text(text_buf);
field_spare2__3.encode_text(text_buf);
field_otherRateAdaptation.encode_text(text_buf);
field_otherInformationTransferCapability.encode_text(text_buf);
field_extension__octet__5a.encode_text(text_buf);
field_spare3__1.encode_text(text_buf);
field_inbandNegotiation.encode_text(text_buf);
field_assignor__assignee.encode_text(text_buf);
field_lli.encode_text(text_buf);
field_mode.encode_text(text_buf);
field_multiframe.encode_text(text_buf);
field_hdrNohdr.encode_text(text_buf);
field_extension__octet__5b.encode_text(text_buf);
}

void BC__octet5::decode_text(Text_Buf& text_buf)
{
field_signallingAccessProtocol.decode_text(text_buf);
field_rateAdaptation.decode_text(text_buf);
field_accessId.decode_text(text_buf);
field_extension__octet__5.decode_text(text_buf);
field_spare2__3.decode_text(text_buf);
field_otherRateAdaptation.decode_text(text_buf);
field_otherInformationTransferCapability.decode_text(text_buf);
field_extension__octet__5a.decode_text(text_buf);
field_spare3__1.decode_text(text_buf);
field_inbandNegotiation.decode_text(text_buf);
field_assignor__assignee.decode_text(text_buf);
field_lli.decode_text(text_buf);
field_mode.decode_text(text_buf);
field_multiframe.decode_text(text_buf);
field_hdrNohdr.decode_text(text_buf);
field_extension__octet__5b.decode_text(text_buf);
}

void BC__octet5::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 BC__octet5::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 BC__octet5::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;
  {
  cbyte* data=p_buf.get_read_data();
  int count=1;
  unsigned mask = 1 << (local_top_order==ORDER_LSB ? 0 : 7);
  if(p_td.raw->extension_bit==EXT_BIT_YES){
    while((data[count-1] & mask)==0 && count*8<(int)limit) count++;
  }
  else{
    while((data[count-1] & mask)!=0 && count*8<(int)limit) count++;
  }
  if(limit) limit=count*8;
  }
  RAW_Force_Omit field_0_force_omit(0, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_signallingAccessProtocol.RAW_decode(General__Types::BIT3_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, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_rateAdaptation.RAW_decode(General__Types::BIT2_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, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_accessId.RAW_decode(General__Types::BIT2_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__5.RAW_decode(General__Types::BIT1_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());
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_spare2__3 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_spare2__3().RAW_decode(General__Types::BIT3_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_spare2__3 = 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_spare2__3=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_otherRateAdaptation = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_otherRateAdaptation().RAW_decode(General__Types::BIT2_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_otherRateAdaptation = 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_otherRateAdaptation=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_otherInformationTransferCapability = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_otherInformationTransferCapability().RAW_decode(General__Types::BIT2_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_otherInformationTransferCapability = 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_otherInformationTransferCapability=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(7)) {
    field_extension__octet__5a = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_7_force_omit(7, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__5a().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 1) {
  field_extension__octet__5a = 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_extension__octet__5a=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(8)) {
    field_spare3__1 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_8_force_omit(8, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_spare3__1().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_8_force_omit);
  if (decoded_field_length < 1) {
  field_spare3__1 = 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_spare3__1=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(9)) {
    field_inbandNegotiation = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_9_force_omit(9, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_inbandNegotiation().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_9_force_omit);
  if (decoded_field_length < 1) {
  field_inbandNegotiation = 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_inbandNegotiation=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(10)) {
    field_assignor__assignee = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_10_force_omit(10, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_assignor__assignee().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_10_force_omit);
  if (decoded_field_length < 1) {
  field_assignor__assignee = 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_assignor__assignee=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(11)) {
    field_lli = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_11_force_omit(11, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_lli().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_11_force_omit);
  if (decoded_field_length < 1) {
  field_lli = 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_lli=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(12)) {
    field_mode = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_12_force_omit(12, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_mode().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_12_force_omit);
  if (decoded_field_length < 1) {
  field_mode = 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_mode=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(13)) {
    field_multiframe = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_13_force_omit(13, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_multiframe().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_13_force_omit);
  if (decoded_field_length < 1) {
  field_multiframe = 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_multiframe=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(14)) {
    field_hdrNohdr = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_14_force_omit(14, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_hdrNohdr().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_14_force_omit);
  if (decoded_field_length < 1) {
  field_hdrNohdr = 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_hdrNohdr=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(15)) {
    field_extension__octet__5b = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_15_force_omit(15, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__5b().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_15_force_omit);
  if (decoded_field_length < 1) {
  field_extension__octet__5b = 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_extension__octet__5b=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int BC__octet5::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 = 16;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(16);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, General__Types::BIT3_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT1_descr_.raw);
  if (field_spare2__3.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT3_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_otherRateAdaptation.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, General__Types::BIT2_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_otherInformationTransferCapability.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, General__Types::BIT2_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  if (field_extension__octet__5a.ispresent()) {
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[7] = NULL;
  if (field_spare3__1.ispresent()) {
  myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 8, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[8] = NULL;
  if (field_inbandNegotiation.ispresent()) {
  myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 9, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[9] = NULL;
  if (field_assignor__assignee.ispresent()) {
  myleaf.body.node.nodes[10] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 10, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[10] = NULL;
  if (field_lli.ispresent()) {
  myleaf.body.node.nodes[11] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 11, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[11] = NULL;
  if (field_mode.ispresent()) {
  myleaf.body.node.nodes[12] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 12, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[12] = NULL;
  if (field_multiframe.ispresent()) {
  myleaf.body.node.nodes[13] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 13, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[13] = NULL;
  if (field_hdrNohdr.ispresent()) {
  myleaf.body.node.nodes[14] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 14, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[14] = NULL;
  if (field_extension__octet__5b.ispresent()) {
  myleaf.body.node.nodes[15] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 15, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[15] = NULL;
  encoded_length += field_signallingAccessProtocol.RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_rateAdaptation.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_accessId.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_extension__octet__5.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[3]);
  if (field_spare2__3.ispresent()) {
  encoded_length += field_spare2__3().RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_otherRateAdaptation.ispresent()) {
  encoded_length += field_otherRateAdaptation().RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_otherInformationTransferCapability.ispresent()) {
  encoded_length += field_otherInformationTransferCapability().RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[6]);
  }
  if (field_extension__octet__5a.ispresent()) {
  encoded_length += field_extension__octet__5a().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[7]);
  }
  if (field_spare3__1.ispresent()) {
  encoded_length += field_spare3__1().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[8]);
  }
  if (field_inbandNegotiation.ispresent()) {
  encoded_length += field_inbandNegotiation().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[9]);
  }
  if (field_assignor__assignee.ispresent()) {
  encoded_length += field_assignor__assignee().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[10]);
  }
  if (field_lli.ispresent()) {
  encoded_length += field_lli().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[11]);
  }
  if (field_mode.ispresent()) {
  encoded_length += field_mode().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[12]);
  }
  if (field_multiframe.ispresent()) {
  encoded_length += field_multiframe().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[13]);
  }
  if (field_hdrNohdr.ispresent()) {
  encoded_length += field_hdrNohdr().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[14]);
  }
  if (field_extension__octet__5b.ispresent()) {
  encoded_length += field_extension__octet__5b().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[15]);
  }
  return myleaf.length = encoded_length;
}

struct BC__octet5_template::single_value_struct {
BITSTRING_template field_signallingAccessProtocol;
BITSTRING_template field_rateAdaptation;
BITSTRING_template field_accessId;
BITSTRING_template field_extension__octet__5;
BITSTRING_template field_spare2__3;
BITSTRING_template field_otherRateAdaptation;
BITSTRING_template field_otherInformationTransferCapability;
BITSTRING_template field_extension__octet__5a;
BITSTRING_template field_spare3__1;
BITSTRING_template field_inbandNegotiation;
BITSTRING_template field_assignor__assignee;
BITSTRING_template field_lli;
BITSTRING_template field_mode;
BITSTRING_template field_multiframe;
BITSTRING_template field_hdrNohdr;
BITSTRING_template field_extension__octet__5b;
};

void BC__octet5_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_signallingAccessProtocol = ANY_VALUE;
single_value->field_rateAdaptation = ANY_VALUE;
single_value->field_accessId = ANY_VALUE;
single_value->field_extension__octet__5 = ANY_VALUE;
single_value->field_spare2__3 = ANY_OR_OMIT;
single_value->field_otherRateAdaptation = ANY_OR_OMIT;
single_value->field_otherInformationTransferCapability = ANY_OR_OMIT;
single_value->field_extension__octet__5a = ANY_OR_OMIT;
single_value->field_spare3__1 = ANY_OR_OMIT;
single_value->field_inbandNegotiation = ANY_OR_OMIT;
single_value->field_assignor__assignee = ANY_OR_OMIT;
single_value->field_lli = ANY_OR_OMIT;
single_value->field_mode = ANY_OR_OMIT;
single_value->field_multiframe = ANY_OR_OMIT;
single_value->field_hdrNohdr = ANY_OR_OMIT;
single_value->field_extension__octet__5b = ANY_OR_OMIT;
}
}
}

void BC__octet5_template::copy_value(const BC__octet5& other_value)
{
single_value = new single_value_struct;
if (other_value.signallingAccessProtocol().is_bound()) {
  single_value->field_signallingAccessProtocol = other_value.signallingAccessProtocol();
} else {
  single_value->field_signallingAccessProtocol.clean_up();
}
if (other_value.rateAdaptation().is_bound()) {
  single_value->field_rateAdaptation = other_value.rateAdaptation();
} else {
  single_value->field_rateAdaptation.clean_up();
}
if (other_value.accessId().is_bound()) {
  single_value->field_accessId = other_value.accessId();
} else {
  single_value->field_accessId.clean_up();
}
if (other_value.extension__octet__5().is_bound()) {
  single_value->field_extension__octet__5 = other_value.extension__octet__5();
} else {
  single_value->field_extension__octet__5.clean_up();
}
if (other_value.spare2__3().is_bound()) {
  if (other_value.spare2__3().ispresent()) single_value->field_spare2__3 = other_value.spare2__3()();
  else single_value->field_spare2__3 = OMIT_VALUE;
} else {
  single_value->field_spare2__3.clean_up();
}
if (other_value.otherRateAdaptation().is_bound()) {
  if (other_value.otherRateAdaptation().ispresent()) single_value->field_otherRateAdaptation = other_value.otherRateAdaptation()();
  else single_value->field_otherRateAdaptation = OMIT_VALUE;
} else {
  single_value->field_otherRateAdaptation.clean_up();
}
if (other_value.otherInformationTransferCapability().is_bound()) {
  if (other_value.otherInformationTransferCapability().ispresent()) single_value->field_otherInformationTransferCapability = other_value.otherInformationTransferCapability()();
  else single_value->field_otherInformationTransferCapability = OMIT_VALUE;
} else {
  single_value->field_otherInformationTransferCapability.clean_up();
}
if (other_value.extension__octet__5a().is_bound()) {
  if (other_value.extension__octet__5a().ispresent()) single_value->field_extension__octet__5a = other_value.extension__octet__5a()();
  else single_value->field_extension__octet__5a = OMIT_VALUE;
} else {
  single_value->field_extension__octet__5a.clean_up();
}
if (other_value.spare3__1().is_bound()) {
  if (other_value.spare3__1().ispresent()) single_value->field_spare3__1 = other_value.spare3__1()();
  else single_value->field_spare3__1 = OMIT_VALUE;
} else {
  single_value->field_spare3__1.clean_up();
}
if (other_value.inbandNegotiation().is_bound()) {
  if (other_value.inbandNegotiation().ispresent()) single_value->field_inbandNegotiation = other_value.inbandNegotiation()();
  else single_value->field_inbandNegotiation = OMIT_VALUE;
} else {
  single_value->field_inbandNegotiation.clean_up();
}
if (other_value.assignor__assignee().is_bound()) {
  if (other_value.assignor__assignee().ispresent()) single_value->field_assignor__assignee = other_value.assignor__assignee()();
  else single_value->field_assignor__assignee = OMIT_VALUE;
} else {
  single_value->field_assignor__assignee.clean_up();
}
if (other_value.lli().is_bound()) {
  if (other_value.lli().ispresent()) single_value->field_lli = other_value.lli()();
  else single_value->field_lli = OMIT_VALUE;
} else {
  single_value->field_lli.clean_up();
}
if (other_value.mode().is_bound()) {
  if (other_value.mode().ispresent()) single_value->field_mode = other_value.mode()();
  else single_value->field_mode = OMIT_VALUE;
} else {
  single_value->field_mode.clean_up();
}
if (other_value.multiframe().is_bound()) {
  if (other_value.multiframe().ispresent()) single_value->field_multiframe = other_value.multiframe()();
  else single_value->field_multiframe = OMIT_VALUE;
} else {
  single_value->field_multiframe.clean_up();
}
if (other_value.hdrNohdr().is_bound()) {
  if (other_value.hdrNohdr().ispresent()) single_value->field_hdrNohdr = other_value.hdrNohdr()();
  else single_value->field_hdrNohdr = OMIT_VALUE;
} else {
  single_value->field_hdrNohdr.clean_up();
}
if (other_value.extension__octet__5b().is_bound()) {
  if (other_value.extension__octet__5b().ispresent()) single_value->field_extension__octet__5b = other_value.extension__octet__5b()();
  else single_value->field_extension__octet__5b = OMIT_VALUE;
} else {
  single_value->field_extension__octet__5b.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void BC__octet5_template::copy_template(const BC__octet5_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.signallingAccessProtocol().get_selection()) {
single_value->field_signallingAccessProtocol = other_value.signallingAccessProtocol();
} else {
single_value->field_signallingAccessProtocol.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.rateAdaptation().get_selection()) {
single_value->field_rateAdaptation = other_value.rateAdaptation();
} else {
single_value->field_rateAdaptation.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.accessId().get_selection()) {
single_value->field_accessId = other_value.accessId();
} else {
single_value->field_accessId.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__5().get_selection()) {
single_value->field_extension__octet__5 = other_value.extension__octet__5();
} else {
single_value->field_extension__octet__5.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare2__3().get_selection()) {
single_value->field_spare2__3 = other_value.spare2__3();
} else {
single_value->field_spare2__3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.otherRateAdaptation().get_selection()) {
single_value->field_otherRateAdaptation = other_value.otherRateAdaptation();
} else {
single_value->field_otherRateAdaptation.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.otherInformationTransferCapability().get_selection()) {
single_value->field_otherInformationTransferCapability = other_value.otherInformationTransferCapability();
} else {
single_value->field_otherInformationTransferCapability.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__5a().get_selection()) {
single_value->field_extension__octet__5a = other_value.extension__octet__5a();
} else {
single_value->field_extension__octet__5a.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare3__1().get_selection()) {
single_value->field_spare3__1 = other_value.spare3__1();
} else {
single_value->field_spare3__1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.inbandNegotiation().get_selection()) {
single_value->field_inbandNegotiation = other_value.inbandNegotiation();
} else {
single_value->field_inbandNegotiation.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.assignor__assignee().get_selection()) {
single_value->field_assignor__assignee = other_value.assignor__assignee();
} else {
single_value->field_assignor__assignee.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lli().get_selection()) {
single_value->field_lli = other_value.lli();
} else {
single_value->field_lli.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mode().get_selection()) {
single_value->field_mode = other_value.mode();
} else {
single_value->field_mode.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.multiframe().get_selection()) {
single_value->field_multiframe = other_value.multiframe();
} else {
single_value->field_multiframe.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.hdrNohdr().get_selection()) {
single_value->field_hdrNohdr = other_value.hdrNohdr();
} else {
single_value->field_hdrNohdr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__5b().get_selection()) {
single_value->field_extension__octet__5b = other_value.extension__octet__5b();
} else {
single_value->field_extension__octet__5b.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 BC__octet5_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 BC__octet5_template(*other_value.implication_.precondition);
implication_.implied_template = new BC__octet5_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 @MobileL3_CC_Types.BC_octet5.");
break;
}
set_selection(other_value);
}

BC__octet5_template::BC__octet5_template()
{
}

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

BC__octet5_template::BC__octet5_template(const BC__octet5& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean BC__octet5_template::match(const BC__octet5& 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.signallingAccessProtocol().is_bound()) return FALSE;
if(!single_value->field_signallingAccessProtocol.match(other_value.signallingAccessProtocol(), legacy))return FALSE;
if(!other_value.rateAdaptation().is_bound()) return FALSE;
if(!single_value->field_rateAdaptation.match(other_value.rateAdaptation(), legacy))return FALSE;
if(!other_value.accessId().is_bound()) return FALSE;
if(!single_value->field_accessId.match(other_value.accessId(), legacy))return FALSE;
if(!other_value.extension__octet__5().is_bound()) return FALSE;
if(!single_value->field_extension__octet__5.match(other_value.extension__octet__5(), legacy))return FALSE;
if(!other_value.spare2__3().is_bound()) return FALSE;
if((other_value.spare2__3().ispresent() ? !single_value->field_spare2__3.match((const BITSTRING&)other_value.spare2__3(), legacy) : !single_value->field_spare2__3.match_omit(legacy)))return FALSE;
if(!other_value.otherRateAdaptation().is_bound()) return FALSE;
if((other_value.otherRateAdaptation().ispresent() ? !single_value->field_otherRateAdaptation.match((const BITSTRING&)other_value.otherRateAdaptation(), legacy) : !single_value->field_otherRateAdaptation.match_omit(legacy)))return FALSE;
if(!other_value.otherInformationTransferCapability().is_bound()) return FALSE;
if((other_value.otherInformationTransferCapability().ispresent() ? !single_value->field_otherInformationTransferCapability.match((const BITSTRING&)other_value.otherInformationTransferCapability(), legacy) : !single_value->field_otherInformationTransferCapability.match_omit(legacy)))return FALSE;
if(!other_value.extension__octet__5a().is_bound()) return FALSE;
if((other_value.extension__octet__5a().ispresent() ? !single_value->field_extension__octet__5a.match((const BITSTRING&)other_value.extension__octet__5a(), legacy) : !single_value->field_extension__octet__5a.match_omit(legacy)))return FALSE;
if(!other_value.spare3__1().is_bound()) return FALSE;
if((other_value.spare3__1().ispresent() ? !single_value->field_spare3__1.match((const BITSTRING&)other_value.spare3__1(), legacy) : !single_value->field_spare3__1.match_omit(legacy)))return FALSE;
if(!other_value.inbandNegotiation().is_bound()) return FALSE;
if((other_value.inbandNegotiation().ispresent() ? !single_value->field_inbandNegotiation.match((const BITSTRING&)other_value.inbandNegotiation(), legacy) : !single_value->field_inbandNegotiation.match_omit(legacy)))return FALSE;
if(!other_value.assignor__assignee().is_bound()) return FALSE;
if((other_value.assignor__assignee().ispresent() ? !single_value->field_assignor__assignee.match((const BITSTRING&)other_value.assignor__assignee(), legacy) : !single_value->field_assignor__assignee.match_omit(legacy)))return FALSE;
if(!other_value.lli().is_bound()) return FALSE;
if((other_value.lli().ispresent() ? !single_value->field_lli.match((const BITSTRING&)other_value.lli(), legacy) : !single_value->field_lli.match_omit(legacy)))return FALSE;
if(!other_value.mode().is_bound()) return FALSE;
if((other_value.mode().ispresent() ? !single_value->field_mode.match((const BITSTRING&)other_value.mode(), legacy) : !single_value->field_mode.match_omit(legacy)))return FALSE;
if(!other_value.multiframe().is_bound()) return FALSE;
if((other_value.multiframe().ispresent() ? !single_value->field_multiframe.match((const BITSTRING&)other_value.multiframe(), legacy) : !single_value->field_multiframe.match_omit(legacy)))return FALSE;
if(!other_value.hdrNohdr().is_bound()) return FALSE;
if((other_value.hdrNohdr().ispresent() ? !single_value->field_hdrNohdr.match((const BITSTRING&)other_value.hdrNohdr(), legacy) : !single_value->field_hdrNohdr.match_omit(legacy)))return FALSE;
if(!other_value.extension__octet__5b().is_bound()) return FALSE;
if((other_value.extension__octet__5b().ispresent() ? !single_value->field_extension__octet__5b.match((const BITSTRING&)other_value.extension__octet__5b(), legacy) : !single_value->field_extension__octet__5b.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 @MobileL3_CC_Types.BC_octet5.");
}
return FALSE;
}

boolean BC__octet5_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_signallingAccessProtocol.is_bound()
 || single_value->field_rateAdaptation.is_bound()
 || single_value->field_accessId.is_bound()
 || single_value->field_extension__octet__5.is_bound()
 || (single_value->field_spare2__3.is_omit() || single_value->field_spare2__3.is_bound())
 || (single_value->field_otherRateAdaptation.is_omit() || single_value->field_otherRateAdaptation.is_bound())
 || (single_value->field_otherInformationTransferCapability.is_omit() || single_value->field_otherInformationTransferCapability.is_bound())
 || (single_value->field_extension__octet__5a.is_omit() || single_value->field_extension__octet__5a.is_bound())
 || (single_value->field_spare3__1.is_omit() || single_value->field_spare3__1.is_bound())
 || (single_value->field_inbandNegotiation.is_omit() || single_value->field_inbandNegotiation.is_bound())
 || (single_value->field_assignor__assignee.is_omit() || single_value->field_assignor__assignee.is_bound())
 || (single_value->field_lli.is_omit() || single_value->field_lli.is_bound())
 || (single_value->field_mode.is_omit() || single_value->field_mode.is_bound())
 || (single_value->field_multiframe.is_omit() || single_value->field_multiframe.is_bound())
 || (single_value->field_hdrNohdr.is_omit() || single_value->field_hdrNohdr.is_bound())
 || (single_value->field_extension__octet__5b.is_omit() || single_value->field_extension__octet__5b.is_bound());
}

boolean BC__octet5_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_signallingAccessProtocol.is_value()
 && single_value->field_rateAdaptation.is_value()
 && single_value->field_accessId.is_value()
 && single_value->field_extension__octet__5.is_value()
 && (single_value->field_spare2__3.is_omit() || single_value->field_spare2__3.is_value())
 && (single_value->field_otherRateAdaptation.is_omit() || single_value->field_otherRateAdaptation.is_value())
 && (single_value->field_otherInformationTransferCapability.is_omit() || single_value->field_otherInformationTransferCapability.is_value())
 && (single_value->field_extension__octet__5a.is_omit() || single_value->field_extension__octet__5a.is_value())
 && (single_value->field_spare3__1.is_omit() || single_value->field_spare3__1.is_value())
 && (single_value->field_inbandNegotiation.is_omit() || single_value->field_inbandNegotiation.is_value())
 && (single_value->field_assignor__assignee.is_omit() || single_value->field_assignor__assignee.is_value())
 && (single_value->field_lli.is_omit() || single_value->field_lli.is_value())
 && (single_value->field_mode.is_omit() || single_value->field_mode.is_value())
 && (single_value->field_multiframe.is_omit() || single_value->field_multiframe.is_value())
 && (single_value->field_hdrNohdr.is_omit() || single_value->field_hdrNohdr.is_value())
 && (single_value->field_extension__octet__5b.is_omit() || single_value->field_extension__octet__5b.is_value());
}

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

BC__octet5 BC__octet5_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 @MobileL3_CC_Types.BC_octet5.");
BC__octet5 ret_val;
if (single_value->field_signallingAccessProtocol.is_bound()) {
ret_val.signallingAccessProtocol() = single_value->field_signallingAccessProtocol.valueof();
}
if (single_value->field_rateAdaptation.is_bound()) {
ret_val.rateAdaptation() = single_value->field_rateAdaptation.valueof();
}
if (single_value->field_accessId.is_bound()) {
ret_val.accessId() = single_value->field_accessId.valueof();
}
if (single_value->field_extension__octet__5.is_bound()) {
ret_val.extension__octet__5() = single_value->field_extension__octet__5.valueof();
}
if (single_value->field_spare2__3.is_omit()) ret_val.spare2__3() = OMIT_VALUE;
else if (single_value->field_spare2__3.is_bound()) {
ret_val.spare2__3() = single_value->field_spare2__3.valueof();
}
if (single_value->field_otherRateAdaptation.is_omit()) ret_val.otherRateAdaptation() = OMIT_VALUE;
else if (single_value->field_otherRateAdaptation.is_bound()) {
ret_val.otherRateAdaptation() = single_value->field_otherRateAdaptation.valueof();
}
if (single_value->field_otherInformationTransferCapability.is_omit()) ret_val.otherInformationTransferCapability() = OMIT_VALUE;
else if (single_value->field_otherInformationTransferCapability.is_bound()) {
ret_val.otherInformationTransferCapability() = single_value->field_otherInformationTransferCapability.valueof();
}
if (single_value->field_extension__octet__5a.is_omit()) ret_val.extension__octet__5a() = OMIT_VALUE;
else if (single_value->field_extension__octet__5a.is_bound()) {
ret_val.extension__octet__5a() = single_value->field_extension__octet__5a.valueof();
}
if (single_value->field_spare3__1.is_omit()) ret_val.spare3__1() = OMIT_VALUE;
else if (single_value->field_spare3__1.is_bound()) {
ret_val.spare3__1() = single_value->field_spare3__1.valueof();
}
if (single_value->field_inbandNegotiation.is_omit()) ret_val.inbandNegotiation() = OMIT_VALUE;
else if (single_value->field_inbandNegotiation.is_bound()) {
ret_val.inbandNegotiation() = single_value->field_inbandNegotiation.valueof();
}
if (single_value->field_assignor__assignee.is_omit()) ret_val.assignor__assignee() = OMIT_VALUE;
else if (single_value->field_assignor__assignee.is_bound()) {
ret_val.assignor__assignee() = single_value->field_assignor__assignee.valueof();
}
if (single_value->field_lli.is_omit()) ret_val.lli() = OMIT_VALUE;
else if (single_value->field_lli.is_bound()) {
ret_val.lli() = single_value->field_lli.valueof();
}
if (single_value->field_mode.is_omit()) ret_val.mode() = OMIT_VALUE;
else if (single_value->field_mode.is_bound()) {
ret_val.mode() = single_value->field_mode.valueof();
}
if (single_value->field_multiframe.is_omit()) ret_val.multiframe() = OMIT_VALUE;
else if (single_value->field_multiframe.is_bound()) {
ret_val.multiframe() = single_value->field_multiframe.valueof();
}
if (single_value->field_hdrNohdr.is_omit()) ret_val.hdrNohdr() = OMIT_VALUE;
else if (single_value->field_hdrNohdr.is_bound()) {
ret_val.hdrNohdr() = single_value->field_hdrNohdr.valueof();
}
if (single_value->field_extension__octet__5b.is_omit()) ret_val.extension__octet__5b() = OMIT_VALUE;
else if (single_value->field_extension__octet__5b.is_bound()) {
ret_val.extension__octet__5b() = single_value->field_extension__octet__5b.valueof();
}
return ret_val;
}

void BC__octet5_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 @MobileL3_CC_Types.BC_octet5.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new BC__octet5_template[list_length];
}

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

BITSTRING_template& BC__octet5_template::signallingAccessProtocol()
{
set_specific();
return single_value->field_signallingAccessProtocol;
}

const BITSTRING_template& BC__octet5_template::signallingAccessProtocol() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field signallingAccessProtocol of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_signallingAccessProtocol;
}

BITSTRING_template& BC__octet5_template::rateAdaptation()
{
set_specific();
return single_value->field_rateAdaptation;
}

const BITSTRING_template& BC__octet5_template::rateAdaptation() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field rateAdaptation of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_rateAdaptation;
}

BITSTRING_template& BC__octet5_template::accessId()
{
set_specific();
return single_value->field_accessId;
}

const BITSTRING_template& BC__octet5_template::accessId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field accessId of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_accessId;
}

BITSTRING_template& BC__octet5_template::extension__octet__5()
{
set_specific();
return single_value->field_extension__octet__5;
}

const BITSTRING_template& BC__octet5_template::extension__octet__5() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_5 of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_extension__octet__5;
}

BITSTRING_template& BC__octet5_template::spare2__3()
{
set_specific();
return single_value->field_spare2__3;
}

const BITSTRING_template& BC__octet5_template::spare2__3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare2_3 of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_spare2__3;
}

BITSTRING_template& BC__octet5_template::otherRateAdaptation()
{
set_specific();
return single_value->field_otherRateAdaptation;
}

const BITSTRING_template& BC__octet5_template::otherRateAdaptation() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field otherRateAdaptation of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_otherRateAdaptation;
}

BITSTRING_template& BC__octet5_template::otherInformationTransferCapability()
{
set_specific();
return single_value->field_otherInformationTransferCapability;
}

const BITSTRING_template& BC__octet5_template::otherInformationTransferCapability() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field otherInformationTransferCapability of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_otherInformationTransferCapability;
}

BITSTRING_template& BC__octet5_template::extension__octet__5a()
{
set_specific();
return single_value->field_extension__octet__5a;
}

const BITSTRING_template& BC__octet5_template::extension__octet__5a() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_5a of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_extension__octet__5a;
}

BITSTRING_template& BC__octet5_template::spare3__1()
{
set_specific();
return single_value->field_spare3__1;
}

const BITSTRING_template& BC__octet5_template::spare3__1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare3_1 of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_spare3__1;
}

BITSTRING_template& BC__octet5_template::inbandNegotiation()
{
set_specific();
return single_value->field_inbandNegotiation;
}

const BITSTRING_template& BC__octet5_template::inbandNegotiation() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field inbandNegotiation of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_inbandNegotiation;
}

BITSTRING_template& BC__octet5_template::assignor__assignee()
{
set_specific();
return single_value->field_assignor__assignee;
}

const BITSTRING_template& BC__octet5_template::assignor__assignee() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field assignor_assignee of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_assignor__assignee;
}

BITSTRING_template& BC__octet5_template::lli()
{
set_specific();
return single_value->field_lli;
}

const BITSTRING_template& BC__octet5_template::lli() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lli of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_lli;
}

BITSTRING_template& BC__octet5_template::mode()
{
set_specific();
return single_value->field_mode;
}

const BITSTRING_template& BC__octet5_template::mode() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mode of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_mode;
}

BITSTRING_template& BC__octet5_template::multiframe()
{
set_specific();
return single_value->field_multiframe;
}

const BITSTRING_template& BC__octet5_template::multiframe() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field multiframe of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_multiframe;
}

BITSTRING_template& BC__octet5_template::hdrNohdr()
{
set_specific();
return single_value->field_hdrNohdr;
}

const BITSTRING_template& BC__octet5_template::hdrNohdr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field hdrNohdr of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_hdrNohdr;
}

BITSTRING_template& BC__octet5_template::extension__octet__5b()
{
set_specific();
return single_value->field_extension__octet__5b;
}

const BITSTRING_template& BC__octet5_template::extension__octet__5b() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_5b of a non-specific template of type @MobileL3_CC_Types.BC_octet5.");
return single_value->field_extension__octet__5b;
}

int BC__octet5_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @MobileL3_CC_Types.BC_octet5 which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
  {    int ret_val = 4;
      if (single_value->field_spare2__3.is_present()) ret_val++;
      if (single_value->field_otherRateAdaptation.is_present()) ret_val++;
      if (single_value->field_otherInformationTransferCapability.is_present()) ret_val++;
      if (single_value->field_extension__octet__5a.is_present()) ret_val++;
      if (single_value->field_spare3__1.is_present()) ret_val++;
      if (single_value->field_inbandNegotiation.is_present()) ret_val++;
      if (single_value->field_assignor__assignee.is_present()) ret_val++;
      if (single_value->field_lli.is_present()) ret_val++;
      if (single_value->field_mode.is_present()) ret_val++;
      if (single_value->field_multiframe.is_present()) ret_val++;
      if (single_value->field_hdrNohdr.is_present()) ret_val++;
      if (single_value->field_extension__octet__5b.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 @MobileL3_CC_Types.BC_octet5 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 @MobileL3_CC_Types.BC_octet5 containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_CC_Types.BC_octet5 containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_CC_Types.BC_octet5 containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_CC_Types.BC_octet5 containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_CC_Types.BC_octet5 containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_CC_Types.BC_octet5 containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_CC_Types.BC_octet5 containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @MobileL3_CC_Types.BC_octet5.");
  }
  return 0;
}

void BC__octet5_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ signallingAccessProtocol := ");
single_value->field_signallingAccessProtocol.log();
TTCN_Logger::log_event_str(", rateAdaptation := ");
single_value->field_rateAdaptation.log();
TTCN_Logger::log_event_str(", accessId := ");
single_value->field_accessId.log();
TTCN_Logger::log_event_str(", extension_octet_5 := ");
single_value->field_extension__octet__5.log();
TTCN_Logger::log_event_str(", spare2_3 := ");
single_value->field_spare2__3.log();
TTCN_Logger::log_event_str(", otherRateAdaptation := ");
single_value->field_otherRateAdaptation.log();
TTCN_Logger::log_event_str(", otherInformationTransferCapability := ");
single_value->field_otherInformationTransferCapability.log();
TTCN_Logger::log_event_str(", extension_octet_5a := ");
single_value->field_extension__octet__5a.log();
TTCN_Logger::log_event_str(", spare3_1 := ");
single_value->field_spare3__1.log();
TTCN_Logger::log_event_str(", inbandNegotiation := ");
single_value->field_inbandNegotiation.log();
TTCN_Logger::log_event_str(", assignor_assignee := ");
single_value->field_assignor__assignee.log();
TTCN_Logger::log_event_str(", lli := ");
single_value->field_lli.log();
TTCN_Logger::log_event_str(", mode := ");
single_value->field_mode.log();
TTCN_Logger::log_event_str(", multiframe := ");
single_value->field_multiframe.log();
TTCN_Logger::log_event_str(", hdrNohdr := ");
single_value->field_hdrNohdr.log();
TTCN_Logger::log_event_str(", extension_octet_5b := ");
single_value->field_extension__octet__5b.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 BC__octet5_template::log_match(const BC__octet5& 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_signallingAccessProtocol.match(match_value.signallingAccessProtocol(), legacy)){
TTCN_Logger::log_logmatch_info(".signallingAccessProtocol");
single_value->field_signallingAccessProtocol.log_match(match_value.signallingAccessProtocol(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_rateAdaptation.match(match_value.rateAdaptation(), legacy)){
TTCN_Logger::log_logmatch_info(".rateAdaptation");
single_value->field_rateAdaptation.log_match(match_value.rateAdaptation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_accessId.match(match_value.accessId(), legacy)){
TTCN_Logger::log_logmatch_info(".accessId");
single_value->field_accessId.log_match(match_value.accessId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_extension__octet__5.match(match_value.extension__octet__5(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_5");
single_value->field_extension__octet__5.log_match(match_value.extension__octet__5(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.spare2__3().ispresent()){
if(!single_value->field_spare2__3.match(match_value.spare2__3(), legacy)){
TTCN_Logger::log_logmatch_info(".spare2_3");
single_value->field_spare2__3.log_match(match_value.spare2__3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_spare2__3.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".spare2_3 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_spare2__3.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.otherRateAdaptation().ispresent()){
if(!single_value->field_otherRateAdaptation.match(match_value.otherRateAdaptation(), legacy)){
TTCN_Logger::log_logmatch_info(".otherRateAdaptation");
single_value->field_otherRateAdaptation.log_match(match_value.otherRateAdaptation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_otherRateAdaptation.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".otherRateAdaptation := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_otherRateAdaptation.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.otherInformationTransferCapability().ispresent()){
if(!single_value->field_otherInformationTransferCapability.match(match_value.otherInformationTransferCapability(), legacy)){
TTCN_Logger::log_logmatch_info(".otherInformationTransferCapability");
single_value->field_otherInformationTransferCapability.log_match(match_value.otherInformationTransferCapability(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_otherInformationTransferCapability.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".otherInformationTransferCapability := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_otherInformationTransferCapability.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.extension__octet__5a().ispresent()){
if(!single_value->field_extension__octet__5a.match(match_value.extension__octet__5a(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_5a");
single_value->field_extension__octet__5a.log_match(match_value.extension__octet__5a(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_extension__octet__5a.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".extension_octet_5a := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_extension__octet__5a.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.spare3__1().ispresent()){
if(!single_value->field_spare3__1.match(match_value.spare3__1(), legacy)){
TTCN_Logger::log_logmatch_info(".spare3_1");
single_value->field_spare3__1.log_match(match_value.spare3__1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_spare3__1.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".spare3_1 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_spare3__1.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.inbandNegotiation().ispresent()){
if(!single_value->field_inbandNegotiation.match(match_value.inbandNegotiation(), legacy)){
TTCN_Logger::log_logmatch_info(".inbandNegotiation");
single_value->field_inbandNegotiation.log_match(match_value.inbandNegotiation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_inbandNegotiation.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".inbandNegotiation := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_inbandNegotiation.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.assignor__assignee().ispresent()){
if(!single_value->field_assignor__assignee.match(match_value.assignor__assignee(), legacy)){
TTCN_Logger::log_logmatch_info(".assignor_assignee");
single_value->field_assignor__assignee.log_match(match_value.assignor__assignee(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_assignor__assignee.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".assignor_assignee := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_assignor__assignee.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.lli().ispresent()){
if(!single_value->field_lli.match(match_value.lli(), legacy)){
TTCN_Logger::log_logmatch_info(".lli");
single_value->field_lli.log_match(match_value.lli(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_lli.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".lli := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_lli.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.mode().ispresent()){
if(!single_value->field_mode.match(match_value.mode(), legacy)){
TTCN_Logger::log_logmatch_info(".mode");
single_value->field_mode.log_match(match_value.mode(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_mode.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".mode := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_mode.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.multiframe().ispresent()){
if(!single_value->field_multiframe.match(match_value.multiframe(), legacy)){
TTCN_Logger::log_logmatch_info(".multiframe");
single_value->field_multiframe.log_match(match_value.multiframe(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_multiframe.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".multiframe := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_multiframe.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.hdrNohdr().ispresent()){
if(!single_value->field_hdrNohdr.match(match_value.hdrNohdr(), legacy)){
TTCN_Logger::log_logmatch_info(".hdrNohdr");
single_value->field_hdrNohdr.log_match(match_value.hdrNohdr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_hdrNohdr.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".hdrNohdr := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_hdrNohdr.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.extension__octet__5b().ispresent()){
if(!single_value->field_extension__octet__5b.match(match_value.extension__octet__5b(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_5b");
single_value->field_extension__octet__5b.log_match(match_value.extension__octet__5b(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_extension__octet__5b.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".extension_octet_5b := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_extension__octet__5b.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("{ signallingAccessProtocol := ");
single_value->field_signallingAccessProtocol.log_match(match_value.signallingAccessProtocol(), legacy);
TTCN_Logger::log_event_str(", rateAdaptation := ");
single_value->field_rateAdaptation.log_match(match_value.rateAdaptation(), legacy);
TTCN_Logger::log_event_str(", accessId := ");
single_value->field_accessId.log_match(match_value.accessId(), legacy);
TTCN_Logger::log_event_str(", extension_octet_5 := ");
single_value->field_extension__octet__5.log_match(match_value.extension__octet__5(), legacy);
TTCN_Logger::log_event_str(", spare2_3 := ");
if (match_value.spare2__3().ispresent()) {
single_value->field_spare2__3.log_match(match_value.spare2__3(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_spare2__3.log();
if (single_value->field_spare2__3.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", otherRateAdaptation := ");
if (match_value.otherRateAdaptation().ispresent()) {
single_value->field_otherRateAdaptation.log_match(match_value.otherRateAdaptation(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_otherRateAdaptation.log();
if (single_value->field_otherRateAdaptation.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", otherInformationTransferCapability := ");
if (match_value.otherInformationTransferCapability().ispresent()) {
single_value->field_otherInformationTransferCapability.log_match(match_value.otherInformationTransferCapability(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_otherInformationTransferCapability.log();
if (single_value->field_otherInformationTransferCapability.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", extension_octet_5a := ");
if (match_value.extension__octet__5a().ispresent()) {
single_value->field_extension__octet__5a.log_match(match_value.extension__octet__5a(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_extension__octet__5a.log();
if (single_value->field_extension__octet__5a.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", spare3_1 := ");
if (match_value.spare3__1().ispresent()) {
single_value->field_spare3__1.log_match(match_value.spare3__1(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_spare3__1.log();
if (single_value->field_spare3__1.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", inbandNegotiation := ");
if (match_value.inbandNegotiation().ispresent()) {
single_value->field_inbandNegotiation.log_match(match_value.inbandNegotiation(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_inbandNegotiation.log();
if (single_value->field_inbandNegotiation.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", assignor_assignee := ");
if (match_value.assignor__assignee().ispresent()) {
single_value->field_assignor__assignee.log_match(match_value.assignor__assignee(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_assignor__assignee.log();
if (single_value->field_assignor__assignee.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", lli := ");
if (match_value.lli().ispresent()) {
single_value->field_lli.log_match(match_value.lli(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_lli.log();
if (single_value->field_lli.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", mode := ");
if (match_value.mode().ispresent()) {
single_value->field_mode.log_match(match_value.mode(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_mode.log();
if (single_value->field_mode.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", multiframe := ");
if (match_value.multiframe().ispresent()) {
single_value->field_multiframe.log_match(match_value.multiframe(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_multiframe.log();
if (single_value->field_multiframe.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", hdrNohdr := ");
if (match_value.hdrNohdr().ispresent()) {
single_value->field_hdrNohdr.log_match(match_value.hdrNohdr(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_hdrNohdr.log();
if (single_value->field_hdrNohdr.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", extension_octet_5b := ");
if (match_value.extension__octet__5b().ispresent()) {
single_value->field_extension__octet__5b.log_match(match_value.extension__octet__5b(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_extension__octet__5b.log();
if (single_value->field_extension__octet__5b.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 BC__octet5_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (signallingAccessProtocol().is_bound()) signallingAccessProtocol().set_implicit_omit();
if (rateAdaptation().is_bound()) rateAdaptation().set_implicit_omit();
if (accessId().is_bound()) accessId().set_implicit_omit();
if (extension__octet__5().is_bound()) extension__octet__5().set_implicit_omit();
if (!spare2__3().is_bound()) spare2__3() = OMIT_VALUE;
else spare2__3().set_implicit_omit();
if (!otherRateAdaptation().is_bound()) otherRateAdaptation() = OMIT_VALUE;
else otherRateAdaptation().set_implicit_omit();
if (!otherInformationTransferCapability().is_bound()) otherInformationTransferCapability() = OMIT_VALUE;
else otherInformationTransferCapability().set_implicit_omit();
if (!extension__octet__5a().is_bound()) extension__octet__5a() = OMIT_VALUE;
else extension__octet__5a().set_implicit_omit();
if (!spare3__1().is_bound()) spare3__1() = OMIT_VALUE;
else spare3__1().set_implicit_omit();
if (!inbandNegotiation().is_bound()) inbandNegotiation() = OMIT_VALUE;
else inbandNegotiation().set_implicit_omit();
if (!assignor__assignee().is_bound()) assignor__assignee() = OMIT_VALUE;
else assignor__assignee().set_implicit_omit();
if (!lli().is_bound()) lli() = OMIT_VALUE;
else lli().set_implicit_omit();
if (!mode().is_bound()) mode() = OMIT_VALUE;
else mode().set_implicit_omit();
if (!multiframe().is_bound()) multiframe() = OMIT_VALUE;
else multiframe().set_implicit_omit();
if (!hdrNohdr().is_bound()) hdrNohdr() = OMIT_VALUE;
else hdrNohdr().set_implicit_omit();
if (!extension__octet__5b().is_bound()) extension__octet__5b() = OMIT_VALUE;
else extension__octet__5b().set_implicit_omit();
}

void BC__octet5_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_signallingAccessProtocol.encode_text(text_buf);
single_value->field_rateAdaptation.encode_text(text_buf);
single_value->field_accessId.encode_text(text_buf);
single_value->field_extension__octet__5.encode_text(text_buf);
single_value->field_spare2__3.encode_text(text_buf);
single_value->field_otherRateAdaptation.encode_text(text_buf);
single_value->field_otherInformationTransferCapability.encode_text(text_buf);
single_value->field_extension__octet__5a.encode_text(text_buf);
single_value->field_spare3__1.encode_text(text_buf);
single_value->field_inbandNegotiation.encode_text(text_buf);
single_value->field_assignor__assignee.encode_text(text_buf);
single_value->field_lli.encode_text(text_buf);
single_value->field_mode.encode_text(text_buf);
single_value->field_multiframe.encode_text(text_buf);
single_value->field_hdrNohdr.encode_text(text_buf);
single_value->field_extension__octet__5b.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 @MobileL3_CC_Types.BC_octet5.");
}
}

void BC__octet5_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_signallingAccessProtocol.decode_text(text_buf);
single_value->field_rateAdaptation.decode_text(text_buf);
single_value->field_accessId.decode_text(text_buf);
single_value->field_extension__octet__5.decode_text(text_buf);
single_value->field_spare2__3.decode_text(text_buf);
single_value->field_otherRateAdaptation.decode_text(text_buf);
single_value->field_otherInformationTransferCapability.decode_text(text_buf);
single_value->field_extension__octet__5a.decode_text(text_buf);
single_value->field_spare3__1.decode_text(text_buf);
single_value->field_inbandNegotiation.decode_text(text_buf);
single_value->field_assignor__assignee.decode_text(text_buf);
single_value->field_lli.decode_text(text_buf);
single_value->field_mode.decode_text(text_buf);
single_value->field_multiframe.decode_text(text_buf);
single_value->field_hdrNohdr.decode_text(text_buf);
single_value->field_extension__octet__5b.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 BC__octet5_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 @MobileL3_CC_Types.BC_octet5.");
}
}

void BC__octet5_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: {
    BC__octet5_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 (16<param.get_size()) {
      param.error("record template of type @MobileL3_CC_Types.BC_octet5 has 16 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) signallingAccessProtocol().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) rateAdaptation().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) accessId().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) extension__octet__5().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) spare2__3().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) otherRateAdaptation().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) otherInformationTransferCapability().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) extension__octet__5a().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) spare3__1().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) inbandNegotiation().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) assignor__assignee().set_param(*param.get_elem(10));
    if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) lli().set_param(*param.get_elem(11));
    if (param.get_size()>12 && param.get_elem(12)->get_type()!=Module_Param::MP_NotUsed) mode().set_param(*param.get_elem(12));
    if (param.get_size()>13 && param.get_elem(13)->get_type()!=Module_Param::MP_NotUsed) multiframe().set_param(*param.get_elem(13));
    if (param.get_size()>14 && param.get_elem(14)->get_type()!=Module_Param::MP_NotUsed) hdrNohdr().set_param(*param.get_elem(14));
    if (param.get_size()>15 && param.get_elem(15)->get_type()!=Module_Param::MP_NotUsed) extension__octet__5b().set_param(*param.get_elem(15));
    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(), "signallingAccessProtocol")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          signallingAccessProtocol().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "rateAdaptation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rateAdaptation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "accessId")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          accessId().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_5")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__5().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare2__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "otherRateAdaptation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          otherRateAdaptation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "otherInformationTransferCapability")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          otherInformationTransferCapability().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_5a")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__5a().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare3_1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare3__1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "inbandNegotiation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          inbandNegotiation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "assignor_assignee")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          assignor__assignee().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lli")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lli().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mode")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mode().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "multiframe")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          multiframe().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "hdrNohdr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          hdrNohdr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_5b")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__5b().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 @MobileL3_CC_Types.BC_octet5: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    BC__octet5_template* precondition = new BC__octet5_template;
    precondition->set_param(*param.get_elem(0));
    BC__octet5_template* implied_template = new BC__octet5_template;
    implied_template->set_param(*param.get_elem(1));
    *this = BC__octet5_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.BC_octet5");
  }
  is_ifpresent = param.get_ifpresent();
}

void BC__octet5_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_signallingAccessProtocol.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
single_value->field_rateAdaptation.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
single_value->field_accessId.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
single_value->field_extension__octet__5.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
single_value->field_spare2__3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
single_value->field_otherRateAdaptation.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
single_value->field_otherInformationTransferCapability.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
single_value->field_extension__octet__5a.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
single_value->field_spare3__1.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
single_value->field_inbandNegotiation.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
single_value->field_assignor__assignee.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
single_value->field_lli.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
single_value->field_mode.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
single_value->field_multiframe.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
single_value->field_hdrNohdr.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
single_value->field_extension__octet__5b.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet5");
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 : "@MobileL3_CC_Types.BC_octet5");
}

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

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

Speech__AuxiliarySpeech::Speech__AuxiliarySpeech()
{
}

Speech__AuxiliarySpeech::Speech__AuxiliarySpeech(const BITSTRING& par_speechVersionIndication,
    const BITSTRING& par_spare1__1,
    const BITSTRING& par_cTM__or__Spare,
    const BITSTRING& par_coding,
    const BITSTRING& par_extension__octet__3a__3b)
  :   field_speechVersionIndication(par_speechVersionIndication),
  field_spare1__1(par_spare1__1),
  field_cTM__or__Spare(par_cTM__or__Spare),
  field_coding(par_coding),
  field_extension__octet__3a__3b(par_extension__octet__3a__3b)
{
}

Speech__AuxiliarySpeech::Speech__AuxiliarySpeech(const Speech__AuxiliarySpeech& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.Speech_AuxiliarySpeech.");
if (other_value.speechVersionIndication().is_bound()) field_speechVersionIndication = other_value.speechVersionIndication();
else field_speechVersionIndication.clean_up();
if (other_value.spare1__1().is_bound()) field_spare1__1 = other_value.spare1__1();
else field_spare1__1.clean_up();
if (other_value.cTM__or__Spare().is_bound()) field_cTM__or__Spare = other_value.cTM__or__Spare();
else field_cTM__or__Spare.clean_up();
if (other_value.coding().is_bound()) field_coding = other_value.coding();
else field_coding.clean_up();
if (other_value.extension__octet__3a__3b().is_bound()) field_extension__octet__3a__3b = other_value.extension__octet__3a__3b();
else field_extension__octet__3a__3b.clean_up();
}

void Speech__AuxiliarySpeech::clean_up()
{
field_speechVersionIndication.clean_up();
field_spare1__1.clean_up();
field_cTM__or__Spare.clean_up();
field_coding.clean_up();
field_extension__octet__3a__3b.clean_up();
}

const TTCN_Typedescriptor_t* Speech__AuxiliarySpeech::get_descriptor() const { return &Speech__AuxiliarySpeech_descr_; }
Speech__AuxiliarySpeech& Speech__AuxiliarySpeech::operator=(const Speech__AuxiliarySpeech& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.Speech_AuxiliarySpeech.");
  if (other_value.speechVersionIndication().is_bound()) field_speechVersionIndication = other_value.speechVersionIndication();
  else field_speechVersionIndication.clean_up();
  if (other_value.spare1__1().is_bound()) field_spare1__1 = other_value.spare1__1();
  else field_spare1__1.clean_up();
  if (other_value.cTM__or__Spare().is_bound()) field_cTM__or__Spare = other_value.cTM__or__Spare();
  else field_cTM__or__Spare.clean_up();
  if (other_value.coding().is_bound()) field_coding = other_value.coding();
  else field_coding.clean_up();
  if (other_value.extension__octet__3a__3b().is_bound()) field_extension__octet__3a__3b = other_value.extension__octet__3a__3b();
  else field_extension__octet__3a__3b.clean_up();
}
return *this;
}

boolean Speech__AuxiliarySpeech::operator==(const Speech__AuxiliarySpeech& other_value) const
{
return field_speechVersionIndication==other_value.field_speechVersionIndication
  && field_spare1__1==other_value.field_spare1__1
  && field_cTM__or__Spare==other_value.field_cTM__or__Spare
  && field_coding==other_value.field_coding
  && field_extension__octet__3a__3b==other_value.field_extension__octet__3a__3b;
}

boolean Speech__AuxiliarySpeech::is_bound() const
{
return (field_speechVersionIndication.is_bound())
  || (field_spare1__1.is_bound())
  || (field_cTM__or__Spare.is_bound())
  || (field_coding.is_bound())
  || (field_extension__octet__3a__3b.is_bound());
}
boolean Speech__AuxiliarySpeech::is_value() const
{
return field_speechVersionIndication.is_value()
  && field_spare1__1.is_value()
  && field_cTM__or__Spare.is_value()
  && field_coding.is_value()
  && field_extension__octet__3a__3b.is_value();
}
void Speech__AuxiliarySpeech::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ speechVersionIndication := ");
field_speechVersionIndication.log();
TTCN_Logger::log_event_str(", spare1_1 := ");
field_spare1__1.log();
TTCN_Logger::log_event_str(", cTM_or_Spare := ");
field_cTM__or__Spare.log();
TTCN_Logger::log_event_str(", coding := ");
field_coding.log();
TTCN_Logger::log_event_str(", extension_octet_3a_3b := ");
field_extension__octet__3a__3b.log();
TTCN_Logger::log_event_str(" }");
}

void Speech__AuxiliarySpeech::set_implicit_omit()
{
if (speechVersionIndication().is_bound()) speechVersionIndication().set_implicit_omit();
if (spare1__1().is_bound()) spare1__1().set_implicit_omit();
if (cTM__or__Spare().is_bound()) cTM__or__Spare().set_implicit_omit();
if (coding().is_bound()) coding().set_implicit_omit();
if (extension__octet__3a__3b().is_bound()) extension__octet__3a__3b().set_implicit_omit();
}

void Speech__AuxiliarySpeech::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (5<param.get_size()) {
      param.error("record value of type @MobileL3_CC_Types.Speech_AuxiliarySpeech has 5 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) speechVersionIndication().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) spare1__1().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) cTM__or__Spare().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) coding().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) extension__octet__3a__3b().set_param(*param.get_elem(4));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "speechVersionIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          speechVersionIndication().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cTM_or_Spare")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cTM__or__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(), "coding")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          coding().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_3a_3b")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__3a__3b().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 @MobileL3_CC_Types.Speech_AuxiliarySpeech: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.Speech_AuxiliarySpeech");
  }
}

void Speech__AuxiliarySpeech::encode_text(Text_Buf& text_buf) const
{
field_speechVersionIndication.encode_text(text_buf);
field_spare1__1.encode_text(text_buf);
field_cTM__or__Spare.encode_text(text_buf);
field_coding.encode_text(text_buf);
field_extension__octet__3a__3b.encode_text(text_buf);
}

void Speech__AuxiliarySpeech::decode_text(Text_Buf& text_buf)
{
field_speechVersionIndication.decode_text(text_buf);
field_spare1__1.decode_text(text_buf);
field_cTM__or__Spare.decode_text(text_buf);
field_coding.decode_text(text_buf);
field_extension__octet__3a__3b.decode_text(text_buf);
}

void Speech__AuxiliarySpeech::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 Speech__AuxiliarySpeech::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 Speech__AuxiliarySpeech::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;
  {
  cbyte* data=p_buf.get_read_data();
  int count=1;
  unsigned mask = 1 << (local_top_order==ORDER_LSB ? 0 : 7);
  if(p_td.raw->extension_bit==EXT_BIT_YES){
    while((data[count-1] & mask)==0 && count*8<(int)limit) count++;
  }
  else{
    while((data[count-1] & mask)!=0 && count*8<(int)limit) count++;
  }
  if(limit) limit=count*8;
  }
  RAW_Force_Omit field_0_force_omit(0, force_omit, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_speechVersionIndication.RAW_decode(General__Types::BIT4_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_spare1__1.RAW_decode(General__Types::BIT1_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_cTM__or__Spare.RAW_decode(General__Types::BIT1_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_coding.RAW_decode(General__Types::BIT1_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__3a__3b.RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int Speech__AuxiliarySpeech::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 5;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(5);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, General__Types::BIT4_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT1_descr_.raw);
  encoded_length += field_speechVersionIndication.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_spare1__1.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_cTM__or__Spare.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_coding.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_extension__octet__3a__3b.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[4]);
  return myleaf.length = encoded_length;
}

struct Speech__AuxiliarySpeech_template::single_value_struct {
BITSTRING_template field_speechVersionIndication;
BITSTRING_template field_spare1__1;
BITSTRING_template field_cTM__or__Spare;
BITSTRING_template field_coding;
BITSTRING_template field_extension__octet__3a__3b;
};

void Speech__AuxiliarySpeech_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_speechVersionIndication = ANY_VALUE;
single_value->field_spare1__1 = ANY_VALUE;
single_value->field_cTM__or__Spare = ANY_VALUE;
single_value->field_coding = ANY_VALUE;
single_value->field_extension__octet__3a__3b = ANY_VALUE;
}
}
}

void Speech__AuxiliarySpeech_template::copy_value(const Speech__AuxiliarySpeech& other_value)
{
single_value = new single_value_struct;
if (other_value.speechVersionIndication().is_bound()) {
  single_value->field_speechVersionIndication = other_value.speechVersionIndication();
} else {
  single_value->field_speechVersionIndication.clean_up();
}
if (other_value.spare1__1().is_bound()) {
  single_value->field_spare1__1 = other_value.spare1__1();
} else {
  single_value->field_spare1__1.clean_up();
}
if (other_value.cTM__or__Spare().is_bound()) {
  single_value->field_cTM__or__Spare = other_value.cTM__or__Spare();
} else {
  single_value->field_cTM__or__Spare.clean_up();
}
if (other_value.coding().is_bound()) {
  single_value->field_coding = other_value.coding();
} else {
  single_value->field_coding.clean_up();
}
if (other_value.extension__octet__3a__3b().is_bound()) {
  single_value->field_extension__octet__3a__3b = other_value.extension__octet__3a__3b();
} else {
  single_value->field_extension__octet__3a__3b.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void Speech__AuxiliarySpeech_template::copy_template(const Speech__AuxiliarySpeech_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.speechVersionIndication().get_selection()) {
single_value->field_speechVersionIndication = other_value.speechVersionIndication();
} else {
single_value->field_speechVersionIndication.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare1__1().get_selection()) {
single_value->field_spare1__1 = other_value.spare1__1();
} else {
single_value->field_spare1__1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.cTM__or__Spare().get_selection()) {
single_value->field_cTM__or__Spare = other_value.cTM__or__Spare();
} else {
single_value->field_cTM__or__Spare.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.coding().get_selection()) {
single_value->field_coding = other_value.coding();
} else {
single_value->field_coding.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__3a__3b().get_selection()) {
single_value->field_extension__octet__3a__3b = other_value.extension__octet__3a__3b();
} else {
single_value->field_extension__octet__3a__3b.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 Speech__AuxiliarySpeech_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 Speech__AuxiliarySpeech_template(*other_value.implication_.precondition);
implication_.implied_template = new Speech__AuxiliarySpeech_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 @MobileL3_CC_Types.Speech_AuxiliarySpeech.");
break;
}
set_selection(other_value);
}

Speech__AuxiliarySpeech_template::Speech__AuxiliarySpeech_template()
{
}

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

Speech__AuxiliarySpeech_template::Speech__AuxiliarySpeech_template(const Speech__AuxiliarySpeech& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean Speech__AuxiliarySpeech_template::match(const Speech__AuxiliarySpeech& 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.speechVersionIndication().is_bound()) return FALSE;
if(!single_value->field_speechVersionIndication.match(other_value.speechVersionIndication(), legacy))return FALSE;
if(!other_value.spare1__1().is_bound()) return FALSE;
if(!single_value->field_spare1__1.match(other_value.spare1__1(), legacy))return FALSE;
if(!other_value.cTM__or__Spare().is_bound()) return FALSE;
if(!single_value->field_cTM__or__Spare.match(other_value.cTM__or__Spare(), legacy))return FALSE;
if(!other_value.coding().is_bound()) return FALSE;
if(!single_value->field_coding.match(other_value.coding(), legacy))return FALSE;
if(!other_value.extension__octet__3a__3b().is_bound()) return FALSE;
if(!single_value->field_extension__octet__3a__3b.match(other_value.extension__octet__3a__3b(), 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 @MobileL3_CC_Types.Speech_AuxiliarySpeech.");
}
return FALSE;
}

boolean Speech__AuxiliarySpeech_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_speechVersionIndication.is_bound()
 || single_value->field_spare1__1.is_bound()
 || single_value->field_cTM__or__Spare.is_bound()
 || single_value->field_coding.is_bound()
 || single_value->field_extension__octet__3a__3b.is_bound();
}

boolean Speech__AuxiliarySpeech_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_speechVersionIndication.is_value()
 && single_value->field_spare1__1.is_value()
 && single_value->field_cTM__or__Spare.is_value()
 && single_value->field_coding.is_value()
 && single_value->field_extension__octet__3a__3b.is_value();
}

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

Speech__AuxiliarySpeech Speech__AuxiliarySpeech_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 @MobileL3_CC_Types.Speech_AuxiliarySpeech.");
Speech__AuxiliarySpeech ret_val;
if (single_value->field_speechVersionIndication.is_bound()) {
ret_val.speechVersionIndication() = single_value->field_speechVersionIndication.valueof();
}
if (single_value->field_spare1__1.is_bound()) {
ret_val.spare1__1() = single_value->field_spare1__1.valueof();
}
if (single_value->field_cTM__or__Spare.is_bound()) {
ret_val.cTM__or__Spare() = single_value->field_cTM__or__Spare.valueof();
}
if (single_value->field_coding.is_bound()) {
ret_val.coding() = single_value->field_coding.valueof();
}
if (single_value->field_extension__octet__3a__3b.is_bound()) {
ret_val.extension__octet__3a__3b() = single_value->field_extension__octet__3a__3b.valueof();
}
return ret_val;
}

void Speech__AuxiliarySpeech_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 @MobileL3_CC_Types.Speech_AuxiliarySpeech.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new Speech__AuxiliarySpeech_template[list_length];
}

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

BITSTRING_template& Speech__AuxiliarySpeech_template::speechVersionIndication()
{
set_specific();
return single_value->field_speechVersionIndication;
}

const BITSTRING_template& Speech__AuxiliarySpeech_template::speechVersionIndication() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field speechVersionIndication of a non-specific template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech.");
return single_value->field_speechVersionIndication;
}

BITSTRING_template& Speech__AuxiliarySpeech_template::spare1__1()
{
set_specific();
return single_value->field_spare1__1;
}

const BITSTRING_template& Speech__AuxiliarySpeech_template::spare1__1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare1_1 of a non-specific template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech.");
return single_value->field_spare1__1;
}

BITSTRING_template& Speech__AuxiliarySpeech_template::cTM__or__Spare()
{
set_specific();
return single_value->field_cTM__or__Spare;
}

const BITSTRING_template& Speech__AuxiliarySpeech_template::cTM__or__Spare() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cTM_or_Spare of a non-specific template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech.");
return single_value->field_cTM__or__Spare;
}

BITSTRING_template& Speech__AuxiliarySpeech_template::coding()
{
set_specific();
return single_value->field_coding;
}

const BITSTRING_template& Speech__AuxiliarySpeech_template::coding() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field coding of a non-specific template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech.");
return single_value->field_coding;
}

BITSTRING_template& Speech__AuxiliarySpeech_template::extension__octet__3a__3b()
{
set_specific();
return single_value->field_extension__octet__3a__3b;
}

const BITSTRING_template& Speech__AuxiliarySpeech_template::extension__octet__3a__3b() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_3a_3b of a non-specific template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech.");
return single_value->field_extension__octet__3a__3b;
}

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

void Speech__AuxiliarySpeech_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ speechVersionIndication := ");
single_value->field_speechVersionIndication.log();
TTCN_Logger::log_event_str(", spare1_1 := ");
single_value->field_spare1__1.log();
TTCN_Logger::log_event_str(", cTM_or_Spare := ");
single_value->field_cTM__or__Spare.log();
TTCN_Logger::log_event_str(", coding := ");
single_value->field_coding.log();
TTCN_Logger::log_event_str(", extension_octet_3a_3b := ");
single_value->field_extension__octet__3a__3b.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 Speech__AuxiliarySpeech_template::log_match(const Speech__AuxiliarySpeech& 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_speechVersionIndication.match(match_value.speechVersionIndication(), legacy)){
TTCN_Logger::log_logmatch_info(".speechVersionIndication");
single_value->field_speechVersionIndication.log_match(match_value.speechVersionIndication(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare1__1.match(match_value.spare1__1(), legacy)){
TTCN_Logger::log_logmatch_info(".spare1_1");
single_value->field_spare1__1.log_match(match_value.spare1__1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_cTM__or__Spare.match(match_value.cTM__or__Spare(), legacy)){
TTCN_Logger::log_logmatch_info(".cTM_or_Spare");
single_value->field_cTM__or__Spare.log_match(match_value.cTM__or__Spare(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_coding.match(match_value.coding(), legacy)){
TTCN_Logger::log_logmatch_info(".coding");
single_value->field_coding.log_match(match_value.coding(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_extension__octet__3a__3b.match(match_value.extension__octet__3a__3b(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_3a_3b");
single_value->field_extension__octet__3a__3b.log_match(match_value.extension__octet__3a__3b(), 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("{ speechVersionIndication := ");
single_value->field_speechVersionIndication.log_match(match_value.speechVersionIndication(), legacy);
TTCN_Logger::log_event_str(", spare1_1 := ");
single_value->field_spare1__1.log_match(match_value.spare1__1(), legacy);
TTCN_Logger::log_event_str(", cTM_or_Spare := ");
single_value->field_cTM__or__Spare.log_match(match_value.cTM__or__Spare(), legacy);
TTCN_Logger::log_event_str(", coding := ");
single_value->field_coding.log_match(match_value.coding(), legacy);
TTCN_Logger::log_event_str(", extension_octet_3a_3b := ");
single_value->field_extension__octet__3a__3b.log_match(match_value.extension__octet__3a__3b(), 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 Speech__AuxiliarySpeech_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (speechVersionIndication().is_bound()) speechVersionIndication().set_implicit_omit();
if (spare1__1().is_bound()) spare1__1().set_implicit_omit();
if (cTM__or__Spare().is_bound()) cTM__or__Spare().set_implicit_omit();
if (coding().is_bound()) coding().set_implicit_omit();
if (extension__octet__3a__3b().is_bound()) extension__octet__3a__3b().set_implicit_omit();
}

void Speech__AuxiliarySpeech_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_speechVersionIndication.encode_text(text_buf);
single_value->field_spare1__1.encode_text(text_buf);
single_value->field_cTM__or__Spare.encode_text(text_buf);
single_value->field_coding.encode_text(text_buf);
single_value->field_extension__octet__3a__3b.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 @MobileL3_CC_Types.Speech_AuxiliarySpeech.");
}
}

void Speech__AuxiliarySpeech_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_speechVersionIndication.decode_text(text_buf);
single_value->field_spare1__1.decode_text(text_buf);
single_value->field_cTM__or__Spare.decode_text(text_buf);
single_value->field_coding.decode_text(text_buf);
single_value->field_extension__octet__3a__3b.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 Speech__AuxiliarySpeech_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 @MobileL3_CC_Types.Speech_AuxiliarySpeech.");
}
}

void Speech__AuxiliarySpeech_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: {
    Speech__AuxiliarySpeech_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (5<param.get_size()) {
      param.error("record template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech has 5 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) speechVersionIndication().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) spare1__1().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) cTM__or__Spare().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) coding().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) extension__octet__3a__3b().set_param(*param.get_elem(4));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "speechVersionIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          speechVersionIndication().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cTM_or_Spare")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cTM__or__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(), "coding")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          coding().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_3a_3b")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__3a__3b().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 @MobileL3_CC_Types.Speech_AuxiliarySpeech: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    Speech__AuxiliarySpeech_template* precondition = new Speech__AuxiliarySpeech_template;
    precondition->set_param(*param.get_elem(0));
    Speech__AuxiliarySpeech_template* implied_template = new Speech__AuxiliarySpeech_template;
    implied_template->set_param(*param.get_elem(1));
    *this = Speech__AuxiliarySpeech_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.Speech_AuxiliarySpeech");
  }
  is_ifpresent = param.get_ifpresent();
}

void Speech__AuxiliarySpeech_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_speechVersionIndication.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.Speech_AuxiliarySpeech");
single_value->field_spare1__1.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.Speech_AuxiliarySpeech");
single_value->field_cTM__or__Spare.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.Speech_AuxiliarySpeech");
single_value->field_coding.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.Speech_AuxiliarySpeech");
single_value->field_extension__octet__3a__3b.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.Speech_AuxiliarySpeech");
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 : "@MobileL3_CC_Types.Speech_AuxiliarySpeech");
}

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

boolean Speech__AuxiliarySpeech_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 Speech__AuxiliarySpeech Speech__AuxiliarySpeech__List::UNBOUND_ELEM;
boolean Speech__AuxiliarySpeech__List::compare_function(const Base_Type *left_ptr, int left_index, const Base_Type *right_ptr, int right_index)
{
if (((const Speech__AuxiliarySpeech__List*)left_ptr)->val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.");
if (((const Speech__AuxiliarySpeech__List*)right_ptr)->val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.");
if (((const Speech__AuxiliarySpeech__List*)left_ptr)->val_ptr->value_elements[left_index] != NULL){
if (((const Speech__AuxiliarySpeech__List*)right_ptr)->val_ptr->value_elements[right_index] != NULL){
return *((const Speech__AuxiliarySpeech__List*)left_ptr)->val_ptr->value_elements[left_index] == *((const Speech__AuxiliarySpeech__List*)right_ptr)->val_ptr->value_elements[right_index];
} else return FALSE;
} else {
return ((const Speech__AuxiliarySpeech__List*)right_ptr)->val_ptr->value_elements[right_index] == NULL;
}
}

Speech__AuxiliarySpeech__List::Speech__AuxiliarySpeech__List()
{
val_ptr = NULL;
}

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

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

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

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

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

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

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

boolean Speech__AuxiliarySpeech__List::operator==(const Speech__AuxiliarySpeech__List& other_value) const
{
if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.");
if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.");
if (val_ptr == other_value.val_ptr) return TRUE;
return compare_set_of(this, val_ptr->n_elements, &other_value, (other_value.val_ptr)->n_elements, compare_function);
}

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

Speech__AuxiliarySpeech& Speech__AuxiliarySpeech__List::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.");
return (*this)[(int)index_value];
}

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

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

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

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

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

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

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

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

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

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

int Speech__AuxiliarySpeech__List::lengthof() const
{
if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.");
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 Speech__AuxiliarySpeech__List::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 Speech__AuxiliarySpeech__List::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 Speech__AuxiliarySpeech__List::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "set 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("set of value", "@MobileL3_CC_Types.Speech_AuxiliarySpeech_List");
    }
    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("set of value", "@MobileL3_CC_Types.Speech_AuxiliarySpeech_List");
    }
    break;
  default:
    TTCN_error("Internal error: Unknown operation type.");
  }
}

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

void Speech__AuxiliarySpeech__List::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 Speech__AuxiliarySpeech__List::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 Speech__AuxiliarySpeech__List::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++;
      if (p_buf.get_last_bit())
        return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
    }
  }
 return decoded_length+p_buf.increase_pos_padd(p_td.raw->padding)+prepaddlength;
}

int Speech__AuxiliarySpeech__List::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 Speech__AuxiliarySpeech__List_template::copy_value(const Speech__AuxiliarySpeech__List& other_value)
{
if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List with an unbound value.");
single_value.n_elements = other_value.size_of();
single_value.value_elements = (Speech__AuxiliarySpeech_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 Speech__AuxiliarySpeech_template(other_value[elem_count]);
} else {
single_value.value_elements[elem_count] = new Speech__AuxiliarySpeech_template;
}
}
set_selection(SPECIFIC_VALUE);
}

void Speech__AuxiliarySpeech__List_template::copy_template(const Speech__AuxiliarySpeech__List_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 = (Speech__AuxiliarySpeech_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 Speech__AuxiliarySpeech_template(*other_value.single_value.value_elements[elem_count]);
} else {
single_value.value_elements[elem_count] = new Speech__AuxiliarySpeech_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 Speech__AuxiliarySpeech__List_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 SUPERSET_MATCH:
case SUBSET_MATCH:
value_set.n_items = other_value.value_set.n_items;
value_set.set_items = new Speech__AuxiliarySpeech_template[value_set.n_items];
for (unsigned int set_count = 0; set_count < value_set.n_items; set_count++)
value_set.set_items[set_count] = other_value.value_set.set_items[set_count];
break;
case IMPLICATION_MATCH:
implication_.precondition = new Speech__AuxiliarySpeech__List_template(*other_value.implication_.precondition);
implication_.implied_template = new Speech__AuxiliarySpeech__List_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 @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.");
break;
}
set_selection(other_value);
}

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

boolean Speech__AuxiliarySpeech__List_template::match_function_set(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 Speech__AuxiliarySpeech__List_template*)template_ptr)->value_set.set_items[template_index].match((*(const Speech__AuxiliarySpeech__List*)value_ptr)[value_index], legacy);
else return ((const Speech__AuxiliarySpeech__List_template*)template_ptr)->value_set.set_items[template_index].is_any_or_omit();
}

void Speech__AuxiliarySpeech__List_template::log_function(const Base_Type *value_ptr, const Restricted_Length_Template *template_ptr, int index_value, int index_template, boolean legacy)
{
if (value_ptr == NULL) {
if (template_ptr != NULL) {
((const Speech__AuxiliarySpeech__List_template*)template_ptr)->single_value.value_elements[index_template]->log();
}
} else if (template_ptr == NULL) {
(*(const Speech__AuxiliarySpeech__List*)value_ptr)[index_value].log();
} else {
((const Speech__AuxiliarySpeech__List_template*)template_ptr)->single_value.value_elements[index_template]->log_match((*(const Speech__AuxiliarySpeech__List*)value_ptr)[index_value], legacy);
}
}

Speech__AuxiliarySpeech__List_template::Speech__AuxiliarySpeech__List_template()
{
}

Speech__AuxiliarySpeech__List_template::Speech__AuxiliarySpeech__List_template(template_sel other_value)
 : Restricted_Length_Template(other_value)
{
check_single_selection(other_value);
}

Speech__AuxiliarySpeech__List_template::Speech__AuxiliarySpeech__List_template(null_type)
 : Restricted_Length_Template(SPECIFIC_VALUE)
{
single_value.n_elements = 0;
single_value.value_elements = NULL;
}

Speech__AuxiliarySpeech__List_template::Speech__AuxiliarySpeech__List_template(const Speech__AuxiliarySpeech__List& other_value)
{
copy_value(other_value);
}

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

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

Speech__AuxiliarySpeech__List_template::Speech__AuxiliarySpeech__List_template(Dynamic_Match_Interface<Speech__AuxiliarySpeech__List>* p_dyn_match)
 : Restricted_Length_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<Speech__AuxiliarySpeech__List>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

Speech__AuxiliarySpeech__List_template::Speech__AuxiliarySpeech__List_template(const Speech__AuxiliarySpeech__List_template& other_value)
 : Restricted_Length_Template()
{
copy_template(other_value);
}

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

void Speech__AuxiliarySpeech__List_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;
break;
case SUPERSET_MATCH:
case SUBSET_MATCH:
delete [] value_set.set_items;
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;
}

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

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

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

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

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

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

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

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

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

int Speech__AuxiliarySpeech__List_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 Speech__AuxiliarySpeech__List_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 @MobileL3_CC_Types.Speech_AuxiliarySpeech_List 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 @MobileL3_CC_Types.Speech_AuxiliarySpeech_List containing omit element.", op_name);
    case ANY_OR_OMIT:
      has_any_or_none = TRUE;
      break;
    default:
      min_size++;
      break;
    }
  }
} break;
case SUPERSET_MATCH:
case SUBSET_MATCH: {
  min_size = 0;
  has_any_or_none = FALSE;
  int elem_count = value_set.n_items;
  if (!is_size) { while (elem_count>0 && !value_set.set_items[elem_count-1].is_bound()) elem_count--; }
  for (int i=0; i<elem_count; i++) {
    switch (value_set.set_items[i].get_selection())
    {
    case OMIT_VALUE:
      TTCN_error("Performing %sof() operation on a template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List containing omit element.", op_name);
    case ANY_OR_OMIT:
      has_any_or_none = TRUE;
      break;
    default:
      min_size++;
      break;
    }
  }
  if (template_selection==SUPERSET_MATCH) {
    has_any_or_none = TRUE;
   } else {
    int max_size = min_size;
    min_size = 0;
    if (!has_any_or_none) { // [0,max_size]
      switch (length_restriction_type) {
      case NO_LENGTH_RESTRICTION:
        if (max_size==0) return 0;
        TTCN_error("Performing %sof() operation on a template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List with no exact size.", op_name);
      case SINGLE_LENGTH_RESTRICTION:
        if (length_restriction.single_length<=max_size)
          return length_restriction.single_length;
        TTCN_error("Performing %sof() operation on an invalid template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List. The maximum size (%d) contradicts the length restriction (%d).", op_name, max_size, length_restriction.single_length);
      case RANGE_LENGTH_RESTRICTION:
        if (max_size==length_restriction.range_length.min_length) {
          return max_size;
        } else if (max_size>length_restriction.range_length.min_length){
          TTCN_error("Performing %sof() operation on a template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List with no exact size.", op_name);
        } else
          TTCN_error("Performing %sof() operation on an invalid template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List. Maximum size (%d) contradicts the length restriction (%d..%d).", op_name, max_size, length_restriction.range_length.min_length, length_restriction.range_length.max_length);
      default:
        TTCN_error("Internal error: Template has invalid length restriction type.");
      }
    }
  }
} break;
case OMIT_VALUE:
  TTCN_error("Performing %sof() operation on a template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List 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 @MobileL3_CC_Types.Speech_AuxiliarySpeech_List 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 @MobileL3_CC_Types.Speech_AuxiliarySpeech_List 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 @MobileL3_CC_Types.Speech_AuxiliarySpeech_List containing complemented list.", op_name);
default:
  TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.", op_name);
}
return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List");
}

boolean Speech__AuxiliarySpeech__List_template::match(const Speech__AuxiliarySpeech__List& 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_set_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 SUPERSET_MATCH:
case SUBSET_MATCH:
return match_set_of(&other_value, value_length, this, value_set.n_items, match_function_set, legacy);
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 @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.");
}
return FALSE;
}

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

Speech__AuxiliarySpeech__List Speech__AuxiliarySpeech__List_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 @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.");
Speech__AuxiliarySpeech__List 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;
}

Speech__AuxiliarySpeech__List Speech__AuxiliarySpeech__List_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);
}

Speech__AuxiliarySpeech__List Speech__AuxiliarySpeech__List_template::replace(int index, int len, const Speech__AuxiliarySpeech__List_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());
}

Speech__AuxiliarySpeech__List Speech__AuxiliarySpeech__List_template::replace(int index, int len, const Speech__AuxiliarySpeech__List& 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 Speech__AuxiliarySpeech__List_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 Speech__AuxiliarySpeech__List_template[list_length];
break;
case SUPERSET_MATCH:
case SUBSET_MATCH:
value_set.n_items = list_length;
value_set.set_items = new Speech__AuxiliarySpeech_template[list_length];
break;
default:
TTCN_error("Internal error: Setting an invalid type for a template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.");
}
set_selection(template_type);
}

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

Speech__AuxiliarySpeech_template& Speech__AuxiliarySpeech__List_template::set_item(unsigned int set_index)
{
if (template_selection != SUPERSET_MATCH && template_selection != SUBSET_MATCH) TTCN_error("Internal error: Accessing a set element of a non-set template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.");
if (set_index >= value_set.n_items) TTCN_error("Internal error: Index overflow in a set template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.");
return value_set.set_items[set_index];
}

void Speech__AuxiliarySpeech__List_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(", ");
single_value.value_elements[elem_count]->log();
}
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 SUPERSET_MATCH:
case SUBSET_MATCH:
TTCN_Logger::log_event("%s(", template_selection == SUPERSET_MATCH ? "superset" : "subset");
for (unsigned int set_count = 0; set_count < value_set.n_items; set_count++) {
if (set_count > 0) TTCN_Logger::log_event_str(", ");
value_set.set_items[set_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 Speech__AuxiliarySpeech__List_template::log_match(const Speech__AuxiliarySpeech__List& 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{
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if (template_selection == SPECIFIC_VALUE)
  log_match_heuristics(&match_value, match_value.size_of(), this, single_value.n_elements, match_function_specific, log_function, legacy);
else{
if(previous_size != 0){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::set_logmatch_buffer_len(previous_size);
TTCN_Logger::log_event_str(":=");
}
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
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");
if (template_selection == SPECIFIC_VALUE) log_match_heuristics(&match_value, match_value.size_of(), this, single_value.n_elements, match_function_specific, log_function, legacy);
}
}

void Speech__AuxiliarySpeech__List_template::encode_text(Text_Buf& text_buf) const
{
encode_text_restricted(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;
case SUPERSET_MATCH:
case SUBSET_MATCH:
text_buf.push_int(value_set.n_items);
for (unsigned int set_count = 0; set_count < value_set.n_items; set_count++)
value_set.set_items[set_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.");
}
}

void Speech__AuxiliarySpeech__List_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_restricted(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 @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.");
single_value.value_elements = (Speech__AuxiliarySpeech_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 Speech__AuxiliarySpeech_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 Speech__AuxiliarySpeech__List_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;
case SUPERSET_MATCH:
case SUBSET_MATCH:
value_set.n_items = text_buf.pull_int().get_val();
value_set.set_items = new Speech__AuxiliarySpeech_template[value_set.n_items];
for (unsigned int set_count = 0; set_count < value_set.n_items; set_count++)
value_set.set_items[set_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of type @MobileL3_CC_Types.Speech_AuxiliarySpeech_List.");
}
}

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

boolean Speech__AuxiliarySpeech__List_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 Speech__AuxiliarySpeech__List_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 Speech__AuxiliarySpeech__List_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "set 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: {
    Speech__AuxiliarySpeech__List_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());
    for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
      if (param.get_elem(p_i)->get_type()!=Module_Param::MP_NotUsed) {
        (*this)[p_i].set_param(*param.get_elem(p_i));
      }
    }
    break;
  case Module_Param::MP_Superset_Template:
  case Module_Param::MP_Subset_Template:
    set_type(param.get_type()==Module_Param::MP_Superset_Template ? SUPERSET_MATCH : SUBSET_MATCH, param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      set_item(p_i).set_param(*param.get_elem(p_i));
    }
    break;
  case Module_Param::MP_Implication_Template: {
    Speech__AuxiliarySpeech__List_template* precondition = new Speech__AuxiliarySpeech__List_template;
    precondition->set_param(*param.get_elem(0));
    Speech__AuxiliarySpeech__List_template* implied_template = new Speech__AuxiliarySpeech__List_template;
    implied_template->set_param(*param.get_elem(1));
    *this = Speech__AuxiliarySpeech__List_template(precondition, implied_template);
  } break;
  default:
    param.type_error("set of template", "@MobileL3_CC_Types.Speech_AuxiliarySpeech_List");
  }
  is_ifpresent = param.get_ifpresent();
  set_length_range(param);
}

void Speech__AuxiliarySpeech__List_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 : "@MobileL3_CC_Types.Speech_AuxiliarySpeech_List");
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 : "@MobileL3_CC_Types.Speech_AuxiliarySpeech_List");
}

boolean Speech__AuxiliarySpeech__List_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 FALSE;
} else if (!strcmp(type, "length")) {
  return length_restriction_type != NO_LENGTH_RESTRICTION;
} else {
  return Base_Template::get_istemplate_kind(type);
}
}
BC__octet3::BC__octet3()
{
}

BC__octet3::BC__octet3(const BITSTRING& par_informationTransferCapability,
    const BITSTRING& par_transferMode,
    const BITSTRING& par_codingStandard,
    const BITSTRING& par_radioChannelRequirement,
    const BITSTRING& par_extension__octet__3,
    const OPTIONAL< Speech__AuxiliarySpeech__List >& par_speech__aux__3a__3b)
  :   field_informationTransferCapability(par_informationTransferCapability),
  field_transferMode(par_transferMode),
  field_codingStandard(par_codingStandard),
  field_radioChannelRequirement(par_radioChannelRequirement),
  field_extension__octet__3(par_extension__octet__3),
  field_speech__aux__3a__3b(par_speech__aux__3a__3b)
{
}

BC__octet3::BC__octet3(const BC__octet3& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.BC_octet3.");
if (other_value.informationTransferCapability().is_bound()) field_informationTransferCapability = other_value.informationTransferCapability();
else field_informationTransferCapability.clean_up();
if (other_value.transferMode().is_bound()) field_transferMode = other_value.transferMode();
else field_transferMode.clean_up();
if (other_value.codingStandard().is_bound()) field_codingStandard = other_value.codingStandard();
else field_codingStandard.clean_up();
if (other_value.radioChannelRequirement().is_bound()) field_radioChannelRequirement = other_value.radioChannelRequirement();
else field_radioChannelRequirement.clean_up();
if (other_value.extension__octet__3().is_bound()) field_extension__octet__3 = other_value.extension__octet__3();
else field_extension__octet__3.clean_up();
if (other_value.speech__aux__3a__3b().is_bound()) field_speech__aux__3a__3b = other_value.speech__aux__3a__3b();
else field_speech__aux__3a__3b.clean_up();
}

void BC__octet3::clean_up()
{
field_informationTransferCapability.clean_up();
field_transferMode.clean_up();
field_codingStandard.clean_up();
field_radioChannelRequirement.clean_up();
field_extension__octet__3.clean_up();
field_speech__aux__3a__3b.clean_up();
}

const TTCN_Typedescriptor_t* BC__octet3::get_descriptor() const { return &BC__octet3_descr_; }
BC__octet3& BC__octet3::operator=(const BC__octet3& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.BC_octet3.");
  if (other_value.informationTransferCapability().is_bound()) field_informationTransferCapability = other_value.informationTransferCapability();
  else field_informationTransferCapability.clean_up();
  if (other_value.transferMode().is_bound()) field_transferMode = other_value.transferMode();
  else field_transferMode.clean_up();
  if (other_value.codingStandard().is_bound()) field_codingStandard = other_value.codingStandard();
  else field_codingStandard.clean_up();
  if (other_value.radioChannelRequirement().is_bound()) field_radioChannelRequirement = other_value.radioChannelRequirement();
  else field_radioChannelRequirement.clean_up();
  if (other_value.extension__octet__3().is_bound()) field_extension__octet__3 = other_value.extension__octet__3();
  else field_extension__octet__3.clean_up();
  if (other_value.speech__aux__3a__3b().is_bound()) field_speech__aux__3a__3b = other_value.speech__aux__3a__3b();
  else field_speech__aux__3a__3b.clean_up();
}
return *this;
}

boolean BC__octet3::operator==(const BC__octet3& other_value) const
{
return field_informationTransferCapability==other_value.field_informationTransferCapability
  && field_transferMode==other_value.field_transferMode
  && field_codingStandard==other_value.field_codingStandard
  && field_radioChannelRequirement==other_value.field_radioChannelRequirement
  && field_extension__octet__3==other_value.field_extension__octet__3
  && field_speech__aux__3a__3b==other_value.field_speech__aux__3a__3b;
}

boolean BC__octet3::is_bound() const
{
return (field_informationTransferCapability.is_bound())
  || (field_transferMode.is_bound())
  || (field_codingStandard.is_bound())
  || (field_radioChannelRequirement.is_bound())
  || (field_extension__octet__3.is_bound())
  || (OPTIONAL_OMIT == field_speech__aux__3a__3b.get_selection() || field_speech__aux__3a__3b.is_bound());
}
boolean BC__octet3::is_value() const
{
return field_informationTransferCapability.is_value()
  && field_transferMode.is_value()
  && field_codingStandard.is_value()
  && field_radioChannelRequirement.is_value()
  && field_extension__octet__3.is_value()
  && (OPTIONAL_OMIT == field_speech__aux__3a__3b.get_selection() || field_speech__aux__3a__3b.is_value());
}
int BC__octet3::size_of() const
{
  int ret_val = 5;
  if (field_speech__aux__3a__3b.ispresent()) ret_val++;
  return ret_val;
}

void BC__octet3::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ informationTransferCapability := ");
field_informationTransferCapability.log();
TTCN_Logger::log_event_str(", transferMode := ");
field_transferMode.log();
TTCN_Logger::log_event_str(", codingStandard := ");
field_codingStandard.log();
TTCN_Logger::log_event_str(", radioChannelRequirement := ");
field_radioChannelRequirement.log();
TTCN_Logger::log_event_str(", extension_octet_3 := ");
field_extension__octet__3.log();
TTCN_Logger::log_event_str(", speech_aux_3a_3b := ");
field_speech__aux__3a__3b.log();
TTCN_Logger::log_event_str(" }");
}

void BC__octet3::set_implicit_omit()
{
if (informationTransferCapability().is_bound()) informationTransferCapability().set_implicit_omit();
if (transferMode().is_bound()) transferMode().set_implicit_omit();
if (codingStandard().is_bound()) codingStandard().set_implicit_omit();
if (radioChannelRequirement().is_bound()) radioChannelRequirement().set_implicit_omit();
if (extension__octet__3().is_bound()) extension__octet__3().set_implicit_omit();
if (!speech__aux__3a__3b().is_bound()) speech__aux__3a__3b() = OMIT_VALUE;
else speech__aux__3a__3b().set_implicit_omit();
}

void BC__octet3::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 @MobileL3_CC_Types.BC_octet3 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) informationTransferCapability().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) transferMode().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) codingStandard().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) radioChannelRequirement().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) extension__octet__3().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) speech__aux__3a__3b().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(), "informationTransferCapability")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          informationTransferCapability().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "transferMode")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          transferMode().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "codingStandard")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          codingStandard().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "radioChannelRequirement")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          radioChannelRequirement().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "speech_aux_3a_3b")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          speech__aux__3a__3b().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 @MobileL3_CC_Types.BC_octet3: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.BC_octet3");
  }
}

void BC__octet3::encode_text(Text_Buf& text_buf) const
{
field_informationTransferCapability.encode_text(text_buf);
field_transferMode.encode_text(text_buf);
field_codingStandard.encode_text(text_buf);
field_radioChannelRequirement.encode_text(text_buf);
field_extension__octet__3.encode_text(text_buf);
field_speech__aux__3a__3b.encode_text(text_buf);
}

void BC__octet3::decode_text(Text_Buf& text_buf)
{
field_informationTransferCapability.decode_text(text_buf);
field_transferMode.decode_text(text_buf);
field_codingStandard.decode_text(text_buf);
field_radioChannelRequirement.decode_text(text_buf);
field_extension__octet__3.decode_text(text_buf);
field_speech__aux__3a__3b.decode_text(text_buf);
}

void BC__octet3::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 BC__octet3::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 BC__octet3::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;
  {
  cbyte* data=p_buf.get_read_data();
  int count=1;
  unsigned mask = 1 << (local_top_order==ORDER_LSB ? 0 : 7);
  if(p_td.raw->extension_bit==EXT_BIT_YES){
    while((data[count-1] & mask)==0 && count*8<(int)limit) count++;
  }
  else{
    while((data[count-1] & mask)!=0 && count*8<(int)limit) count++;
  }
  if(limit) limit=count*8;
  }
  RAW_Force_Omit field_0_force_omit(0, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_informationTransferCapability.RAW_decode(General__Types::BIT3_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_transferMode.RAW_decode(General__Types::BIT1_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_codingStandard.RAW_decode(General__Types::BIT1_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, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_radioChannelRequirement.RAW_decode(General__Types::BIT2_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__3.RAW_decode(General__Types::BIT1_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){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_speech__aux__3a__3b = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, Speech__AuxiliarySpeech__List_descr_.raw->forceomit);
  decoded_field_length = field_speech__aux__3a__3b().RAW_decode(Speech__AuxiliarySpeech__List_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_speech__aux__3a__3b = 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_speech__aux__3a__3b=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int BC__octet3::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, General__Types::BIT3_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT1_descr_.raw);
  if (field_speech__aux__3a__3b.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, Speech__AuxiliarySpeech__List_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  encoded_length += field_informationTransferCapability.RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_transferMode.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_codingStandard.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_radioChannelRequirement.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_extension__octet__3.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[4]);
  if (field_speech__aux__3a__3b.ispresent()) {
  encoded_length += field_speech__aux__3a__3b().RAW_encode(Speech__AuxiliarySpeech__List_descr_, *myleaf.body.node.nodes[5]);
  }
  return myleaf.length = encoded_length;
}

struct BC__octet3_template::single_value_struct {
BITSTRING_template field_informationTransferCapability;
BITSTRING_template field_transferMode;
BITSTRING_template field_codingStandard;
BITSTRING_template field_radioChannelRequirement;
BITSTRING_template field_extension__octet__3;
Speech__AuxiliarySpeech__List_template field_speech__aux__3a__3b;
};

void BC__octet3_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_informationTransferCapability = ANY_VALUE;
single_value->field_transferMode = ANY_VALUE;
single_value->field_codingStandard = ANY_VALUE;
single_value->field_radioChannelRequirement = ANY_VALUE;
single_value->field_extension__octet__3 = ANY_VALUE;
single_value->field_speech__aux__3a__3b = ANY_OR_OMIT;
}
}
}

void BC__octet3_template::copy_value(const BC__octet3& other_value)
{
single_value = new single_value_struct;
if (other_value.informationTransferCapability().is_bound()) {
  single_value->field_informationTransferCapability = other_value.informationTransferCapability();
} else {
  single_value->field_informationTransferCapability.clean_up();
}
if (other_value.transferMode().is_bound()) {
  single_value->field_transferMode = other_value.transferMode();
} else {
  single_value->field_transferMode.clean_up();
}
if (other_value.codingStandard().is_bound()) {
  single_value->field_codingStandard = other_value.codingStandard();
} else {
  single_value->field_codingStandard.clean_up();
}
if (other_value.radioChannelRequirement().is_bound()) {
  single_value->field_radioChannelRequirement = other_value.radioChannelRequirement();
} else {
  single_value->field_radioChannelRequirement.clean_up();
}
if (other_value.extension__octet__3().is_bound()) {
  single_value->field_extension__octet__3 = other_value.extension__octet__3();
} else {
  single_value->field_extension__octet__3.clean_up();
}
if (other_value.speech__aux__3a__3b().is_bound()) {
  if (other_value.speech__aux__3a__3b().ispresent()) single_value->field_speech__aux__3a__3b = other_value.speech__aux__3a__3b()();
  else single_value->field_speech__aux__3a__3b = OMIT_VALUE;
} else {
  single_value->field_speech__aux__3a__3b.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void BC__octet3_template::copy_template(const BC__octet3_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.informationTransferCapability().get_selection()) {
single_value->field_informationTransferCapability = other_value.informationTransferCapability();
} else {
single_value->field_informationTransferCapability.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.transferMode().get_selection()) {
single_value->field_transferMode = other_value.transferMode();
} else {
single_value->field_transferMode.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.codingStandard().get_selection()) {
single_value->field_codingStandard = other_value.codingStandard();
} else {
single_value->field_codingStandard.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.radioChannelRequirement().get_selection()) {
single_value->field_radioChannelRequirement = other_value.radioChannelRequirement();
} else {
single_value->field_radioChannelRequirement.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__3().get_selection()) {
single_value->field_extension__octet__3 = other_value.extension__octet__3();
} else {
single_value->field_extension__octet__3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.speech__aux__3a__3b().get_selection()) {
single_value->field_speech__aux__3a__3b = other_value.speech__aux__3a__3b();
} else {
single_value->field_speech__aux__3a__3b.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 BC__octet3_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 BC__octet3_template(*other_value.implication_.precondition);
implication_.implied_template = new BC__octet3_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 @MobileL3_CC_Types.BC_octet3.");
break;
}
set_selection(other_value);
}

BC__octet3_template::BC__octet3_template()
{
}

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

BC__octet3_template::BC__octet3_template(const BC__octet3& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean BC__octet3_template::match(const BC__octet3& 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.informationTransferCapability().is_bound()) return FALSE;
if(!single_value->field_informationTransferCapability.match(other_value.informationTransferCapability(), legacy))return FALSE;
if(!other_value.transferMode().is_bound()) return FALSE;
if(!single_value->field_transferMode.match(other_value.transferMode(), legacy))return FALSE;
if(!other_value.codingStandard().is_bound()) return FALSE;
if(!single_value->field_codingStandard.match(other_value.codingStandard(), legacy))return FALSE;
if(!other_value.radioChannelRequirement().is_bound()) return FALSE;
if(!single_value->field_radioChannelRequirement.match(other_value.radioChannelRequirement(), legacy))return FALSE;
if(!other_value.extension__octet__3().is_bound()) return FALSE;
if(!single_value->field_extension__octet__3.match(other_value.extension__octet__3(), legacy))return FALSE;
if(!other_value.speech__aux__3a__3b().is_bound()) return FALSE;
if((other_value.speech__aux__3a__3b().ispresent() ? !single_value->field_speech__aux__3a__3b.match((const Speech__AuxiliarySpeech__List&)other_value.speech__aux__3a__3b(), legacy) : !single_value->field_speech__aux__3a__3b.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 @MobileL3_CC_Types.BC_octet3.");
}
return FALSE;
}

boolean BC__octet3_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_informationTransferCapability.is_bound()
 || single_value->field_transferMode.is_bound()
 || single_value->field_codingStandard.is_bound()
 || single_value->field_radioChannelRequirement.is_bound()
 || single_value->field_extension__octet__3.is_bound()
 || (single_value->field_speech__aux__3a__3b.is_omit() || single_value->field_speech__aux__3a__3b.is_bound());
}

boolean BC__octet3_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_informationTransferCapability.is_value()
 && single_value->field_transferMode.is_value()
 && single_value->field_codingStandard.is_value()
 && single_value->field_radioChannelRequirement.is_value()
 && single_value->field_extension__octet__3.is_value()
 && (single_value->field_speech__aux__3a__3b.is_omit() || single_value->field_speech__aux__3a__3b.is_value());
}

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

BC__octet3 BC__octet3_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 @MobileL3_CC_Types.BC_octet3.");
BC__octet3 ret_val;
if (single_value->field_informationTransferCapability.is_bound()) {
ret_val.informationTransferCapability() = single_value->field_informationTransferCapability.valueof();
}
if (single_value->field_transferMode.is_bound()) {
ret_val.transferMode() = single_value->field_transferMode.valueof();
}
if (single_value->field_codingStandard.is_bound()) {
ret_val.codingStandard() = single_value->field_codingStandard.valueof();
}
if (single_value->field_radioChannelRequirement.is_bound()) {
ret_val.radioChannelRequirement() = single_value->field_radioChannelRequirement.valueof();
}
if (single_value->field_extension__octet__3.is_bound()) {
ret_val.extension__octet__3() = single_value->field_extension__octet__3.valueof();
}
if (single_value->field_speech__aux__3a__3b.is_omit()) ret_val.speech__aux__3a__3b() = OMIT_VALUE;
else if (single_value->field_speech__aux__3a__3b.is_bound()) {
ret_val.speech__aux__3a__3b() = single_value->field_speech__aux__3a__3b.valueof();
}
return ret_val;
}

void BC__octet3_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 @MobileL3_CC_Types.BC_octet3.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new BC__octet3_template[list_length];
}

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

BITSTRING_template& BC__octet3_template::informationTransferCapability()
{
set_specific();
return single_value->field_informationTransferCapability;
}

const BITSTRING_template& BC__octet3_template::informationTransferCapability() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field informationTransferCapability of a non-specific template of type @MobileL3_CC_Types.BC_octet3.");
return single_value->field_informationTransferCapability;
}

BITSTRING_template& BC__octet3_template::transferMode()
{
set_specific();
return single_value->field_transferMode;
}

const BITSTRING_template& BC__octet3_template::transferMode() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field transferMode of a non-specific template of type @MobileL3_CC_Types.BC_octet3.");
return single_value->field_transferMode;
}

BITSTRING_template& BC__octet3_template::codingStandard()
{
set_specific();
return single_value->field_codingStandard;
}

const BITSTRING_template& BC__octet3_template::codingStandard() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field codingStandard of a non-specific template of type @MobileL3_CC_Types.BC_octet3.");
return single_value->field_codingStandard;
}

BITSTRING_template& BC__octet3_template::radioChannelRequirement()
{
set_specific();
return single_value->field_radioChannelRequirement;
}

const BITSTRING_template& BC__octet3_template::radioChannelRequirement() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field radioChannelRequirement of a non-specific template of type @MobileL3_CC_Types.BC_octet3.");
return single_value->field_radioChannelRequirement;
}

BITSTRING_template& BC__octet3_template::extension__octet__3()
{
set_specific();
return single_value->field_extension__octet__3;
}

const BITSTRING_template& BC__octet3_template::extension__octet__3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_3 of a non-specific template of type @MobileL3_CC_Types.BC_octet3.");
return single_value->field_extension__octet__3;
}

Speech__AuxiliarySpeech__List_template& BC__octet3_template::speech__aux__3a__3b()
{
set_specific();
return single_value->field_speech__aux__3a__3b;
}

const Speech__AuxiliarySpeech__List_template& BC__octet3_template::speech__aux__3a__3b() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field speech_aux_3a_3b of a non-specific template of type @MobileL3_CC_Types.BC_octet3.");
return single_value->field_speech__aux__3a__3b;
}

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

void BC__octet3_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ informationTransferCapability := ");
single_value->field_informationTransferCapability.log();
TTCN_Logger::log_event_str(", transferMode := ");
single_value->field_transferMode.log();
TTCN_Logger::log_event_str(", codingStandard := ");
single_value->field_codingStandard.log();
TTCN_Logger::log_event_str(", radioChannelRequirement := ");
single_value->field_radioChannelRequirement.log();
TTCN_Logger::log_event_str(", extension_octet_3 := ");
single_value->field_extension__octet__3.log();
TTCN_Logger::log_event_str(", speech_aux_3a_3b := ");
single_value->field_speech__aux__3a__3b.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 BC__octet3_template::log_match(const BC__octet3& 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_informationTransferCapability.match(match_value.informationTransferCapability(), legacy)){
TTCN_Logger::log_logmatch_info(".informationTransferCapability");
single_value->field_informationTransferCapability.log_match(match_value.informationTransferCapability(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_transferMode.match(match_value.transferMode(), legacy)){
TTCN_Logger::log_logmatch_info(".transferMode");
single_value->field_transferMode.log_match(match_value.transferMode(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_codingStandard.match(match_value.codingStandard(), legacy)){
TTCN_Logger::log_logmatch_info(".codingStandard");
single_value->field_codingStandard.log_match(match_value.codingStandard(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_radioChannelRequirement.match(match_value.radioChannelRequirement(), legacy)){
TTCN_Logger::log_logmatch_info(".radioChannelRequirement");
single_value->field_radioChannelRequirement.log_match(match_value.radioChannelRequirement(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_extension__octet__3.match(match_value.extension__octet__3(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_3");
single_value->field_extension__octet__3.log_match(match_value.extension__octet__3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.speech__aux__3a__3b().ispresent()){
if(!single_value->field_speech__aux__3a__3b.match(match_value.speech__aux__3a__3b(), legacy)){
TTCN_Logger::log_logmatch_info(".speech_aux_3a_3b");
single_value->field_speech__aux__3a__3b.log_match(match_value.speech__aux__3a__3b(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_speech__aux__3a__3b.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".speech_aux_3a_3b := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_speech__aux__3a__3b.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("{ informationTransferCapability := ");
single_value->field_informationTransferCapability.log_match(match_value.informationTransferCapability(), legacy);
TTCN_Logger::log_event_str(", transferMode := ");
single_value->field_transferMode.log_match(match_value.transferMode(), legacy);
TTCN_Logger::log_event_str(", codingStandard := ");
single_value->field_codingStandard.log_match(match_value.codingStandard(), legacy);
TTCN_Logger::log_event_str(", radioChannelRequirement := ");
single_value->field_radioChannelRequirement.log_match(match_value.radioChannelRequirement(), legacy);
TTCN_Logger::log_event_str(", extension_octet_3 := ");
single_value->field_extension__octet__3.log_match(match_value.extension__octet__3(), legacy);
TTCN_Logger::log_event_str(", speech_aux_3a_3b := ");
if (match_value.speech__aux__3a__3b().ispresent()) {
single_value->field_speech__aux__3a__3b.log_match(match_value.speech__aux__3a__3b(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_speech__aux__3a__3b.log();
if (single_value->field_speech__aux__3a__3b.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 BC__octet3_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (informationTransferCapability().is_bound()) informationTransferCapability().set_implicit_omit();
if (transferMode().is_bound()) transferMode().set_implicit_omit();
if (codingStandard().is_bound()) codingStandard().set_implicit_omit();
if (radioChannelRequirement().is_bound()) radioChannelRequirement().set_implicit_omit();
if (extension__octet__3().is_bound()) extension__octet__3().set_implicit_omit();
if (!speech__aux__3a__3b().is_bound()) speech__aux__3a__3b() = OMIT_VALUE;
else speech__aux__3a__3b().set_implicit_omit();
}

void BC__octet3_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_informationTransferCapability.encode_text(text_buf);
single_value->field_transferMode.encode_text(text_buf);
single_value->field_codingStandard.encode_text(text_buf);
single_value->field_radioChannelRequirement.encode_text(text_buf);
single_value->field_extension__octet__3.encode_text(text_buf);
single_value->field_speech__aux__3a__3b.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 @MobileL3_CC_Types.BC_octet3.");
}
}

void BC__octet3_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_informationTransferCapability.decode_text(text_buf);
single_value->field_transferMode.decode_text(text_buf);
single_value->field_codingStandard.decode_text(text_buf);
single_value->field_radioChannelRequirement.decode_text(text_buf);
single_value->field_extension__octet__3.decode_text(text_buf);
single_value->field_speech__aux__3a__3b.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 BC__octet3_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 @MobileL3_CC_Types.BC_octet3.");
}
}

void BC__octet3_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: {
    BC__octet3_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 @MobileL3_CC_Types.BC_octet3 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) informationTransferCapability().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) transferMode().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) codingStandard().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) radioChannelRequirement().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) extension__octet__3().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) speech__aux__3a__3b().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(), "informationTransferCapability")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          informationTransferCapability().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "transferMode")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          transferMode().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "codingStandard")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          codingStandard().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "radioChannelRequirement")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          radioChannelRequirement().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "speech_aux_3a_3b")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          speech__aux__3a__3b().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 @MobileL3_CC_Types.BC_octet3: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    BC__octet3_template* precondition = new BC__octet3_template;
    precondition->set_param(*param.get_elem(0));
    BC__octet3_template* implied_template = new BC__octet3_template;
    implied_template->set_param(*param.get_elem(1));
    *this = BC__octet3_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.BC_octet3");
  }
  is_ifpresent = param.get_ifpresent();
}

void BC__octet3_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_informationTransferCapability.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet3");
single_value->field_transferMode.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet3");
single_value->field_codingStandard.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet3");
single_value->field_radioChannelRequirement.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet3");
single_value->field_extension__octet__3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet3");
single_value->field_speech__aux__3a__3b.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BC_octet3");
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 : "@MobileL3_CC_Types.BC_octet3");
}

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

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

BearerCapability__TLV::BearerCapability__TLV()
{
}

BearerCapability__TLV::BearerCapability__TLV(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const BC__octet3& par_octet3,
    const OPTIONAL< BC__octet4 >& par_octet4,
    const OPTIONAL< BC__octet5 >& par_octet5,
    const OPTIONAL< BC__octet6 >& par_octet6,
    const OPTIONAL< BC__octet7 >& par_octet7)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_octet3(par_octet3),
  field_octet4(par_octet4),
  field_octet5(par_octet5),
  field_octet6(par_octet6),
  field_octet7(par_octet7)
{
}

BearerCapability__TLV::BearerCapability__TLV(const BearerCapability__TLV& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.BearerCapability_TLV.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.octet3().is_bound()) field_octet3 = other_value.octet3();
else field_octet3.clean_up();
if (other_value.octet4().is_bound()) field_octet4 = other_value.octet4();
else field_octet4.clean_up();
if (other_value.octet5().is_bound()) field_octet5 = other_value.octet5();
else field_octet5.clean_up();
if (other_value.octet6().is_bound()) field_octet6 = other_value.octet6();
else field_octet6.clean_up();
if (other_value.octet7().is_bound()) field_octet7 = other_value.octet7();
else field_octet7.clean_up();
}

void BearerCapability__TLV::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_octet3.clean_up();
field_octet4.clean_up();
field_octet5.clean_up();
field_octet6.clean_up();
field_octet7.clean_up();
}

const TTCN_Typedescriptor_t* BearerCapability__TLV::get_descriptor() const { return &BearerCapability__TLV_descr_; }
BearerCapability__TLV& BearerCapability__TLV::operator=(const BearerCapability__TLV& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.BearerCapability_TLV.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.octet3().is_bound()) field_octet3 = other_value.octet3();
  else field_octet3.clean_up();
  if (other_value.octet4().is_bound()) field_octet4 = other_value.octet4();
  else field_octet4.clean_up();
  if (other_value.octet5().is_bound()) field_octet5 = other_value.octet5();
  else field_octet5.clean_up();
  if (other_value.octet6().is_bound()) field_octet6 = other_value.octet6();
  else field_octet6.clean_up();
  if (other_value.octet7().is_bound()) field_octet7 = other_value.octet7();
  else field_octet7.clean_up();
}
return *this;
}

boolean BearerCapability__TLV::operator==(const BearerCapability__TLV& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_octet3==other_value.field_octet3
  && field_octet4==other_value.field_octet4
  && field_octet5==other_value.field_octet5
  && field_octet6==other_value.field_octet6
  && field_octet7==other_value.field_octet7;
}

boolean BearerCapability__TLV::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (field_octet3.is_bound())
  || (OPTIONAL_OMIT == field_octet4.get_selection() || field_octet4.is_bound())
  || (OPTIONAL_OMIT == field_octet5.get_selection() || field_octet5.is_bound())
  || (OPTIONAL_OMIT == field_octet6.get_selection() || field_octet6.is_bound())
  || (OPTIONAL_OMIT == field_octet7.get_selection() || field_octet7.is_bound());
}
boolean BearerCapability__TLV::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && field_octet3.is_value()
  && (OPTIONAL_OMIT == field_octet4.get_selection() || field_octet4.is_value())
  && (OPTIONAL_OMIT == field_octet5.get_selection() || field_octet5.is_value())
  && (OPTIONAL_OMIT == field_octet6.get_selection() || field_octet6.is_value())
  && (OPTIONAL_OMIT == field_octet7.get_selection() || field_octet7.is_value());
}
int BearerCapability__TLV::size_of() const
{
  int ret_val = 3;
  if (field_octet4.ispresent()) ret_val++;
  if (field_octet5.ispresent()) ret_val++;
  if (field_octet6.ispresent()) ret_val++;
  if (field_octet7.ispresent()) ret_val++;
  return ret_val;
}

void BearerCapability__TLV::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", octet3 := ");
field_octet3.log();
TTCN_Logger::log_event_str(", octet4 := ");
field_octet4.log();
TTCN_Logger::log_event_str(", octet5 := ");
field_octet5.log();
TTCN_Logger::log_event_str(", octet6 := ");
field_octet6.log();
TTCN_Logger::log_event_str(", octet7 := ");
field_octet7.log();
TTCN_Logger::log_event_str(" }");
}

void BearerCapability__TLV::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (octet3().is_bound()) octet3().set_implicit_omit();
if (!octet4().is_bound()) octet4() = OMIT_VALUE;
else octet4().set_implicit_omit();
if (!octet5().is_bound()) octet5() = OMIT_VALUE;
else octet5().set_implicit_omit();
if (!octet6().is_bound()) octet6() = OMIT_VALUE;
else octet6().set_implicit_omit();
if (!octet7().is_bound()) octet7() = OMIT_VALUE;
else octet7().set_implicit_omit();
}

void BearerCapability__TLV::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 @MobileL3_CC_Types.BearerCapability_TLV 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) octet3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) octet4().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) octet5().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) octet6().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) octet7().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet4().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet5")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet5().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet6")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet6().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet7")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet7().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 @MobileL3_CC_Types.BearerCapability_TLV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.BearerCapability_TLV");
  }
}

void BearerCapability__TLV::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_octet3.encode_text(text_buf);
field_octet4.encode_text(text_buf);
field_octet5.encode_text(text_buf);
field_octet6.encode_text(text_buf);
field_octet7.encode_text(text_buf);
}

void BearerCapability__TLV::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_octet3.decode_text(text_buf);
field_octet4.decode_text(text_buf);
field_octet5.decode_text(text_buf);
field_octet6.decode_text(text_buf);
field_octet7.decode_text(text_buf);
}

void BearerCapability__TLV::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 BearerCapability__TLV::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 BearerCapability__TLV::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, BearerCapability__TLV_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(BearerCapability__TLV_lengthIndicator_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_lengthIndicator.convert_to_Integer(BearerCapability__TLV_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  RAW_Force_Omit field_2_force_omit(2, force_omit, BC__octet3_descr_.raw->forceomit);
  decoded_field_length = field_octet3.RAW_decode(BC__octet3_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;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_octet4 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, BC__octet4_descr_.raw->forceomit);
  decoded_field_length = field_octet4().RAW_decode(BC__octet4_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_octet4 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_octet4=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_octet5 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, BC__octet5_descr_.raw->forceomit);
  decoded_field_length = field_octet5().RAW_decode(BC__octet5_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_octet5 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_octet5=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_octet6 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, BC__octet6_descr_.raw->forceomit);
  decoded_field_length = field_octet6().RAW_decode(BC__octet6_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_octet6 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_octet6=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_octet7 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, BC__octet7_descr_.raw->forceomit);
  decoded_field_length = field_octet7().RAW_decode(BC__octet7_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_octet7 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_octet7=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int BearerCapability__TLV::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, BearerCapability__TLV_lengthIndicator_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, BC__octet3_descr_.raw);
  if (field_octet4.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, BC__octet4_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_octet5.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, BC__octet5_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_octet6.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, BC__octet6_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_octet7.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, BC__octet7_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &BearerCapability__TLV_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 5;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(5);
  myleaf.body.node.nodes[1]->length = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[2]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[2]->curr_pos.pos;
  if (field_octet4.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = 0;
  }
  if (field_octet5.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = myleaf.body.node.nodes[4]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = myleaf.body.node.nodes[4]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = 0;
  }
  if (field_octet6.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = myleaf.body.node.nodes[5]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = myleaf.body.node.nodes[5]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = 0;
  }
  if (field_octet7.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].level = myleaf.body.node.nodes[6]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].pos = myleaf.body.node.nodes[6]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].pos = 0;
  }
  encoded_length += field_octet3.RAW_encode(BC__octet3_descr_, *myleaf.body.node.nodes[2]);
  if (field_octet4.ispresent()) {
  encoded_length += field_octet4().RAW_encode(BC__octet4_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_octet5.ispresent()) {
  encoded_length += field_octet5().RAW_encode(BC__octet5_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_octet6.ispresent()) {
  encoded_length += field_octet6().RAW_encode(BC__octet6_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_octet7.ispresent()) {
  encoded_length += field_octet7().RAW_encode(BC__octet7_descr_, *myleaf.body.node.nodes[6]);
  }
  return myleaf.length = encoded_length;
}

struct BearerCapability__TLV_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
BC__octet3_template field_octet3;
BC__octet4_template field_octet4;
BC__octet5_template field_octet5;
BC__octet6_template field_octet6;
BC__octet7_template field_octet7;
};

void BearerCapability__TLV_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_octet3 = ANY_VALUE;
single_value->field_octet4 = ANY_OR_OMIT;
single_value->field_octet5 = ANY_OR_OMIT;
single_value->field_octet6 = ANY_OR_OMIT;
single_value->field_octet7 = ANY_OR_OMIT;
}
}
}

void BearerCapability__TLV_template::copy_value(const BearerCapability__TLV& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.octet3().is_bound()) {
  single_value->field_octet3 = other_value.octet3();
} else {
  single_value->field_octet3.clean_up();
}
if (other_value.octet4().is_bound()) {
  if (other_value.octet4().ispresent()) single_value->field_octet4 = other_value.octet4()();
  else single_value->field_octet4 = OMIT_VALUE;
} else {
  single_value->field_octet4.clean_up();
}
if (other_value.octet5().is_bound()) {
  if (other_value.octet5().ispresent()) single_value->field_octet5 = other_value.octet5()();
  else single_value->field_octet5 = OMIT_VALUE;
} else {
  single_value->field_octet5.clean_up();
}
if (other_value.octet6().is_bound()) {
  if (other_value.octet6().ispresent()) single_value->field_octet6 = other_value.octet6()();
  else single_value->field_octet6 = OMIT_VALUE;
} else {
  single_value->field_octet6.clean_up();
}
if (other_value.octet7().is_bound()) {
  if (other_value.octet7().ispresent()) single_value->field_octet7 = other_value.octet7()();
  else single_value->field_octet7 = OMIT_VALUE;
} else {
  single_value->field_octet7.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void BearerCapability__TLV_template::copy_template(const BearerCapability__TLV_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet3().get_selection()) {
single_value->field_octet3 = other_value.octet3();
} else {
single_value->field_octet3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet4().get_selection()) {
single_value->field_octet4 = other_value.octet4();
} else {
single_value->field_octet4.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet5().get_selection()) {
single_value->field_octet5 = other_value.octet5();
} else {
single_value->field_octet5.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet6().get_selection()) {
single_value->field_octet6 = other_value.octet6();
} else {
single_value->field_octet6.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet7().get_selection()) {
single_value->field_octet7 = other_value.octet7();
} else {
single_value->field_octet7.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 BearerCapability__TLV_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 BearerCapability__TLV_template(*other_value.implication_.precondition);
implication_.implied_template = new BearerCapability__TLV_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 @MobileL3_CC_Types.BearerCapability_TLV.");
break;
}
set_selection(other_value);
}

BearerCapability__TLV_template::BearerCapability__TLV_template()
{
}

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

BearerCapability__TLV_template::BearerCapability__TLV_template(const BearerCapability__TLV& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean BearerCapability__TLV_template::match(const BearerCapability__TLV& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.octet3().is_bound()) return FALSE;
if(!single_value->field_octet3.match(other_value.octet3(), legacy))return FALSE;
if(!other_value.octet4().is_bound()) return FALSE;
if((other_value.octet4().ispresent() ? !single_value->field_octet4.match((const BC__octet4&)other_value.octet4(), legacy) : !single_value->field_octet4.match_omit(legacy)))return FALSE;
if(!other_value.octet5().is_bound()) return FALSE;
if((other_value.octet5().ispresent() ? !single_value->field_octet5.match((const BC__octet5&)other_value.octet5(), legacy) : !single_value->field_octet5.match_omit(legacy)))return FALSE;
if(!other_value.octet6().is_bound()) return FALSE;
if((other_value.octet6().ispresent() ? !single_value->field_octet6.match((const BC__octet6&)other_value.octet6(), legacy) : !single_value->field_octet6.match_omit(legacy)))return FALSE;
if(!other_value.octet7().is_bound()) return FALSE;
if((other_value.octet7().ispresent() ? !single_value->field_octet7.match((const BC__octet7&)other_value.octet7(), legacy) : !single_value->field_octet7.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 @MobileL3_CC_Types.BearerCapability_TLV.");
}
return FALSE;
}

boolean BearerCapability__TLV_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || single_value->field_octet3.is_bound()
 || (single_value->field_octet4.is_omit() || single_value->field_octet4.is_bound())
 || (single_value->field_octet5.is_omit() || single_value->field_octet5.is_bound())
 || (single_value->field_octet6.is_omit() || single_value->field_octet6.is_bound())
 || (single_value->field_octet7.is_omit() || single_value->field_octet7.is_bound());
}

boolean BearerCapability__TLV_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && single_value->field_octet3.is_value()
 && (single_value->field_octet4.is_omit() || single_value->field_octet4.is_value())
 && (single_value->field_octet5.is_omit() || single_value->field_octet5.is_value())
 && (single_value->field_octet6.is_omit() || single_value->field_octet6.is_value())
 && (single_value->field_octet7.is_omit() || single_value->field_octet7.is_value());
}

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

BearerCapability__TLV BearerCapability__TLV_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 @MobileL3_CC_Types.BearerCapability_TLV.");
BearerCapability__TLV ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_octet3.is_bound()) {
ret_val.octet3() = single_value->field_octet3.valueof();
}
if (single_value->field_octet4.is_omit()) ret_val.octet4() = OMIT_VALUE;
else if (single_value->field_octet4.is_bound()) {
ret_val.octet4() = single_value->field_octet4.valueof();
}
if (single_value->field_octet5.is_omit()) ret_val.octet5() = OMIT_VALUE;
else if (single_value->field_octet5.is_bound()) {
ret_val.octet5() = single_value->field_octet5.valueof();
}
if (single_value->field_octet6.is_omit()) ret_val.octet6() = OMIT_VALUE;
else if (single_value->field_octet6.is_bound()) {
ret_val.octet6() = single_value->field_octet6.valueof();
}
if (single_value->field_octet7.is_omit()) ret_val.octet7() = OMIT_VALUE;
else if (single_value->field_octet7.is_bound()) {
ret_val.octet7() = single_value->field_octet7.valueof();
}
return ret_val;
}

void BearerCapability__TLV_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 @MobileL3_CC_Types.BearerCapability_TLV.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new BearerCapability__TLV_template[list_length];
}

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

OCTETSTRING_template& BearerCapability__TLV_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& BearerCapability__TLV_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.BearerCapability_TLV.");
return single_value->field_elementIdentifier;
}

INTEGER_template& BearerCapability__TLV_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& BearerCapability__TLV_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.BearerCapability_TLV.");
return single_value->field_lengthIndicator;
}

BC__octet3_template& BearerCapability__TLV_template::octet3()
{
set_specific();
return single_value->field_octet3;
}

const BC__octet3_template& BearerCapability__TLV_template::octet3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet3 of a non-specific template of type @MobileL3_CC_Types.BearerCapability_TLV.");
return single_value->field_octet3;
}

BC__octet4_template& BearerCapability__TLV_template::octet4()
{
set_specific();
return single_value->field_octet4;
}

const BC__octet4_template& BearerCapability__TLV_template::octet4() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet4 of a non-specific template of type @MobileL3_CC_Types.BearerCapability_TLV.");
return single_value->field_octet4;
}

BC__octet5_template& BearerCapability__TLV_template::octet5()
{
set_specific();
return single_value->field_octet5;
}

const BC__octet5_template& BearerCapability__TLV_template::octet5() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet5 of a non-specific template of type @MobileL3_CC_Types.BearerCapability_TLV.");
return single_value->field_octet5;
}

BC__octet6_template& BearerCapability__TLV_template::octet6()
{
set_specific();
return single_value->field_octet6;
}

const BC__octet6_template& BearerCapability__TLV_template::octet6() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet6 of a non-specific template of type @MobileL3_CC_Types.BearerCapability_TLV.");
return single_value->field_octet6;
}

BC__octet7_template& BearerCapability__TLV_template::octet7()
{
set_specific();
return single_value->field_octet7;
}

const BC__octet7_template& BearerCapability__TLV_template::octet7() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet7 of a non-specific template of type @MobileL3_CC_Types.BearerCapability_TLV.");
return single_value->field_octet7;
}

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

void BearerCapability__TLV_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", octet3 := ");
single_value->field_octet3.log();
TTCN_Logger::log_event_str(", octet4 := ");
single_value->field_octet4.log();
TTCN_Logger::log_event_str(", octet5 := ");
single_value->field_octet5.log();
TTCN_Logger::log_event_str(", octet6 := ");
single_value->field_octet6.log();
TTCN_Logger::log_event_str(", octet7 := ");
single_value->field_octet7.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 BearerCapability__TLV_template::log_match(const BearerCapability__TLV& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_octet3.match(match_value.octet3(), legacy)){
TTCN_Logger::log_logmatch_info(".octet3");
single_value->field_octet3.log_match(match_value.octet3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.octet4().ispresent()){
if(!single_value->field_octet4.match(match_value.octet4(), legacy)){
TTCN_Logger::log_logmatch_info(".octet4");
single_value->field_octet4.log_match(match_value.octet4(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_octet4.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".octet4 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_octet4.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.octet5().ispresent()){
if(!single_value->field_octet5.match(match_value.octet5(), legacy)){
TTCN_Logger::log_logmatch_info(".octet5");
single_value->field_octet5.log_match(match_value.octet5(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_octet5.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".octet5 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_octet5.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.octet6().ispresent()){
if(!single_value->field_octet6.match(match_value.octet6(), legacy)){
TTCN_Logger::log_logmatch_info(".octet6");
single_value->field_octet6.log_match(match_value.octet6(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_octet6.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".octet6 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_octet6.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.octet7().ispresent()){
if(!single_value->field_octet7.match(match_value.octet7(), legacy)){
TTCN_Logger::log_logmatch_info(".octet7");
single_value->field_octet7.log_match(match_value.octet7(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_octet7.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".octet7 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_octet7.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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", octet3 := ");
single_value->field_octet3.log_match(match_value.octet3(), legacy);
TTCN_Logger::log_event_str(", octet4 := ");
if (match_value.octet4().ispresent()) {
single_value->field_octet4.log_match(match_value.octet4(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_octet4.log();
if (single_value->field_octet4.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", octet5 := ");
if (match_value.octet5().ispresent()) {
single_value->field_octet5.log_match(match_value.octet5(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_octet5.log();
if (single_value->field_octet5.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", octet6 := ");
if (match_value.octet6().ispresent()) {
single_value->field_octet6.log_match(match_value.octet6(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_octet6.log();
if (single_value->field_octet6.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", octet7 := ");
if (match_value.octet7().ispresent()) {
single_value->field_octet7.log_match(match_value.octet7(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_octet7.log();
if (single_value->field_octet7.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 BearerCapability__TLV_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (octet3().is_bound()) octet3().set_implicit_omit();
if (!octet4().is_bound()) octet4() = OMIT_VALUE;
else octet4().set_implicit_omit();
if (!octet5().is_bound()) octet5() = OMIT_VALUE;
else octet5().set_implicit_omit();
if (!octet6().is_bound()) octet6() = OMIT_VALUE;
else octet6().set_implicit_omit();
if (!octet7().is_bound()) octet7() = OMIT_VALUE;
else octet7().set_implicit_omit();
}

void BearerCapability__TLV_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_octet3.encode_text(text_buf);
single_value->field_octet4.encode_text(text_buf);
single_value->field_octet5.encode_text(text_buf);
single_value->field_octet6.encode_text(text_buf);
single_value->field_octet7.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 @MobileL3_CC_Types.BearerCapability_TLV.");
}
}

void BearerCapability__TLV_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_octet3.decode_text(text_buf);
single_value->field_octet4.decode_text(text_buf);
single_value->field_octet5.decode_text(text_buf);
single_value->field_octet6.decode_text(text_buf);
single_value->field_octet7.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 BearerCapability__TLV_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 @MobileL3_CC_Types.BearerCapability_TLV.");
}
}

void BearerCapability__TLV_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: {
    BearerCapability__TLV_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 @MobileL3_CC_Types.BearerCapability_TLV 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) octet3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) octet4().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) octet5().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) octet6().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) octet7().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet4().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet5")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet5().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet6")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet6().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet7")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet7().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 @MobileL3_CC_Types.BearerCapability_TLV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    BearerCapability__TLV_template* precondition = new BearerCapability__TLV_template;
    precondition->set_param(*param.get_elem(0));
    BearerCapability__TLV_template* implied_template = new BearerCapability__TLV_template;
    implied_template->set_param(*param.get_elem(1));
    *this = BearerCapability__TLV_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.BearerCapability_TLV");
  }
  is_ifpresent = param.get_ifpresent();
}

void BearerCapability__TLV_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BearerCapability_TLV");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BearerCapability_TLV");
single_value->field_octet3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BearerCapability_TLV");
single_value->field_octet4.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BearerCapability_TLV");
single_value->field_octet5.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BearerCapability_TLV");
single_value->field_octet6.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BearerCapability_TLV");
single_value->field_octet7.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BearerCapability_TLV");
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 : "@MobileL3_CC_Types.BearerCapability_TLV");
}

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

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

BearerCapability__LV::BearerCapability__LV()
{
}

BearerCapability__LV::BearerCapability__LV(const INTEGER& par_lengthIndicator,
    const BC__octet3& par_octet3,
    const OPTIONAL< BC__octet4 >& par_octet4,
    const OPTIONAL< BC__octet5 >& par_octet5,
    const OPTIONAL< BC__octet6 >& par_octet6,
    const OPTIONAL< BC__octet7 >& par_octet7)
  :   field_lengthIndicator(par_lengthIndicator),
  field_octet3(par_octet3),
  field_octet4(par_octet4),
  field_octet5(par_octet5),
  field_octet6(par_octet6),
  field_octet7(par_octet7)
{
}

BearerCapability__LV::BearerCapability__LV(const BearerCapability__LV& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.BearerCapability_LV.");
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.octet3().is_bound()) field_octet3 = other_value.octet3();
else field_octet3.clean_up();
if (other_value.octet4().is_bound()) field_octet4 = other_value.octet4();
else field_octet4.clean_up();
if (other_value.octet5().is_bound()) field_octet5 = other_value.octet5();
else field_octet5.clean_up();
if (other_value.octet6().is_bound()) field_octet6 = other_value.octet6();
else field_octet6.clean_up();
if (other_value.octet7().is_bound()) field_octet7 = other_value.octet7();
else field_octet7.clean_up();
}

void BearerCapability__LV::clean_up()
{
field_lengthIndicator.clean_up();
field_octet3.clean_up();
field_octet4.clean_up();
field_octet5.clean_up();
field_octet6.clean_up();
field_octet7.clean_up();
}

const TTCN_Typedescriptor_t* BearerCapability__LV::get_descriptor() const { return &BearerCapability__LV_descr_; }
BearerCapability__LV& BearerCapability__LV::operator=(const BearerCapability__LV& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.BearerCapability_LV.");
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.octet3().is_bound()) field_octet3 = other_value.octet3();
  else field_octet3.clean_up();
  if (other_value.octet4().is_bound()) field_octet4 = other_value.octet4();
  else field_octet4.clean_up();
  if (other_value.octet5().is_bound()) field_octet5 = other_value.octet5();
  else field_octet5.clean_up();
  if (other_value.octet6().is_bound()) field_octet6 = other_value.octet6();
  else field_octet6.clean_up();
  if (other_value.octet7().is_bound()) field_octet7 = other_value.octet7();
  else field_octet7.clean_up();
}
return *this;
}

boolean BearerCapability__LV::operator==(const BearerCapability__LV& other_value) const
{
return field_lengthIndicator==other_value.field_lengthIndicator
  && field_octet3==other_value.field_octet3
  && field_octet4==other_value.field_octet4
  && field_octet5==other_value.field_octet5
  && field_octet6==other_value.field_octet6
  && field_octet7==other_value.field_octet7;
}

boolean BearerCapability__LV::is_bound() const
{
return (field_lengthIndicator.is_bound())
  || (field_octet3.is_bound())
  || (OPTIONAL_OMIT == field_octet4.get_selection() || field_octet4.is_bound())
  || (OPTIONAL_OMIT == field_octet5.get_selection() || field_octet5.is_bound())
  || (OPTIONAL_OMIT == field_octet6.get_selection() || field_octet6.is_bound())
  || (OPTIONAL_OMIT == field_octet7.get_selection() || field_octet7.is_bound());
}
boolean BearerCapability__LV::is_value() const
{
return field_lengthIndicator.is_value()
  && field_octet3.is_value()
  && (OPTIONAL_OMIT == field_octet4.get_selection() || field_octet4.is_value())
  && (OPTIONAL_OMIT == field_octet5.get_selection() || field_octet5.is_value())
  && (OPTIONAL_OMIT == field_octet6.get_selection() || field_octet6.is_value())
  && (OPTIONAL_OMIT == field_octet7.get_selection() || field_octet7.is_value());
}
int BearerCapability__LV::size_of() const
{
  int ret_val = 2;
  if (field_octet4.ispresent()) ret_val++;
  if (field_octet5.ispresent()) ret_val++;
  if (field_octet6.ispresent()) ret_val++;
  if (field_octet7.ispresent()) ret_val++;
  return ret_val;
}

void BearerCapability__LV::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", octet3 := ");
field_octet3.log();
TTCN_Logger::log_event_str(", octet4 := ");
field_octet4.log();
TTCN_Logger::log_event_str(", octet5 := ");
field_octet5.log();
TTCN_Logger::log_event_str(", octet6 := ");
field_octet6.log();
TTCN_Logger::log_event_str(", octet7 := ");
field_octet7.log();
TTCN_Logger::log_event_str(" }");
}

void BearerCapability__LV::set_implicit_omit()
{
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (octet3().is_bound()) octet3().set_implicit_omit();
if (!octet4().is_bound()) octet4() = OMIT_VALUE;
else octet4().set_implicit_omit();
if (!octet5().is_bound()) octet5() = OMIT_VALUE;
else octet5().set_implicit_omit();
if (!octet6().is_bound()) octet6() = OMIT_VALUE;
else octet6().set_implicit_omit();
if (!octet7().is_bound()) octet7() = OMIT_VALUE;
else octet7().set_implicit_omit();
}

void BearerCapability__LV::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 @MobileL3_CC_Types.BearerCapability_LV 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) lengthIndicator().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) octet3().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) octet4().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) octet5().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) octet6().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) octet7().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(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet4().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet5")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet5().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet6")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet6().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet7")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet7().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 @MobileL3_CC_Types.BearerCapability_LV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.BearerCapability_LV");
  }
}

void BearerCapability__LV::encode_text(Text_Buf& text_buf) const
{
field_lengthIndicator.encode_text(text_buf);
field_octet3.encode_text(text_buf);
field_octet4.encode_text(text_buf);
field_octet5.encode_text(text_buf);
field_octet6.encode_text(text_buf);
field_octet7.encode_text(text_buf);
}

void BearerCapability__LV::decode_text(Text_Buf& text_buf)
{
field_lengthIndicator.decode_text(text_buf);
field_octet3.decode_text(text_buf);
field_octet4.decode_text(text_buf);
field_octet5.decode_text(text_buf);
field_octet6.decode_text(text_buf);
field_octet7.decode_text(text_buf);
}

void BearerCapability__LV::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 BearerCapability__LV::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 BearerCapability__LV::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_field0 = 0;
  RAW_Force_Omit field_0_force_omit(0, force_omit, BearerCapability__LV_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(BearerCapability__LV_lengthIndicator_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());
  INTEGER tmp0 = field_lengthIndicator.convert_to_Integer(BearerCapability__LV_lengthIndicator_descr_);
  field_lengthIndicator = tmp0;
  value_of_length_field0 += tmp0.get_long_long_val() * 8;
  RAW_Force_Omit field_1_force_omit(1, force_omit, BC__octet3_descr_.raw->forceomit);
  decoded_field_length = field_octet3.RAW_decode(BC__octet3_descr_, p_buf, min_of_ints(2, limit, value_of_length_field0), 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());
  value_of_length_field0 -= decoded_field_length;
  if (limit > 0 && value_of_length_field0 > 0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_octet4 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, BC__octet4_descr_.raw->forceomit);
  decoded_field_length = field_octet4().RAW_decode(BC__octet4_descr_, p_buf, min_of_ints(2, limit, value_of_length_field0), local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_octet4 = 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());
  value_of_length_field0 -= decoded_field_length;
  }
  }
  }
  else field_octet4=OMIT_VALUE;
  if (limit > 0 && value_of_length_field0 > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_octet5 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, BC__octet5_descr_.raw->forceomit);
  decoded_field_length = field_octet5().RAW_decode(BC__octet5_descr_, p_buf, min_of_ints(2, limit, value_of_length_field0), local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_octet5 = 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());
  value_of_length_field0 -= decoded_field_length;
  }
  }
  }
  else field_octet5=OMIT_VALUE;
  if (limit > 0 && value_of_length_field0 > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_octet6 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, BC__octet6_descr_.raw->forceomit);
  decoded_field_length = field_octet6().RAW_decode(BC__octet6_descr_, p_buf, min_of_ints(2, limit, value_of_length_field0), local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_octet6 = 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());
  value_of_length_field0 -= decoded_field_length;
  }
  }
  }
  else field_octet6=OMIT_VALUE;
  if (limit > 0 && value_of_length_field0 > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_octet7 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, BC__octet7_descr_.raw->forceomit);
  decoded_field_length = field_octet7().RAW_decode(BC__octet7_descr_, p_buf, min_of_ints(2, limit, value_of_length_field0), local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_octet7 = 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());
  value_of_length_field0 -= decoded_field_length;
  }
  }
  }
  else field_octet7=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int BearerCapability__LV::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, BearerCapability__LV_lengthIndicator_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, BC__octet3_descr_.raw);
  if (field_octet4.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, BC__octet4_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_octet5.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, BC__octet5_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_octet6.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, BC__octet6_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_octet7.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, BC__octet7_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  encoded_length += 8;
  myleaf.body.node.nodes[0]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[0]->coding_descr = &BearerCapability__LV_lengthIndicator_descr_;
  myleaf.body.node.nodes[0]->calcof.lengthto.num_of_fields = 5;
  myleaf.body.node.nodes[0]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[0]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields = init_lengthto_fields_list(5);
  myleaf.body.node.nodes[0]->length = 8;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[1]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[1]->curr_pos.pos;
  if (field_octet4.ispresent()) {
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[2]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[2]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[1].level = 0;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[1].pos = 0;
  }
  if (field_octet5.ispresent()) {
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[2].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[2].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[2].level = 0;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[2].pos = 0;
  }
  if (field_octet6.ispresent()) {
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[3].level = myleaf.body.node.nodes[4]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[3].pos = myleaf.body.node.nodes[4]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[3].level = 0;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[3].pos = 0;
  }
  if (field_octet7.ispresent()) {
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[4].level = myleaf.body.node.nodes[5]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[4].pos = myleaf.body.node.nodes[5]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[4].level = 0;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[4].pos = 0;
  }
  encoded_length += field_octet3.RAW_encode(BC__octet3_descr_, *myleaf.body.node.nodes[1]);
  if (field_octet4.ispresent()) {
  encoded_length += field_octet4().RAW_encode(BC__octet4_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_octet5.ispresent()) {
  encoded_length += field_octet5().RAW_encode(BC__octet5_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_octet6.ispresent()) {
  encoded_length += field_octet6().RAW_encode(BC__octet6_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_octet7.ispresent()) {
  encoded_length += field_octet7().RAW_encode(BC__octet7_descr_, *myleaf.body.node.nodes[5]);
  }
  return myleaf.length = encoded_length;
}

struct BearerCapability__LV_template::single_value_struct {
INTEGER_template field_lengthIndicator;
BC__octet3_template field_octet3;
BC__octet4_template field_octet4;
BC__octet5_template field_octet5;
BC__octet6_template field_octet6;
BC__octet7_template field_octet7;
};

void BearerCapability__LV_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_lengthIndicator = ANY_VALUE;
single_value->field_octet3 = ANY_VALUE;
single_value->field_octet4 = ANY_OR_OMIT;
single_value->field_octet5 = ANY_OR_OMIT;
single_value->field_octet6 = ANY_OR_OMIT;
single_value->field_octet7 = ANY_OR_OMIT;
}
}
}

void BearerCapability__LV_template::copy_value(const BearerCapability__LV& other_value)
{
single_value = new single_value_struct;
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.octet3().is_bound()) {
  single_value->field_octet3 = other_value.octet3();
} else {
  single_value->field_octet3.clean_up();
}
if (other_value.octet4().is_bound()) {
  if (other_value.octet4().ispresent()) single_value->field_octet4 = other_value.octet4()();
  else single_value->field_octet4 = OMIT_VALUE;
} else {
  single_value->field_octet4.clean_up();
}
if (other_value.octet5().is_bound()) {
  if (other_value.octet5().ispresent()) single_value->field_octet5 = other_value.octet5()();
  else single_value->field_octet5 = OMIT_VALUE;
} else {
  single_value->field_octet5.clean_up();
}
if (other_value.octet6().is_bound()) {
  if (other_value.octet6().ispresent()) single_value->field_octet6 = other_value.octet6()();
  else single_value->field_octet6 = OMIT_VALUE;
} else {
  single_value->field_octet6.clean_up();
}
if (other_value.octet7().is_bound()) {
  if (other_value.octet7().ispresent()) single_value->field_octet7 = other_value.octet7()();
  else single_value->field_octet7 = OMIT_VALUE;
} else {
  single_value->field_octet7.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void BearerCapability__LV_template::copy_template(const BearerCapability__LV_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet3().get_selection()) {
single_value->field_octet3 = other_value.octet3();
} else {
single_value->field_octet3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet4().get_selection()) {
single_value->field_octet4 = other_value.octet4();
} else {
single_value->field_octet4.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet5().get_selection()) {
single_value->field_octet5 = other_value.octet5();
} else {
single_value->field_octet5.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet6().get_selection()) {
single_value->field_octet6 = other_value.octet6();
} else {
single_value->field_octet6.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet7().get_selection()) {
single_value->field_octet7 = other_value.octet7();
} else {
single_value->field_octet7.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 BearerCapability__LV_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 BearerCapability__LV_template(*other_value.implication_.precondition);
implication_.implied_template = new BearerCapability__LV_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 @MobileL3_CC_Types.BearerCapability_LV.");
break;
}
set_selection(other_value);
}

BearerCapability__LV_template::BearerCapability__LV_template()
{
}

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

BearerCapability__LV_template::BearerCapability__LV_template(const BearerCapability__LV& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean BearerCapability__LV_template::match(const BearerCapability__LV& 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.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.octet3().is_bound()) return FALSE;
if(!single_value->field_octet3.match(other_value.octet3(), legacy))return FALSE;
if(!other_value.octet4().is_bound()) return FALSE;
if((other_value.octet4().ispresent() ? !single_value->field_octet4.match((const BC__octet4&)other_value.octet4(), legacy) : !single_value->field_octet4.match_omit(legacy)))return FALSE;
if(!other_value.octet5().is_bound()) return FALSE;
if((other_value.octet5().ispresent() ? !single_value->field_octet5.match((const BC__octet5&)other_value.octet5(), legacy) : !single_value->field_octet5.match_omit(legacy)))return FALSE;
if(!other_value.octet6().is_bound()) return FALSE;
if((other_value.octet6().ispresent() ? !single_value->field_octet6.match((const BC__octet6&)other_value.octet6(), legacy) : !single_value->field_octet6.match_omit(legacy)))return FALSE;
if(!other_value.octet7().is_bound()) return FALSE;
if((other_value.octet7().ispresent() ? !single_value->field_octet7.match((const BC__octet7&)other_value.octet7(), legacy) : !single_value->field_octet7.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 @MobileL3_CC_Types.BearerCapability_LV.");
}
return FALSE;
}

boolean BearerCapability__LV_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_lengthIndicator.is_bound()
 || single_value->field_octet3.is_bound()
 || (single_value->field_octet4.is_omit() || single_value->field_octet4.is_bound())
 || (single_value->field_octet5.is_omit() || single_value->field_octet5.is_bound())
 || (single_value->field_octet6.is_omit() || single_value->field_octet6.is_bound())
 || (single_value->field_octet7.is_omit() || single_value->field_octet7.is_bound());
}

boolean BearerCapability__LV_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_lengthIndicator.is_value()
 && single_value->field_octet3.is_value()
 && (single_value->field_octet4.is_omit() || single_value->field_octet4.is_value())
 && (single_value->field_octet5.is_omit() || single_value->field_octet5.is_value())
 && (single_value->field_octet6.is_omit() || single_value->field_octet6.is_value())
 && (single_value->field_octet7.is_omit() || single_value->field_octet7.is_value());
}

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

BearerCapability__LV BearerCapability__LV_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 @MobileL3_CC_Types.BearerCapability_LV.");
BearerCapability__LV ret_val;
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_octet3.is_bound()) {
ret_val.octet3() = single_value->field_octet3.valueof();
}
if (single_value->field_octet4.is_omit()) ret_val.octet4() = OMIT_VALUE;
else if (single_value->field_octet4.is_bound()) {
ret_val.octet4() = single_value->field_octet4.valueof();
}
if (single_value->field_octet5.is_omit()) ret_val.octet5() = OMIT_VALUE;
else if (single_value->field_octet5.is_bound()) {
ret_val.octet5() = single_value->field_octet5.valueof();
}
if (single_value->field_octet6.is_omit()) ret_val.octet6() = OMIT_VALUE;
else if (single_value->field_octet6.is_bound()) {
ret_val.octet6() = single_value->field_octet6.valueof();
}
if (single_value->field_octet7.is_omit()) ret_val.octet7() = OMIT_VALUE;
else if (single_value->field_octet7.is_bound()) {
ret_val.octet7() = single_value->field_octet7.valueof();
}
return ret_val;
}

void BearerCapability__LV_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 @MobileL3_CC_Types.BearerCapability_LV.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new BearerCapability__LV_template[list_length];
}

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

INTEGER_template& BearerCapability__LV_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& BearerCapability__LV_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.BearerCapability_LV.");
return single_value->field_lengthIndicator;
}

BC__octet3_template& BearerCapability__LV_template::octet3()
{
set_specific();
return single_value->field_octet3;
}

const BC__octet3_template& BearerCapability__LV_template::octet3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet3 of a non-specific template of type @MobileL3_CC_Types.BearerCapability_LV.");
return single_value->field_octet3;
}

BC__octet4_template& BearerCapability__LV_template::octet4()
{
set_specific();
return single_value->field_octet4;
}

const BC__octet4_template& BearerCapability__LV_template::octet4() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet4 of a non-specific template of type @MobileL3_CC_Types.BearerCapability_LV.");
return single_value->field_octet4;
}

BC__octet5_template& BearerCapability__LV_template::octet5()
{
set_specific();
return single_value->field_octet5;
}

const BC__octet5_template& BearerCapability__LV_template::octet5() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet5 of a non-specific template of type @MobileL3_CC_Types.BearerCapability_LV.");
return single_value->field_octet5;
}

BC__octet6_template& BearerCapability__LV_template::octet6()
{
set_specific();
return single_value->field_octet6;
}

const BC__octet6_template& BearerCapability__LV_template::octet6() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet6 of a non-specific template of type @MobileL3_CC_Types.BearerCapability_LV.");
return single_value->field_octet6;
}

BC__octet7_template& BearerCapability__LV_template::octet7()
{
set_specific();
return single_value->field_octet7;
}

const BC__octet7_template& BearerCapability__LV_template::octet7() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet7 of a non-specific template of type @MobileL3_CC_Types.BearerCapability_LV.");
return single_value->field_octet7;
}

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

void BearerCapability__LV_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", octet3 := ");
single_value->field_octet3.log();
TTCN_Logger::log_event_str(", octet4 := ");
single_value->field_octet4.log();
TTCN_Logger::log_event_str(", octet5 := ");
single_value->field_octet5.log();
TTCN_Logger::log_event_str(", octet6 := ");
single_value->field_octet6.log();
TTCN_Logger::log_event_str(", octet7 := ");
single_value->field_octet7.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 BearerCapability__LV_template::log_match(const BearerCapability__LV& 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_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_octet3.match(match_value.octet3(), legacy)){
TTCN_Logger::log_logmatch_info(".octet3");
single_value->field_octet3.log_match(match_value.octet3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.octet4().ispresent()){
if(!single_value->field_octet4.match(match_value.octet4(), legacy)){
TTCN_Logger::log_logmatch_info(".octet4");
single_value->field_octet4.log_match(match_value.octet4(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_octet4.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".octet4 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_octet4.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.octet5().ispresent()){
if(!single_value->field_octet5.match(match_value.octet5(), legacy)){
TTCN_Logger::log_logmatch_info(".octet5");
single_value->field_octet5.log_match(match_value.octet5(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_octet5.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".octet5 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_octet5.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.octet6().ispresent()){
if(!single_value->field_octet6.match(match_value.octet6(), legacy)){
TTCN_Logger::log_logmatch_info(".octet6");
single_value->field_octet6.log_match(match_value.octet6(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_octet6.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".octet6 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_octet6.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.octet7().ispresent()){
if(!single_value->field_octet7.match(match_value.octet7(), legacy)){
TTCN_Logger::log_logmatch_info(".octet7");
single_value->field_octet7.log_match(match_value.octet7(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_octet7.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".octet7 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_octet7.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("{ lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", octet3 := ");
single_value->field_octet3.log_match(match_value.octet3(), legacy);
TTCN_Logger::log_event_str(", octet4 := ");
if (match_value.octet4().ispresent()) {
single_value->field_octet4.log_match(match_value.octet4(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_octet4.log();
if (single_value->field_octet4.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", octet5 := ");
if (match_value.octet5().ispresent()) {
single_value->field_octet5.log_match(match_value.octet5(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_octet5.log();
if (single_value->field_octet5.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", octet6 := ");
if (match_value.octet6().ispresent()) {
single_value->field_octet6.log_match(match_value.octet6(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_octet6.log();
if (single_value->field_octet6.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", octet7 := ");
if (match_value.octet7().ispresent()) {
single_value->field_octet7.log_match(match_value.octet7(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_octet7.log();
if (single_value->field_octet7.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 BearerCapability__LV_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (octet3().is_bound()) octet3().set_implicit_omit();
if (!octet4().is_bound()) octet4() = OMIT_VALUE;
else octet4().set_implicit_omit();
if (!octet5().is_bound()) octet5() = OMIT_VALUE;
else octet5().set_implicit_omit();
if (!octet6().is_bound()) octet6() = OMIT_VALUE;
else octet6().set_implicit_omit();
if (!octet7().is_bound()) octet7() = OMIT_VALUE;
else octet7().set_implicit_omit();
}

void BearerCapability__LV_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_octet3.encode_text(text_buf);
single_value->field_octet4.encode_text(text_buf);
single_value->field_octet5.encode_text(text_buf);
single_value->field_octet6.encode_text(text_buf);
single_value->field_octet7.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 @MobileL3_CC_Types.BearerCapability_LV.");
}
}

void BearerCapability__LV_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_lengthIndicator.decode_text(text_buf);
single_value->field_octet3.decode_text(text_buf);
single_value->field_octet4.decode_text(text_buf);
single_value->field_octet5.decode_text(text_buf);
single_value->field_octet6.decode_text(text_buf);
single_value->field_octet7.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 BearerCapability__LV_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 @MobileL3_CC_Types.BearerCapability_LV.");
}
}

void BearerCapability__LV_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: {
    BearerCapability__LV_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 @MobileL3_CC_Types.BearerCapability_LV 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) lengthIndicator().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) octet3().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) octet4().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) octet5().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) octet6().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) octet7().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(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet4().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet5")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet5().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet6")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet6().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet7")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet7().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 @MobileL3_CC_Types.BearerCapability_LV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    BearerCapability__LV_template* precondition = new BearerCapability__LV_template;
    precondition->set_param(*param.get_elem(0));
    BearerCapability__LV_template* implied_template = new BearerCapability__LV_template;
    implied_template->set_param(*param.get_elem(1));
    *this = BearerCapability__LV_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.BearerCapability_LV");
  }
  is_ifpresent = param.get_ifpresent();
}

void BearerCapability__LV_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_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BearerCapability_LV");
single_value->field_octet3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BearerCapability_LV");
single_value->field_octet4.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BearerCapability_LV");
single_value->field_octet5.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BearerCapability_LV");
single_value->field_octet6.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BearerCapability_LV");
single_value->field_octet7.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.BearerCapability_LV");
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 : "@MobileL3_CC_Types.BearerCapability_LV");
}

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

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

CallControlCapabilities::CallControlCapabilities()
{
}

CallControlCapabilities::CallControlCapabilities(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const BITSTRING& par_dTMF,
    const BITSTRING& par_pCP,
    const BITSTRING& par_eNICM,
    const BITSTRING& par_mcat,
    const BITSTRING& par_maxNumberOfSupportedBearers,
    const BITSTRING& par_maxNumberOfSpeechBearers,
    const BITSTRING& par_spare2)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_dTMF(par_dTMF),
  field_pCP(par_pCP),
  field_eNICM(par_eNICM),
  field_mcat(par_mcat),
  field_maxNumberOfSupportedBearers(par_maxNumberOfSupportedBearers),
  field_maxNumberOfSpeechBearers(par_maxNumberOfSpeechBearers),
  field_spare2(par_spare2)
{
}

CallControlCapabilities::CallControlCapabilities(const CallControlCapabilities& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.CallControlCapabilities.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.dTMF().is_bound()) field_dTMF = other_value.dTMF();
else field_dTMF.clean_up();
if (other_value.pCP().is_bound()) field_pCP = other_value.pCP();
else field_pCP.clean_up();
if (other_value.eNICM().is_bound()) field_eNICM = other_value.eNICM();
else field_eNICM.clean_up();
if (other_value.mcat().is_bound()) field_mcat = other_value.mcat();
else field_mcat.clean_up();
if (other_value.maxNumberOfSupportedBearers().is_bound()) field_maxNumberOfSupportedBearers = other_value.maxNumberOfSupportedBearers();
else field_maxNumberOfSupportedBearers.clean_up();
if (other_value.maxNumberOfSpeechBearers().is_bound()) field_maxNumberOfSpeechBearers = other_value.maxNumberOfSpeechBearers();
else field_maxNumberOfSpeechBearers.clean_up();
if (other_value.spare2().is_bound()) field_spare2 = other_value.spare2();
else field_spare2.clean_up();
}

void CallControlCapabilities::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_dTMF.clean_up();
field_pCP.clean_up();
field_eNICM.clean_up();
field_mcat.clean_up();
field_maxNumberOfSupportedBearers.clean_up();
field_maxNumberOfSpeechBearers.clean_up();
field_spare2.clean_up();
}

const TTCN_Typedescriptor_t* CallControlCapabilities::get_descriptor() const { return &CallControlCapabilities_descr_; }
CallControlCapabilities& CallControlCapabilities::operator=(const CallControlCapabilities& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.CallControlCapabilities.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.dTMF().is_bound()) field_dTMF = other_value.dTMF();
  else field_dTMF.clean_up();
  if (other_value.pCP().is_bound()) field_pCP = other_value.pCP();
  else field_pCP.clean_up();
  if (other_value.eNICM().is_bound()) field_eNICM = other_value.eNICM();
  else field_eNICM.clean_up();
  if (other_value.mcat().is_bound()) field_mcat = other_value.mcat();
  else field_mcat.clean_up();
  if (other_value.maxNumberOfSupportedBearers().is_bound()) field_maxNumberOfSupportedBearers = other_value.maxNumberOfSupportedBearers();
  else field_maxNumberOfSupportedBearers.clean_up();
  if (other_value.maxNumberOfSpeechBearers().is_bound()) field_maxNumberOfSpeechBearers = other_value.maxNumberOfSpeechBearers();
  else field_maxNumberOfSpeechBearers.clean_up();
  if (other_value.spare2().is_bound()) field_spare2 = other_value.spare2();
  else field_spare2.clean_up();
}
return *this;
}

boolean CallControlCapabilities::operator==(const CallControlCapabilities& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_dTMF==other_value.field_dTMF
  && field_pCP==other_value.field_pCP
  && field_eNICM==other_value.field_eNICM
  && field_mcat==other_value.field_mcat
  && field_maxNumberOfSupportedBearers==other_value.field_maxNumberOfSupportedBearers
  && field_maxNumberOfSpeechBearers==other_value.field_maxNumberOfSpeechBearers
  && field_spare2==other_value.field_spare2;
}

boolean CallControlCapabilities::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (field_dTMF.is_bound())
  || (field_pCP.is_bound())
  || (field_eNICM.is_bound())
  || (field_mcat.is_bound())
  || (field_maxNumberOfSupportedBearers.is_bound())
  || (field_maxNumberOfSpeechBearers.is_bound())
  || (field_spare2.is_bound());
}
boolean CallControlCapabilities::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && field_dTMF.is_value()
  && field_pCP.is_value()
  && field_eNICM.is_value()
  && field_mcat.is_value()
  && field_maxNumberOfSupportedBearers.is_value()
  && field_maxNumberOfSpeechBearers.is_value()
  && field_spare2.is_value();
}
void CallControlCapabilities::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", dTMF := ");
field_dTMF.log();
TTCN_Logger::log_event_str(", pCP := ");
field_pCP.log();
TTCN_Logger::log_event_str(", eNICM := ");
field_eNICM.log();
TTCN_Logger::log_event_str(", mcat := ");
field_mcat.log();
TTCN_Logger::log_event_str(", maxNumberOfSupportedBearers := ");
field_maxNumberOfSupportedBearers.log();
TTCN_Logger::log_event_str(", maxNumberOfSpeechBearers := ");
field_maxNumberOfSpeechBearers.log();
TTCN_Logger::log_event_str(", spare2 := ");
field_spare2.log();
TTCN_Logger::log_event_str(" }");
}

void CallControlCapabilities::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (dTMF().is_bound()) dTMF().set_implicit_omit();
if (pCP().is_bound()) pCP().set_implicit_omit();
if (eNICM().is_bound()) eNICM().set_implicit_omit();
if (mcat().is_bound()) mcat().set_implicit_omit();
if (maxNumberOfSupportedBearers().is_bound()) maxNumberOfSupportedBearers().set_implicit_omit();
if (maxNumberOfSpeechBearers().is_bound()) maxNumberOfSpeechBearers().set_implicit_omit();
if (spare2().is_bound()) spare2().set_implicit_omit();
}

void CallControlCapabilities::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 @MobileL3_CC_Types.CallControlCapabilities 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) dTMF().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) pCP().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) eNICM().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) mcat().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) maxNumberOfSupportedBearers().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) maxNumberOfSpeechBearers().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "dTMF")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          dTMF().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "pCP")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pCP().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "eNICM")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          eNICM().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcat")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcat().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "maxNumberOfSupportedBearers")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          maxNumberOfSupportedBearers().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "maxNumberOfSpeechBearers")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          maxNumberOfSpeechBearers().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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 @MobileL3_CC_Types.CallControlCapabilities: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.CallControlCapabilities");
  }
}

void CallControlCapabilities::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_dTMF.encode_text(text_buf);
field_pCP.encode_text(text_buf);
field_eNICM.encode_text(text_buf);
field_mcat.encode_text(text_buf);
field_maxNumberOfSupportedBearers.encode_text(text_buf);
field_maxNumberOfSpeechBearers.encode_text(text_buf);
field_spare2.encode_text(text_buf);
}

void CallControlCapabilities::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_dTMF.decode_text(text_buf);
field_pCP.decode_text(text_buf);
field_eNICM.decode_text(text_buf);
field_mcat.decode_text(text_buf);
field_maxNumberOfSupportedBearers.decode_text(text_buf);
field_maxNumberOfSpeechBearers.decode_text(text_buf);
field_spare2.decode_text(text_buf);
}

void CallControlCapabilities::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 CallControlCapabilities::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 CallControlCapabilities::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, CallControlCapabilities_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(CallControlCapabilities_lengthIndicator_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_lengthIndicator.convert_to_Integer(CallControlCapabilities_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  RAW_Force_Omit field_2_force_omit(2, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_dTMF.RAW_decode(General__Types::BIT1_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;
  RAW_Force_Omit field_3_force_omit(3, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_pCP.RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), 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());
  value_of_length_field1 -= decoded_field_length;
  RAW_Force_Omit field_4_force_omit(4, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_eNICM.RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), 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());
  value_of_length_field1 -= decoded_field_length;
  RAW_Force_Omit field_5_force_omit(5, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_mcat.RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), 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());
  value_of_length_field1 -= decoded_field_length;
  RAW_Force_Omit field_6_force_omit(6, force_omit, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_maxNumberOfSupportedBearers.RAW_decode(General__Types::BIT4_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), 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());
  value_of_length_field1 -= decoded_field_length;
  RAW_Force_Omit field_7_force_omit(7, force_omit, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_maxNumberOfSpeechBearers.RAW_decode(General__Types::BIT4_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, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_spare2.RAW_decode(General__Types::BIT4_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), 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());
  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 CallControlCapabilities::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CallControlCapabilities_lengthIndicator_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, General__Types::BIT4_descr_.raw);
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, General__Types::BIT4_descr_.raw);
  myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 8, General__Types::BIT4_descr_.raw);
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &CallControlCapabilities_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 6;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(6);
  myleaf.body.node.nodes[1]->length = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[2]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[2]->curr_pos.pos;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = myleaf.body.node.nodes[4]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = myleaf.body.node.nodes[4]->curr_pos.pos;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = myleaf.body.node.nodes[5]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = myleaf.body.node.nodes[5]->curr_pos.pos;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].level = myleaf.body.node.nodes[6]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].pos = myleaf.body.node.nodes[6]->curr_pos.pos;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[5].level = myleaf.body.node.nodes[8]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[5].pos = myleaf.body.node.nodes[8]->curr_pos.pos;
  encoded_length += field_dTMF.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_pCP.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_eNICM.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_mcat.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_maxNumberOfSupportedBearers.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[6]);
  encoded_length += field_maxNumberOfSpeechBearers.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[7]);
  encoded_length += field_spare2.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[8]);
  return myleaf.length = encoded_length;
}

struct CallControlCapabilities_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
BITSTRING_template field_dTMF;
BITSTRING_template field_pCP;
BITSTRING_template field_eNICM;
BITSTRING_template field_mcat;
BITSTRING_template field_maxNumberOfSupportedBearers;
BITSTRING_template field_maxNumberOfSpeechBearers;
BITSTRING_template field_spare2;
};

void CallControlCapabilities_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_dTMF = ANY_VALUE;
single_value->field_pCP = ANY_VALUE;
single_value->field_eNICM = ANY_VALUE;
single_value->field_mcat = ANY_VALUE;
single_value->field_maxNumberOfSupportedBearers = ANY_VALUE;
single_value->field_maxNumberOfSpeechBearers = ANY_VALUE;
single_value->field_spare2 = ANY_VALUE;
}
}
}

void CallControlCapabilities_template::copy_value(const CallControlCapabilities& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.dTMF().is_bound()) {
  single_value->field_dTMF = other_value.dTMF();
} else {
  single_value->field_dTMF.clean_up();
}
if (other_value.pCP().is_bound()) {
  single_value->field_pCP = other_value.pCP();
} else {
  single_value->field_pCP.clean_up();
}
if (other_value.eNICM().is_bound()) {
  single_value->field_eNICM = other_value.eNICM();
} else {
  single_value->field_eNICM.clean_up();
}
if (other_value.mcat().is_bound()) {
  single_value->field_mcat = other_value.mcat();
} else {
  single_value->field_mcat.clean_up();
}
if (other_value.maxNumberOfSupportedBearers().is_bound()) {
  single_value->field_maxNumberOfSupportedBearers = other_value.maxNumberOfSupportedBearers();
} else {
  single_value->field_maxNumberOfSupportedBearers.clean_up();
}
if (other_value.maxNumberOfSpeechBearers().is_bound()) {
  single_value->field_maxNumberOfSpeechBearers = other_value.maxNumberOfSpeechBearers();
} else {
  single_value->field_maxNumberOfSpeechBearers.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 CallControlCapabilities_template::copy_template(const CallControlCapabilities_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.dTMF().get_selection()) {
single_value->field_dTMF = other_value.dTMF();
} else {
single_value->field_dTMF.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.pCP().get_selection()) {
single_value->field_pCP = other_value.pCP();
} else {
single_value->field_pCP.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.eNICM().get_selection()) {
single_value->field_eNICM = other_value.eNICM();
} else {
single_value->field_eNICM.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mcat().get_selection()) {
single_value->field_mcat = other_value.mcat();
} else {
single_value->field_mcat.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.maxNumberOfSupportedBearers().get_selection()) {
single_value->field_maxNumberOfSupportedBearers = other_value.maxNumberOfSupportedBearers();
} else {
single_value->field_maxNumberOfSupportedBearers.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.maxNumberOfSpeechBearers().get_selection()) {
single_value->field_maxNumberOfSpeechBearers = other_value.maxNumberOfSpeechBearers();
} else {
single_value->field_maxNumberOfSpeechBearers.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 CallControlCapabilities_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 CallControlCapabilities_template(*other_value.implication_.precondition);
implication_.implied_template = new CallControlCapabilities_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 @MobileL3_CC_Types.CallControlCapabilities.");
break;
}
set_selection(other_value);
}

CallControlCapabilities_template::CallControlCapabilities_template()
{
}

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

CallControlCapabilities_template::CallControlCapabilities_template(const CallControlCapabilities& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean CallControlCapabilities_template::match(const CallControlCapabilities& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.dTMF().is_bound()) return FALSE;
if(!single_value->field_dTMF.match(other_value.dTMF(), legacy))return FALSE;
if(!other_value.pCP().is_bound()) return FALSE;
if(!single_value->field_pCP.match(other_value.pCP(), legacy))return FALSE;
if(!other_value.eNICM().is_bound()) return FALSE;
if(!single_value->field_eNICM.match(other_value.eNICM(), legacy))return FALSE;
if(!other_value.mcat().is_bound()) return FALSE;
if(!single_value->field_mcat.match(other_value.mcat(), legacy))return FALSE;
if(!other_value.maxNumberOfSupportedBearers().is_bound()) return FALSE;
if(!single_value->field_maxNumberOfSupportedBearers.match(other_value.maxNumberOfSupportedBearers(), legacy))return FALSE;
if(!other_value.maxNumberOfSpeechBearers().is_bound()) return FALSE;
if(!single_value->field_maxNumberOfSpeechBearers.match(other_value.maxNumberOfSpeechBearers(), 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 @MobileL3_CC_Types.CallControlCapabilities.");
}
return FALSE;
}

boolean CallControlCapabilities_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || single_value->field_dTMF.is_bound()
 || single_value->field_pCP.is_bound()
 || single_value->field_eNICM.is_bound()
 || single_value->field_mcat.is_bound()
 || single_value->field_maxNumberOfSupportedBearers.is_bound()
 || single_value->field_maxNumberOfSpeechBearers.is_bound()
 || single_value->field_spare2.is_bound();
}

boolean CallControlCapabilities_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && single_value->field_dTMF.is_value()
 && single_value->field_pCP.is_value()
 && single_value->field_eNICM.is_value()
 && single_value->field_mcat.is_value()
 && single_value->field_maxNumberOfSupportedBearers.is_value()
 && single_value->field_maxNumberOfSpeechBearers.is_value()
 && single_value->field_spare2.is_value();
}

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

CallControlCapabilities CallControlCapabilities_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 @MobileL3_CC_Types.CallControlCapabilities.");
CallControlCapabilities ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_dTMF.is_bound()) {
ret_val.dTMF() = single_value->field_dTMF.valueof();
}
if (single_value->field_pCP.is_bound()) {
ret_val.pCP() = single_value->field_pCP.valueof();
}
if (single_value->field_eNICM.is_bound()) {
ret_val.eNICM() = single_value->field_eNICM.valueof();
}
if (single_value->field_mcat.is_bound()) {
ret_val.mcat() = single_value->field_mcat.valueof();
}
if (single_value->field_maxNumberOfSupportedBearers.is_bound()) {
ret_val.maxNumberOfSupportedBearers() = single_value->field_maxNumberOfSupportedBearers.valueof();
}
if (single_value->field_maxNumberOfSpeechBearers.is_bound()) {
ret_val.maxNumberOfSpeechBearers() = single_value->field_maxNumberOfSpeechBearers.valueof();
}
if (single_value->field_spare2.is_bound()) {
ret_val.spare2() = single_value->field_spare2.valueof();
}
return ret_val;
}

void CallControlCapabilities_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 @MobileL3_CC_Types.CallControlCapabilities.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new CallControlCapabilities_template[list_length];
}

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

OCTETSTRING_template& CallControlCapabilities_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& CallControlCapabilities_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.CallControlCapabilities.");
return single_value->field_elementIdentifier;
}

INTEGER_template& CallControlCapabilities_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& CallControlCapabilities_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.CallControlCapabilities.");
return single_value->field_lengthIndicator;
}

BITSTRING_template& CallControlCapabilities_template::dTMF()
{
set_specific();
return single_value->field_dTMF;
}

const BITSTRING_template& CallControlCapabilities_template::dTMF() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field dTMF of a non-specific template of type @MobileL3_CC_Types.CallControlCapabilities.");
return single_value->field_dTMF;
}

BITSTRING_template& CallControlCapabilities_template::pCP()
{
set_specific();
return single_value->field_pCP;
}

const BITSTRING_template& CallControlCapabilities_template::pCP() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pCP of a non-specific template of type @MobileL3_CC_Types.CallControlCapabilities.");
return single_value->field_pCP;
}

BITSTRING_template& CallControlCapabilities_template::eNICM()
{
set_specific();
return single_value->field_eNICM;
}

const BITSTRING_template& CallControlCapabilities_template::eNICM() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field eNICM of a non-specific template of type @MobileL3_CC_Types.CallControlCapabilities.");
return single_value->field_eNICM;
}

BITSTRING_template& CallControlCapabilities_template::mcat()
{
set_specific();
return single_value->field_mcat;
}

const BITSTRING_template& CallControlCapabilities_template::mcat() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mcat of a non-specific template of type @MobileL3_CC_Types.CallControlCapabilities.");
return single_value->field_mcat;
}

BITSTRING_template& CallControlCapabilities_template::maxNumberOfSupportedBearers()
{
set_specific();
return single_value->field_maxNumberOfSupportedBearers;
}

const BITSTRING_template& CallControlCapabilities_template::maxNumberOfSupportedBearers() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field maxNumberOfSupportedBearers of a non-specific template of type @MobileL3_CC_Types.CallControlCapabilities.");
return single_value->field_maxNumberOfSupportedBearers;
}

BITSTRING_template& CallControlCapabilities_template::maxNumberOfSpeechBearers()
{
set_specific();
return single_value->field_maxNumberOfSpeechBearers;
}

const BITSTRING_template& CallControlCapabilities_template::maxNumberOfSpeechBearers() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field maxNumberOfSpeechBearers of a non-specific template of type @MobileL3_CC_Types.CallControlCapabilities.");
return single_value->field_maxNumberOfSpeechBearers;
}

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

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

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

void CallControlCapabilities_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", dTMF := ");
single_value->field_dTMF.log();
TTCN_Logger::log_event_str(", pCP := ");
single_value->field_pCP.log();
TTCN_Logger::log_event_str(", eNICM := ");
single_value->field_eNICM.log();
TTCN_Logger::log_event_str(", mcat := ");
single_value->field_mcat.log();
TTCN_Logger::log_event_str(", maxNumberOfSupportedBearers := ");
single_value->field_maxNumberOfSupportedBearers.log();
TTCN_Logger::log_event_str(", maxNumberOfSpeechBearers := ");
single_value->field_maxNumberOfSpeechBearers.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 CallControlCapabilities_template::log_match(const CallControlCapabilities& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_dTMF.match(match_value.dTMF(), legacy)){
TTCN_Logger::log_logmatch_info(".dTMF");
single_value->field_dTMF.log_match(match_value.dTMF(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_pCP.match(match_value.pCP(), legacy)){
TTCN_Logger::log_logmatch_info(".pCP");
single_value->field_pCP.log_match(match_value.pCP(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_eNICM.match(match_value.eNICM(), legacy)){
TTCN_Logger::log_logmatch_info(".eNICM");
single_value->field_eNICM.log_match(match_value.eNICM(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mcat.match(match_value.mcat(), legacy)){
TTCN_Logger::log_logmatch_info(".mcat");
single_value->field_mcat.log_match(match_value.mcat(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_maxNumberOfSupportedBearers.match(match_value.maxNumberOfSupportedBearers(), legacy)){
TTCN_Logger::log_logmatch_info(".maxNumberOfSupportedBearers");
single_value->field_maxNumberOfSupportedBearers.log_match(match_value.maxNumberOfSupportedBearers(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_maxNumberOfSpeechBearers.match(match_value.maxNumberOfSpeechBearers(), legacy)){
TTCN_Logger::log_logmatch_info(".maxNumberOfSpeechBearers");
single_value->field_maxNumberOfSpeechBearers.log_match(match_value.maxNumberOfSpeechBearers(), 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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", dTMF := ");
single_value->field_dTMF.log_match(match_value.dTMF(), legacy);
TTCN_Logger::log_event_str(", pCP := ");
single_value->field_pCP.log_match(match_value.pCP(), legacy);
TTCN_Logger::log_event_str(", eNICM := ");
single_value->field_eNICM.log_match(match_value.eNICM(), legacy);
TTCN_Logger::log_event_str(", mcat := ");
single_value->field_mcat.log_match(match_value.mcat(), legacy);
TTCN_Logger::log_event_str(", maxNumberOfSupportedBearers := ");
single_value->field_maxNumberOfSupportedBearers.log_match(match_value.maxNumberOfSupportedBearers(), legacy);
TTCN_Logger::log_event_str(", maxNumberOfSpeechBearers := ");
single_value->field_maxNumberOfSpeechBearers.log_match(match_value.maxNumberOfSpeechBearers(), 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 CallControlCapabilities_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (dTMF().is_bound()) dTMF().set_implicit_omit();
if (pCP().is_bound()) pCP().set_implicit_omit();
if (eNICM().is_bound()) eNICM().set_implicit_omit();
if (mcat().is_bound()) mcat().set_implicit_omit();
if (maxNumberOfSupportedBearers().is_bound()) maxNumberOfSupportedBearers().set_implicit_omit();
if (maxNumberOfSpeechBearers().is_bound()) maxNumberOfSpeechBearers().set_implicit_omit();
if (spare2().is_bound()) spare2().set_implicit_omit();
}

void CallControlCapabilities_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_dTMF.encode_text(text_buf);
single_value->field_pCP.encode_text(text_buf);
single_value->field_eNICM.encode_text(text_buf);
single_value->field_mcat.encode_text(text_buf);
single_value->field_maxNumberOfSupportedBearers.encode_text(text_buf);
single_value->field_maxNumberOfSpeechBearers.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 @MobileL3_CC_Types.CallControlCapabilities.");
}
}

void CallControlCapabilities_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_dTMF.decode_text(text_buf);
single_value->field_pCP.decode_text(text_buf);
single_value->field_eNICM.decode_text(text_buf);
single_value->field_mcat.decode_text(text_buf);
single_value->field_maxNumberOfSupportedBearers.decode_text(text_buf);
single_value->field_maxNumberOfSpeechBearers.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 CallControlCapabilities_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 @MobileL3_CC_Types.CallControlCapabilities.");
}
}

void CallControlCapabilities_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: {
    CallControlCapabilities_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 @MobileL3_CC_Types.CallControlCapabilities 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) dTMF().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) pCP().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) eNICM().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) mcat().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) maxNumberOfSupportedBearers().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) maxNumberOfSpeechBearers().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "dTMF")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          dTMF().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "pCP")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pCP().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "eNICM")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          eNICM().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mcat")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mcat().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "maxNumberOfSupportedBearers")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          maxNumberOfSupportedBearers().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "maxNumberOfSpeechBearers")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          maxNumberOfSpeechBearers().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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 @MobileL3_CC_Types.CallControlCapabilities: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    CallControlCapabilities_template* precondition = new CallControlCapabilities_template;
    precondition->set_param(*param.get_elem(0));
    CallControlCapabilities_template* implied_template = new CallControlCapabilities_template;
    implied_template->set_param(*param.get_elem(1));
    *this = CallControlCapabilities_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.CallControlCapabilities");
  }
  is_ifpresent = param.get_ifpresent();
}

void CallControlCapabilities_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallControlCapabilities");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallControlCapabilities");
single_value->field_dTMF.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallControlCapabilities");
single_value->field_pCP.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallControlCapabilities");
single_value->field_eNICM.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallControlCapabilities");
single_value->field_mcat.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallControlCapabilities");
single_value->field_maxNumberOfSupportedBearers.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallControlCapabilities");
single_value->field_maxNumberOfSpeechBearers.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallControlCapabilities");
single_value->field_spare2.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallControlCapabilities");
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 : "@MobileL3_CC_Types.CallControlCapabilities");
}

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

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

CallState__V::CallState__V()
{
}

CallState__V::CallState__V(const BITSTRING& par_callStateValue,
    const BITSTRING& par_codingStd)
  :   field_callStateValue(par_callStateValue),
  field_codingStd(par_codingStd)
{
}

CallState__V::CallState__V(const CallState__V& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.CallState_V.");
if (other_value.callStateValue().is_bound()) field_callStateValue = other_value.callStateValue();
else field_callStateValue.clean_up();
if (other_value.codingStd().is_bound()) field_codingStd = other_value.codingStd();
else field_codingStd.clean_up();
}

void CallState__V::clean_up()
{
field_callStateValue.clean_up();
field_codingStd.clean_up();
}

const TTCN_Typedescriptor_t* CallState__V::get_descriptor() const { return &CallState__V_descr_; }
CallState__V& CallState__V::operator=(const CallState__V& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.CallState_V.");
  if (other_value.callStateValue().is_bound()) field_callStateValue = other_value.callStateValue();
  else field_callStateValue.clean_up();
  if (other_value.codingStd().is_bound()) field_codingStd = other_value.codingStd();
  else field_codingStd.clean_up();
}
return *this;
}

boolean CallState__V::operator==(const CallState__V& other_value) const
{
return field_callStateValue==other_value.field_callStateValue
  && field_codingStd==other_value.field_codingStd;
}

boolean CallState__V::is_bound() const
{
return (field_callStateValue.is_bound())
  || (field_codingStd.is_bound());
}
boolean CallState__V::is_value() const
{
return field_callStateValue.is_value()
  && field_codingStd.is_value();
}
void CallState__V::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ callStateValue := ");
field_callStateValue.log();
TTCN_Logger::log_event_str(", codingStd := ");
field_codingStd.log();
TTCN_Logger::log_event_str(" }");
}

void CallState__V::set_implicit_omit()
{
if (callStateValue().is_bound()) callStateValue().set_implicit_omit();
if (codingStd().is_bound()) codingStd().set_implicit_omit();
}

void CallState__V::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 @MobileL3_CC_Types.CallState_V 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) callStateValue().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) codingStd().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(), "callStateValue")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          callStateValue().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "codingStd")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          codingStd().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 @MobileL3_CC_Types.CallState_V: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.CallState_V");
  }
}

void CallState__V::encode_text(Text_Buf& text_buf) const
{
field_callStateValue.encode_text(text_buf);
field_codingStd.encode_text(text_buf);
}

void CallState__V::decode_text(Text_Buf& text_buf)
{
field_callStateValue.decode_text(text_buf);
field_codingStd.decode_text(text_buf);
}

void CallState__V::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 CallState__V::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 CallState__V::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, General__Types::BIT6_descr_.raw->forceomit);
  decoded_field_length = field_callStateValue.RAW_decode(General__Types::BIT6_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, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_codingStd.RAW_decode(General__Types::BIT2_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 CallState__V::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, General__Types::BIT6_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT2_descr_.raw);
  encoded_length += field_callStateValue.RAW_encode(General__Types::BIT6_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_codingStd.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct CallState__V_template::single_value_struct {
BITSTRING_template field_callStateValue;
BITSTRING_template field_codingStd;
};

void CallState__V_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_callStateValue = ANY_VALUE;
single_value->field_codingStd = ANY_VALUE;
}
}
}

void CallState__V_template::copy_value(const CallState__V& other_value)
{
single_value = new single_value_struct;
if (other_value.callStateValue().is_bound()) {
  single_value->field_callStateValue = other_value.callStateValue();
} else {
  single_value->field_callStateValue.clean_up();
}
if (other_value.codingStd().is_bound()) {
  single_value->field_codingStd = other_value.codingStd();
} else {
  single_value->field_codingStd.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void CallState__V_template::copy_template(const CallState__V_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.callStateValue().get_selection()) {
single_value->field_callStateValue = other_value.callStateValue();
} else {
single_value->field_callStateValue.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.codingStd().get_selection()) {
single_value->field_codingStd = other_value.codingStd();
} else {
single_value->field_codingStd.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 CallState__V_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 CallState__V_template(*other_value.implication_.precondition);
implication_.implied_template = new CallState__V_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 @MobileL3_CC_Types.CallState_V.");
break;
}
set_selection(other_value);
}

CallState__V_template::CallState__V_template()
{
}

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

CallState__V_template::CallState__V_template(const CallState__V& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean CallState__V_template::match(const CallState__V& 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.callStateValue().is_bound()) return FALSE;
if(!single_value->field_callStateValue.match(other_value.callStateValue(), legacy))return FALSE;
if(!other_value.codingStd().is_bound()) return FALSE;
if(!single_value->field_codingStd.match(other_value.codingStd(), 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 @MobileL3_CC_Types.CallState_V.");
}
return FALSE;
}

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

boolean CallState__V_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_callStateValue.is_value()
 && single_value->field_codingStd.is_value();
}

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

CallState__V CallState__V_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 @MobileL3_CC_Types.CallState_V.");
CallState__V ret_val;
if (single_value->field_callStateValue.is_bound()) {
ret_val.callStateValue() = single_value->field_callStateValue.valueof();
}
if (single_value->field_codingStd.is_bound()) {
ret_val.codingStd() = single_value->field_codingStd.valueof();
}
return ret_val;
}

void CallState__V_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 @MobileL3_CC_Types.CallState_V.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new CallState__V_template[list_length];
}

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

BITSTRING_template& CallState__V_template::callStateValue()
{
set_specific();
return single_value->field_callStateValue;
}

const BITSTRING_template& CallState__V_template::callStateValue() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field callStateValue of a non-specific template of type @MobileL3_CC_Types.CallState_V.");
return single_value->field_callStateValue;
}

BITSTRING_template& CallState__V_template::codingStd()
{
set_specific();
return single_value->field_codingStd;
}

const BITSTRING_template& CallState__V_template::codingStd() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field codingStd of a non-specific template of type @MobileL3_CC_Types.CallState_V.");
return single_value->field_codingStd;
}

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

void CallState__V_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ callStateValue := ");
single_value->field_callStateValue.log();
TTCN_Logger::log_event_str(", codingStd := ");
single_value->field_codingStd.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 CallState__V_template::log_match(const CallState__V& 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_callStateValue.match(match_value.callStateValue(), legacy)){
TTCN_Logger::log_logmatch_info(".callStateValue");
single_value->field_callStateValue.log_match(match_value.callStateValue(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_codingStd.match(match_value.codingStd(), legacy)){
TTCN_Logger::log_logmatch_info(".codingStd");
single_value->field_codingStd.log_match(match_value.codingStd(), 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("{ callStateValue := ");
single_value->field_callStateValue.log_match(match_value.callStateValue(), legacy);
TTCN_Logger::log_event_str(", codingStd := ");
single_value->field_codingStd.log_match(match_value.codingStd(), 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 CallState__V_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (callStateValue().is_bound()) callStateValue().set_implicit_omit();
if (codingStd().is_bound()) codingStd().set_implicit_omit();
}

void CallState__V_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_callStateValue.encode_text(text_buf);
single_value->field_codingStd.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 @MobileL3_CC_Types.CallState_V.");
}
}

void CallState__V_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_callStateValue.decode_text(text_buf);
single_value->field_codingStd.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 CallState__V_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 @MobileL3_CC_Types.CallState_V.");
}
}

void CallState__V_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: {
    CallState__V_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 @MobileL3_CC_Types.CallState_V 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) callStateValue().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) codingStd().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(), "callStateValue")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          callStateValue().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "codingStd")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          codingStd().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 @MobileL3_CC_Types.CallState_V: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    CallState__V_template* precondition = new CallState__V_template;
    precondition->set_param(*param.get_elem(0));
    CallState__V_template* implied_template = new CallState__V_template;
    implied_template->set_param(*param.get_elem(1));
    *this = CallState__V_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.CallState_V");
  }
  is_ifpresent = param.get_ifpresent();
}

void CallState__V_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_callStateValue.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallState_V");
single_value->field_codingStd.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallState_V");
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 : "@MobileL3_CC_Types.CallState_V");
}

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

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

CallState__TV::CallState__TV()
{
}

CallState__TV::CallState__TV(const OCTETSTRING& par_elementIdentifier,
    const BITSTRING& par_callStateValue,
    const BITSTRING& par_codingStd)
  :   field_elementIdentifier(par_elementIdentifier),
  field_callStateValue(par_callStateValue),
  field_codingStd(par_codingStd)
{
}

CallState__TV::CallState__TV(const CallState__TV& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.CallState_TV.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.callStateValue().is_bound()) field_callStateValue = other_value.callStateValue();
else field_callStateValue.clean_up();
if (other_value.codingStd().is_bound()) field_codingStd = other_value.codingStd();
else field_codingStd.clean_up();
}

void CallState__TV::clean_up()
{
field_elementIdentifier.clean_up();
field_callStateValue.clean_up();
field_codingStd.clean_up();
}

const TTCN_Typedescriptor_t* CallState__TV::get_descriptor() const { return &CallState__TV_descr_; }
CallState__TV& CallState__TV::operator=(const CallState__TV& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.CallState_TV.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.callStateValue().is_bound()) field_callStateValue = other_value.callStateValue();
  else field_callStateValue.clean_up();
  if (other_value.codingStd().is_bound()) field_codingStd = other_value.codingStd();
  else field_codingStd.clean_up();
}
return *this;
}

boolean CallState__TV::operator==(const CallState__TV& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_callStateValue==other_value.field_callStateValue
  && field_codingStd==other_value.field_codingStd;
}

boolean CallState__TV::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_callStateValue.is_bound())
  || (field_codingStd.is_bound());
}
boolean CallState__TV::is_value() const
{
return field_elementIdentifier.is_value()
  && field_callStateValue.is_value()
  && field_codingStd.is_value();
}
void CallState__TV::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", callStateValue := ");
field_callStateValue.log();
TTCN_Logger::log_event_str(", codingStd := ");
field_codingStd.log();
TTCN_Logger::log_event_str(" }");
}

void CallState__TV::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (callStateValue().is_bound()) callStateValue().set_implicit_omit();
if (codingStd().is_bound()) codingStd().set_implicit_omit();
}

void CallState__TV::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 @MobileL3_CC_Types.CallState_TV 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) callStateValue().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) codingStd().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "callStateValue")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          callStateValue().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "codingStd")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          codingStd().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 @MobileL3_CC_Types.CallState_TV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.CallState_TV");
  }
}

void CallState__TV::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_callStateValue.encode_text(text_buf);
field_codingStd.encode_text(text_buf);
}

void CallState__TV::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_callStateValue.decode_text(text_buf);
field_codingStd.decode_text(text_buf);
}

void CallState__TV::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 CallState__TV::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 CallState__TV::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, General__Types::BIT6_descr_.raw->forceomit);
  decoded_field_length = field_callStateValue.RAW_decode(General__Types::BIT6_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, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_codingStd.RAW_decode(General__Types::BIT2_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int CallState__TV::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT6_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT2_descr_.raw);
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_callStateValue.RAW_encode(General__Types::BIT6_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_codingStd.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[2]);
  return myleaf.length = encoded_length;
}

struct CallState__TV_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
BITSTRING_template field_callStateValue;
BITSTRING_template field_codingStd;
};

void CallState__TV_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_elementIdentifier = ANY_VALUE;
single_value->field_callStateValue = ANY_VALUE;
single_value->field_codingStd = ANY_VALUE;
}
}
}

void CallState__TV_template::copy_value(const CallState__TV& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.callStateValue().is_bound()) {
  single_value->field_callStateValue = other_value.callStateValue();
} else {
  single_value->field_callStateValue.clean_up();
}
if (other_value.codingStd().is_bound()) {
  single_value->field_codingStd = other_value.codingStd();
} else {
  single_value->field_codingStd.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void CallState__TV_template::copy_template(const CallState__TV_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.callStateValue().get_selection()) {
single_value->field_callStateValue = other_value.callStateValue();
} else {
single_value->field_callStateValue.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.codingStd().get_selection()) {
single_value->field_codingStd = other_value.codingStd();
} else {
single_value->field_codingStd.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 CallState__TV_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 CallState__TV_template(*other_value.implication_.precondition);
implication_.implied_template = new CallState__TV_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 @MobileL3_CC_Types.CallState_TV.");
break;
}
set_selection(other_value);
}

CallState__TV_template::CallState__TV_template()
{
}

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

CallState__TV_template::CallState__TV_template(const CallState__TV& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean CallState__TV_template::match(const CallState__TV& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.callStateValue().is_bound()) return FALSE;
if(!single_value->field_callStateValue.match(other_value.callStateValue(), legacy))return FALSE;
if(!other_value.codingStd().is_bound()) return FALSE;
if(!single_value->field_codingStd.match(other_value.codingStd(), 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 @MobileL3_CC_Types.CallState_TV.");
}
return FALSE;
}

boolean CallState__TV_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_callStateValue.is_bound()
 || single_value->field_codingStd.is_bound();
}

boolean CallState__TV_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_callStateValue.is_value()
 && single_value->field_codingStd.is_value();
}

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

CallState__TV CallState__TV_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 @MobileL3_CC_Types.CallState_TV.");
CallState__TV ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_callStateValue.is_bound()) {
ret_val.callStateValue() = single_value->field_callStateValue.valueof();
}
if (single_value->field_codingStd.is_bound()) {
ret_val.codingStd() = single_value->field_codingStd.valueof();
}
return ret_val;
}

void CallState__TV_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 @MobileL3_CC_Types.CallState_TV.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new CallState__TV_template[list_length];
}

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

OCTETSTRING_template& CallState__TV_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& CallState__TV_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.CallState_TV.");
return single_value->field_elementIdentifier;
}

BITSTRING_template& CallState__TV_template::callStateValue()
{
set_specific();
return single_value->field_callStateValue;
}

const BITSTRING_template& CallState__TV_template::callStateValue() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field callStateValue of a non-specific template of type @MobileL3_CC_Types.CallState_TV.");
return single_value->field_callStateValue;
}

BITSTRING_template& CallState__TV_template::codingStd()
{
set_specific();
return single_value->field_codingStd;
}

const BITSTRING_template& CallState__TV_template::codingStd() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field codingStd of a non-specific template of type @MobileL3_CC_Types.CallState_TV.");
return single_value->field_codingStd;
}

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

void CallState__TV_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", callStateValue := ");
single_value->field_callStateValue.log();
TTCN_Logger::log_event_str(", codingStd := ");
single_value->field_codingStd.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 CallState__TV_template::log_match(const CallState__TV& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_callStateValue.match(match_value.callStateValue(), legacy)){
TTCN_Logger::log_logmatch_info(".callStateValue");
single_value->field_callStateValue.log_match(match_value.callStateValue(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_codingStd.match(match_value.codingStd(), legacy)){
TTCN_Logger::log_logmatch_info(".codingStd");
single_value->field_codingStd.log_match(match_value.codingStd(), 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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", callStateValue := ");
single_value->field_callStateValue.log_match(match_value.callStateValue(), legacy);
TTCN_Logger::log_event_str(", codingStd := ");
single_value->field_codingStd.log_match(match_value.codingStd(), 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 CallState__TV_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (callStateValue().is_bound()) callStateValue().set_implicit_omit();
if (codingStd().is_bound()) codingStd().set_implicit_omit();
}

void CallState__TV_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_callStateValue.encode_text(text_buf);
single_value->field_codingStd.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 @MobileL3_CC_Types.CallState_TV.");
}
}

void CallState__TV_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_elementIdentifier.decode_text(text_buf);
single_value->field_callStateValue.decode_text(text_buf);
single_value->field_codingStd.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 CallState__TV_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 @MobileL3_CC_Types.CallState_TV.");
}
}

void CallState__TV_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: {
    CallState__TV_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 @MobileL3_CC_Types.CallState_TV 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) callStateValue().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) codingStd().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "callStateValue")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          callStateValue().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "codingStd")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          codingStd().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 @MobileL3_CC_Types.CallState_TV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    CallState__TV_template* precondition = new CallState__TV_template;
    precondition->set_param(*param.get_elem(0));
    CallState__TV_template* implied_template = new CallState__TV_template;
    implied_template->set_param(*param.get_elem(1));
    *this = CallState__TV_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.CallState_TV");
  }
  is_ifpresent = param.get_ifpresent();
}

void CallState__TV_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallState_TV");
single_value->field_callStateValue.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallState_TV");
single_value->field_codingStd.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallState_TV");
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 : "@MobileL3_CC_Types.CallState_TV");
}

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

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

CalledPartyBCD__Number::CalledPartyBCD__Number()
{
}

CalledPartyBCD__Number::CalledPartyBCD__Number(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const BITSTRING& par_numberingPlanIdentification,
    const BITSTRING& par_typeOfNumber,
    const BITSTRING& par_ext1,
    const OPTIONAL< HEXSTRING >& par_digits)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_numberingPlanIdentification(par_numberingPlanIdentification),
  field_typeOfNumber(par_typeOfNumber),
  field_ext1(par_ext1),
  field_digits(par_digits)
{
}

CalledPartyBCD__Number::CalledPartyBCD__Number(const CalledPartyBCD__Number& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.CalledPartyBCD_Number.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.numberingPlanIdentification().is_bound()) field_numberingPlanIdentification = other_value.numberingPlanIdentification();
else field_numberingPlanIdentification.clean_up();
if (other_value.typeOfNumber().is_bound()) field_typeOfNumber = other_value.typeOfNumber();
else field_typeOfNumber.clean_up();
if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
else field_ext1.clean_up();
if (other_value.digits().is_bound()) field_digits = other_value.digits();
else field_digits.clean_up();
}

void CalledPartyBCD__Number::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_numberingPlanIdentification.clean_up();
field_typeOfNumber.clean_up();
field_ext1.clean_up();
field_digits.clean_up();
}

const TTCN_Typedescriptor_t* CalledPartyBCD__Number::get_descriptor() const { return &CalledPartyBCD__Number_descr_; }
CalledPartyBCD__Number& CalledPartyBCD__Number::operator=(const CalledPartyBCD__Number& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.CalledPartyBCD_Number.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.numberingPlanIdentification().is_bound()) field_numberingPlanIdentification = other_value.numberingPlanIdentification();
  else field_numberingPlanIdentification.clean_up();
  if (other_value.typeOfNumber().is_bound()) field_typeOfNumber = other_value.typeOfNumber();
  else field_typeOfNumber.clean_up();
  if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
  else field_ext1.clean_up();
  if (other_value.digits().is_bound()) field_digits = other_value.digits();
  else field_digits.clean_up();
}
return *this;
}

boolean CalledPartyBCD__Number::operator==(const CalledPartyBCD__Number& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_numberingPlanIdentification==other_value.field_numberingPlanIdentification
  && field_typeOfNumber==other_value.field_typeOfNumber
  && field_ext1==other_value.field_ext1
  && field_digits==other_value.field_digits;
}

boolean CalledPartyBCD__Number::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (field_numberingPlanIdentification.is_bound())
  || (field_typeOfNumber.is_bound())
  || (field_ext1.is_bound())
  || (OPTIONAL_OMIT == field_digits.get_selection() || field_digits.is_bound());
}
boolean CalledPartyBCD__Number::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && field_numberingPlanIdentification.is_value()
  && field_typeOfNumber.is_value()
  && field_ext1.is_value()
  && (OPTIONAL_OMIT == field_digits.get_selection() || field_digits.is_value());
}
int CalledPartyBCD__Number::size_of() const
{
  int ret_val = 5;
  if (field_digits.ispresent()) ret_val++;
  return ret_val;
}

void CalledPartyBCD__Number::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", numberingPlanIdentification := ");
field_numberingPlanIdentification.log();
TTCN_Logger::log_event_str(", typeOfNumber := ");
field_typeOfNumber.log();
TTCN_Logger::log_event_str(", ext1 := ");
field_ext1.log();
TTCN_Logger::log_event_str(", digits := ");
field_digits.log();
TTCN_Logger::log_event_str(" }");
}

void CalledPartyBCD__Number::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (numberingPlanIdentification().is_bound()) numberingPlanIdentification().set_implicit_omit();
if (typeOfNumber().is_bound()) typeOfNumber().set_implicit_omit();
if (ext1().is_bound()) ext1().set_implicit_omit();
if (!digits().is_bound()) digits() = OMIT_VALUE;
else digits().set_implicit_omit();
}

void CalledPartyBCD__Number::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 @MobileL3_CC_Types.CalledPartyBCD_Number 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) numberingPlanIdentification().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) typeOfNumber().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) digits().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "numberingPlanIdentification")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberingPlanIdentification().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "typeOfNumber")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          typeOfNumber().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "digits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          digits().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 @MobileL3_CC_Types.CalledPartyBCD_Number: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.CalledPartyBCD_Number");
  }
}

void CalledPartyBCD__Number::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_numberingPlanIdentification.encode_text(text_buf);
field_typeOfNumber.encode_text(text_buf);
field_ext1.encode_text(text_buf);
field_digits.encode_text(text_buf);
}

void CalledPartyBCD__Number::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_numberingPlanIdentification.decode_text(text_buf);
field_typeOfNumber.decode_text(text_buf);
field_ext1.decode_text(text_buf);
field_digits.decode_text(text_buf);
}

void CalledPartyBCD__Number::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 CalledPartyBCD__Number::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 CalledPartyBCD__Number::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, CalledPartyBCD__Number_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(CalledPartyBCD__Number_lengthIndicator_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_lengthIndicator.convert_to_Integer(CalledPartyBCD__Number_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  RAW_Force_Omit field_2_force_omit(2, force_omit, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_numberingPlanIdentification.RAW_decode(General__Types::BIT4_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;
  RAW_Force_Omit field_3_force_omit(3, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_typeOfNumber.RAW_decode(General__Types::BIT3_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), 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());
  value_of_length_field1 -= decoded_field_length;
  RAW_Force_Omit field_4_force_omit(4, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_ext1.RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), 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());
  value_of_length_field1 -= decoded_field_length;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_digits = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, CalledPartyBCD__Number_digits_descr_.raw->forceomit);
  decoded_field_length = field_digits().RAW_decode(CalledPartyBCD__Number_digits_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_digits = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_digits=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int CalledPartyBCD__Number::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CalledPartyBCD__Number_lengthIndicator_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT4_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT3_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT1_descr_.raw);
  if (field_digits.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, CalledPartyBCD__Number_digits_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &CalledPartyBCD__Number_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 4;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(4);
  myleaf.body.node.nodes[1]->length = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[2]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[2]->curr_pos.pos;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = myleaf.body.node.nodes[4]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = myleaf.body.node.nodes[4]->curr_pos.pos;
  if (field_digits.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = myleaf.body.node.nodes[5]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = myleaf.body.node.nodes[5]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = 0;
  }
  encoded_length += field_numberingPlanIdentification.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_typeOfNumber.RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_ext1.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[4]);
  if (field_digits.ispresent()) {
  encoded_length += field_digits().RAW_encode(CalledPartyBCD__Number_digits_descr_, *myleaf.body.node.nodes[5]);
  }
  return myleaf.length = encoded_length;
}

struct CalledPartyBCD__Number_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
BITSTRING_template field_numberingPlanIdentification;
BITSTRING_template field_typeOfNumber;
BITSTRING_template field_ext1;
HEXSTRING_template field_digits;
};

void CalledPartyBCD__Number_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_numberingPlanIdentification = ANY_VALUE;
single_value->field_typeOfNumber = ANY_VALUE;
single_value->field_ext1 = ANY_VALUE;
single_value->field_digits = ANY_OR_OMIT;
}
}
}

void CalledPartyBCD__Number_template::copy_value(const CalledPartyBCD__Number& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.numberingPlanIdentification().is_bound()) {
  single_value->field_numberingPlanIdentification = other_value.numberingPlanIdentification();
} else {
  single_value->field_numberingPlanIdentification.clean_up();
}
if (other_value.typeOfNumber().is_bound()) {
  single_value->field_typeOfNumber = other_value.typeOfNumber();
} else {
  single_value->field_typeOfNumber.clean_up();
}
if (other_value.ext1().is_bound()) {
  single_value->field_ext1 = other_value.ext1();
} else {
  single_value->field_ext1.clean_up();
}
if (other_value.digits().is_bound()) {
  if (other_value.digits().ispresent()) single_value->field_digits = other_value.digits()();
  else single_value->field_digits = OMIT_VALUE;
} else {
  single_value->field_digits.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void CalledPartyBCD__Number_template::copy_template(const CalledPartyBCD__Number_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.numberingPlanIdentification().get_selection()) {
single_value->field_numberingPlanIdentification = other_value.numberingPlanIdentification();
} else {
single_value->field_numberingPlanIdentification.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.typeOfNumber().get_selection()) {
single_value->field_typeOfNumber = other_value.typeOfNumber();
} else {
single_value->field_typeOfNumber.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext1().get_selection()) {
single_value->field_ext1 = other_value.ext1();
} else {
single_value->field_ext1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.digits().get_selection()) {
single_value->field_digits = other_value.digits();
} else {
single_value->field_digits.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 CalledPartyBCD__Number_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 CalledPartyBCD__Number_template(*other_value.implication_.precondition);
implication_.implied_template = new CalledPartyBCD__Number_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 @MobileL3_CC_Types.CalledPartyBCD_Number.");
break;
}
set_selection(other_value);
}

CalledPartyBCD__Number_template::CalledPartyBCD__Number_template()
{
}

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

CalledPartyBCD__Number_template::CalledPartyBCD__Number_template(const CalledPartyBCD__Number& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean CalledPartyBCD__Number_template::match(const CalledPartyBCD__Number& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.numberingPlanIdentification().is_bound()) return FALSE;
if(!single_value->field_numberingPlanIdentification.match(other_value.numberingPlanIdentification(), legacy))return FALSE;
if(!other_value.typeOfNumber().is_bound()) return FALSE;
if(!single_value->field_typeOfNumber.match(other_value.typeOfNumber(), legacy))return FALSE;
if(!other_value.ext1().is_bound()) return FALSE;
if(!single_value->field_ext1.match(other_value.ext1(), legacy))return FALSE;
if(!other_value.digits().is_bound()) return FALSE;
if((other_value.digits().ispresent() ? !single_value->field_digits.match((const HEXSTRING&)other_value.digits(), legacy) : !single_value->field_digits.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 @MobileL3_CC_Types.CalledPartyBCD_Number.");
}
return FALSE;
}

boolean CalledPartyBCD__Number_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || single_value->field_numberingPlanIdentification.is_bound()
 || single_value->field_typeOfNumber.is_bound()
 || single_value->field_ext1.is_bound()
 || (single_value->field_digits.is_omit() || single_value->field_digits.is_bound());
}

boolean CalledPartyBCD__Number_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && single_value->field_numberingPlanIdentification.is_value()
 && single_value->field_typeOfNumber.is_value()
 && single_value->field_ext1.is_value()
 && (single_value->field_digits.is_omit() || single_value->field_digits.is_value());
}

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

CalledPartyBCD__Number CalledPartyBCD__Number_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 @MobileL3_CC_Types.CalledPartyBCD_Number.");
CalledPartyBCD__Number ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_numberingPlanIdentification.is_bound()) {
ret_val.numberingPlanIdentification() = single_value->field_numberingPlanIdentification.valueof();
}
if (single_value->field_typeOfNumber.is_bound()) {
ret_val.typeOfNumber() = single_value->field_typeOfNumber.valueof();
}
if (single_value->field_ext1.is_bound()) {
ret_val.ext1() = single_value->field_ext1.valueof();
}
if (single_value->field_digits.is_omit()) ret_val.digits() = OMIT_VALUE;
else if (single_value->field_digits.is_bound()) {
ret_val.digits() = single_value->field_digits.valueof();
}
return ret_val;
}

void CalledPartyBCD__Number_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 @MobileL3_CC_Types.CalledPartyBCD_Number.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new CalledPartyBCD__Number_template[list_length];
}

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

OCTETSTRING_template& CalledPartyBCD__Number_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& CalledPartyBCD__Number_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.CalledPartyBCD_Number.");
return single_value->field_elementIdentifier;
}

INTEGER_template& CalledPartyBCD__Number_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& CalledPartyBCD__Number_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.CalledPartyBCD_Number.");
return single_value->field_lengthIndicator;
}

BITSTRING_template& CalledPartyBCD__Number_template::numberingPlanIdentification()
{
set_specific();
return single_value->field_numberingPlanIdentification;
}

const BITSTRING_template& CalledPartyBCD__Number_template::numberingPlanIdentification() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field numberingPlanIdentification of a non-specific template of type @MobileL3_CC_Types.CalledPartyBCD_Number.");
return single_value->field_numberingPlanIdentification;
}

BITSTRING_template& CalledPartyBCD__Number_template::typeOfNumber()
{
set_specific();
return single_value->field_typeOfNumber;
}

const BITSTRING_template& CalledPartyBCD__Number_template::typeOfNumber() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field typeOfNumber of a non-specific template of type @MobileL3_CC_Types.CalledPartyBCD_Number.");
return single_value->field_typeOfNumber;
}

BITSTRING_template& CalledPartyBCD__Number_template::ext1()
{
set_specific();
return single_value->field_ext1;
}

const BITSTRING_template& CalledPartyBCD__Number_template::ext1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext1 of a non-specific template of type @MobileL3_CC_Types.CalledPartyBCD_Number.");
return single_value->field_ext1;
}

HEXSTRING_template& CalledPartyBCD__Number_template::digits()
{
set_specific();
return single_value->field_digits;
}

const HEXSTRING_template& CalledPartyBCD__Number_template::digits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field digits of a non-specific template of type @MobileL3_CC_Types.CalledPartyBCD_Number.");
return single_value->field_digits;
}

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

void CalledPartyBCD__Number_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", numberingPlanIdentification := ");
single_value->field_numberingPlanIdentification.log();
TTCN_Logger::log_event_str(", typeOfNumber := ");
single_value->field_typeOfNumber.log();
TTCN_Logger::log_event_str(", ext1 := ");
single_value->field_ext1.log();
TTCN_Logger::log_event_str(", digits := ");
single_value->field_digits.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 CalledPartyBCD__Number_template::log_match(const CalledPartyBCD__Number& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_numberingPlanIdentification.match(match_value.numberingPlanIdentification(), legacy)){
TTCN_Logger::log_logmatch_info(".numberingPlanIdentification");
single_value->field_numberingPlanIdentification.log_match(match_value.numberingPlanIdentification(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_typeOfNumber.match(match_value.typeOfNumber(), legacy)){
TTCN_Logger::log_logmatch_info(".typeOfNumber");
single_value->field_typeOfNumber.log_match(match_value.typeOfNumber(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ext1.match(match_value.ext1(), legacy)){
TTCN_Logger::log_logmatch_info(".ext1");
single_value->field_ext1.log_match(match_value.ext1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.digits().ispresent()){
if(!single_value->field_digits.match(match_value.digits(), legacy)){
TTCN_Logger::log_logmatch_info(".digits");
single_value->field_digits.log_match(match_value.digits(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_digits.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".digits := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_digits.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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", numberingPlanIdentification := ");
single_value->field_numberingPlanIdentification.log_match(match_value.numberingPlanIdentification(), legacy);
TTCN_Logger::log_event_str(", typeOfNumber := ");
single_value->field_typeOfNumber.log_match(match_value.typeOfNumber(), legacy);
TTCN_Logger::log_event_str(", ext1 := ");
single_value->field_ext1.log_match(match_value.ext1(), legacy);
TTCN_Logger::log_event_str(", digits := ");
if (match_value.digits().ispresent()) {
single_value->field_digits.log_match(match_value.digits(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_digits.log();
if (single_value->field_digits.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 CalledPartyBCD__Number_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (numberingPlanIdentification().is_bound()) numberingPlanIdentification().set_implicit_omit();
if (typeOfNumber().is_bound()) typeOfNumber().set_implicit_omit();
if (ext1().is_bound()) ext1().set_implicit_omit();
if (!digits().is_bound()) digits() = OMIT_VALUE;
else digits().set_implicit_omit();
}

void CalledPartyBCD__Number_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_numberingPlanIdentification.encode_text(text_buf);
single_value->field_typeOfNumber.encode_text(text_buf);
single_value->field_ext1.encode_text(text_buf);
single_value->field_digits.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 @MobileL3_CC_Types.CalledPartyBCD_Number.");
}
}

void CalledPartyBCD__Number_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_numberingPlanIdentification.decode_text(text_buf);
single_value->field_typeOfNumber.decode_text(text_buf);
single_value->field_ext1.decode_text(text_buf);
single_value->field_digits.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 CalledPartyBCD__Number_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 @MobileL3_CC_Types.CalledPartyBCD_Number.");
}
}

void CalledPartyBCD__Number_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: {
    CalledPartyBCD__Number_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 @MobileL3_CC_Types.CalledPartyBCD_Number 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) numberingPlanIdentification().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) typeOfNumber().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) digits().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "numberingPlanIdentification")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberingPlanIdentification().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "typeOfNumber")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          typeOfNumber().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "digits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          digits().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 @MobileL3_CC_Types.CalledPartyBCD_Number: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    CalledPartyBCD__Number_template* precondition = new CalledPartyBCD__Number_template;
    precondition->set_param(*param.get_elem(0));
    CalledPartyBCD__Number_template* implied_template = new CalledPartyBCD__Number_template;
    implied_template->set_param(*param.get_elem(1));
    *this = CalledPartyBCD__Number_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.CalledPartyBCD_Number");
  }
  is_ifpresent = param.get_ifpresent();
}

void CalledPartyBCD__Number_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CalledPartyBCD_Number");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CalledPartyBCD_Number");
single_value->field_numberingPlanIdentification.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CalledPartyBCD_Number");
single_value->field_typeOfNumber.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CalledPartyBCD_Number");
single_value->field_ext1.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CalledPartyBCD_Number");
single_value->field_digits.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CalledPartyBCD_Number");
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 : "@MobileL3_CC_Types.CalledPartyBCD_Number");
}

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

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

CalledPartySubAddress::CalledPartySubAddress()
{
}

CalledPartySubAddress::CalledPartySubAddress(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const OPTIONAL< BITSTRING >& par_spare1__3,
    const OPTIONAL< BITSTRING >& par_odd__evenIndicator,
    const OPTIONAL< BITSTRING >& par_typeOfSubAddress,
    const OPTIONAL< BITSTRING >& par_ext1,
    const OPTIONAL< OCTETSTRING >& par_subAddressInformation)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_spare1__3(par_spare1__3),
  field_odd__evenIndicator(par_odd__evenIndicator),
  field_typeOfSubAddress(par_typeOfSubAddress),
  field_ext1(par_ext1),
  field_subAddressInformation(par_subAddressInformation)
{
}

CalledPartySubAddress::CalledPartySubAddress(const CalledPartySubAddress& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.CalledPartySubAddress.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.spare1__3().is_bound()) field_spare1__3 = other_value.spare1__3();
else field_spare1__3.clean_up();
if (other_value.odd__evenIndicator().is_bound()) field_odd__evenIndicator = other_value.odd__evenIndicator();
else field_odd__evenIndicator.clean_up();
if (other_value.typeOfSubAddress().is_bound()) field_typeOfSubAddress = other_value.typeOfSubAddress();
else field_typeOfSubAddress.clean_up();
if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
else field_ext1.clean_up();
if (other_value.subAddressInformation().is_bound()) field_subAddressInformation = other_value.subAddressInformation();
else field_subAddressInformation.clean_up();
}

void CalledPartySubAddress::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_spare1__3.clean_up();
field_odd__evenIndicator.clean_up();
field_typeOfSubAddress.clean_up();
field_ext1.clean_up();
field_subAddressInformation.clean_up();
}

const TTCN_Typedescriptor_t* CalledPartySubAddress::get_descriptor() const { return &CalledPartySubAddress_descr_; }
CalledPartySubAddress& CalledPartySubAddress::operator=(const CalledPartySubAddress& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.CalledPartySubAddress.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.spare1__3().is_bound()) field_spare1__3 = other_value.spare1__3();
  else field_spare1__3.clean_up();
  if (other_value.odd__evenIndicator().is_bound()) field_odd__evenIndicator = other_value.odd__evenIndicator();
  else field_odd__evenIndicator.clean_up();
  if (other_value.typeOfSubAddress().is_bound()) field_typeOfSubAddress = other_value.typeOfSubAddress();
  else field_typeOfSubAddress.clean_up();
  if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
  else field_ext1.clean_up();
  if (other_value.subAddressInformation().is_bound()) field_subAddressInformation = other_value.subAddressInformation();
  else field_subAddressInformation.clean_up();
}
return *this;
}

boolean CalledPartySubAddress::operator==(const CalledPartySubAddress& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_spare1__3==other_value.field_spare1__3
  && field_odd__evenIndicator==other_value.field_odd__evenIndicator
  && field_typeOfSubAddress==other_value.field_typeOfSubAddress
  && field_ext1==other_value.field_ext1
  && field_subAddressInformation==other_value.field_subAddressInformation;
}

boolean CalledPartySubAddress::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (OPTIONAL_OMIT == field_spare1__3.get_selection() || field_spare1__3.is_bound())
  || (OPTIONAL_OMIT == field_odd__evenIndicator.get_selection() || field_odd__evenIndicator.is_bound())
  || (OPTIONAL_OMIT == field_typeOfSubAddress.get_selection() || field_typeOfSubAddress.is_bound())
  || (OPTIONAL_OMIT == field_ext1.get_selection() || field_ext1.is_bound())
  || (OPTIONAL_OMIT == field_subAddressInformation.get_selection() || field_subAddressInformation.is_bound());
}
boolean CalledPartySubAddress::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && (OPTIONAL_OMIT == field_spare1__3.get_selection() || field_spare1__3.is_value())
  && (OPTIONAL_OMIT == field_odd__evenIndicator.get_selection() || field_odd__evenIndicator.is_value())
  && (OPTIONAL_OMIT == field_typeOfSubAddress.get_selection() || field_typeOfSubAddress.is_value())
  && (OPTIONAL_OMIT == field_ext1.get_selection() || field_ext1.is_value())
  && (OPTIONAL_OMIT == field_subAddressInformation.get_selection() || field_subAddressInformation.is_value());
}
int CalledPartySubAddress::size_of() const
{
  int ret_val = 2;
  if (field_spare1__3.ispresent()) ret_val++;
  if (field_odd__evenIndicator.ispresent()) ret_val++;
  if (field_typeOfSubAddress.ispresent()) ret_val++;
  if (field_ext1.ispresent()) ret_val++;
  if (field_subAddressInformation.ispresent()) ret_val++;
  return ret_val;
}

void CalledPartySubAddress::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", spare1_3 := ");
field_spare1__3.log();
TTCN_Logger::log_event_str(", odd_evenIndicator := ");
field_odd__evenIndicator.log();
TTCN_Logger::log_event_str(", typeOfSubAddress := ");
field_typeOfSubAddress.log();
TTCN_Logger::log_event_str(", ext1 := ");
field_ext1.log();
TTCN_Logger::log_event_str(", subAddressInformation := ");
field_subAddressInformation.log();
TTCN_Logger::log_event_str(" }");
}

void CalledPartySubAddress::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (!spare1__3().is_bound()) spare1__3() = OMIT_VALUE;
else spare1__3().set_implicit_omit();
if (!odd__evenIndicator().is_bound()) odd__evenIndicator() = OMIT_VALUE;
else odd__evenIndicator().set_implicit_omit();
if (!typeOfSubAddress().is_bound()) typeOfSubAddress() = OMIT_VALUE;
else typeOfSubAddress().set_implicit_omit();
if (!ext1().is_bound()) ext1() = OMIT_VALUE;
else ext1().set_implicit_omit();
if (!subAddressInformation().is_bound()) subAddressInformation() = OMIT_VALUE;
else subAddressInformation().set_implicit_omit();
}

void CalledPartySubAddress::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 @MobileL3_CC_Types.CalledPartySubAddress 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare1__3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) odd__evenIndicator().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) typeOfSubAddress().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) subAddressInformation().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "odd_evenIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          odd__evenIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "typeOfSubAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          typeOfSubAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "subAddressInformation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          subAddressInformation().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 @MobileL3_CC_Types.CalledPartySubAddress: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.CalledPartySubAddress");
  }
}

void CalledPartySubAddress::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_spare1__3.encode_text(text_buf);
field_odd__evenIndicator.encode_text(text_buf);
field_typeOfSubAddress.encode_text(text_buf);
field_ext1.encode_text(text_buf);
field_subAddressInformation.encode_text(text_buf);
}

void CalledPartySubAddress::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_spare1__3.decode_text(text_buf);
field_odd__evenIndicator.decode_text(text_buf);
field_typeOfSubAddress.decode_text(text_buf);
field_ext1.decode_text(text_buf);
field_subAddressInformation.decode_text(text_buf);
}

void CalledPartySubAddress::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 CalledPartySubAddress::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 CalledPartySubAddress::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, CalledPartySubAddress_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(CalledPartySubAddress_lengthIndicator_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_lengthIndicator.convert_to_Integer(CalledPartySubAddress_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_spare1__3 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_spare1__3().RAW_decode(General__Types::BIT3_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_spare1__3 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_spare1__3=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_odd__evenIndicator = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_odd__evenIndicator().RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_odd__evenIndicator = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_odd__evenIndicator=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_typeOfSubAddress = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_typeOfSubAddress().RAW_decode(General__Types::BIT3_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_typeOfSubAddress = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_typeOfSubAddress=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_ext1 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_ext1().RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_ext1 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_ext1=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_subAddressInformation = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, General__Types::OCTN_descr_.raw->forceomit);
  decoded_field_length = field_subAddressInformation().RAW_decode(General__Types::OCTN_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_subAddressInformation = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_subAddressInformation=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int CalledPartySubAddress::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CalledPartySubAddress_lengthIndicator_descr_.raw);
  if (field_spare1__3.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT3_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_odd__evenIndicator.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_typeOfSubAddress.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT3_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_ext1.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_subAddressInformation.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, General__Types::OCTN_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &CalledPartySubAddress_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 5;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(5);
  myleaf.body.node.nodes[1]->length = 8;
  if (field_spare1__3.ispresent()) {
  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;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = 0;
  }
  if (field_odd__evenIndicator.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = 0;
  }
  if (field_typeOfSubAddress.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = myleaf.body.node.nodes[4]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = myleaf.body.node.nodes[4]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = 0;
  }
  if (field_ext1.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = myleaf.body.node.nodes[5]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = myleaf.body.node.nodes[5]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = 0;
  }
  if (field_subAddressInformation.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].level = myleaf.body.node.nodes[6]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].pos = myleaf.body.node.nodes[6]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].pos = 0;
  }
  if (field_spare1__3.ispresent()) {
  encoded_length += field_spare1__3().RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_odd__evenIndicator.ispresent()) {
  encoded_length += field_odd__evenIndicator().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_typeOfSubAddress.ispresent()) {
  encoded_length += field_typeOfSubAddress().RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_ext1.ispresent()) {
  encoded_length += field_ext1().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_subAddressInformation.ispresent()) {
  encoded_length += field_subAddressInformation().RAW_encode(General__Types::OCTN_descr_, *myleaf.body.node.nodes[6]);
  }
  return myleaf.length = encoded_length;
}

struct CalledPartySubAddress_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
BITSTRING_template field_spare1__3;
BITSTRING_template field_odd__evenIndicator;
BITSTRING_template field_typeOfSubAddress;
BITSTRING_template field_ext1;
OCTETSTRING_template field_subAddressInformation;
};

void CalledPartySubAddress_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_spare1__3 = ANY_OR_OMIT;
single_value->field_odd__evenIndicator = ANY_OR_OMIT;
single_value->field_typeOfSubAddress = ANY_OR_OMIT;
single_value->field_ext1 = ANY_OR_OMIT;
single_value->field_subAddressInformation = ANY_OR_OMIT;
}
}
}

void CalledPartySubAddress_template::copy_value(const CalledPartySubAddress& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.spare1__3().is_bound()) {
  if (other_value.spare1__3().ispresent()) single_value->field_spare1__3 = other_value.spare1__3()();
  else single_value->field_spare1__3 = OMIT_VALUE;
} else {
  single_value->field_spare1__3.clean_up();
}
if (other_value.odd__evenIndicator().is_bound()) {
  if (other_value.odd__evenIndicator().ispresent()) single_value->field_odd__evenIndicator = other_value.odd__evenIndicator()();
  else single_value->field_odd__evenIndicator = OMIT_VALUE;
} else {
  single_value->field_odd__evenIndicator.clean_up();
}
if (other_value.typeOfSubAddress().is_bound()) {
  if (other_value.typeOfSubAddress().ispresent()) single_value->field_typeOfSubAddress = other_value.typeOfSubAddress()();
  else single_value->field_typeOfSubAddress = OMIT_VALUE;
} else {
  single_value->field_typeOfSubAddress.clean_up();
}
if (other_value.ext1().is_bound()) {
  if (other_value.ext1().ispresent()) single_value->field_ext1 = other_value.ext1()();
  else single_value->field_ext1 = OMIT_VALUE;
} else {
  single_value->field_ext1.clean_up();
}
if (other_value.subAddressInformation().is_bound()) {
  if (other_value.subAddressInformation().ispresent()) single_value->field_subAddressInformation = other_value.subAddressInformation()();
  else single_value->field_subAddressInformation = OMIT_VALUE;
} else {
  single_value->field_subAddressInformation.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void CalledPartySubAddress_template::copy_template(const CalledPartySubAddress_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare1__3().get_selection()) {
single_value->field_spare1__3 = other_value.spare1__3();
} else {
single_value->field_spare1__3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.odd__evenIndicator().get_selection()) {
single_value->field_odd__evenIndicator = other_value.odd__evenIndicator();
} else {
single_value->field_odd__evenIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.typeOfSubAddress().get_selection()) {
single_value->field_typeOfSubAddress = other_value.typeOfSubAddress();
} else {
single_value->field_typeOfSubAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext1().get_selection()) {
single_value->field_ext1 = other_value.ext1();
} else {
single_value->field_ext1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.subAddressInformation().get_selection()) {
single_value->field_subAddressInformation = other_value.subAddressInformation();
} else {
single_value->field_subAddressInformation.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 CalledPartySubAddress_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 CalledPartySubAddress_template(*other_value.implication_.precondition);
implication_.implied_template = new CalledPartySubAddress_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 @MobileL3_CC_Types.CalledPartySubAddress.");
break;
}
set_selection(other_value);
}

CalledPartySubAddress_template::CalledPartySubAddress_template()
{
}

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

CalledPartySubAddress_template::CalledPartySubAddress_template(const CalledPartySubAddress& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean CalledPartySubAddress_template::match(const CalledPartySubAddress& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.spare1__3().is_bound()) return FALSE;
if((other_value.spare1__3().ispresent() ? !single_value->field_spare1__3.match((const BITSTRING&)other_value.spare1__3(), legacy) : !single_value->field_spare1__3.match_omit(legacy)))return FALSE;
if(!other_value.odd__evenIndicator().is_bound()) return FALSE;
if((other_value.odd__evenIndicator().ispresent() ? !single_value->field_odd__evenIndicator.match((const BITSTRING&)other_value.odd__evenIndicator(), legacy) : !single_value->field_odd__evenIndicator.match_omit(legacy)))return FALSE;
if(!other_value.typeOfSubAddress().is_bound()) return FALSE;
if((other_value.typeOfSubAddress().ispresent() ? !single_value->field_typeOfSubAddress.match((const BITSTRING&)other_value.typeOfSubAddress(), legacy) : !single_value->field_typeOfSubAddress.match_omit(legacy)))return FALSE;
if(!other_value.ext1().is_bound()) return FALSE;
if((other_value.ext1().ispresent() ? !single_value->field_ext1.match((const BITSTRING&)other_value.ext1(), legacy) : !single_value->field_ext1.match_omit(legacy)))return FALSE;
if(!other_value.subAddressInformation().is_bound()) return FALSE;
if((other_value.subAddressInformation().ispresent() ? !single_value->field_subAddressInformation.match((const OCTETSTRING&)other_value.subAddressInformation(), legacy) : !single_value->field_subAddressInformation.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 @MobileL3_CC_Types.CalledPartySubAddress.");
}
return FALSE;
}

boolean CalledPartySubAddress_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || (single_value->field_spare1__3.is_omit() || single_value->field_spare1__3.is_bound())
 || (single_value->field_odd__evenIndicator.is_omit() || single_value->field_odd__evenIndicator.is_bound())
 || (single_value->field_typeOfSubAddress.is_omit() || single_value->field_typeOfSubAddress.is_bound())
 || (single_value->field_ext1.is_omit() || single_value->field_ext1.is_bound())
 || (single_value->field_subAddressInformation.is_omit() || single_value->field_subAddressInformation.is_bound());
}

boolean CalledPartySubAddress_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && (single_value->field_spare1__3.is_omit() || single_value->field_spare1__3.is_value())
 && (single_value->field_odd__evenIndicator.is_omit() || single_value->field_odd__evenIndicator.is_value())
 && (single_value->field_typeOfSubAddress.is_omit() || single_value->field_typeOfSubAddress.is_value())
 && (single_value->field_ext1.is_omit() || single_value->field_ext1.is_value())
 && (single_value->field_subAddressInformation.is_omit() || single_value->field_subAddressInformation.is_value());
}

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

CalledPartySubAddress CalledPartySubAddress_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 @MobileL3_CC_Types.CalledPartySubAddress.");
CalledPartySubAddress ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_spare1__3.is_omit()) ret_val.spare1__3() = OMIT_VALUE;
else if (single_value->field_spare1__3.is_bound()) {
ret_val.spare1__3() = single_value->field_spare1__3.valueof();
}
if (single_value->field_odd__evenIndicator.is_omit()) ret_val.odd__evenIndicator() = OMIT_VALUE;
else if (single_value->field_odd__evenIndicator.is_bound()) {
ret_val.odd__evenIndicator() = single_value->field_odd__evenIndicator.valueof();
}
if (single_value->field_typeOfSubAddress.is_omit()) ret_val.typeOfSubAddress() = OMIT_VALUE;
else if (single_value->field_typeOfSubAddress.is_bound()) {
ret_val.typeOfSubAddress() = single_value->field_typeOfSubAddress.valueof();
}
if (single_value->field_ext1.is_omit()) ret_val.ext1() = OMIT_VALUE;
else if (single_value->field_ext1.is_bound()) {
ret_val.ext1() = single_value->field_ext1.valueof();
}
if (single_value->field_subAddressInformation.is_omit()) ret_val.subAddressInformation() = OMIT_VALUE;
else if (single_value->field_subAddressInformation.is_bound()) {
ret_val.subAddressInformation() = single_value->field_subAddressInformation.valueof();
}
return ret_val;
}

void CalledPartySubAddress_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 @MobileL3_CC_Types.CalledPartySubAddress.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new CalledPartySubAddress_template[list_length];
}

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

OCTETSTRING_template& CalledPartySubAddress_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& CalledPartySubAddress_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.CalledPartySubAddress.");
return single_value->field_elementIdentifier;
}

INTEGER_template& CalledPartySubAddress_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& CalledPartySubAddress_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.CalledPartySubAddress.");
return single_value->field_lengthIndicator;
}

BITSTRING_template& CalledPartySubAddress_template::spare1__3()
{
set_specific();
return single_value->field_spare1__3;
}

const BITSTRING_template& CalledPartySubAddress_template::spare1__3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare1_3 of a non-specific template of type @MobileL3_CC_Types.CalledPartySubAddress.");
return single_value->field_spare1__3;
}

BITSTRING_template& CalledPartySubAddress_template::odd__evenIndicator()
{
set_specific();
return single_value->field_odd__evenIndicator;
}

const BITSTRING_template& CalledPartySubAddress_template::odd__evenIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field odd_evenIndicator of a non-specific template of type @MobileL3_CC_Types.CalledPartySubAddress.");
return single_value->field_odd__evenIndicator;
}

BITSTRING_template& CalledPartySubAddress_template::typeOfSubAddress()
{
set_specific();
return single_value->field_typeOfSubAddress;
}

const BITSTRING_template& CalledPartySubAddress_template::typeOfSubAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field typeOfSubAddress of a non-specific template of type @MobileL3_CC_Types.CalledPartySubAddress.");
return single_value->field_typeOfSubAddress;
}

BITSTRING_template& CalledPartySubAddress_template::ext1()
{
set_specific();
return single_value->field_ext1;
}

const BITSTRING_template& CalledPartySubAddress_template::ext1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext1 of a non-specific template of type @MobileL3_CC_Types.CalledPartySubAddress.");
return single_value->field_ext1;
}

OCTETSTRING_template& CalledPartySubAddress_template::subAddressInformation()
{
set_specific();
return single_value->field_subAddressInformation;
}

const OCTETSTRING_template& CalledPartySubAddress_template::subAddressInformation() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field subAddressInformation of a non-specific template of type @MobileL3_CC_Types.CalledPartySubAddress.");
return single_value->field_subAddressInformation;
}

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

void CalledPartySubAddress_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", spare1_3 := ");
single_value->field_spare1__3.log();
TTCN_Logger::log_event_str(", odd_evenIndicator := ");
single_value->field_odd__evenIndicator.log();
TTCN_Logger::log_event_str(", typeOfSubAddress := ");
single_value->field_typeOfSubAddress.log();
TTCN_Logger::log_event_str(", ext1 := ");
single_value->field_ext1.log();
TTCN_Logger::log_event_str(", subAddressInformation := ");
single_value->field_subAddressInformation.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 CalledPartySubAddress_template::log_match(const CalledPartySubAddress& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.spare1__3().ispresent()){
if(!single_value->field_spare1__3.match(match_value.spare1__3(), legacy)){
TTCN_Logger::log_logmatch_info(".spare1_3");
single_value->field_spare1__3.log_match(match_value.spare1__3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_spare1__3.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".spare1_3 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_spare1__3.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.odd__evenIndicator().ispresent()){
if(!single_value->field_odd__evenIndicator.match(match_value.odd__evenIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".odd_evenIndicator");
single_value->field_odd__evenIndicator.log_match(match_value.odd__evenIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_odd__evenIndicator.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".odd_evenIndicator := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_odd__evenIndicator.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.typeOfSubAddress().ispresent()){
if(!single_value->field_typeOfSubAddress.match(match_value.typeOfSubAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".typeOfSubAddress");
single_value->field_typeOfSubAddress.log_match(match_value.typeOfSubAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_typeOfSubAddress.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".typeOfSubAddress := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_typeOfSubAddress.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.ext1().ispresent()){
if(!single_value->field_ext1.match(match_value.ext1(), legacy)){
TTCN_Logger::log_logmatch_info(".ext1");
single_value->field_ext1.log_match(match_value.ext1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_ext1.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".ext1 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_ext1.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.subAddressInformation().ispresent()){
if(!single_value->field_subAddressInformation.match(match_value.subAddressInformation(), legacy)){
TTCN_Logger::log_logmatch_info(".subAddressInformation");
single_value->field_subAddressInformation.log_match(match_value.subAddressInformation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_subAddressInformation.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".subAddressInformation := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_subAddressInformation.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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", spare1_3 := ");
if (match_value.spare1__3().ispresent()) {
single_value->field_spare1__3.log_match(match_value.spare1__3(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_spare1__3.log();
if (single_value->field_spare1__3.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", odd_evenIndicator := ");
if (match_value.odd__evenIndicator().ispresent()) {
single_value->field_odd__evenIndicator.log_match(match_value.odd__evenIndicator(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_odd__evenIndicator.log();
if (single_value->field_odd__evenIndicator.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", typeOfSubAddress := ");
if (match_value.typeOfSubAddress().ispresent()) {
single_value->field_typeOfSubAddress.log_match(match_value.typeOfSubAddress(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_typeOfSubAddress.log();
if (single_value->field_typeOfSubAddress.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", ext1 := ");
if (match_value.ext1().ispresent()) {
single_value->field_ext1.log_match(match_value.ext1(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_ext1.log();
if (single_value->field_ext1.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", subAddressInformation := ");
if (match_value.subAddressInformation().ispresent()) {
single_value->field_subAddressInformation.log_match(match_value.subAddressInformation(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_subAddressInformation.log();
if (single_value->field_subAddressInformation.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 CalledPartySubAddress_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (!spare1__3().is_bound()) spare1__3() = OMIT_VALUE;
else spare1__3().set_implicit_omit();
if (!odd__evenIndicator().is_bound()) odd__evenIndicator() = OMIT_VALUE;
else odd__evenIndicator().set_implicit_omit();
if (!typeOfSubAddress().is_bound()) typeOfSubAddress() = OMIT_VALUE;
else typeOfSubAddress().set_implicit_omit();
if (!ext1().is_bound()) ext1() = OMIT_VALUE;
else ext1().set_implicit_omit();
if (!subAddressInformation().is_bound()) subAddressInformation() = OMIT_VALUE;
else subAddressInformation().set_implicit_omit();
}

void CalledPartySubAddress_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_spare1__3.encode_text(text_buf);
single_value->field_odd__evenIndicator.encode_text(text_buf);
single_value->field_typeOfSubAddress.encode_text(text_buf);
single_value->field_ext1.encode_text(text_buf);
single_value->field_subAddressInformation.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 @MobileL3_CC_Types.CalledPartySubAddress.");
}
}

void CalledPartySubAddress_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_spare1__3.decode_text(text_buf);
single_value->field_odd__evenIndicator.decode_text(text_buf);
single_value->field_typeOfSubAddress.decode_text(text_buf);
single_value->field_ext1.decode_text(text_buf);
single_value->field_subAddressInformation.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 CalledPartySubAddress_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 @MobileL3_CC_Types.CalledPartySubAddress.");
}
}

void CalledPartySubAddress_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: {
    CalledPartySubAddress_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 @MobileL3_CC_Types.CalledPartySubAddress 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare1__3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) odd__evenIndicator().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) typeOfSubAddress().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) subAddressInformation().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "odd_evenIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          odd__evenIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "typeOfSubAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          typeOfSubAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "subAddressInformation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          subAddressInformation().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 @MobileL3_CC_Types.CalledPartySubAddress: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    CalledPartySubAddress_template* precondition = new CalledPartySubAddress_template;
    precondition->set_param(*param.get_elem(0));
    CalledPartySubAddress_template* implied_template = new CalledPartySubAddress_template;
    implied_template->set_param(*param.get_elem(1));
    *this = CalledPartySubAddress_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.CalledPartySubAddress");
  }
  is_ifpresent = param.get_ifpresent();
}

void CalledPartySubAddress_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CalledPartySubAddress");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CalledPartySubAddress");
single_value->field_spare1__3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CalledPartySubAddress");
single_value->field_odd__evenIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CalledPartySubAddress");
single_value->field_typeOfSubAddress.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CalledPartySubAddress");
single_value->field_ext1.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CalledPartySubAddress");
single_value->field_subAddressInformation.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CalledPartySubAddress");
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 : "@MobileL3_CC_Types.CalledPartySubAddress");
}

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

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

CallingOrCalled__Number__oct3::CallingOrCalled__Number__oct3()
{
}

CallingOrCalled__Number__oct3::CallingOrCalled__Number__oct3(const BITSTRING& par_numberingPlanIdentification,
    const BITSTRING& par_typeOfNumber,
    const BITSTRING& par_ext1,
    const OPTIONAL< BITSTRING >& par_screeningIndicator,
    const OPTIONAL< BITSTRING >& par_spare1__3,
    const OPTIONAL< BITSTRING >& par_presentationIndicator,
    const OPTIONAL< BITSTRING >& par_ext2)
  :   field_numberingPlanIdentification(par_numberingPlanIdentification),
  field_typeOfNumber(par_typeOfNumber),
  field_ext1(par_ext1),
  field_screeningIndicator(par_screeningIndicator),
  field_spare1__3(par_spare1__3),
  field_presentationIndicator(par_presentationIndicator),
  field_ext2(par_ext2)
{
}

CallingOrCalled__Number__oct3::CallingOrCalled__Number__oct3(const CallingOrCalled__Number__oct3& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.CallingOrCalled_Number_oct3.");
if (other_value.numberingPlanIdentification().is_bound()) field_numberingPlanIdentification = other_value.numberingPlanIdentification();
else field_numberingPlanIdentification.clean_up();
if (other_value.typeOfNumber().is_bound()) field_typeOfNumber = other_value.typeOfNumber();
else field_typeOfNumber.clean_up();
if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
else field_ext1.clean_up();
if (other_value.screeningIndicator().is_bound()) field_screeningIndicator = other_value.screeningIndicator();
else field_screeningIndicator.clean_up();
if (other_value.spare1__3().is_bound()) field_spare1__3 = other_value.spare1__3();
else field_spare1__3.clean_up();
if (other_value.presentationIndicator().is_bound()) field_presentationIndicator = other_value.presentationIndicator();
else field_presentationIndicator.clean_up();
if (other_value.ext2().is_bound()) field_ext2 = other_value.ext2();
else field_ext2.clean_up();
}

void CallingOrCalled__Number__oct3::clean_up()
{
field_numberingPlanIdentification.clean_up();
field_typeOfNumber.clean_up();
field_ext1.clean_up();
field_screeningIndicator.clean_up();
field_spare1__3.clean_up();
field_presentationIndicator.clean_up();
field_ext2.clean_up();
}

const TTCN_Typedescriptor_t* CallingOrCalled__Number__oct3::get_descriptor() const { return &CallingOrCalled__Number__oct3_descr_; }
CallingOrCalled__Number__oct3& CallingOrCalled__Number__oct3::operator=(const CallingOrCalled__Number__oct3& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.CallingOrCalled_Number_oct3.");
  if (other_value.numberingPlanIdentification().is_bound()) field_numberingPlanIdentification = other_value.numberingPlanIdentification();
  else field_numberingPlanIdentification.clean_up();
  if (other_value.typeOfNumber().is_bound()) field_typeOfNumber = other_value.typeOfNumber();
  else field_typeOfNumber.clean_up();
  if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
  else field_ext1.clean_up();
  if (other_value.screeningIndicator().is_bound()) field_screeningIndicator = other_value.screeningIndicator();
  else field_screeningIndicator.clean_up();
  if (other_value.spare1__3().is_bound()) field_spare1__3 = other_value.spare1__3();
  else field_spare1__3.clean_up();
  if (other_value.presentationIndicator().is_bound()) field_presentationIndicator = other_value.presentationIndicator();
  else field_presentationIndicator.clean_up();
  if (other_value.ext2().is_bound()) field_ext2 = other_value.ext2();
  else field_ext2.clean_up();
}
return *this;
}

boolean CallingOrCalled__Number__oct3::operator==(const CallingOrCalled__Number__oct3& other_value) const
{
return field_numberingPlanIdentification==other_value.field_numberingPlanIdentification
  && field_typeOfNumber==other_value.field_typeOfNumber
  && field_ext1==other_value.field_ext1
  && field_screeningIndicator==other_value.field_screeningIndicator
  && field_spare1__3==other_value.field_spare1__3
  && field_presentationIndicator==other_value.field_presentationIndicator
  && field_ext2==other_value.field_ext2;
}

boolean CallingOrCalled__Number__oct3::is_bound() const
{
return (field_numberingPlanIdentification.is_bound())
  || (field_typeOfNumber.is_bound())
  || (field_ext1.is_bound())
  || (OPTIONAL_OMIT == field_screeningIndicator.get_selection() || field_screeningIndicator.is_bound())
  || (OPTIONAL_OMIT == field_spare1__3.get_selection() || field_spare1__3.is_bound())
  || (OPTIONAL_OMIT == field_presentationIndicator.get_selection() || field_presentationIndicator.is_bound())
  || (OPTIONAL_OMIT == field_ext2.get_selection() || field_ext2.is_bound());
}
boolean CallingOrCalled__Number__oct3::is_value() const
{
return field_numberingPlanIdentification.is_value()
  && field_typeOfNumber.is_value()
  && field_ext1.is_value()
  && (OPTIONAL_OMIT == field_screeningIndicator.get_selection() || field_screeningIndicator.is_value())
  && (OPTIONAL_OMIT == field_spare1__3.get_selection() || field_spare1__3.is_value())
  && (OPTIONAL_OMIT == field_presentationIndicator.get_selection() || field_presentationIndicator.is_value())
  && (OPTIONAL_OMIT == field_ext2.get_selection() || field_ext2.is_value());
}
int CallingOrCalled__Number__oct3::size_of() const
{
  int ret_val = 3;
  if (field_screeningIndicator.ispresent()) ret_val++;
  if (field_spare1__3.ispresent()) ret_val++;
  if (field_presentationIndicator.ispresent()) ret_val++;
  if (field_ext2.ispresent()) ret_val++;
  return ret_val;
}

void CallingOrCalled__Number__oct3::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ numberingPlanIdentification := ");
field_numberingPlanIdentification.log();
TTCN_Logger::log_event_str(", typeOfNumber := ");
field_typeOfNumber.log();
TTCN_Logger::log_event_str(", ext1 := ");
field_ext1.log();
TTCN_Logger::log_event_str(", screeningIndicator := ");
field_screeningIndicator.log();
TTCN_Logger::log_event_str(", spare1_3 := ");
field_spare1__3.log();
TTCN_Logger::log_event_str(", presentationIndicator := ");
field_presentationIndicator.log();
TTCN_Logger::log_event_str(", ext2 := ");
field_ext2.log();
TTCN_Logger::log_event_str(" }");
}

void CallingOrCalled__Number__oct3::set_implicit_omit()
{
if (numberingPlanIdentification().is_bound()) numberingPlanIdentification().set_implicit_omit();
if (typeOfNumber().is_bound()) typeOfNumber().set_implicit_omit();
if (ext1().is_bound()) ext1().set_implicit_omit();
if (!screeningIndicator().is_bound()) screeningIndicator() = OMIT_VALUE;
else screeningIndicator().set_implicit_omit();
if (!spare1__3().is_bound()) spare1__3() = OMIT_VALUE;
else spare1__3().set_implicit_omit();
if (!presentationIndicator().is_bound()) presentationIndicator() = OMIT_VALUE;
else presentationIndicator().set_implicit_omit();
if (!ext2().is_bound()) ext2() = OMIT_VALUE;
else ext2().set_implicit_omit();
}

void CallingOrCalled__Number__oct3::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 @MobileL3_CC_Types.CallingOrCalled_Number_oct3 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) numberingPlanIdentification().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) typeOfNumber().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) screeningIndicator().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) spare1__3().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) presentationIndicator().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) ext2().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(), "numberingPlanIdentification")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberingPlanIdentification().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "typeOfNumber")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          typeOfNumber().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "screeningIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          screeningIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "presentationIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          presentationIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext2")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext2().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 @MobileL3_CC_Types.CallingOrCalled_Number_oct3: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.CallingOrCalled_Number_oct3");
  }
}

void CallingOrCalled__Number__oct3::encode_text(Text_Buf& text_buf) const
{
field_numberingPlanIdentification.encode_text(text_buf);
field_typeOfNumber.encode_text(text_buf);
field_ext1.encode_text(text_buf);
field_screeningIndicator.encode_text(text_buf);
field_spare1__3.encode_text(text_buf);
field_presentationIndicator.encode_text(text_buf);
field_ext2.encode_text(text_buf);
}

void CallingOrCalled__Number__oct3::decode_text(Text_Buf& text_buf)
{
field_numberingPlanIdentification.decode_text(text_buf);
field_typeOfNumber.decode_text(text_buf);
field_ext1.decode_text(text_buf);
field_screeningIndicator.decode_text(text_buf);
field_spare1__3.decode_text(text_buf);
field_presentationIndicator.decode_text(text_buf);
field_ext2.decode_text(text_buf);
}

void CallingOrCalled__Number__oct3::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 CallingOrCalled__Number__oct3::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 CallingOrCalled__Number__oct3::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;
  {
  cbyte* data=p_buf.get_read_data();
  int count=1;
  unsigned mask = 1 << (local_top_order==ORDER_LSB ? 0 : 7);
  if(p_td.raw->extension_bit==EXT_BIT_YES){
    while((data[count-1] & mask)==0 && count*8<(int)limit) count++;
  }
  else{
    while((data[count-1] & mask)!=0 && count*8<(int)limit) count++;
  }
  if(limit) limit=count*8;
  }
  RAW_Force_Omit field_0_force_omit(0, force_omit, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_numberingPlanIdentification.RAW_decode(General__Types::BIT4_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, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_typeOfNumber.RAW_decode(General__Types::BIT3_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_ext1.RAW_decode(General__Types::BIT1_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_screeningIndicator = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_screeningIndicator().RAW_decode(General__Types::BIT2_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_screeningIndicator = 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_screeningIndicator=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_spare1__3 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_spare1__3().RAW_decode(General__Types::BIT3_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_spare1__3 = 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_spare1__3=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_presentationIndicator = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_presentationIndicator().RAW_decode(General__Types::BIT2_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_presentationIndicator = 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_presentationIndicator=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_ext2 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_ext2().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_ext2 = 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_ext2=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int CallingOrCalled__Number__oct3::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, General__Types::BIT4_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT3_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT1_descr_.raw);
  if (field_screeningIndicator.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT2_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_spare1__3.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT3_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_presentationIndicator.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, General__Types::BIT2_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_ext2.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  encoded_length += field_numberingPlanIdentification.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_typeOfNumber.RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_ext1.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[2]);
  if (field_screeningIndicator.ispresent()) {
  encoded_length += field_screeningIndicator().RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_spare1__3.ispresent()) {
  encoded_length += field_spare1__3().RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_presentationIndicator.ispresent()) {
  encoded_length += field_presentationIndicator().RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_ext2.ispresent()) {
  encoded_length += field_ext2().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[6]);
  }
  return myleaf.length = encoded_length;
}

struct CallingOrCalled__Number__oct3_template::single_value_struct {
BITSTRING_template field_numberingPlanIdentification;
BITSTRING_template field_typeOfNumber;
BITSTRING_template field_ext1;
BITSTRING_template field_screeningIndicator;
BITSTRING_template field_spare1__3;
BITSTRING_template field_presentationIndicator;
BITSTRING_template field_ext2;
};

void CallingOrCalled__Number__oct3_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_numberingPlanIdentification = ANY_VALUE;
single_value->field_typeOfNumber = ANY_VALUE;
single_value->field_ext1 = ANY_VALUE;
single_value->field_screeningIndicator = ANY_OR_OMIT;
single_value->field_spare1__3 = ANY_OR_OMIT;
single_value->field_presentationIndicator = ANY_OR_OMIT;
single_value->field_ext2 = ANY_OR_OMIT;
}
}
}

void CallingOrCalled__Number__oct3_template::copy_value(const CallingOrCalled__Number__oct3& other_value)
{
single_value = new single_value_struct;
if (other_value.numberingPlanIdentification().is_bound()) {
  single_value->field_numberingPlanIdentification = other_value.numberingPlanIdentification();
} else {
  single_value->field_numberingPlanIdentification.clean_up();
}
if (other_value.typeOfNumber().is_bound()) {
  single_value->field_typeOfNumber = other_value.typeOfNumber();
} else {
  single_value->field_typeOfNumber.clean_up();
}
if (other_value.ext1().is_bound()) {
  single_value->field_ext1 = other_value.ext1();
} else {
  single_value->field_ext1.clean_up();
}
if (other_value.screeningIndicator().is_bound()) {
  if (other_value.screeningIndicator().ispresent()) single_value->field_screeningIndicator = other_value.screeningIndicator()();
  else single_value->field_screeningIndicator = OMIT_VALUE;
} else {
  single_value->field_screeningIndicator.clean_up();
}
if (other_value.spare1__3().is_bound()) {
  if (other_value.spare1__3().ispresent()) single_value->field_spare1__3 = other_value.spare1__3()();
  else single_value->field_spare1__3 = OMIT_VALUE;
} else {
  single_value->field_spare1__3.clean_up();
}
if (other_value.presentationIndicator().is_bound()) {
  if (other_value.presentationIndicator().ispresent()) single_value->field_presentationIndicator = other_value.presentationIndicator()();
  else single_value->field_presentationIndicator = OMIT_VALUE;
} else {
  single_value->field_presentationIndicator.clean_up();
}
if (other_value.ext2().is_bound()) {
  if (other_value.ext2().ispresent()) single_value->field_ext2 = other_value.ext2()();
  else single_value->field_ext2 = OMIT_VALUE;
} else {
  single_value->field_ext2.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void CallingOrCalled__Number__oct3_template::copy_template(const CallingOrCalled__Number__oct3_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.numberingPlanIdentification().get_selection()) {
single_value->field_numberingPlanIdentification = other_value.numberingPlanIdentification();
} else {
single_value->field_numberingPlanIdentification.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.typeOfNumber().get_selection()) {
single_value->field_typeOfNumber = other_value.typeOfNumber();
} else {
single_value->field_typeOfNumber.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext1().get_selection()) {
single_value->field_ext1 = other_value.ext1();
} else {
single_value->field_ext1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.screeningIndicator().get_selection()) {
single_value->field_screeningIndicator = other_value.screeningIndicator();
} else {
single_value->field_screeningIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare1__3().get_selection()) {
single_value->field_spare1__3 = other_value.spare1__3();
} else {
single_value->field_spare1__3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.presentationIndicator().get_selection()) {
single_value->field_presentationIndicator = other_value.presentationIndicator();
} else {
single_value->field_presentationIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext2().get_selection()) {
single_value->field_ext2 = other_value.ext2();
} else {
single_value->field_ext2.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 CallingOrCalled__Number__oct3_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 CallingOrCalled__Number__oct3_template(*other_value.implication_.precondition);
implication_.implied_template = new CallingOrCalled__Number__oct3_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 @MobileL3_CC_Types.CallingOrCalled_Number_oct3.");
break;
}
set_selection(other_value);
}

CallingOrCalled__Number__oct3_template::CallingOrCalled__Number__oct3_template()
{
}

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

CallingOrCalled__Number__oct3_template::CallingOrCalled__Number__oct3_template(const CallingOrCalled__Number__oct3& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean CallingOrCalled__Number__oct3_template::match(const CallingOrCalled__Number__oct3& 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.numberingPlanIdentification().is_bound()) return FALSE;
if(!single_value->field_numberingPlanIdentification.match(other_value.numberingPlanIdentification(), legacy))return FALSE;
if(!other_value.typeOfNumber().is_bound()) return FALSE;
if(!single_value->field_typeOfNumber.match(other_value.typeOfNumber(), legacy))return FALSE;
if(!other_value.ext1().is_bound()) return FALSE;
if(!single_value->field_ext1.match(other_value.ext1(), legacy))return FALSE;
if(!other_value.screeningIndicator().is_bound()) return FALSE;
if((other_value.screeningIndicator().ispresent() ? !single_value->field_screeningIndicator.match((const BITSTRING&)other_value.screeningIndicator(), legacy) : !single_value->field_screeningIndicator.match_omit(legacy)))return FALSE;
if(!other_value.spare1__3().is_bound()) return FALSE;
if((other_value.spare1__3().ispresent() ? !single_value->field_spare1__3.match((const BITSTRING&)other_value.spare1__3(), legacy) : !single_value->field_spare1__3.match_omit(legacy)))return FALSE;
if(!other_value.presentationIndicator().is_bound()) return FALSE;
if((other_value.presentationIndicator().ispresent() ? !single_value->field_presentationIndicator.match((const BITSTRING&)other_value.presentationIndicator(), legacy) : !single_value->field_presentationIndicator.match_omit(legacy)))return FALSE;
if(!other_value.ext2().is_bound()) return FALSE;
if((other_value.ext2().ispresent() ? !single_value->field_ext2.match((const BITSTRING&)other_value.ext2(), legacy) : !single_value->field_ext2.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 @MobileL3_CC_Types.CallingOrCalled_Number_oct3.");
}
return FALSE;
}

boolean CallingOrCalled__Number__oct3_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_numberingPlanIdentification.is_bound()
 || single_value->field_typeOfNumber.is_bound()
 || single_value->field_ext1.is_bound()
 || (single_value->field_screeningIndicator.is_omit() || single_value->field_screeningIndicator.is_bound())
 || (single_value->field_spare1__3.is_omit() || single_value->field_spare1__3.is_bound())
 || (single_value->field_presentationIndicator.is_omit() || single_value->field_presentationIndicator.is_bound())
 || (single_value->field_ext2.is_omit() || single_value->field_ext2.is_bound());
}

boolean CallingOrCalled__Number__oct3_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_numberingPlanIdentification.is_value()
 && single_value->field_typeOfNumber.is_value()
 && single_value->field_ext1.is_value()
 && (single_value->field_screeningIndicator.is_omit() || single_value->field_screeningIndicator.is_value())
 && (single_value->field_spare1__3.is_omit() || single_value->field_spare1__3.is_value())
 && (single_value->field_presentationIndicator.is_omit() || single_value->field_presentationIndicator.is_value())
 && (single_value->field_ext2.is_omit() || single_value->field_ext2.is_value());
}

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

CallingOrCalled__Number__oct3 CallingOrCalled__Number__oct3_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 @MobileL3_CC_Types.CallingOrCalled_Number_oct3.");
CallingOrCalled__Number__oct3 ret_val;
if (single_value->field_numberingPlanIdentification.is_bound()) {
ret_val.numberingPlanIdentification() = single_value->field_numberingPlanIdentification.valueof();
}
if (single_value->field_typeOfNumber.is_bound()) {
ret_val.typeOfNumber() = single_value->field_typeOfNumber.valueof();
}
if (single_value->field_ext1.is_bound()) {
ret_val.ext1() = single_value->field_ext1.valueof();
}
if (single_value->field_screeningIndicator.is_omit()) ret_val.screeningIndicator() = OMIT_VALUE;
else if (single_value->field_screeningIndicator.is_bound()) {
ret_val.screeningIndicator() = single_value->field_screeningIndicator.valueof();
}
if (single_value->field_spare1__3.is_omit()) ret_val.spare1__3() = OMIT_VALUE;
else if (single_value->field_spare1__3.is_bound()) {
ret_val.spare1__3() = single_value->field_spare1__3.valueof();
}
if (single_value->field_presentationIndicator.is_omit()) ret_val.presentationIndicator() = OMIT_VALUE;
else if (single_value->field_presentationIndicator.is_bound()) {
ret_val.presentationIndicator() = single_value->field_presentationIndicator.valueof();
}
if (single_value->field_ext2.is_omit()) ret_val.ext2() = OMIT_VALUE;
else if (single_value->field_ext2.is_bound()) {
ret_val.ext2() = single_value->field_ext2.valueof();
}
return ret_val;
}

void CallingOrCalled__Number__oct3_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 @MobileL3_CC_Types.CallingOrCalled_Number_oct3.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new CallingOrCalled__Number__oct3_template[list_length];
}

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

BITSTRING_template& CallingOrCalled__Number__oct3_template::numberingPlanIdentification()
{
set_specific();
return single_value->field_numberingPlanIdentification;
}

const BITSTRING_template& CallingOrCalled__Number__oct3_template::numberingPlanIdentification() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field numberingPlanIdentification of a non-specific template of type @MobileL3_CC_Types.CallingOrCalled_Number_oct3.");
return single_value->field_numberingPlanIdentification;
}

BITSTRING_template& CallingOrCalled__Number__oct3_template::typeOfNumber()
{
set_specific();
return single_value->field_typeOfNumber;
}

const BITSTRING_template& CallingOrCalled__Number__oct3_template::typeOfNumber() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field typeOfNumber of a non-specific template of type @MobileL3_CC_Types.CallingOrCalled_Number_oct3.");
return single_value->field_typeOfNumber;
}

BITSTRING_template& CallingOrCalled__Number__oct3_template::ext1()
{
set_specific();
return single_value->field_ext1;
}

const BITSTRING_template& CallingOrCalled__Number__oct3_template::ext1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext1 of a non-specific template of type @MobileL3_CC_Types.CallingOrCalled_Number_oct3.");
return single_value->field_ext1;
}

BITSTRING_template& CallingOrCalled__Number__oct3_template::screeningIndicator()
{
set_specific();
return single_value->field_screeningIndicator;
}

const BITSTRING_template& CallingOrCalled__Number__oct3_template::screeningIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field screeningIndicator of a non-specific template of type @MobileL3_CC_Types.CallingOrCalled_Number_oct3.");
return single_value->field_screeningIndicator;
}

BITSTRING_template& CallingOrCalled__Number__oct3_template::spare1__3()
{
set_specific();
return single_value->field_spare1__3;
}

const BITSTRING_template& CallingOrCalled__Number__oct3_template::spare1__3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare1_3 of a non-specific template of type @MobileL3_CC_Types.CallingOrCalled_Number_oct3.");
return single_value->field_spare1__3;
}

BITSTRING_template& CallingOrCalled__Number__oct3_template::presentationIndicator()
{
set_specific();
return single_value->field_presentationIndicator;
}

const BITSTRING_template& CallingOrCalled__Number__oct3_template::presentationIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field presentationIndicator of a non-specific template of type @MobileL3_CC_Types.CallingOrCalled_Number_oct3.");
return single_value->field_presentationIndicator;
}

BITSTRING_template& CallingOrCalled__Number__oct3_template::ext2()
{
set_specific();
return single_value->field_ext2;
}

const BITSTRING_template& CallingOrCalled__Number__oct3_template::ext2() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext2 of a non-specific template of type @MobileL3_CC_Types.CallingOrCalled_Number_oct3.");
return single_value->field_ext2;
}

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

void CallingOrCalled__Number__oct3_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ numberingPlanIdentification := ");
single_value->field_numberingPlanIdentification.log();
TTCN_Logger::log_event_str(", typeOfNumber := ");
single_value->field_typeOfNumber.log();
TTCN_Logger::log_event_str(", ext1 := ");
single_value->field_ext1.log();
TTCN_Logger::log_event_str(", screeningIndicator := ");
single_value->field_screeningIndicator.log();
TTCN_Logger::log_event_str(", spare1_3 := ");
single_value->field_spare1__3.log();
TTCN_Logger::log_event_str(", presentationIndicator := ");
single_value->field_presentationIndicator.log();
TTCN_Logger::log_event_str(", ext2 := ");
single_value->field_ext2.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 CallingOrCalled__Number__oct3_template::log_match(const CallingOrCalled__Number__oct3& 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_numberingPlanIdentification.match(match_value.numberingPlanIdentification(), legacy)){
TTCN_Logger::log_logmatch_info(".numberingPlanIdentification");
single_value->field_numberingPlanIdentification.log_match(match_value.numberingPlanIdentification(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_typeOfNumber.match(match_value.typeOfNumber(), legacy)){
TTCN_Logger::log_logmatch_info(".typeOfNumber");
single_value->field_typeOfNumber.log_match(match_value.typeOfNumber(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ext1.match(match_value.ext1(), legacy)){
TTCN_Logger::log_logmatch_info(".ext1");
single_value->field_ext1.log_match(match_value.ext1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.screeningIndicator().ispresent()){
if(!single_value->field_screeningIndicator.match(match_value.screeningIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".screeningIndicator");
single_value->field_screeningIndicator.log_match(match_value.screeningIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_screeningIndicator.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".screeningIndicator := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_screeningIndicator.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.spare1__3().ispresent()){
if(!single_value->field_spare1__3.match(match_value.spare1__3(), legacy)){
TTCN_Logger::log_logmatch_info(".spare1_3");
single_value->field_spare1__3.log_match(match_value.spare1__3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_spare1__3.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".spare1_3 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_spare1__3.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.presentationIndicator().ispresent()){
if(!single_value->field_presentationIndicator.match(match_value.presentationIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".presentationIndicator");
single_value->field_presentationIndicator.log_match(match_value.presentationIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_presentationIndicator.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".presentationIndicator := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_presentationIndicator.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.ext2().ispresent()){
if(!single_value->field_ext2.match(match_value.ext2(), legacy)){
TTCN_Logger::log_logmatch_info(".ext2");
single_value->field_ext2.log_match(match_value.ext2(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_ext2.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".ext2 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_ext2.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("{ numberingPlanIdentification := ");
single_value->field_numberingPlanIdentification.log_match(match_value.numberingPlanIdentification(), legacy);
TTCN_Logger::log_event_str(", typeOfNumber := ");
single_value->field_typeOfNumber.log_match(match_value.typeOfNumber(), legacy);
TTCN_Logger::log_event_str(", ext1 := ");
single_value->field_ext1.log_match(match_value.ext1(), legacy);
TTCN_Logger::log_event_str(", screeningIndicator := ");
if (match_value.screeningIndicator().ispresent()) {
single_value->field_screeningIndicator.log_match(match_value.screeningIndicator(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_screeningIndicator.log();
if (single_value->field_screeningIndicator.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", spare1_3 := ");
if (match_value.spare1__3().ispresent()) {
single_value->field_spare1__3.log_match(match_value.spare1__3(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_spare1__3.log();
if (single_value->field_spare1__3.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", presentationIndicator := ");
if (match_value.presentationIndicator().ispresent()) {
single_value->field_presentationIndicator.log_match(match_value.presentationIndicator(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_presentationIndicator.log();
if (single_value->field_presentationIndicator.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", ext2 := ");
if (match_value.ext2().ispresent()) {
single_value->field_ext2.log_match(match_value.ext2(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_ext2.log();
if (single_value->field_ext2.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 CallingOrCalled__Number__oct3_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (numberingPlanIdentification().is_bound()) numberingPlanIdentification().set_implicit_omit();
if (typeOfNumber().is_bound()) typeOfNumber().set_implicit_omit();
if (ext1().is_bound()) ext1().set_implicit_omit();
if (!screeningIndicator().is_bound()) screeningIndicator() = OMIT_VALUE;
else screeningIndicator().set_implicit_omit();
if (!spare1__3().is_bound()) spare1__3() = OMIT_VALUE;
else spare1__3().set_implicit_omit();
if (!presentationIndicator().is_bound()) presentationIndicator() = OMIT_VALUE;
else presentationIndicator().set_implicit_omit();
if (!ext2().is_bound()) ext2() = OMIT_VALUE;
else ext2().set_implicit_omit();
}

void CallingOrCalled__Number__oct3_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_numberingPlanIdentification.encode_text(text_buf);
single_value->field_typeOfNumber.encode_text(text_buf);
single_value->field_ext1.encode_text(text_buf);
single_value->field_screeningIndicator.encode_text(text_buf);
single_value->field_spare1__3.encode_text(text_buf);
single_value->field_presentationIndicator.encode_text(text_buf);
single_value->field_ext2.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 @MobileL3_CC_Types.CallingOrCalled_Number_oct3.");
}
}

void CallingOrCalled__Number__oct3_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_numberingPlanIdentification.decode_text(text_buf);
single_value->field_typeOfNumber.decode_text(text_buf);
single_value->field_ext1.decode_text(text_buf);
single_value->field_screeningIndicator.decode_text(text_buf);
single_value->field_spare1__3.decode_text(text_buf);
single_value->field_presentationIndicator.decode_text(text_buf);
single_value->field_ext2.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 CallingOrCalled__Number__oct3_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 @MobileL3_CC_Types.CallingOrCalled_Number_oct3.");
}
}

void CallingOrCalled__Number__oct3_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: {
    CallingOrCalled__Number__oct3_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 @MobileL3_CC_Types.CallingOrCalled_Number_oct3 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) numberingPlanIdentification().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) typeOfNumber().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) screeningIndicator().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) spare1__3().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) presentationIndicator().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) ext2().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(), "numberingPlanIdentification")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          numberingPlanIdentification().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "typeOfNumber")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          typeOfNumber().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "screeningIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          screeningIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "presentationIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          presentationIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext2")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext2().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 @MobileL3_CC_Types.CallingOrCalled_Number_oct3: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    CallingOrCalled__Number__oct3_template* precondition = new CallingOrCalled__Number__oct3_template;
    precondition->set_param(*param.get_elem(0));
    CallingOrCalled__Number__oct3_template* implied_template = new CallingOrCalled__Number__oct3_template;
    implied_template->set_param(*param.get_elem(1));
    *this = CallingOrCalled__Number__oct3_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.CallingOrCalled_Number_oct3");
  }
  is_ifpresent = param.get_ifpresent();
}

void CallingOrCalled__Number__oct3_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_numberingPlanIdentification.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingOrCalled_Number_oct3");
single_value->field_typeOfNumber.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingOrCalled_Number_oct3");
single_value->field_ext1.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingOrCalled_Number_oct3");
single_value->field_screeningIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingOrCalled_Number_oct3");
single_value->field_spare1__3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingOrCalled_Number_oct3");
single_value->field_presentationIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingOrCalled_Number_oct3");
single_value->field_ext2.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingOrCalled_Number_oct3");
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 : "@MobileL3_CC_Types.CallingOrCalled_Number_oct3");
}

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

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

CallingPartyBCD__Number::CallingPartyBCD__Number()
{
}

CallingPartyBCD__Number::CallingPartyBCD__Number(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const CallingOrCalled__Number__oct3& par_oct3,
    const OPTIONAL< HEXSTRING >& par_digits)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_oct3(par_oct3),
  field_digits(par_digits)
{
}

CallingPartyBCD__Number::CallingPartyBCD__Number(const CallingPartyBCD__Number& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.CallingPartyBCD_Number.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.oct3().is_bound()) field_oct3 = other_value.oct3();
else field_oct3.clean_up();
if (other_value.digits().is_bound()) field_digits = other_value.digits();
else field_digits.clean_up();
}

void CallingPartyBCD__Number::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_oct3.clean_up();
field_digits.clean_up();
}

const TTCN_Typedescriptor_t* CallingPartyBCD__Number::get_descriptor() const { return &CallingPartyBCD__Number_descr_; }
CallingPartyBCD__Number& CallingPartyBCD__Number::operator=(const CallingPartyBCD__Number& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.CallingPartyBCD_Number.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.oct3().is_bound()) field_oct3 = other_value.oct3();
  else field_oct3.clean_up();
  if (other_value.digits().is_bound()) field_digits = other_value.digits();
  else field_digits.clean_up();
}
return *this;
}

boolean CallingPartyBCD__Number::operator==(const CallingPartyBCD__Number& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_oct3==other_value.field_oct3
  && field_digits==other_value.field_digits;
}

boolean CallingPartyBCD__Number::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (field_oct3.is_bound())
  || (OPTIONAL_OMIT == field_digits.get_selection() || field_digits.is_bound());
}
boolean CallingPartyBCD__Number::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && field_oct3.is_value()
  && (OPTIONAL_OMIT == field_digits.get_selection() || field_digits.is_value());
}
int CallingPartyBCD__Number::size_of() const
{
  int ret_val = 3;
  if (field_digits.ispresent()) ret_val++;
  return ret_val;
}

void CallingPartyBCD__Number::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", oct3 := ");
field_oct3.log();
TTCN_Logger::log_event_str(", digits := ");
field_digits.log();
TTCN_Logger::log_event_str(" }");
}

void CallingPartyBCD__Number::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (oct3().is_bound()) oct3().set_implicit_omit();
if (!digits().is_bound()) digits() = OMIT_VALUE;
else digits().set_implicit_omit();
}

void CallingPartyBCD__Number::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 @MobileL3_CC_Types.CallingPartyBCD_Number 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) oct3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) digits().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "oct3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          oct3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "digits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          digits().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 @MobileL3_CC_Types.CallingPartyBCD_Number: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.CallingPartyBCD_Number");
  }
}

void CallingPartyBCD__Number::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_oct3.encode_text(text_buf);
field_digits.encode_text(text_buf);
}

void CallingPartyBCD__Number::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_oct3.decode_text(text_buf);
field_digits.decode_text(text_buf);
}

void CallingPartyBCD__Number::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 CallingPartyBCD__Number::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 CallingPartyBCD__Number::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, CallingPartyBCD__Number_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(CallingPartyBCD__Number_lengthIndicator_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_lengthIndicator.convert_to_Integer(CallingPartyBCD__Number_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  RAW_Force_Omit field_2_force_omit(2, force_omit, CallingOrCalled__Number__oct3_descr_.raw->forceomit);
  decoded_field_length = field_oct3.RAW_decode(CallingOrCalled__Number__oct3_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;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_digits = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, CallingPartyBCD__Number_digits_descr_.raw->forceomit);
  decoded_field_length = field_digits().RAW_decode(CallingPartyBCD__Number_digits_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_digits = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_digits=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int CallingPartyBCD__Number::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CallingPartyBCD__Number_lengthIndicator_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, CallingOrCalled__Number__oct3_descr_.raw);
  if (field_digits.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, CallingPartyBCD__Number_digits_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &CallingPartyBCD__Number_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 2;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(2);
  myleaf.body.node.nodes[1]->length = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[2]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[2]->curr_pos.pos;
  if (field_digits.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = 0;
  }
  encoded_length += field_oct3.RAW_encode(CallingOrCalled__Number__oct3_descr_, *myleaf.body.node.nodes[2]);
  if (field_digits.ispresent()) {
  encoded_length += field_digits().RAW_encode(CallingPartyBCD__Number_digits_descr_, *myleaf.body.node.nodes[3]);
  }
  return myleaf.length = encoded_length;
}

struct CallingPartyBCD__Number_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
CallingOrCalled__Number__oct3_template field_oct3;
HEXSTRING_template field_digits;
};

void CallingPartyBCD__Number_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_oct3 = ANY_VALUE;
single_value->field_digits = ANY_OR_OMIT;
}
}
}

void CallingPartyBCD__Number_template::copy_value(const CallingPartyBCD__Number& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.oct3().is_bound()) {
  single_value->field_oct3 = other_value.oct3();
} else {
  single_value->field_oct3.clean_up();
}
if (other_value.digits().is_bound()) {
  if (other_value.digits().ispresent()) single_value->field_digits = other_value.digits()();
  else single_value->field_digits = OMIT_VALUE;
} else {
  single_value->field_digits.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void CallingPartyBCD__Number_template::copy_template(const CallingPartyBCD__Number_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.oct3().get_selection()) {
single_value->field_oct3 = other_value.oct3();
} else {
single_value->field_oct3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.digits().get_selection()) {
single_value->field_digits = other_value.digits();
} else {
single_value->field_digits.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 CallingPartyBCD__Number_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 CallingPartyBCD__Number_template(*other_value.implication_.precondition);
implication_.implied_template = new CallingPartyBCD__Number_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 @MobileL3_CC_Types.CallingPartyBCD_Number.");
break;
}
set_selection(other_value);
}

CallingPartyBCD__Number_template::CallingPartyBCD__Number_template()
{
}

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

CallingPartyBCD__Number_template::CallingPartyBCD__Number_template(const CallingPartyBCD__Number& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean CallingPartyBCD__Number_template::match(const CallingPartyBCD__Number& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.oct3().is_bound()) return FALSE;
if(!single_value->field_oct3.match(other_value.oct3(), legacy))return FALSE;
if(!other_value.digits().is_bound()) return FALSE;
if((other_value.digits().ispresent() ? !single_value->field_digits.match((const HEXSTRING&)other_value.digits(), legacy) : !single_value->field_digits.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 @MobileL3_CC_Types.CallingPartyBCD_Number.");
}
return FALSE;
}

boolean CallingPartyBCD__Number_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || single_value->field_oct3.is_bound()
 || (single_value->field_digits.is_omit() || single_value->field_digits.is_bound());
}

boolean CallingPartyBCD__Number_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && single_value->field_oct3.is_value()
 && (single_value->field_digits.is_omit() || single_value->field_digits.is_value());
}

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

CallingPartyBCD__Number CallingPartyBCD__Number_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 @MobileL3_CC_Types.CallingPartyBCD_Number.");
CallingPartyBCD__Number ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_oct3.is_bound()) {
ret_val.oct3() = single_value->field_oct3.valueof();
}
if (single_value->field_digits.is_omit()) ret_val.digits() = OMIT_VALUE;
else if (single_value->field_digits.is_bound()) {
ret_val.digits() = single_value->field_digits.valueof();
}
return ret_val;
}

void CallingPartyBCD__Number_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 @MobileL3_CC_Types.CallingPartyBCD_Number.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new CallingPartyBCD__Number_template[list_length];
}

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

OCTETSTRING_template& CallingPartyBCD__Number_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& CallingPartyBCD__Number_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.CallingPartyBCD_Number.");
return single_value->field_elementIdentifier;
}

INTEGER_template& CallingPartyBCD__Number_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& CallingPartyBCD__Number_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.CallingPartyBCD_Number.");
return single_value->field_lengthIndicator;
}

CallingOrCalled__Number__oct3_template& CallingPartyBCD__Number_template::oct3()
{
set_specific();
return single_value->field_oct3;
}

const CallingOrCalled__Number__oct3_template& CallingPartyBCD__Number_template::oct3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field oct3 of a non-specific template of type @MobileL3_CC_Types.CallingPartyBCD_Number.");
return single_value->field_oct3;
}

HEXSTRING_template& CallingPartyBCD__Number_template::digits()
{
set_specific();
return single_value->field_digits;
}

const HEXSTRING_template& CallingPartyBCD__Number_template::digits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field digits of a non-specific template of type @MobileL3_CC_Types.CallingPartyBCD_Number.");
return single_value->field_digits;
}

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

void CallingPartyBCD__Number_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", oct3 := ");
single_value->field_oct3.log();
TTCN_Logger::log_event_str(", digits := ");
single_value->field_digits.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 CallingPartyBCD__Number_template::log_match(const CallingPartyBCD__Number& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_oct3.match(match_value.oct3(), legacy)){
TTCN_Logger::log_logmatch_info(".oct3");
single_value->field_oct3.log_match(match_value.oct3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.digits().ispresent()){
if(!single_value->field_digits.match(match_value.digits(), legacy)){
TTCN_Logger::log_logmatch_info(".digits");
single_value->field_digits.log_match(match_value.digits(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_digits.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".digits := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_digits.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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", oct3 := ");
single_value->field_oct3.log_match(match_value.oct3(), legacy);
TTCN_Logger::log_event_str(", digits := ");
if (match_value.digits().ispresent()) {
single_value->field_digits.log_match(match_value.digits(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_digits.log();
if (single_value->field_digits.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 CallingPartyBCD__Number_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (oct3().is_bound()) oct3().set_implicit_omit();
if (!digits().is_bound()) digits() = OMIT_VALUE;
else digits().set_implicit_omit();
}

void CallingPartyBCD__Number_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_oct3.encode_text(text_buf);
single_value->field_digits.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 @MobileL3_CC_Types.CallingPartyBCD_Number.");
}
}

void CallingPartyBCD__Number_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_oct3.decode_text(text_buf);
single_value->field_digits.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 CallingPartyBCD__Number_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 @MobileL3_CC_Types.CallingPartyBCD_Number.");
}
}

void CallingPartyBCD__Number_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: {
    CallingPartyBCD__Number_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 @MobileL3_CC_Types.CallingPartyBCD_Number 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) oct3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) digits().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "oct3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          oct3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "digits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          digits().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 @MobileL3_CC_Types.CallingPartyBCD_Number: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    CallingPartyBCD__Number_template* precondition = new CallingPartyBCD__Number_template;
    precondition->set_param(*param.get_elem(0));
    CallingPartyBCD__Number_template* implied_template = new CallingPartyBCD__Number_template;
    implied_template->set_param(*param.get_elem(1));
    *this = CallingPartyBCD__Number_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.CallingPartyBCD_Number");
  }
  is_ifpresent = param.get_ifpresent();
}

void CallingPartyBCD__Number_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingPartyBCD_Number");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingPartyBCD_Number");
single_value->field_oct3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingPartyBCD_Number");
single_value->field_digits.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingPartyBCD_Number");
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 : "@MobileL3_CC_Types.CallingPartyBCD_Number");
}

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

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

CallingPartySubAddress::CallingPartySubAddress()
{
}

CallingPartySubAddress::CallingPartySubAddress(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const OPTIONAL< BITSTRING >& par_spare1__3,
    const OPTIONAL< BITSTRING >& par_odd__evenIndicator,
    const OPTIONAL< BITSTRING >& par_typeOfSubAddress,
    const OPTIONAL< BITSTRING >& par_ext1,
    const OPTIONAL< OCTETSTRING >& par_subAddressInformation)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_spare1__3(par_spare1__3),
  field_odd__evenIndicator(par_odd__evenIndicator),
  field_typeOfSubAddress(par_typeOfSubAddress),
  field_ext1(par_ext1),
  field_subAddressInformation(par_subAddressInformation)
{
}

CallingPartySubAddress::CallingPartySubAddress(const CallingPartySubAddress& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.CallingPartySubAddress.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.spare1__3().is_bound()) field_spare1__3 = other_value.spare1__3();
else field_spare1__3.clean_up();
if (other_value.odd__evenIndicator().is_bound()) field_odd__evenIndicator = other_value.odd__evenIndicator();
else field_odd__evenIndicator.clean_up();
if (other_value.typeOfSubAddress().is_bound()) field_typeOfSubAddress = other_value.typeOfSubAddress();
else field_typeOfSubAddress.clean_up();
if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
else field_ext1.clean_up();
if (other_value.subAddressInformation().is_bound()) field_subAddressInformation = other_value.subAddressInformation();
else field_subAddressInformation.clean_up();
}

void CallingPartySubAddress::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_spare1__3.clean_up();
field_odd__evenIndicator.clean_up();
field_typeOfSubAddress.clean_up();
field_ext1.clean_up();
field_subAddressInformation.clean_up();
}

const TTCN_Typedescriptor_t* CallingPartySubAddress::get_descriptor() const { return &CallingPartySubAddress_descr_; }
CallingPartySubAddress& CallingPartySubAddress::operator=(const CallingPartySubAddress& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.CallingPartySubAddress.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.spare1__3().is_bound()) field_spare1__3 = other_value.spare1__3();
  else field_spare1__3.clean_up();
  if (other_value.odd__evenIndicator().is_bound()) field_odd__evenIndicator = other_value.odd__evenIndicator();
  else field_odd__evenIndicator.clean_up();
  if (other_value.typeOfSubAddress().is_bound()) field_typeOfSubAddress = other_value.typeOfSubAddress();
  else field_typeOfSubAddress.clean_up();
  if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
  else field_ext1.clean_up();
  if (other_value.subAddressInformation().is_bound()) field_subAddressInformation = other_value.subAddressInformation();
  else field_subAddressInformation.clean_up();
}
return *this;
}

boolean CallingPartySubAddress::operator==(const CallingPartySubAddress& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_spare1__3==other_value.field_spare1__3
  && field_odd__evenIndicator==other_value.field_odd__evenIndicator
  && field_typeOfSubAddress==other_value.field_typeOfSubAddress
  && field_ext1==other_value.field_ext1
  && field_subAddressInformation==other_value.field_subAddressInformation;
}

boolean CallingPartySubAddress::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (OPTIONAL_OMIT == field_spare1__3.get_selection() || field_spare1__3.is_bound())
  || (OPTIONAL_OMIT == field_odd__evenIndicator.get_selection() || field_odd__evenIndicator.is_bound())
  || (OPTIONAL_OMIT == field_typeOfSubAddress.get_selection() || field_typeOfSubAddress.is_bound())
  || (OPTIONAL_OMIT == field_ext1.get_selection() || field_ext1.is_bound())
  || (OPTIONAL_OMIT == field_subAddressInformation.get_selection() || field_subAddressInformation.is_bound());
}
boolean CallingPartySubAddress::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && (OPTIONAL_OMIT == field_spare1__3.get_selection() || field_spare1__3.is_value())
  && (OPTIONAL_OMIT == field_odd__evenIndicator.get_selection() || field_odd__evenIndicator.is_value())
  && (OPTIONAL_OMIT == field_typeOfSubAddress.get_selection() || field_typeOfSubAddress.is_value())
  && (OPTIONAL_OMIT == field_ext1.get_selection() || field_ext1.is_value())
  && (OPTIONAL_OMIT == field_subAddressInformation.get_selection() || field_subAddressInformation.is_value());
}
int CallingPartySubAddress::size_of() const
{
  int ret_val = 2;
  if (field_spare1__3.ispresent()) ret_val++;
  if (field_odd__evenIndicator.ispresent()) ret_val++;
  if (field_typeOfSubAddress.ispresent()) ret_val++;
  if (field_ext1.ispresent()) ret_val++;
  if (field_subAddressInformation.ispresent()) ret_val++;
  return ret_val;
}

void CallingPartySubAddress::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", spare1_3 := ");
field_spare1__3.log();
TTCN_Logger::log_event_str(", odd_evenIndicator := ");
field_odd__evenIndicator.log();
TTCN_Logger::log_event_str(", typeOfSubAddress := ");
field_typeOfSubAddress.log();
TTCN_Logger::log_event_str(", ext1 := ");
field_ext1.log();
TTCN_Logger::log_event_str(", subAddressInformation := ");
field_subAddressInformation.log();
TTCN_Logger::log_event_str(" }");
}

void CallingPartySubAddress::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (!spare1__3().is_bound()) spare1__3() = OMIT_VALUE;
else spare1__3().set_implicit_omit();
if (!odd__evenIndicator().is_bound()) odd__evenIndicator() = OMIT_VALUE;
else odd__evenIndicator().set_implicit_omit();
if (!typeOfSubAddress().is_bound()) typeOfSubAddress() = OMIT_VALUE;
else typeOfSubAddress().set_implicit_omit();
if (!ext1().is_bound()) ext1() = OMIT_VALUE;
else ext1().set_implicit_omit();
if (!subAddressInformation().is_bound()) subAddressInformation() = OMIT_VALUE;
else subAddressInformation().set_implicit_omit();
}

void CallingPartySubAddress::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 @MobileL3_CC_Types.CallingPartySubAddress 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare1__3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) odd__evenIndicator().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) typeOfSubAddress().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) subAddressInformation().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "odd_evenIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          odd__evenIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "typeOfSubAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          typeOfSubAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "subAddressInformation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          subAddressInformation().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 @MobileL3_CC_Types.CallingPartySubAddress: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.CallingPartySubAddress");
  }
}

void CallingPartySubAddress::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_spare1__3.encode_text(text_buf);
field_odd__evenIndicator.encode_text(text_buf);
field_typeOfSubAddress.encode_text(text_buf);
field_ext1.encode_text(text_buf);
field_subAddressInformation.encode_text(text_buf);
}

void CallingPartySubAddress::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_spare1__3.decode_text(text_buf);
field_odd__evenIndicator.decode_text(text_buf);
field_typeOfSubAddress.decode_text(text_buf);
field_ext1.decode_text(text_buf);
field_subAddressInformation.decode_text(text_buf);
}

void CallingPartySubAddress::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 CallingPartySubAddress::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 CallingPartySubAddress::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, CallingPartySubAddress_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(CallingPartySubAddress_lengthIndicator_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_lengthIndicator.convert_to_Integer(CallingPartySubAddress_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_spare1__3 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_spare1__3().RAW_decode(General__Types::BIT3_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_spare1__3 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_spare1__3=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_odd__evenIndicator = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_odd__evenIndicator().RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_odd__evenIndicator = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_odd__evenIndicator=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_typeOfSubAddress = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_typeOfSubAddress().RAW_decode(General__Types::BIT3_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_typeOfSubAddress = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_typeOfSubAddress=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_ext1 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_ext1().RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_ext1 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_ext1=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_subAddressInformation = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, General__Types::OCTN_descr_.raw->forceomit);
  decoded_field_length = field_subAddressInformation().RAW_decode(General__Types::OCTN_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_subAddressInformation = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_subAddressInformation=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int CallingPartySubAddress::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, CallingPartySubAddress_lengthIndicator_descr_.raw);
  if (field_spare1__3.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT3_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_odd__evenIndicator.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_typeOfSubAddress.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT3_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_ext1.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_subAddressInformation.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, General__Types::OCTN_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &CallingPartySubAddress_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 5;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(5);
  myleaf.body.node.nodes[1]->length = 8;
  if (field_spare1__3.ispresent()) {
  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;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = 0;
  }
  if (field_odd__evenIndicator.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = 0;
  }
  if (field_typeOfSubAddress.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = myleaf.body.node.nodes[4]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = myleaf.body.node.nodes[4]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = 0;
  }
  if (field_ext1.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = myleaf.body.node.nodes[5]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = myleaf.body.node.nodes[5]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = 0;
  }
  if (field_subAddressInformation.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].level = myleaf.body.node.nodes[6]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].pos = myleaf.body.node.nodes[6]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].pos = 0;
  }
  if (field_spare1__3.ispresent()) {
  encoded_length += field_spare1__3().RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_odd__evenIndicator.ispresent()) {
  encoded_length += field_odd__evenIndicator().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_typeOfSubAddress.ispresent()) {
  encoded_length += field_typeOfSubAddress().RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_ext1.ispresent()) {
  encoded_length += field_ext1().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_subAddressInformation.ispresent()) {
  encoded_length += field_subAddressInformation().RAW_encode(General__Types::OCTN_descr_, *myleaf.body.node.nodes[6]);
  }
  return myleaf.length = encoded_length;
}

struct CallingPartySubAddress_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
BITSTRING_template field_spare1__3;
BITSTRING_template field_odd__evenIndicator;
BITSTRING_template field_typeOfSubAddress;
BITSTRING_template field_ext1;
OCTETSTRING_template field_subAddressInformation;
};

void CallingPartySubAddress_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_spare1__3 = ANY_OR_OMIT;
single_value->field_odd__evenIndicator = ANY_OR_OMIT;
single_value->field_typeOfSubAddress = ANY_OR_OMIT;
single_value->field_ext1 = ANY_OR_OMIT;
single_value->field_subAddressInformation = ANY_OR_OMIT;
}
}
}

void CallingPartySubAddress_template::copy_value(const CallingPartySubAddress& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.spare1__3().is_bound()) {
  if (other_value.spare1__3().ispresent()) single_value->field_spare1__3 = other_value.spare1__3()();
  else single_value->field_spare1__3 = OMIT_VALUE;
} else {
  single_value->field_spare1__3.clean_up();
}
if (other_value.odd__evenIndicator().is_bound()) {
  if (other_value.odd__evenIndicator().ispresent()) single_value->field_odd__evenIndicator = other_value.odd__evenIndicator()();
  else single_value->field_odd__evenIndicator = OMIT_VALUE;
} else {
  single_value->field_odd__evenIndicator.clean_up();
}
if (other_value.typeOfSubAddress().is_bound()) {
  if (other_value.typeOfSubAddress().ispresent()) single_value->field_typeOfSubAddress = other_value.typeOfSubAddress()();
  else single_value->field_typeOfSubAddress = OMIT_VALUE;
} else {
  single_value->field_typeOfSubAddress.clean_up();
}
if (other_value.ext1().is_bound()) {
  if (other_value.ext1().ispresent()) single_value->field_ext1 = other_value.ext1()();
  else single_value->field_ext1 = OMIT_VALUE;
} else {
  single_value->field_ext1.clean_up();
}
if (other_value.subAddressInformation().is_bound()) {
  if (other_value.subAddressInformation().ispresent()) single_value->field_subAddressInformation = other_value.subAddressInformation()();
  else single_value->field_subAddressInformation = OMIT_VALUE;
} else {
  single_value->field_subAddressInformation.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void CallingPartySubAddress_template::copy_template(const CallingPartySubAddress_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare1__3().get_selection()) {
single_value->field_spare1__3 = other_value.spare1__3();
} else {
single_value->field_spare1__3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.odd__evenIndicator().get_selection()) {
single_value->field_odd__evenIndicator = other_value.odd__evenIndicator();
} else {
single_value->field_odd__evenIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.typeOfSubAddress().get_selection()) {
single_value->field_typeOfSubAddress = other_value.typeOfSubAddress();
} else {
single_value->field_typeOfSubAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext1().get_selection()) {
single_value->field_ext1 = other_value.ext1();
} else {
single_value->field_ext1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.subAddressInformation().get_selection()) {
single_value->field_subAddressInformation = other_value.subAddressInformation();
} else {
single_value->field_subAddressInformation.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 CallingPartySubAddress_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 CallingPartySubAddress_template(*other_value.implication_.precondition);
implication_.implied_template = new CallingPartySubAddress_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 @MobileL3_CC_Types.CallingPartySubAddress.");
break;
}
set_selection(other_value);
}

CallingPartySubAddress_template::CallingPartySubAddress_template()
{
}

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

CallingPartySubAddress_template::CallingPartySubAddress_template(const CallingPartySubAddress& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean CallingPartySubAddress_template::match(const CallingPartySubAddress& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.spare1__3().is_bound()) return FALSE;
if((other_value.spare1__3().ispresent() ? !single_value->field_spare1__3.match((const BITSTRING&)other_value.spare1__3(), legacy) : !single_value->field_spare1__3.match_omit(legacy)))return FALSE;
if(!other_value.odd__evenIndicator().is_bound()) return FALSE;
if((other_value.odd__evenIndicator().ispresent() ? !single_value->field_odd__evenIndicator.match((const BITSTRING&)other_value.odd__evenIndicator(), legacy) : !single_value->field_odd__evenIndicator.match_omit(legacy)))return FALSE;
if(!other_value.typeOfSubAddress().is_bound()) return FALSE;
if((other_value.typeOfSubAddress().ispresent() ? !single_value->field_typeOfSubAddress.match((const BITSTRING&)other_value.typeOfSubAddress(), legacy) : !single_value->field_typeOfSubAddress.match_omit(legacy)))return FALSE;
if(!other_value.ext1().is_bound()) return FALSE;
if((other_value.ext1().ispresent() ? !single_value->field_ext1.match((const BITSTRING&)other_value.ext1(), legacy) : !single_value->field_ext1.match_omit(legacy)))return FALSE;
if(!other_value.subAddressInformation().is_bound()) return FALSE;
if((other_value.subAddressInformation().ispresent() ? !single_value->field_subAddressInformation.match((const OCTETSTRING&)other_value.subAddressInformation(), legacy) : !single_value->field_subAddressInformation.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 @MobileL3_CC_Types.CallingPartySubAddress.");
}
return FALSE;
}

boolean CallingPartySubAddress_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || (single_value->field_spare1__3.is_omit() || single_value->field_spare1__3.is_bound())
 || (single_value->field_odd__evenIndicator.is_omit() || single_value->field_odd__evenIndicator.is_bound())
 || (single_value->field_typeOfSubAddress.is_omit() || single_value->field_typeOfSubAddress.is_bound())
 || (single_value->field_ext1.is_omit() || single_value->field_ext1.is_bound())
 || (single_value->field_subAddressInformation.is_omit() || single_value->field_subAddressInformation.is_bound());
}

boolean CallingPartySubAddress_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && (single_value->field_spare1__3.is_omit() || single_value->field_spare1__3.is_value())
 && (single_value->field_odd__evenIndicator.is_omit() || single_value->field_odd__evenIndicator.is_value())
 && (single_value->field_typeOfSubAddress.is_omit() || single_value->field_typeOfSubAddress.is_value())
 && (single_value->field_ext1.is_omit() || single_value->field_ext1.is_value())
 && (single_value->field_subAddressInformation.is_omit() || single_value->field_subAddressInformation.is_value());
}

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

CallingPartySubAddress CallingPartySubAddress_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 @MobileL3_CC_Types.CallingPartySubAddress.");
CallingPartySubAddress ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_spare1__3.is_omit()) ret_val.spare1__3() = OMIT_VALUE;
else if (single_value->field_spare1__3.is_bound()) {
ret_val.spare1__3() = single_value->field_spare1__3.valueof();
}
if (single_value->field_odd__evenIndicator.is_omit()) ret_val.odd__evenIndicator() = OMIT_VALUE;
else if (single_value->field_odd__evenIndicator.is_bound()) {
ret_val.odd__evenIndicator() = single_value->field_odd__evenIndicator.valueof();
}
if (single_value->field_typeOfSubAddress.is_omit()) ret_val.typeOfSubAddress() = OMIT_VALUE;
else if (single_value->field_typeOfSubAddress.is_bound()) {
ret_val.typeOfSubAddress() = single_value->field_typeOfSubAddress.valueof();
}
if (single_value->field_ext1.is_omit()) ret_val.ext1() = OMIT_VALUE;
else if (single_value->field_ext1.is_bound()) {
ret_val.ext1() = single_value->field_ext1.valueof();
}
if (single_value->field_subAddressInformation.is_omit()) ret_val.subAddressInformation() = OMIT_VALUE;
else if (single_value->field_subAddressInformation.is_bound()) {
ret_val.subAddressInformation() = single_value->field_subAddressInformation.valueof();
}
return ret_val;
}

void CallingPartySubAddress_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 @MobileL3_CC_Types.CallingPartySubAddress.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new CallingPartySubAddress_template[list_length];
}

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

OCTETSTRING_template& CallingPartySubAddress_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& CallingPartySubAddress_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.CallingPartySubAddress.");
return single_value->field_elementIdentifier;
}

INTEGER_template& CallingPartySubAddress_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& CallingPartySubAddress_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.CallingPartySubAddress.");
return single_value->field_lengthIndicator;
}

BITSTRING_template& CallingPartySubAddress_template::spare1__3()
{
set_specific();
return single_value->field_spare1__3;
}

const BITSTRING_template& CallingPartySubAddress_template::spare1__3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare1_3 of a non-specific template of type @MobileL3_CC_Types.CallingPartySubAddress.");
return single_value->field_spare1__3;
}

BITSTRING_template& CallingPartySubAddress_template::odd__evenIndicator()
{
set_specific();
return single_value->field_odd__evenIndicator;
}

const BITSTRING_template& CallingPartySubAddress_template::odd__evenIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field odd_evenIndicator of a non-specific template of type @MobileL3_CC_Types.CallingPartySubAddress.");
return single_value->field_odd__evenIndicator;
}

BITSTRING_template& CallingPartySubAddress_template::typeOfSubAddress()
{
set_specific();
return single_value->field_typeOfSubAddress;
}

const BITSTRING_template& CallingPartySubAddress_template::typeOfSubAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field typeOfSubAddress of a non-specific template of type @MobileL3_CC_Types.CallingPartySubAddress.");
return single_value->field_typeOfSubAddress;
}

BITSTRING_template& CallingPartySubAddress_template::ext1()
{
set_specific();
return single_value->field_ext1;
}

const BITSTRING_template& CallingPartySubAddress_template::ext1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext1 of a non-specific template of type @MobileL3_CC_Types.CallingPartySubAddress.");
return single_value->field_ext1;
}

OCTETSTRING_template& CallingPartySubAddress_template::subAddressInformation()
{
set_specific();
return single_value->field_subAddressInformation;
}

const OCTETSTRING_template& CallingPartySubAddress_template::subAddressInformation() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field subAddressInformation of a non-specific template of type @MobileL3_CC_Types.CallingPartySubAddress.");
return single_value->field_subAddressInformation;
}

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

void CallingPartySubAddress_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", spare1_3 := ");
single_value->field_spare1__3.log();
TTCN_Logger::log_event_str(", odd_evenIndicator := ");
single_value->field_odd__evenIndicator.log();
TTCN_Logger::log_event_str(", typeOfSubAddress := ");
single_value->field_typeOfSubAddress.log();
TTCN_Logger::log_event_str(", ext1 := ");
single_value->field_ext1.log();
TTCN_Logger::log_event_str(", subAddressInformation := ");
single_value->field_subAddressInformation.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 CallingPartySubAddress_template::log_match(const CallingPartySubAddress& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.spare1__3().ispresent()){
if(!single_value->field_spare1__3.match(match_value.spare1__3(), legacy)){
TTCN_Logger::log_logmatch_info(".spare1_3");
single_value->field_spare1__3.log_match(match_value.spare1__3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_spare1__3.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".spare1_3 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_spare1__3.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.odd__evenIndicator().ispresent()){
if(!single_value->field_odd__evenIndicator.match(match_value.odd__evenIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".odd_evenIndicator");
single_value->field_odd__evenIndicator.log_match(match_value.odd__evenIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_odd__evenIndicator.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".odd_evenIndicator := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_odd__evenIndicator.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.typeOfSubAddress().ispresent()){
if(!single_value->field_typeOfSubAddress.match(match_value.typeOfSubAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".typeOfSubAddress");
single_value->field_typeOfSubAddress.log_match(match_value.typeOfSubAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_typeOfSubAddress.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".typeOfSubAddress := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_typeOfSubAddress.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.ext1().ispresent()){
if(!single_value->field_ext1.match(match_value.ext1(), legacy)){
TTCN_Logger::log_logmatch_info(".ext1");
single_value->field_ext1.log_match(match_value.ext1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_ext1.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".ext1 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_ext1.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.subAddressInformation().ispresent()){
if(!single_value->field_subAddressInformation.match(match_value.subAddressInformation(), legacy)){
TTCN_Logger::log_logmatch_info(".subAddressInformation");
single_value->field_subAddressInformation.log_match(match_value.subAddressInformation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_subAddressInformation.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".subAddressInformation := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_subAddressInformation.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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", spare1_3 := ");
if (match_value.spare1__3().ispresent()) {
single_value->field_spare1__3.log_match(match_value.spare1__3(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_spare1__3.log();
if (single_value->field_spare1__3.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", odd_evenIndicator := ");
if (match_value.odd__evenIndicator().ispresent()) {
single_value->field_odd__evenIndicator.log_match(match_value.odd__evenIndicator(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_odd__evenIndicator.log();
if (single_value->field_odd__evenIndicator.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", typeOfSubAddress := ");
if (match_value.typeOfSubAddress().ispresent()) {
single_value->field_typeOfSubAddress.log_match(match_value.typeOfSubAddress(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_typeOfSubAddress.log();
if (single_value->field_typeOfSubAddress.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", ext1 := ");
if (match_value.ext1().ispresent()) {
single_value->field_ext1.log_match(match_value.ext1(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_ext1.log();
if (single_value->field_ext1.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", subAddressInformation := ");
if (match_value.subAddressInformation().ispresent()) {
single_value->field_subAddressInformation.log_match(match_value.subAddressInformation(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_subAddressInformation.log();
if (single_value->field_subAddressInformation.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 CallingPartySubAddress_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (!spare1__3().is_bound()) spare1__3() = OMIT_VALUE;
else spare1__3().set_implicit_omit();
if (!odd__evenIndicator().is_bound()) odd__evenIndicator() = OMIT_VALUE;
else odd__evenIndicator().set_implicit_omit();
if (!typeOfSubAddress().is_bound()) typeOfSubAddress() = OMIT_VALUE;
else typeOfSubAddress().set_implicit_omit();
if (!ext1().is_bound()) ext1() = OMIT_VALUE;
else ext1().set_implicit_omit();
if (!subAddressInformation().is_bound()) subAddressInformation() = OMIT_VALUE;
else subAddressInformation().set_implicit_omit();
}

void CallingPartySubAddress_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_spare1__3.encode_text(text_buf);
single_value->field_odd__evenIndicator.encode_text(text_buf);
single_value->field_typeOfSubAddress.encode_text(text_buf);
single_value->field_ext1.encode_text(text_buf);
single_value->field_subAddressInformation.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 @MobileL3_CC_Types.CallingPartySubAddress.");
}
}

void CallingPartySubAddress_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_spare1__3.decode_text(text_buf);
single_value->field_odd__evenIndicator.decode_text(text_buf);
single_value->field_typeOfSubAddress.decode_text(text_buf);
single_value->field_ext1.decode_text(text_buf);
single_value->field_subAddressInformation.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 CallingPartySubAddress_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 @MobileL3_CC_Types.CallingPartySubAddress.");
}
}

void CallingPartySubAddress_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: {
    CallingPartySubAddress_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 @MobileL3_CC_Types.CallingPartySubAddress 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare1__3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) odd__evenIndicator().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) typeOfSubAddress().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) subAddressInformation().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "odd_evenIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          odd__evenIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "typeOfSubAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          typeOfSubAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "subAddressInformation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          subAddressInformation().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 @MobileL3_CC_Types.CallingPartySubAddress: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    CallingPartySubAddress_template* precondition = new CallingPartySubAddress_template;
    precondition->set_param(*param.get_elem(0));
    CallingPartySubAddress_template* implied_template = new CallingPartySubAddress_template;
    implied_template->set_param(*param.get_elem(1));
    *this = CallingPartySubAddress_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.CallingPartySubAddress");
  }
  is_ifpresent = param.get_ifpresent();
}

void CallingPartySubAddress_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingPartySubAddress");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingPartySubAddress");
single_value->field_spare1__3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingPartySubAddress");
single_value->field_odd__evenIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingPartySubAddress");
single_value->field_typeOfSubAddress.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingPartySubAddress");
single_value->field_ext1.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingPartySubAddress");
single_value->field_subAddressInformation.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CallingPartySubAddress");
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 : "@MobileL3_CC_Types.CallingPartySubAddress");
}

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

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

CLIR::CLIR()
{
}

CLIR::CLIR(const OCTETSTRING& par_elementIdentifier)
  :   field_elementIdentifier(par_elementIdentifier)
{
}

CLIR::CLIR(const CLIR& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.CLIR.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
}

void CLIR::clean_up()
{
field_elementIdentifier.clean_up();
}

const TTCN_Typedescriptor_t* CLIR::get_descriptor() const { return &CLIR_descr_; }
CLIR& CLIR::operator=(const CLIR& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.CLIR.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
}
return *this;
}

boolean CLIR::operator==(const CLIR& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier;
}

boolean CLIR::is_bound() const
{
return (field_elementIdentifier.is_bound());
}
boolean CLIR::is_value() const
{
return field_elementIdentifier.is_value();
}
void CLIR::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(" }");
}

void CLIR::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
}

void CLIR::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (1<param.get_size()) {
      param.error("record value of type @MobileL3_CC_Types.CLIR has 1 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) elementIdentifier().set_param(*param.get_elem(0));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().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 @MobileL3_CC_Types.CLIR: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.CLIR");
  }
}

void CLIR::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
}

void CLIR::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
}

void CLIR::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 CLIR::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 CLIR::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

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

struct CLIR_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
};

void CLIR_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_elementIdentifier = ANY_VALUE;
}
}
}

void CLIR_template::copy_value(const CLIR& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void CLIR_template::copy_template(const CLIR_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.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 CLIR_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 CLIR_template(*other_value.implication_.precondition);
implication_.implied_template = new CLIR_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 @MobileL3_CC_Types.CLIR.");
break;
}
set_selection(other_value);
}

CLIR_template::CLIR_template()
{
}

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

CLIR_template::CLIR_template(const CLIR& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean CLIR_template::match(const CLIR& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), 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 @MobileL3_CC_Types.CLIR.");
}
return FALSE;
}

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

boolean CLIR_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value();
}

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

CLIR CLIR_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 @MobileL3_CC_Types.CLIR.");
CLIR ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
return ret_val;
}

void CLIR_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 @MobileL3_CC_Types.CLIR.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new CLIR_template[list_length];
}

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

OCTETSTRING_template& CLIR_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& CLIR_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.CLIR.");
return single_value->field_elementIdentifier;
}

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

void CLIR_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.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 CLIR_template::log_match(const CLIR& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), 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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), 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 CLIR_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
}

void CLIR_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.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 @MobileL3_CC_Types.CLIR.");
}
}

void CLIR_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_elementIdentifier.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 CLIR_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 @MobileL3_CC_Types.CLIR.");
}
}

void CLIR_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: {
    CLIR_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (1<param.get_size()) {
      param.error("record template of type @MobileL3_CC_Types.CLIR has 1 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) elementIdentifier().set_param(*param.get_elem(0));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().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 @MobileL3_CC_Types.CLIR: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    CLIR_template* precondition = new CLIR_template;
    precondition->set_param(*param.get_elem(0));
    CLIR_template* implied_template = new CLIR_template;
    implied_template->set_param(*param.get_elem(1));
    *this = CLIR_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.CLIR");
  }
  is_ifpresent = param.get_ifpresent();
}

void CLIR_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CLIR");
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 : "@MobileL3_CC_Types.CLIR");
}

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

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

CongestionLevel::CongestionLevel()
{
}

CongestionLevel::CongestionLevel(const BITSTRING& par_congestionLevel,
    const BITSTRING& par_elementIdentifier)
  :   field_congestionLevel(par_congestionLevel),
  field_elementIdentifier(par_elementIdentifier)
{
}

CongestionLevel::CongestionLevel(const CongestionLevel& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.CongestionLevel.");
if (other_value.congestionLevel().is_bound()) field_congestionLevel = other_value.congestionLevel();
else field_congestionLevel.clean_up();
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
}

void CongestionLevel::clean_up()
{
field_congestionLevel.clean_up();
field_elementIdentifier.clean_up();
}

const TTCN_Typedescriptor_t* CongestionLevel::get_descriptor() const { return &CongestionLevel_descr_; }
CongestionLevel& CongestionLevel::operator=(const CongestionLevel& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.CongestionLevel.");
  if (other_value.congestionLevel().is_bound()) field_congestionLevel = other_value.congestionLevel();
  else field_congestionLevel.clean_up();
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
}
return *this;
}

boolean CongestionLevel::operator==(const CongestionLevel& other_value) const
{
return field_congestionLevel==other_value.field_congestionLevel
  && field_elementIdentifier==other_value.field_elementIdentifier;
}

boolean CongestionLevel::is_bound() const
{
return (field_congestionLevel.is_bound())
  || (field_elementIdentifier.is_bound());
}
boolean CongestionLevel::is_value() const
{
return field_congestionLevel.is_value()
  && field_elementIdentifier.is_value();
}
void CongestionLevel::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ congestionLevel := ");
field_congestionLevel.log();
TTCN_Logger::log_event_str(", elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(" }");
}

void CongestionLevel::set_implicit_omit()
{
if (congestionLevel().is_bound()) congestionLevel().set_implicit_omit();
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
}

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

void CongestionLevel::encode_text(Text_Buf& text_buf) const
{
field_congestionLevel.encode_text(text_buf);
field_elementIdentifier.encode_text(text_buf);
}

void CongestionLevel::decode_text(Text_Buf& text_buf)
{
field_congestionLevel.decode_text(text_buf);
field_elementIdentifier.decode_text(text_buf);
}

void CongestionLevel::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 CongestionLevel::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 CongestionLevel::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, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_congestionLevel.RAW_decode(General__Types::BIT4_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, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::BIT4_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 CongestionLevel::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, General__Types::BIT4_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT4_descr_.raw);
  encoded_length += field_congestionLevel.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct CongestionLevel_template::single_value_struct {
BITSTRING_template field_congestionLevel;
BITSTRING_template field_elementIdentifier;
};

void CongestionLevel_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_congestionLevel = ANY_VALUE;
single_value->field_elementIdentifier = ANY_VALUE;
}
}
}

void CongestionLevel_template::copy_value(const CongestionLevel& other_value)
{
single_value = new single_value_struct;
if (other_value.congestionLevel().is_bound()) {
  single_value->field_congestionLevel = other_value.congestionLevel();
} else {
  single_value->field_congestionLevel.clean_up();
}
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void CongestionLevel_template::copy_template(const CongestionLevel_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.congestionLevel().get_selection()) {
single_value->field_congestionLevel = other_value.congestionLevel();
} else {
single_value->field_congestionLevel.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.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 CongestionLevel_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 CongestionLevel_template(*other_value.implication_.precondition);
implication_.implied_template = new CongestionLevel_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 @MobileL3_CC_Types.CongestionLevel.");
break;
}
set_selection(other_value);
}

CongestionLevel_template::CongestionLevel_template()
{
}

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

CongestionLevel_template::CongestionLevel_template(const CongestionLevel& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean CongestionLevel_template::match(const CongestionLevel& 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.congestionLevel().is_bound()) return FALSE;
if(!single_value->field_congestionLevel.match(other_value.congestionLevel(), legacy))return FALSE;
if(!other_value.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), 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 @MobileL3_CC_Types.CongestionLevel.");
}
return FALSE;
}

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

boolean CongestionLevel_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_congestionLevel.is_value()
 && single_value->field_elementIdentifier.is_value();
}

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

CongestionLevel CongestionLevel_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 @MobileL3_CC_Types.CongestionLevel.");
CongestionLevel ret_val;
if (single_value->field_congestionLevel.is_bound()) {
ret_val.congestionLevel() = single_value->field_congestionLevel.valueof();
}
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
return ret_val;
}

void CongestionLevel_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 @MobileL3_CC_Types.CongestionLevel.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new CongestionLevel_template[list_length];
}

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

BITSTRING_template& CongestionLevel_template::congestionLevel()
{
set_specific();
return single_value->field_congestionLevel;
}

const BITSTRING_template& CongestionLevel_template::congestionLevel() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field congestionLevel of a non-specific template of type @MobileL3_CC_Types.CongestionLevel.");
return single_value->field_congestionLevel;
}

BITSTRING_template& CongestionLevel_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const BITSTRING_template& CongestionLevel_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.CongestionLevel.");
return single_value->field_elementIdentifier;
}

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

void CongestionLevel_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ congestionLevel := ");
single_value->field_congestionLevel.log();
TTCN_Logger::log_event_str(", elementIdentifier := ");
single_value->field_elementIdentifier.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 CongestionLevel_template::log_match(const CongestionLevel& 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_congestionLevel.match(match_value.congestionLevel(), legacy)){
TTCN_Logger::log_logmatch_info(".congestionLevel");
single_value->field_congestionLevel.log_match(match_value.congestionLevel(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), 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("{ congestionLevel := ");
single_value->field_congestionLevel.log_match(match_value.congestionLevel(), legacy);
TTCN_Logger::log_event_str(", elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), 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 CongestionLevel_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (congestionLevel().is_bound()) congestionLevel().set_implicit_omit();
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
}

void CongestionLevel_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_congestionLevel.encode_text(text_buf);
single_value->field_elementIdentifier.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 @MobileL3_CC_Types.CongestionLevel.");
}
}

void CongestionLevel_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_congestionLevel.decode_text(text_buf);
single_value->field_elementIdentifier.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 CongestionLevel_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 @MobileL3_CC_Types.CongestionLevel.");
}
}

void CongestionLevel_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: {
    CongestionLevel_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 @MobileL3_CC_Types.CongestionLevel 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) congestionLevel().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) elementIdentifier().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(), "congestionLevel")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          congestionLevel().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().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 @MobileL3_CC_Types.CongestionLevel: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    CongestionLevel_template* precondition = new CongestionLevel_template;
    precondition->set_param(*param.get_elem(0));
    CongestionLevel_template* implied_template = new CongestionLevel_template;
    implied_template->set_param(*param.get_elem(1));
    *this = CongestionLevel_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.CongestionLevel");
  }
  is_ifpresent = param.get_ifpresent();
}

void CongestionLevel_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_congestionLevel.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CongestionLevel");
single_value->field_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.CongestionLevel");
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 : "@MobileL3_CC_Types.CongestionLevel");
}

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

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

ConnectedNumber::ConnectedNumber()
{
}

ConnectedNumber::ConnectedNumber(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const CallingOrCalled__Number__oct3& par_oct3,
    const OPTIONAL< HEXSTRING >& par_digits)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_oct3(par_oct3),
  field_digits(par_digits)
{
}

ConnectedNumber::ConnectedNumber(const ConnectedNumber& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.ConnectedNumber.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.oct3().is_bound()) field_oct3 = other_value.oct3();
else field_oct3.clean_up();
if (other_value.digits().is_bound()) field_digits = other_value.digits();
else field_digits.clean_up();
}

void ConnectedNumber::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_oct3.clean_up();
field_digits.clean_up();
}

const TTCN_Typedescriptor_t* ConnectedNumber::get_descriptor() const { return &ConnectedNumber_descr_; }
ConnectedNumber& ConnectedNumber::operator=(const ConnectedNumber& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.ConnectedNumber.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.oct3().is_bound()) field_oct3 = other_value.oct3();
  else field_oct3.clean_up();
  if (other_value.digits().is_bound()) field_digits = other_value.digits();
  else field_digits.clean_up();
}
return *this;
}

boolean ConnectedNumber::operator==(const ConnectedNumber& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_oct3==other_value.field_oct3
  && field_digits==other_value.field_digits;
}

boolean ConnectedNumber::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (field_oct3.is_bound())
  || (OPTIONAL_OMIT == field_digits.get_selection() || field_digits.is_bound());
}
boolean ConnectedNumber::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && field_oct3.is_value()
  && (OPTIONAL_OMIT == field_digits.get_selection() || field_digits.is_value());
}
int ConnectedNumber::size_of() const
{
  int ret_val = 3;
  if (field_digits.ispresent()) ret_val++;
  return ret_val;
}

void ConnectedNumber::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", oct3 := ");
field_oct3.log();
TTCN_Logger::log_event_str(", digits := ");
field_digits.log();
TTCN_Logger::log_event_str(" }");
}

void ConnectedNumber::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (oct3().is_bound()) oct3().set_implicit_omit();
if (!digits().is_bound()) digits() = OMIT_VALUE;
else digits().set_implicit_omit();
}

void ConnectedNumber::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 @MobileL3_CC_Types.ConnectedNumber 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) oct3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) digits().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "oct3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          oct3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "digits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          digits().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 @MobileL3_CC_Types.ConnectedNumber: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.ConnectedNumber");
  }
}

void ConnectedNumber::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_oct3.encode_text(text_buf);
field_digits.encode_text(text_buf);
}

void ConnectedNumber::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_oct3.decode_text(text_buf);
field_digits.decode_text(text_buf);
}

void ConnectedNumber::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 ConnectedNumber::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 ConnectedNumber::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, ConnectedNumber_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(ConnectedNumber_lengthIndicator_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_lengthIndicator.convert_to_Integer(ConnectedNumber_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  RAW_Force_Omit field_2_force_omit(2, force_omit, CallingOrCalled__Number__oct3_descr_.raw->forceomit);
  decoded_field_length = field_oct3.RAW_decode(CallingOrCalled__Number__oct3_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;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_digits = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, ConnectedNumber_digits_descr_.raw->forceomit);
  decoded_field_length = field_digits().RAW_decode(ConnectedNumber_digits_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_digits = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_digits=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int ConnectedNumber::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, ConnectedNumber_lengthIndicator_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, CallingOrCalled__Number__oct3_descr_.raw);
  if (field_digits.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, ConnectedNumber_digits_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &ConnectedNumber_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 2;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(2);
  myleaf.body.node.nodes[1]->length = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[2]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[2]->curr_pos.pos;
  if (field_digits.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = 0;
  }
  encoded_length += field_oct3.RAW_encode(CallingOrCalled__Number__oct3_descr_, *myleaf.body.node.nodes[2]);
  if (field_digits.ispresent()) {
  encoded_length += field_digits().RAW_encode(ConnectedNumber_digits_descr_, *myleaf.body.node.nodes[3]);
  }
  return myleaf.length = encoded_length;
}

struct ConnectedNumber_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
CallingOrCalled__Number__oct3_template field_oct3;
HEXSTRING_template field_digits;
};

void ConnectedNumber_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_oct3 = ANY_VALUE;
single_value->field_digits = ANY_OR_OMIT;
}
}
}

void ConnectedNumber_template::copy_value(const ConnectedNumber& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.oct3().is_bound()) {
  single_value->field_oct3 = other_value.oct3();
} else {
  single_value->field_oct3.clean_up();
}
if (other_value.digits().is_bound()) {
  if (other_value.digits().ispresent()) single_value->field_digits = other_value.digits()();
  else single_value->field_digits = OMIT_VALUE;
} else {
  single_value->field_digits.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ConnectedNumber_template::copy_template(const ConnectedNumber_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.oct3().get_selection()) {
single_value->field_oct3 = other_value.oct3();
} else {
single_value->field_oct3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.digits().get_selection()) {
single_value->field_digits = other_value.digits();
} else {
single_value->field_digits.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 ConnectedNumber_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 ConnectedNumber_template(*other_value.implication_.precondition);
implication_.implied_template = new ConnectedNumber_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 @MobileL3_CC_Types.ConnectedNumber.");
break;
}
set_selection(other_value);
}

ConnectedNumber_template::ConnectedNumber_template()
{
}

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

ConnectedNumber_template::ConnectedNumber_template(const ConnectedNumber& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ConnectedNumber_template::match(const ConnectedNumber& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.oct3().is_bound()) return FALSE;
if(!single_value->field_oct3.match(other_value.oct3(), legacy))return FALSE;
if(!other_value.digits().is_bound()) return FALSE;
if((other_value.digits().ispresent() ? !single_value->field_digits.match((const HEXSTRING&)other_value.digits(), legacy) : !single_value->field_digits.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 @MobileL3_CC_Types.ConnectedNumber.");
}
return FALSE;
}

boolean ConnectedNumber_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || single_value->field_oct3.is_bound()
 || (single_value->field_digits.is_omit() || single_value->field_digits.is_bound());
}

boolean ConnectedNumber_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && single_value->field_oct3.is_value()
 && (single_value->field_digits.is_omit() || single_value->field_digits.is_value());
}

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

ConnectedNumber ConnectedNumber_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 @MobileL3_CC_Types.ConnectedNumber.");
ConnectedNumber ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_oct3.is_bound()) {
ret_val.oct3() = single_value->field_oct3.valueof();
}
if (single_value->field_digits.is_omit()) ret_val.digits() = OMIT_VALUE;
else if (single_value->field_digits.is_bound()) {
ret_val.digits() = single_value->field_digits.valueof();
}
return ret_val;
}

void ConnectedNumber_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 @MobileL3_CC_Types.ConnectedNumber.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new ConnectedNumber_template[list_length];
}

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

OCTETSTRING_template& ConnectedNumber_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& ConnectedNumber_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.ConnectedNumber.");
return single_value->field_elementIdentifier;
}

INTEGER_template& ConnectedNumber_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& ConnectedNumber_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.ConnectedNumber.");
return single_value->field_lengthIndicator;
}

CallingOrCalled__Number__oct3_template& ConnectedNumber_template::oct3()
{
set_specific();
return single_value->field_oct3;
}

const CallingOrCalled__Number__oct3_template& ConnectedNumber_template::oct3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field oct3 of a non-specific template of type @MobileL3_CC_Types.ConnectedNumber.");
return single_value->field_oct3;
}

HEXSTRING_template& ConnectedNumber_template::digits()
{
set_specific();
return single_value->field_digits;
}

const HEXSTRING_template& ConnectedNumber_template::digits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field digits of a non-specific template of type @MobileL3_CC_Types.ConnectedNumber.");
return single_value->field_digits;
}

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

void ConnectedNumber_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", oct3 := ");
single_value->field_oct3.log();
TTCN_Logger::log_event_str(", digits := ");
single_value->field_digits.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 ConnectedNumber_template::log_match(const ConnectedNumber& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_oct3.match(match_value.oct3(), legacy)){
TTCN_Logger::log_logmatch_info(".oct3");
single_value->field_oct3.log_match(match_value.oct3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.digits().ispresent()){
if(!single_value->field_digits.match(match_value.digits(), legacy)){
TTCN_Logger::log_logmatch_info(".digits");
single_value->field_digits.log_match(match_value.digits(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_digits.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".digits := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_digits.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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", oct3 := ");
single_value->field_oct3.log_match(match_value.oct3(), legacy);
TTCN_Logger::log_event_str(", digits := ");
if (match_value.digits().ispresent()) {
single_value->field_digits.log_match(match_value.digits(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_digits.log();
if (single_value->field_digits.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 ConnectedNumber_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (oct3().is_bound()) oct3().set_implicit_omit();
if (!digits().is_bound()) digits() = OMIT_VALUE;
else digits().set_implicit_omit();
}

void ConnectedNumber_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_oct3.encode_text(text_buf);
single_value->field_digits.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 @MobileL3_CC_Types.ConnectedNumber.");
}
}

void ConnectedNumber_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_oct3.decode_text(text_buf);
single_value->field_digits.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 ConnectedNumber_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 @MobileL3_CC_Types.ConnectedNumber.");
}
}

void ConnectedNumber_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: {
    ConnectedNumber_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 @MobileL3_CC_Types.ConnectedNumber 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) oct3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) digits().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "oct3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          oct3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "digits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          digits().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 @MobileL3_CC_Types.ConnectedNumber: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    ConnectedNumber_template* precondition = new ConnectedNumber_template;
    precondition->set_param(*param.get_elem(0));
    ConnectedNumber_template* implied_template = new ConnectedNumber_template;
    implied_template->set_param(*param.get_elem(1));
    *this = ConnectedNumber_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.ConnectedNumber");
  }
  is_ifpresent = param.get_ifpresent();
}

void ConnectedNumber_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ConnectedNumber");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ConnectedNumber");
single_value->field_oct3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ConnectedNumber");
single_value->field_digits.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ConnectedNumber");
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 : "@MobileL3_CC_Types.ConnectedNumber");
}

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

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

ConnectedSubAddress::ConnectedSubAddress()
{
}

ConnectedSubAddress::ConnectedSubAddress(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const OPTIONAL< BITSTRING >& par_spare1__3,
    const OPTIONAL< BITSTRING >& par_odd__evenIndicator,
    const OPTIONAL< BITSTRING >& par_typeOfSubAddress,
    const OPTIONAL< BITSTRING >& par_ext1,
    const OPTIONAL< OCTETSTRING >& par_subAddressInformation)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_spare1__3(par_spare1__3),
  field_odd__evenIndicator(par_odd__evenIndicator),
  field_typeOfSubAddress(par_typeOfSubAddress),
  field_ext1(par_ext1),
  field_subAddressInformation(par_subAddressInformation)
{
}

ConnectedSubAddress::ConnectedSubAddress(const ConnectedSubAddress& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.ConnectedSubAddress.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.spare1__3().is_bound()) field_spare1__3 = other_value.spare1__3();
else field_spare1__3.clean_up();
if (other_value.odd__evenIndicator().is_bound()) field_odd__evenIndicator = other_value.odd__evenIndicator();
else field_odd__evenIndicator.clean_up();
if (other_value.typeOfSubAddress().is_bound()) field_typeOfSubAddress = other_value.typeOfSubAddress();
else field_typeOfSubAddress.clean_up();
if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
else field_ext1.clean_up();
if (other_value.subAddressInformation().is_bound()) field_subAddressInformation = other_value.subAddressInformation();
else field_subAddressInformation.clean_up();
}

void ConnectedSubAddress::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_spare1__3.clean_up();
field_odd__evenIndicator.clean_up();
field_typeOfSubAddress.clean_up();
field_ext1.clean_up();
field_subAddressInformation.clean_up();
}

const TTCN_Typedescriptor_t* ConnectedSubAddress::get_descriptor() const { return &ConnectedSubAddress_descr_; }
ConnectedSubAddress& ConnectedSubAddress::operator=(const ConnectedSubAddress& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.ConnectedSubAddress.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.spare1__3().is_bound()) field_spare1__3 = other_value.spare1__3();
  else field_spare1__3.clean_up();
  if (other_value.odd__evenIndicator().is_bound()) field_odd__evenIndicator = other_value.odd__evenIndicator();
  else field_odd__evenIndicator.clean_up();
  if (other_value.typeOfSubAddress().is_bound()) field_typeOfSubAddress = other_value.typeOfSubAddress();
  else field_typeOfSubAddress.clean_up();
  if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
  else field_ext1.clean_up();
  if (other_value.subAddressInformation().is_bound()) field_subAddressInformation = other_value.subAddressInformation();
  else field_subAddressInformation.clean_up();
}
return *this;
}

boolean ConnectedSubAddress::operator==(const ConnectedSubAddress& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_spare1__3==other_value.field_spare1__3
  && field_odd__evenIndicator==other_value.field_odd__evenIndicator
  && field_typeOfSubAddress==other_value.field_typeOfSubAddress
  && field_ext1==other_value.field_ext1
  && field_subAddressInformation==other_value.field_subAddressInformation;
}

boolean ConnectedSubAddress::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (OPTIONAL_OMIT == field_spare1__3.get_selection() || field_spare1__3.is_bound())
  || (OPTIONAL_OMIT == field_odd__evenIndicator.get_selection() || field_odd__evenIndicator.is_bound())
  || (OPTIONAL_OMIT == field_typeOfSubAddress.get_selection() || field_typeOfSubAddress.is_bound())
  || (OPTIONAL_OMIT == field_ext1.get_selection() || field_ext1.is_bound())
  || (OPTIONAL_OMIT == field_subAddressInformation.get_selection() || field_subAddressInformation.is_bound());
}
boolean ConnectedSubAddress::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && (OPTIONAL_OMIT == field_spare1__3.get_selection() || field_spare1__3.is_value())
  && (OPTIONAL_OMIT == field_odd__evenIndicator.get_selection() || field_odd__evenIndicator.is_value())
  && (OPTIONAL_OMIT == field_typeOfSubAddress.get_selection() || field_typeOfSubAddress.is_value())
  && (OPTIONAL_OMIT == field_ext1.get_selection() || field_ext1.is_value())
  && (OPTIONAL_OMIT == field_subAddressInformation.get_selection() || field_subAddressInformation.is_value());
}
int ConnectedSubAddress::size_of() const
{
  int ret_val = 2;
  if (field_spare1__3.ispresent()) ret_val++;
  if (field_odd__evenIndicator.ispresent()) ret_val++;
  if (field_typeOfSubAddress.ispresent()) ret_val++;
  if (field_ext1.ispresent()) ret_val++;
  if (field_subAddressInformation.ispresent()) ret_val++;
  return ret_val;
}

void ConnectedSubAddress::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", spare1_3 := ");
field_spare1__3.log();
TTCN_Logger::log_event_str(", odd_evenIndicator := ");
field_odd__evenIndicator.log();
TTCN_Logger::log_event_str(", typeOfSubAddress := ");
field_typeOfSubAddress.log();
TTCN_Logger::log_event_str(", ext1 := ");
field_ext1.log();
TTCN_Logger::log_event_str(", subAddressInformation := ");
field_subAddressInformation.log();
TTCN_Logger::log_event_str(" }");
}

void ConnectedSubAddress::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (!spare1__3().is_bound()) spare1__3() = OMIT_VALUE;
else spare1__3().set_implicit_omit();
if (!odd__evenIndicator().is_bound()) odd__evenIndicator() = OMIT_VALUE;
else odd__evenIndicator().set_implicit_omit();
if (!typeOfSubAddress().is_bound()) typeOfSubAddress() = OMIT_VALUE;
else typeOfSubAddress().set_implicit_omit();
if (!ext1().is_bound()) ext1() = OMIT_VALUE;
else ext1().set_implicit_omit();
if (!subAddressInformation().is_bound()) subAddressInformation() = OMIT_VALUE;
else subAddressInformation().set_implicit_omit();
}

void ConnectedSubAddress::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 @MobileL3_CC_Types.ConnectedSubAddress 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare1__3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) odd__evenIndicator().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) typeOfSubAddress().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) subAddressInformation().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "odd_evenIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          odd__evenIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "typeOfSubAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          typeOfSubAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "subAddressInformation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          subAddressInformation().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 @MobileL3_CC_Types.ConnectedSubAddress: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.ConnectedSubAddress");
  }
}

void ConnectedSubAddress::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_spare1__3.encode_text(text_buf);
field_odd__evenIndicator.encode_text(text_buf);
field_typeOfSubAddress.encode_text(text_buf);
field_ext1.encode_text(text_buf);
field_subAddressInformation.encode_text(text_buf);
}

void ConnectedSubAddress::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_spare1__3.decode_text(text_buf);
field_odd__evenIndicator.decode_text(text_buf);
field_typeOfSubAddress.decode_text(text_buf);
field_ext1.decode_text(text_buf);
field_subAddressInformation.decode_text(text_buf);
}

void ConnectedSubAddress::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 ConnectedSubAddress::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 ConnectedSubAddress::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, ConnectedSubAddress_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(ConnectedSubAddress_lengthIndicator_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_lengthIndicator.convert_to_Integer(ConnectedSubAddress_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_spare1__3 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_spare1__3().RAW_decode(General__Types::BIT3_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_spare1__3 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_spare1__3=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_odd__evenIndicator = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_odd__evenIndicator().RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_odd__evenIndicator = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_odd__evenIndicator=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_typeOfSubAddress = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_typeOfSubAddress().RAW_decode(General__Types::BIT3_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_typeOfSubAddress = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_typeOfSubAddress=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_ext1 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_ext1().RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_ext1 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_ext1=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_subAddressInformation = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, General__Types::OCTN_descr_.raw->forceomit);
  decoded_field_length = field_subAddressInformation().RAW_decode(General__Types::OCTN_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_subAddressInformation = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_subAddressInformation=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int ConnectedSubAddress::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, ConnectedSubAddress_lengthIndicator_descr_.raw);
  if (field_spare1__3.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT3_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_odd__evenIndicator.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_typeOfSubAddress.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT3_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_ext1.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_subAddressInformation.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, General__Types::OCTN_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &ConnectedSubAddress_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 5;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(5);
  myleaf.body.node.nodes[1]->length = 8;
  if (field_spare1__3.ispresent()) {
  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;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = 0;
  }
  if (field_odd__evenIndicator.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = 0;
  }
  if (field_typeOfSubAddress.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = myleaf.body.node.nodes[4]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = myleaf.body.node.nodes[4]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = 0;
  }
  if (field_ext1.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = myleaf.body.node.nodes[5]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = myleaf.body.node.nodes[5]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = 0;
  }
  if (field_subAddressInformation.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].level = myleaf.body.node.nodes[6]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].pos = myleaf.body.node.nodes[6]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].pos = 0;
  }
  if (field_spare1__3.ispresent()) {
  encoded_length += field_spare1__3().RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_odd__evenIndicator.ispresent()) {
  encoded_length += field_odd__evenIndicator().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_typeOfSubAddress.ispresent()) {
  encoded_length += field_typeOfSubAddress().RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_ext1.ispresent()) {
  encoded_length += field_ext1().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_subAddressInformation.ispresent()) {
  encoded_length += field_subAddressInformation().RAW_encode(General__Types::OCTN_descr_, *myleaf.body.node.nodes[6]);
  }
  return myleaf.length = encoded_length;
}

struct ConnectedSubAddress_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
BITSTRING_template field_spare1__3;
BITSTRING_template field_odd__evenIndicator;
BITSTRING_template field_typeOfSubAddress;
BITSTRING_template field_ext1;
OCTETSTRING_template field_subAddressInformation;
};

void ConnectedSubAddress_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_spare1__3 = ANY_OR_OMIT;
single_value->field_odd__evenIndicator = ANY_OR_OMIT;
single_value->field_typeOfSubAddress = ANY_OR_OMIT;
single_value->field_ext1 = ANY_OR_OMIT;
single_value->field_subAddressInformation = ANY_OR_OMIT;
}
}
}

void ConnectedSubAddress_template::copy_value(const ConnectedSubAddress& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.spare1__3().is_bound()) {
  if (other_value.spare1__3().ispresent()) single_value->field_spare1__3 = other_value.spare1__3()();
  else single_value->field_spare1__3 = OMIT_VALUE;
} else {
  single_value->field_spare1__3.clean_up();
}
if (other_value.odd__evenIndicator().is_bound()) {
  if (other_value.odd__evenIndicator().ispresent()) single_value->field_odd__evenIndicator = other_value.odd__evenIndicator()();
  else single_value->field_odd__evenIndicator = OMIT_VALUE;
} else {
  single_value->field_odd__evenIndicator.clean_up();
}
if (other_value.typeOfSubAddress().is_bound()) {
  if (other_value.typeOfSubAddress().ispresent()) single_value->field_typeOfSubAddress = other_value.typeOfSubAddress()();
  else single_value->field_typeOfSubAddress = OMIT_VALUE;
} else {
  single_value->field_typeOfSubAddress.clean_up();
}
if (other_value.ext1().is_bound()) {
  if (other_value.ext1().ispresent()) single_value->field_ext1 = other_value.ext1()();
  else single_value->field_ext1 = OMIT_VALUE;
} else {
  single_value->field_ext1.clean_up();
}
if (other_value.subAddressInformation().is_bound()) {
  if (other_value.subAddressInformation().ispresent()) single_value->field_subAddressInformation = other_value.subAddressInformation()();
  else single_value->field_subAddressInformation = OMIT_VALUE;
} else {
  single_value->field_subAddressInformation.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ConnectedSubAddress_template::copy_template(const ConnectedSubAddress_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare1__3().get_selection()) {
single_value->field_spare1__3 = other_value.spare1__3();
} else {
single_value->field_spare1__3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.odd__evenIndicator().get_selection()) {
single_value->field_odd__evenIndicator = other_value.odd__evenIndicator();
} else {
single_value->field_odd__evenIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.typeOfSubAddress().get_selection()) {
single_value->field_typeOfSubAddress = other_value.typeOfSubAddress();
} else {
single_value->field_typeOfSubAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext1().get_selection()) {
single_value->field_ext1 = other_value.ext1();
} else {
single_value->field_ext1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.subAddressInformation().get_selection()) {
single_value->field_subAddressInformation = other_value.subAddressInformation();
} else {
single_value->field_subAddressInformation.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 ConnectedSubAddress_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 ConnectedSubAddress_template(*other_value.implication_.precondition);
implication_.implied_template = new ConnectedSubAddress_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 @MobileL3_CC_Types.ConnectedSubAddress.");
break;
}
set_selection(other_value);
}

ConnectedSubAddress_template::ConnectedSubAddress_template()
{
}

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

ConnectedSubAddress_template::ConnectedSubAddress_template(const ConnectedSubAddress& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ConnectedSubAddress_template::match(const ConnectedSubAddress& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.spare1__3().is_bound()) return FALSE;
if((other_value.spare1__3().ispresent() ? !single_value->field_spare1__3.match((const BITSTRING&)other_value.spare1__3(), legacy) : !single_value->field_spare1__3.match_omit(legacy)))return FALSE;
if(!other_value.odd__evenIndicator().is_bound()) return FALSE;
if((other_value.odd__evenIndicator().ispresent() ? !single_value->field_odd__evenIndicator.match((const BITSTRING&)other_value.odd__evenIndicator(), legacy) : !single_value->field_odd__evenIndicator.match_omit(legacy)))return FALSE;
if(!other_value.typeOfSubAddress().is_bound()) return FALSE;
if((other_value.typeOfSubAddress().ispresent() ? !single_value->field_typeOfSubAddress.match((const BITSTRING&)other_value.typeOfSubAddress(), legacy) : !single_value->field_typeOfSubAddress.match_omit(legacy)))return FALSE;
if(!other_value.ext1().is_bound()) return FALSE;
if((other_value.ext1().ispresent() ? !single_value->field_ext1.match((const BITSTRING&)other_value.ext1(), legacy) : !single_value->field_ext1.match_omit(legacy)))return FALSE;
if(!other_value.subAddressInformation().is_bound()) return FALSE;
if((other_value.subAddressInformation().ispresent() ? !single_value->field_subAddressInformation.match((const OCTETSTRING&)other_value.subAddressInformation(), legacy) : !single_value->field_subAddressInformation.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 @MobileL3_CC_Types.ConnectedSubAddress.");
}
return FALSE;
}

boolean ConnectedSubAddress_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || (single_value->field_spare1__3.is_omit() || single_value->field_spare1__3.is_bound())
 || (single_value->field_odd__evenIndicator.is_omit() || single_value->field_odd__evenIndicator.is_bound())
 || (single_value->field_typeOfSubAddress.is_omit() || single_value->field_typeOfSubAddress.is_bound())
 || (single_value->field_ext1.is_omit() || single_value->field_ext1.is_bound())
 || (single_value->field_subAddressInformation.is_omit() || single_value->field_subAddressInformation.is_bound());
}

boolean ConnectedSubAddress_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && (single_value->field_spare1__3.is_omit() || single_value->field_spare1__3.is_value())
 && (single_value->field_odd__evenIndicator.is_omit() || single_value->field_odd__evenIndicator.is_value())
 && (single_value->field_typeOfSubAddress.is_omit() || single_value->field_typeOfSubAddress.is_value())
 && (single_value->field_ext1.is_omit() || single_value->field_ext1.is_value())
 && (single_value->field_subAddressInformation.is_omit() || single_value->field_subAddressInformation.is_value());
}

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

ConnectedSubAddress ConnectedSubAddress_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 @MobileL3_CC_Types.ConnectedSubAddress.");
ConnectedSubAddress ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_spare1__3.is_omit()) ret_val.spare1__3() = OMIT_VALUE;
else if (single_value->field_spare1__3.is_bound()) {
ret_val.spare1__3() = single_value->field_spare1__3.valueof();
}
if (single_value->field_odd__evenIndicator.is_omit()) ret_val.odd__evenIndicator() = OMIT_VALUE;
else if (single_value->field_odd__evenIndicator.is_bound()) {
ret_val.odd__evenIndicator() = single_value->field_odd__evenIndicator.valueof();
}
if (single_value->field_typeOfSubAddress.is_omit()) ret_val.typeOfSubAddress() = OMIT_VALUE;
else if (single_value->field_typeOfSubAddress.is_bound()) {
ret_val.typeOfSubAddress() = single_value->field_typeOfSubAddress.valueof();
}
if (single_value->field_ext1.is_omit()) ret_val.ext1() = OMIT_VALUE;
else if (single_value->field_ext1.is_bound()) {
ret_val.ext1() = single_value->field_ext1.valueof();
}
if (single_value->field_subAddressInformation.is_omit()) ret_val.subAddressInformation() = OMIT_VALUE;
else if (single_value->field_subAddressInformation.is_bound()) {
ret_val.subAddressInformation() = single_value->field_subAddressInformation.valueof();
}
return ret_val;
}

void ConnectedSubAddress_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 @MobileL3_CC_Types.ConnectedSubAddress.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new ConnectedSubAddress_template[list_length];
}

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

OCTETSTRING_template& ConnectedSubAddress_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& ConnectedSubAddress_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.ConnectedSubAddress.");
return single_value->field_elementIdentifier;
}

INTEGER_template& ConnectedSubAddress_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& ConnectedSubAddress_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.ConnectedSubAddress.");
return single_value->field_lengthIndicator;
}

BITSTRING_template& ConnectedSubAddress_template::spare1__3()
{
set_specific();
return single_value->field_spare1__3;
}

const BITSTRING_template& ConnectedSubAddress_template::spare1__3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare1_3 of a non-specific template of type @MobileL3_CC_Types.ConnectedSubAddress.");
return single_value->field_spare1__3;
}

BITSTRING_template& ConnectedSubAddress_template::odd__evenIndicator()
{
set_specific();
return single_value->field_odd__evenIndicator;
}

const BITSTRING_template& ConnectedSubAddress_template::odd__evenIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field odd_evenIndicator of a non-specific template of type @MobileL3_CC_Types.ConnectedSubAddress.");
return single_value->field_odd__evenIndicator;
}

BITSTRING_template& ConnectedSubAddress_template::typeOfSubAddress()
{
set_specific();
return single_value->field_typeOfSubAddress;
}

const BITSTRING_template& ConnectedSubAddress_template::typeOfSubAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field typeOfSubAddress of a non-specific template of type @MobileL3_CC_Types.ConnectedSubAddress.");
return single_value->field_typeOfSubAddress;
}

BITSTRING_template& ConnectedSubAddress_template::ext1()
{
set_specific();
return single_value->field_ext1;
}

const BITSTRING_template& ConnectedSubAddress_template::ext1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext1 of a non-specific template of type @MobileL3_CC_Types.ConnectedSubAddress.");
return single_value->field_ext1;
}

OCTETSTRING_template& ConnectedSubAddress_template::subAddressInformation()
{
set_specific();
return single_value->field_subAddressInformation;
}

const OCTETSTRING_template& ConnectedSubAddress_template::subAddressInformation() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field subAddressInformation of a non-specific template of type @MobileL3_CC_Types.ConnectedSubAddress.");
return single_value->field_subAddressInformation;
}

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

void ConnectedSubAddress_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", spare1_3 := ");
single_value->field_spare1__3.log();
TTCN_Logger::log_event_str(", odd_evenIndicator := ");
single_value->field_odd__evenIndicator.log();
TTCN_Logger::log_event_str(", typeOfSubAddress := ");
single_value->field_typeOfSubAddress.log();
TTCN_Logger::log_event_str(", ext1 := ");
single_value->field_ext1.log();
TTCN_Logger::log_event_str(", subAddressInformation := ");
single_value->field_subAddressInformation.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 ConnectedSubAddress_template::log_match(const ConnectedSubAddress& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.spare1__3().ispresent()){
if(!single_value->field_spare1__3.match(match_value.spare1__3(), legacy)){
TTCN_Logger::log_logmatch_info(".spare1_3");
single_value->field_spare1__3.log_match(match_value.spare1__3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_spare1__3.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".spare1_3 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_spare1__3.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.odd__evenIndicator().ispresent()){
if(!single_value->field_odd__evenIndicator.match(match_value.odd__evenIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".odd_evenIndicator");
single_value->field_odd__evenIndicator.log_match(match_value.odd__evenIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_odd__evenIndicator.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".odd_evenIndicator := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_odd__evenIndicator.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.typeOfSubAddress().ispresent()){
if(!single_value->field_typeOfSubAddress.match(match_value.typeOfSubAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".typeOfSubAddress");
single_value->field_typeOfSubAddress.log_match(match_value.typeOfSubAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_typeOfSubAddress.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".typeOfSubAddress := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_typeOfSubAddress.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.ext1().ispresent()){
if(!single_value->field_ext1.match(match_value.ext1(), legacy)){
TTCN_Logger::log_logmatch_info(".ext1");
single_value->field_ext1.log_match(match_value.ext1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_ext1.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".ext1 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_ext1.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.subAddressInformation().ispresent()){
if(!single_value->field_subAddressInformation.match(match_value.subAddressInformation(), legacy)){
TTCN_Logger::log_logmatch_info(".subAddressInformation");
single_value->field_subAddressInformation.log_match(match_value.subAddressInformation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_subAddressInformation.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".subAddressInformation := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_subAddressInformation.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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", spare1_3 := ");
if (match_value.spare1__3().ispresent()) {
single_value->field_spare1__3.log_match(match_value.spare1__3(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_spare1__3.log();
if (single_value->field_spare1__3.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", odd_evenIndicator := ");
if (match_value.odd__evenIndicator().ispresent()) {
single_value->field_odd__evenIndicator.log_match(match_value.odd__evenIndicator(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_odd__evenIndicator.log();
if (single_value->field_odd__evenIndicator.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", typeOfSubAddress := ");
if (match_value.typeOfSubAddress().ispresent()) {
single_value->field_typeOfSubAddress.log_match(match_value.typeOfSubAddress(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_typeOfSubAddress.log();
if (single_value->field_typeOfSubAddress.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", ext1 := ");
if (match_value.ext1().ispresent()) {
single_value->field_ext1.log_match(match_value.ext1(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_ext1.log();
if (single_value->field_ext1.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", subAddressInformation := ");
if (match_value.subAddressInformation().ispresent()) {
single_value->field_subAddressInformation.log_match(match_value.subAddressInformation(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_subAddressInformation.log();
if (single_value->field_subAddressInformation.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 ConnectedSubAddress_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (!spare1__3().is_bound()) spare1__3() = OMIT_VALUE;
else spare1__3().set_implicit_omit();
if (!odd__evenIndicator().is_bound()) odd__evenIndicator() = OMIT_VALUE;
else odd__evenIndicator().set_implicit_omit();
if (!typeOfSubAddress().is_bound()) typeOfSubAddress() = OMIT_VALUE;
else typeOfSubAddress().set_implicit_omit();
if (!ext1().is_bound()) ext1() = OMIT_VALUE;
else ext1().set_implicit_omit();
if (!subAddressInformation().is_bound()) subAddressInformation() = OMIT_VALUE;
else subAddressInformation().set_implicit_omit();
}

void ConnectedSubAddress_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_spare1__3.encode_text(text_buf);
single_value->field_odd__evenIndicator.encode_text(text_buf);
single_value->field_typeOfSubAddress.encode_text(text_buf);
single_value->field_ext1.encode_text(text_buf);
single_value->field_subAddressInformation.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 @MobileL3_CC_Types.ConnectedSubAddress.");
}
}

void ConnectedSubAddress_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_spare1__3.decode_text(text_buf);
single_value->field_odd__evenIndicator.decode_text(text_buf);
single_value->field_typeOfSubAddress.decode_text(text_buf);
single_value->field_ext1.decode_text(text_buf);
single_value->field_subAddressInformation.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 ConnectedSubAddress_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 @MobileL3_CC_Types.ConnectedSubAddress.");
}
}

void ConnectedSubAddress_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: {
    ConnectedSubAddress_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 @MobileL3_CC_Types.ConnectedSubAddress 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare1__3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) odd__evenIndicator().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) typeOfSubAddress().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) subAddressInformation().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "odd_evenIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          odd__evenIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "typeOfSubAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          typeOfSubAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "subAddressInformation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          subAddressInformation().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 @MobileL3_CC_Types.ConnectedSubAddress: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    ConnectedSubAddress_template* precondition = new ConnectedSubAddress_template;
    precondition->set_param(*param.get_elem(0));
    ConnectedSubAddress_template* implied_template = new ConnectedSubAddress_template;
    implied_template->set_param(*param.get_elem(1));
    *this = ConnectedSubAddress_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.ConnectedSubAddress");
  }
  is_ifpresent = param.get_ifpresent();
}

void ConnectedSubAddress_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ConnectedSubAddress");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ConnectedSubAddress");
single_value->field_spare1__3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ConnectedSubAddress");
single_value->field_odd__evenIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ConnectedSubAddress");
single_value->field_typeOfSubAddress.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ConnectedSubAddress");
single_value->field_ext1.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ConnectedSubAddress");
single_value->field_subAddressInformation.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ConnectedSubAddress");
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 : "@MobileL3_CC_Types.ConnectedSubAddress");
}

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

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

HLC__octet3::HLC__octet3()
{
}

HLC__octet3::HLC__octet3(const BITSTRING& par_presentationMethod,
    const BITSTRING& par_interpretation,
    const BITSTRING& par_codingStandard,
    const BITSTRING& par_extension__octet__3)
  :   field_presentationMethod(par_presentationMethod),
  field_interpretation(par_interpretation),
  field_codingStandard(par_codingStandard),
  field_extension__octet__3(par_extension__octet__3)
{
}

HLC__octet3::HLC__octet3(const HLC__octet3& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.HLC_octet3.");
if (other_value.presentationMethod().is_bound()) field_presentationMethod = other_value.presentationMethod();
else field_presentationMethod.clean_up();
if (other_value.interpretation().is_bound()) field_interpretation = other_value.interpretation();
else field_interpretation.clean_up();
if (other_value.codingStandard().is_bound()) field_codingStandard = other_value.codingStandard();
else field_codingStandard.clean_up();
if (other_value.extension__octet__3().is_bound()) field_extension__octet__3 = other_value.extension__octet__3();
else field_extension__octet__3.clean_up();
}

void HLC__octet3::clean_up()
{
field_presentationMethod.clean_up();
field_interpretation.clean_up();
field_codingStandard.clean_up();
field_extension__octet__3.clean_up();
}

const TTCN_Typedescriptor_t* HLC__octet3::get_descriptor() const { return &HLC__octet3_descr_; }
HLC__octet3& HLC__octet3::operator=(const HLC__octet3& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.HLC_octet3.");
  if (other_value.presentationMethod().is_bound()) field_presentationMethod = other_value.presentationMethod();
  else field_presentationMethod.clean_up();
  if (other_value.interpretation().is_bound()) field_interpretation = other_value.interpretation();
  else field_interpretation.clean_up();
  if (other_value.codingStandard().is_bound()) field_codingStandard = other_value.codingStandard();
  else field_codingStandard.clean_up();
  if (other_value.extension__octet__3().is_bound()) field_extension__octet__3 = other_value.extension__octet__3();
  else field_extension__octet__3.clean_up();
}
return *this;
}

boolean HLC__octet3::operator==(const HLC__octet3& other_value) const
{
return field_presentationMethod==other_value.field_presentationMethod
  && field_interpretation==other_value.field_interpretation
  && field_codingStandard==other_value.field_codingStandard
  && field_extension__octet__3==other_value.field_extension__octet__3;
}

boolean HLC__octet3::is_bound() const
{
return (field_presentationMethod.is_bound())
  || (field_interpretation.is_bound())
  || (field_codingStandard.is_bound())
  || (field_extension__octet__3.is_bound());
}
boolean HLC__octet3::is_value() const
{
return field_presentationMethod.is_value()
  && field_interpretation.is_value()
  && field_codingStandard.is_value()
  && field_extension__octet__3.is_value();
}
void HLC__octet3::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ presentationMethod := ");
field_presentationMethod.log();
TTCN_Logger::log_event_str(", interpretation := ");
field_interpretation.log();
TTCN_Logger::log_event_str(", codingStandard := ");
field_codingStandard.log();
TTCN_Logger::log_event_str(", extension_octet_3 := ");
field_extension__octet__3.log();
TTCN_Logger::log_event_str(" }");
}

void HLC__octet3::set_implicit_omit()
{
if (presentationMethod().is_bound()) presentationMethod().set_implicit_omit();
if (interpretation().is_bound()) interpretation().set_implicit_omit();
if (codingStandard().is_bound()) codingStandard().set_implicit_omit();
if (extension__octet__3().is_bound()) extension__octet__3().set_implicit_omit();
}

void HLC__octet3::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 @MobileL3_CC_Types.HLC_octet3 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) presentationMethod().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) interpretation().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) codingStandard().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) extension__octet__3().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(), "presentationMethod")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          presentationMethod().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "interpretation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          interpretation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "codingStandard")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          codingStandard().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__3().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 @MobileL3_CC_Types.HLC_octet3: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.HLC_octet3");
  }
}

void HLC__octet3::encode_text(Text_Buf& text_buf) const
{
field_presentationMethod.encode_text(text_buf);
field_interpretation.encode_text(text_buf);
field_codingStandard.encode_text(text_buf);
field_extension__octet__3.encode_text(text_buf);
}

void HLC__octet3::decode_text(Text_Buf& text_buf)
{
field_presentationMethod.decode_text(text_buf);
field_interpretation.decode_text(text_buf);
field_codingStandard.decode_text(text_buf);
field_extension__octet__3.decode_text(text_buf);
}

void HLC__octet3::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 HLC__octet3::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 HLC__octet3::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;
  {
  cbyte* data=p_buf.get_read_data();
  int count=1;
  unsigned mask = 1 << (local_top_order==ORDER_LSB ? 0 : 7);
  if(p_td.raw->extension_bit==EXT_BIT_YES){
    while((data[count-1] & mask)==0 && count*8<(int)limit) count++;
  }
  else{
    while((data[count-1] & mask)!=0 && count*8<(int)limit) count++;
  }
  if(limit) limit=count*8;
  }
  RAW_Force_Omit field_0_force_omit(0, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_presentationMethod.RAW_decode(General__Types::BIT2_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, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_interpretation.RAW_decode(General__Types::BIT3_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, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_codingStandard.RAW_decode(General__Types::BIT2_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__3.RAW_decode(General__Types::BIT1_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 HLC__octet3::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, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT3_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT1_descr_.raw);
  encoded_length += field_presentationMethod.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_interpretation.RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_codingStandard.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_extension__octet__3.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[3]);
  return myleaf.length = encoded_length;
}

struct HLC__octet3_template::single_value_struct {
BITSTRING_template field_presentationMethod;
BITSTRING_template field_interpretation;
BITSTRING_template field_codingStandard;
BITSTRING_template field_extension__octet__3;
};

void HLC__octet3_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_presentationMethod = ANY_VALUE;
single_value->field_interpretation = ANY_VALUE;
single_value->field_codingStandard = ANY_VALUE;
single_value->field_extension__octet__3 = ANY_VALUE;
}
}
}

void HLC__octet3_template::copy_value(const HLC__octet3& other_value)
{
single_value = new single_value_struct;
if (other_value.presentationMethod().is_bound()) {
  single_value->field_presentationMethod = other_value.presentationMethod();
} else {
  single_value->field_presentationMethod.clean_up();
}
if (other_value.interpretation().is_bound()) {
  single_value->field_interpretation = other_value.interpretation();
} else {
  single_value->field_interpretation.clean_up();
}
if (other_value.codingStandard().is_bound()) {
  single_value->field_codingStandard = other_value.codingStandard();
} else {
  single_value->field_codingStandard.clean_up();
}
if (other_value.extension__octet__3().is_bound()) {
  single_value->field_extension__octet__3 = other_value.extension__octet__3();
} else {
  single_value->field_extension__octet__3.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void HLC__octet3_template::copy_template(const HLC__octet3_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.presentationMethod().get_selection()) {
single_value->field_presentationMethod = other_value.presentationMethod();
} else {
single_value->field_presentationMethod.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.interpretation().get_selection()) {
single_value->field_interpretation = other_value.interpretation();
} else {
single_value->field_interpretation.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.codingStandard().get_selection()) {
single_value->field_codingStandard = other_value.codingStandard();
} else {
single_value->field_codingStandard.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__3().get_selection()) {
single_value->field_extension__octet__3 = other_value.extension__octet__3();
} else {
single_value->field_extension__octet__3.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 HLC__octet3_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 HLC__octet3_template(*other_value.implication_.precondition);
implication_.implied_template = new HLC__octet3_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 @MobileL3_CC_Types.HLC_octet3.");
break;
}
set_selection(other_value);
}

HLC__octet3_template::HLC__octet3_template()
{
}

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

HLC__octet3_template::HLC__octet3_template(const HLC__octet3& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean HLC__octet3_template::match(const HLC__octet3& 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.presentationMethod().is_bound()) return FALSE;
if(!single_value->field_presentationMethod.match(other_value.presentationMethod(), legacy))return FALSE;
if(!other_value.interpretation().is_bound()) return FALSE;
if(!single_value->field_interpretation.match(other_value.interpretation(), legacy))return FALSE;
if(!other_value.codingStandard().is_bound()) return FALSE;
if(!single_value->field_codingStandard.match(other_value.codingStandard(), legacy))return FALSE;
if(!other_value.extension__octet__3().is_bound()) return FALSE;
if(!single_value->field_extension__octet__3.match(other_value.extension__octet__3(), 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 @MobileL3_CC_Types.HLC_octet3.");
}
return FALSE;
}

boolean HLC__octet3_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_presentationMethod.is_bound()
 || single_value->field_interpretation.is_bound()
 || single_value->field_codingStandard.is_bound()
 || single_value->field_extension__octet__3.is_bound();
}

boolean HLC__octet3_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_presentationMethod.is_value()
 && single_value->field_interpretation.is_value()
 && single_value->field_codingStandard.is_value()
 && single_value->field_extension__octet__3.is_value();
}

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

HLC__octet3 HLC__octet3_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 @MobileL3_CC_Types.HLC_octet3.");
HLC__octet3 ret_val;
if (single_value->field_presentationMethod.is_bound()) {
ret_val.presentationMethod() = single_value->field_presentationMethod.valueof();
}
if (single_value->field_interpretation.is_bound()) {
ret_val.interpretation() = single_value->field_interpretation.valueof();
}
if (single_value->field_codingStandard.is_bound()) {
ret_val.codingStandard() = single_value->field_codingStandard.valueof();
}
if (single_value->field_extension__octet__3.is_bound()) {
ret_val.extension__octet__3() = single_value->field_extension__octet__3.valueof();
}
return ret_val;
}

void HLC__octet3_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 @MobileL3_CC_Types.HLC_octet3.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new HLC__octet3_template[list_length];
}

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

BITSTRING_template& HLC__octet3_template::presentationMethod()
{
set_specific();
return single_value->field_presentationMethod;
}

const BITSTRING_template& HLC__octet3_template::presentationMethod() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field presentationMethod of a non-specific template of type @MobileL3_CC_Types.HLC_octet3.");
return single_value->field_presentationMethod;
}

BITSTRING_template& HLC__octet3_template::interpretation()
{
set_specific();
return single_value->field_interpretation;
}

const BITSTRING_template& HLC__octet3_template::interpretation() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field interpretation of a non-specific template of type @MobileL3_CC_Types.HLC_octet3.");
return single_value->field_interpretation;
}

BITSTRING_template& HLC__octet3_template::codingStandard()
{
set_specific();
return single_value->field_codingStandard;
}

const BITSTRING_template& HLC__octet3_template::codingStandard() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field codingStandard of a non-specific template of type @MobileL3_CC_Types.HLC_octet3.");
return single_value->field_codingStandard;
}

BITSTRING_template& HLC__octet3_template::extension__octet__3()
{
set_specific();
return single_value->field_extension__octet__3;
}

const BITSTRING_template& HLC__octet3_template::extension__octet__3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_3 of a non-specific template of type @MobileL3_CC_Types.HLC_octet3.");
return single_value->field_extension__octet__3;
}

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

void HLC__octet3_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ presentationMethod := ");
single_value->field_presentationMethod.log();
TTCN_Logger::log_event_str(", interpretation := ");
single_value->field_interpretation.log();
TTCN_Logger::log_event_str(", codingStandard := ");
single_value->field_codingStandard.log();
TTCN_Logger::log_event_str(", extension_octet_3 := ");
single_value->field_extension__octet__3.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 HLC__octet3_template::log_match(const HLC__octet3& 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_presentationMethod.match(match_value.presentationMethod(), legacy)){
TTCN_Logger::log_logmatch_info(".presentationMethod");
single_value->field_presentationMethod.log_match(match_value.presentationMethod(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_interpretation.match(match_value.interpretation(), legacy)){
TTCN_Logger::log_logmatch_info(".interpretation");
single_value->field_interpretation.log_match(match_value.interpretation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_codingStandard.match(match_value.codingStandard(), legacy)){
TTCN_Logger::log_logmatch_info(".codingStandard");
single_value->field_codingStandard.log_match(match_value.codingStandard(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_extension__octet__3.match(match_value.extension__octet__3(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_3");
single_value->field_extension__octet__3.log_match(match_value.extension__octet__3(), 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("{ presentationMethod := ");
single_value->field_presentationMethod.log_match(match_value.presentationMethod(), legacy);
TTCN_Logger::log_event_str(", interpretation := ");
single_value->field_interpretation.log_match(match_value.interpretation(), legacy);
TTCN_Logger::log_event_str(", codingStandard := ");
single_value->field_codingStandard.log_match(match_value.codingStandard(), legacy);
TTCN_Logger::log_event_str(", extension_octet_3 := ");
single_value->field_extension__octet__3.log_match(match_value.extension__octet__3(), 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 HLC__octet3_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (presentationMethod().is_bound()) presentationMethod().set_implicit_omit();
if (interpretation().is_bound()) interpretation().set_implicit_omit();
if (codingStandard().is_bound()) codingStandard().set_implicit_omit();
if (extension__octet__3().is_bound()) extension__octet__3().set_implicit_omit();
}

void HLC__octet3_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_presentationMethod.encode_text(text_buf);
single_value->field_interpretation.encode_text(text_buf);
single_value->field_codingStandard.encode_text(text_buf);
single_value->field_extension__octet__3.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 @MobileL3_CC_Types.HLC_octet3.");
}
}

void HLC__octet3_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_presentationMethod.decode_text(text_buf);
single_value->field_interpretation.decode_text(text_buf);
single_value->field_codingStandard.decode_text(text_buf);
single_value->field_extension__octet__3.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 HLC__octet3_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 @MobileL3_CC_Types.HLC_octet3.");
}
}

void HLC__octet3_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: {
    HLC__octet3_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 @MobileL3_CC_Types.HLC_octet3 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) presentationMethod().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) interpretation().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) codingStandard().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) extension__octet__3().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(), "presentationMethod")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          presentationMethod().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "interpretation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          interpretation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "codingStandard")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          codingStandard().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__3().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 @MobileL3_CC_Types.HLC_octet3: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    HLC__octet3_template* precondition = new HLC__octet3_template;
    precondition->set_param(*param.get_elem(0));
    HLC__octet3_template* implied_template = new HLC__octet3_template;
    implied_template->set_param(*param.get_elem(1));
    *this = HLC__octet3_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.HLC_octet3");
  }
  is_ifpresent = param.get_ifpresent();
}

void HLC__octet3_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_presentationMethod.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.HLC_octet3");
single_value->field_interpretation.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.HLC_octet3");
single_value->field_codingStandard.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.HLC_octet3");
single_value->field_extension__octet__3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.HLC_octet3");
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 : "@MobileL3_CC_Types.HLC_octet3");
}

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

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

HLC__octet4::HLC__octet4()
{
}

HLC__octet4::HLC__octet4(const BITSTRING& par_highLayerCharId,
    const BITSTRING& par_extension__octet__4,
    const OPTIONAL< BITSTRING >& par_extendedHighLayerCharId,
    const OPTIONAL< BITSTRING >& par_extension__octet__4a)
  :   field_highLayerCharId(par_highLayerCharId),
  field_extension__octet__4(par_extension__octet__4),
  field_extendedHighLayerCharId(par_extendedHighLayerCharId),
  field_extension__octet__4a(par_extension__octet__4a)
{
}

HLC__octet4::HLC__octet4(const HLC__octet4& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.HLC_octet4.");
if (other_value.highLayerCharId().is_bound()) field_highLayerCharId = other_value.highLayerCharId();
else field_highLayerCharId.clean_up();
if (other_value.extension__octet__4().is_bound()) field_extension__octet__4 = other_value.extension__octet__4();
else field_extension__octet__4.clean_up();
if (other_value.extendedHighLayerCharId().is_bound()) field_extendedHighLayerCharId = other_value.extendedHighLayerCharId();
else field_extendedHighLayerCharId.clean_up();
if (other_value.extension__octet__4a().is_bound()) field_extension__octet__4a = other_value.extension__octet__4a();
else field_extension__octet__4a.clean_up();
}

void HLC__octet4::clean_up()
{
field_highLayerCharId.clean_up();
field_extension__octet__4.clean_up();
field_extendedHighLayerCharId.clean_up();
field_extension__octet__4a.clean_up();
}

const TTCN_Typedescriptor_t* HLC__octet4::get_descriptor() const { return &HLC__octet4_descr_; }
HLC__octet4& HLC__octet4::operator=(const HLC__octet4& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.HLC_octet4.");
  if (other_value.highLayerCharId().is_bound()) field_highLayerCharId = other_value.highLayerCharId();
  else field_highLayerCharId.clean_up();
  if (other_value.extension__octet__4().is_bound()) field_extension__octet__4 = other_value.extension__octet__4();
  else field_extension__octet__4.clean_up();
  if (other_value.extendedHighLayerCharId().is_bound()) field_extendedHighLayerCharId = other_value.extendedHighLayerCharId();
  else field_extendedHighLayerCharId.clean_up();
  if (other_value.extension__octet__4a().is_bound()) field_extension__octet__4a = other_value.extension__octet__4a();
  else field_extension__octet__4a.clean_up();
}
return *this;
}

boolean HLC__octet4::operator==(const HLC__octet4& other_value) const
{
return field_highLayerCharId==other_value.field_highLayerCharId
  && field_extension__octet__4==other_value.field_extension__octet__4
  && field_extendedHighLayerCharId==other_value.field_extendedHighLayerCharId
  && field_extension__octet__4a==other_value.field_extension__octet__4a;
}

boolean HLC__octet4::is_bound() const
{
return (field_highLayerCharId.is_bound())
  || (field_extension__octet__4.is_bound())
  || (OPTIONAL_OMIT == field_extendedHighLayerCharId.get_selection() || field_extendedHighLayerCharId.is_bound())
  || (OPTIONAL_OMIT == field_extension__octet__4a.get_selection() || field_extension__octet__4a.is_bound());
}
boolean HLC__octet4::is_value() const
{
return field_highLayerCharId.is_value()
  && field_extension__octet__4.is_value()
  && (OPTIONAL_OMIT == field_extendedHighLayerCharId.get_selection() || field_extendedHighLayerCharId.is_value())
  && (OPTIONAL_OMIT == field_extension__octet__4a.get_selection() || field_extension__octet__4a.is_value());
}
int HLC__octet4::size_of() const
{
  int ret_val = 2;
  if (field_extendedHighLayerCharId.ispresent()) ret_val++;
  if (field_extension__octet__4a.ispresent()) ret_val++;
  return ret_val;
}

void HLC__octet4::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ highLayerCharId := ");
field_highLayerCharId.log();
TTCN_Logger::log_event_str(", extension_octet_4 := ");
field_extension__octet__4.log();
TTCN_Logger::log_event_str(", extendedHighLayerCharId := ");
field_extendedHighLayerCharId.log();
TTCN_Logger::log_event_str(", extension_octet_4a := ");
field_extension__octet__4a.log();
TTCN_Logger::log_event_str(" }");
}

void HLC__octet4::set_implicit_omit()
{
if (highLayerCharId().is_bound()) highLayerCharId().set_implicit_omit();
if (extension__octet__4().is_bound()) extension__octet__4().set_implicit_omit();
if (!extendedHighLayerCharId().is_bound()) extendedHighLayerCharId() = OMIT_VALUE;
else extendedHighLayerCharId().set_implicit_omit();
if (!extension__octet__4a().is_bound()) extension__octet__4a() = OMIT_VALUE;
else extension__octet__4a().set_implicit_omit();
}

void HLC__octet4::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 @MobileL3_CC_Types.HLC_octet4 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) highLayerCharId().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) extension__octet__4().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) extendedHighLayerCharId().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) extension__octet__4a().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(), "highLayerCharId")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          highLayerCharId().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__4().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extendedHighLayerCharId")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extendedHighLayerCharId().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_4a")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__4a().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 @MobileL3_CC_Types.HLC_octet4: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.HLC_octet4");
  }
}

void HLC__octet4::encode_text(Text_Buf& text_buf) const
{
field_highLayerCharId.encode_text(text_buf);
field_extension__octet__4.encode_text(text_buf);
field_extendedHighLayerCharId.encode_text(text_buf);
field_extension__octet__4a.encode_text(text_buf);
}

void HLC__octet4::decode_text(Text_Buf& text_buf)
{
field_highLayerCharId.decode_text(text_buf);
field_extension__octet__4.decode_text(text_buf);
field_extendedHighLayerCharId.decode_text(text_buf);
field_extension__octet__4a.decode_text(text_buf);
}

void HLC__octet4::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 HLC__octet4::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 HLC__octet4::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;
  {
  cbyte* data=p_buf.get_read_data();
  int count=1;
  unsigned mask = 1 << (local_top_order==ORDER_LSB ? 0 : 7);
  if(p_td.raw->extension_bit==EXT_BIT_YES){
    while((data[count-1] & mask)==0 && count*8<(int)limit) count++;
  }
  else{
    while((data[count-1] & mask)!=0 && count*8<(int)limit) count++;
  }
  if(limit) limit=count*8;
  }
  RAW_Force_Omit field_0_force_omit(0, force_omit, General__Types::BIT7_descr_.raw->forceomit);
  decoded_field_length = field_highLayerCharId.RAW_decode(General__Types::BIT7_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__4.RAW_decode(General__Types::BIT1_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());
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_extendedHighLayerCharId = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, General__Types::BIT7_descr_.raw->forceomit);
  decoded_field_length = field_extendedHighLayerCharId().RAW_decode(General__Types::BIT7_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_extendedHighLayerCharId = 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_extendedHighLayerCharId=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_extension__octet__4a = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_extension__octet__4a().RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_extension__octet__4a = 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_extension__octet__4a=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int HLC__octet4::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, General__Types::BIT7_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT1_descr_.raw);
  if (field_extendedHighLayerCharId.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT7_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_extension__octet__4a.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  encoded_length += field_highLayerCharId.RAW_encode(General__Types::BIT7_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_extension__octet__4.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[1]);
  if (field_extendedHighLayerCharId.ispresent()) {
  encoded_length += field_extendedHighLayerCharId().RAW_encode(General__Types::BIT7_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_extension__octet__4a.ispresent()) {
  encoded_length += field_extension__octet__4a().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[3]);
  }
  return myleaf.length = encoded_length;
}

struct HLC__octet4_template::single_value_struct {
BITSTRING_template field_highLayerCharId;
BITSTRING_template field_extension__octet__4;
BITSTRING_template field_extendedHighLayerCharId;
BITSTRING_template field_extension__octet__4a;
};

void HLC__octet4_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_highLayerCharId = ANY_VALUE;
single_value->field_extension__octet__4 = ANY_VALUE;
single_value->field_extendedHighLayerCharId = ANY_OR_OMIT;
single_value->field_extension__octet__4a = ANY_OR_OMIT;
}
}
}

void HLC__octet4_template::copy_value(const HLC__octet4& other_value)
{
single_value = new single_value_struct;
if (other_value.highLayerCharId().is_bound()) {
  single_value->field_highLayerCharId = other_value.highLayerCharId();
} else {
  single_value->field_highLayerCharId.clean_up();
}
if (other_value.extension__octet__4().is_bound()) {
  single_value->field_extension__octet__4 = other_value.extension__octet__4();
} else {
  single_value->field_extension__octet__4.clean_up();
}
if (other_value.extendedHighLayerCharId().is_bound()) {
  if (other_value.extendedHighLayerCharId().ispresent()) single_value->field_extendedHighLayerCharId = other_value.extendedHighLayerCharId()();
  else single_value->field_extendedHighLayerCharId = OMIT_VALUE;
} else {
  single_value->field_extendedHighLayerCharId.clean_up();
}
if (other_value.extension__octet__4a().is_bound()) {
  if (other_value.extension__octet__4a().ispresent()) single_value->field_extension__octet__4a = other_value.extension__octet__4a()();
  else single_value->field_extension__octet__4a = OMIT_VALUE;
} else {
  single_value->field_extension__octet__4a.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void HLC__octet4_template::copy_template(const HLC__octet4_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.highLayerCharId().get_selection()) {
single_value->field_highLayerCharId = other_value.highLayerCharId();
} else {
single_value->field_highLayerCharId.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__4().get_selection()) {
single_value->field_extension__octet__4 = other_value.extension__octet__4();
} else {
single_value->field_extension__octet__4.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extendedHighLayerCharId().get_selection()) {
single_value->field_extendedHighLayerCharId = other_value.extendedHighLayerCharId();
} else {
single_value->field_extendedHighLayerCharId.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.extension__octet__4a().get_selection()) {
single_value->field_extension__octet__4a = other_value.extension__octet__4a();
} else {
single_value->field_extension__octet__4a.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 HLC__octet4_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 HLC__octet4_template(*other_value.implication_.precondition);
implication_.implied_template = new HLC__octet4_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 @MobileL3_CC_Types.HLC_octet4.");
break;
}
set_selection(other_value);
}

HLC__octet4_template::HLC__octet4_template()
{
}

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

HLC__octet4_template::HLC__octet4_template(const HLC__octet4& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean HLC__octet4_template::match(const HLC__octet4& 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.highLayerCharId().is_bound()) return FALSE;
if(!single_value->field_highLayerCharId.match(other_value.highLayerCharId(), legacy))return FALSE;
if(!other_value.extension__octet__4().is_bound()) return FALSE;
if(!single_value->field_extension__octet__4.match(other_value.extension__octet__4(), legacy))return FALSE;
if(!other_value.extendedHighLayerCharId().is_bound()) return FALSE;
if((other_value.extendedHighLayerCharId().ispresent() ? !single_value->field_extendedHighLayerCharId.match((const BITSTRING&)other_value.extendedHighLayerCharId(), legacy) : !single_value->field_extendedHighLayerCharId.match_omit(legacy)))return FALSE;
if(!other_value.extension__octet__4a().is_bound()) return FALSE;
if((other_value.extension__octet__4a().ispresent() ? !single_value->field_extension__octet__4a.match((const BITSTRING&)other_value.extension__octet__4a(), legacy) : !single_value->field_extension__octet__4a.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 @MobileL3_CC_Types.HLC_octet4.");
}
return FALSE;
}

boolean HLC__octet4_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_highLayerCharId.is_bound()
 || single_value->field_extension__octet__4.is_bound()
 || (single_value->field_extendedHighLayerCharId.is_omit() || single_value->field_extendedHighLayerCharId.is_bound())
 || (single_value->field_extension__octet__4a.is_omit() || single_value->field_extension__octet__4a.is_bound());
}

boolean HLC__octet4_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_highLayerCharId.is_value()
 && single_value->field_extension__octet__4.is_value()
 && (single_value->field_extendedHighLayerCharId.is_omit() || single_value->field_extendedHighLayerCharId.is_value())
 && (single_value->field_extension__octet__4a.is_omit() || single_value->field_extension__octet__4a.is_value());
}

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

HLC__octet4 HLC__octet4_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 @MobileL3_CC_Types.HLC_octet4.");
HLC__octet4 ret_val;
if (single_value->field_highLayerCharId.is_bound()) {
ret_val.highLayerCharId() = single_value->field_highLayerCharId.valueof();
}
if (single_value->field_extension__octet__4.is_bound()) {
ret_val.extension__octet__4() = single_value->field_extension__octet__4.valueof();
}
if (single_value->field_extendedHighLayerCharId.is_omit()) ret_val.extendedHighLayerCharId() = OMIT_VALUE;
else if (single_value->field_extendedHighLayerCharId.is_bound()) {
ret_val.extendedHighLayerCharId() = single_value->field_extendedHighLayerCharId.valueof();
}
if (single_value->field_extension__octet__4a.is_omit()) ret_val.extension__octet__4a() = OMIT_VALUE;
else if (single_value->field_extension__octet__4a.is_bound()) {
ret_val.extension__octet__4a() = single_value->field_extension__octet__4a.valueof();
}
return ret_val;
}

void HLC__octet4_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 @MobileL3_CC_Types.HLC_octet4.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new HLC__octet4_template[list_length];
}

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

BITSTRING_template& HLC__octet4_template::highLayerCharId()
{
set_specific();
return single_value->field_highLayerCharId;
}

const BITSTRING_template& HLC__octet4_template::highLayerCharId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field highLayerCharId of a non-specific template of type @MobileL3_CC_Types.HLC_octet4.");
return single_value->field_highLayerCharId;
}

BITSTRING_template& HLC__octet4_template::extension__octet__4()
{
set_specific();
return single_value->field_extension__octet__4;
}

const BITSTRING_template& HLC__octet4_template::extension__octet__4() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_4 of a non-specific template of type @MobileL3_CC_Types.HLC_octet4.");
return single_value->field_extension__octet__4;
}

BITSTRING_template& HLC__octet4_template::extendedHighLayerCharId()
{
set_specific();
return single_value->field_extendedHighLayerCharId;
}

const BITSTRING_template& HLC__octet4_template::extendedHighLayerCharId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extendedHighLayerCharId of a non-specific template of type @MobileL3_CC_Types.HLC_octet4.");
return single_value->field_extendedHighLayerCharId;
}

BITSTRING_template& HLC__octet4_template::extension__octet__4a()
{
set_specific();
return single_value->field_extension__octet__4a;
}

const BITSTRING_template& HLC__octet4_template::extension__octet__4a() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field extension_octet_4a of a non-specific template of type @MobileL3_CC_Types.HLC_octet4.");
return single_value->field_extension__octet__4a;
}

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

void HLC__octet4_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ highLayerCharId := ");
single_value->field_highLayerCharId.log();
TTCN_Logger::log_event_str(", extension_octet_4 := ");
single_value->field_extension__octet__4.log();
TTCN_Logger::log_event_str(", extendedHighLayerCharId := ");
single_value->field_extendedHighLayerCharId.log();
TTCN_Logger::log_event_str(", extension_octet_4a := ");
single_value->field_extension__octet__4a.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 HLC__octet4_template::log_match(const HLC__octet4& 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_highLayerCharId.match(match_value.highLayerCharId(), legacy)){
TTCN_Logger::log_logmatch_info(".highLayerCharId");
single_value->field_highLayerCharId.log_match(match_value.highLayerCharId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_extension__octet__4.match(match_value.extension__octet__4(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_4");
single_value->field_extension__octet__4.log_match(match_value.extension__octet__4(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.extendedHighLayerCharId().ispresent()){
if(!single_value->field_extendedHighLayerCharId.match(match_value.extendedHighLayerCharId(), legacy)){
TTCN_Logger::log_logmatch_info(".extendedHighLayerCharId");
single_value->field_extendedHighLayerCharId.log_match(match_value.extendedHighLayerCharId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_extendedHighLayerCharId.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".extendedHighLayerCharId := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_extendedHighLayerCharId.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.extension__octet__4a().ispresent()){
if(!single_value->field_extension__octet__4a.match(match_value.extension__octet__4a(), legacy)){
TTCN_Logger::log_logmatch_info(".extension_octet_4a");
single_value->field_extension__octet__4a.log_match(match_value.extension__octet__4a(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_extension__octet__4a.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".extension_octet_4a := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_extension__octet__4a.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("{ highLayerCharId := ");
single_value->field_highLayerCharId.log_match(match_value.highLayerCharId(), legacy);
TTCN_Logger::log_event_str(", extension_octet_4 := ");
single_value->field_extension__octet__4.log_match(match_value.extension__octet__4(), legacy);
TTCN_Logger::log_event_str(", extendedHighLayerCharId := ");
if (match_value.extendedHighLayerCharId().ispresent()) {
single_value->field_extendedHighLayerCharId.log_match(match_value.extendedHighLayerCharId(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_extendedHighLayerCharId.log();
if (single_value->field_extendedHighLayerCharId.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", extension_octet_4a := ");
if (match_value.extension__octet__4a().ispresent()) {
single_value->field_extension__octet__4a.log_match(match_value.extension__octet__4a(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_extension__octet__4a.log();
if (single_value->field_extension__octet__4a.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 HLC__octet4_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (highLayerCharId().is_bound()) highLayerCharId().set_implicit_omit();
if (extension__octet__4().is_bound()) extension__octet__4().set_implicit_omit();
if (!extendedHighLayerCharId().is_bound()) extendedHighLayerCharId() = OMIT_VALUE;
else extendedHighLayerCharId().set_implicit_omit();
if (!extension__octet__4a().is_bound()) extension__octet__4a() = OMIT_VALUE;
else extension__octet__4a().set_implicit_omit();
}

void HLC__octet4_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_highLayerCharId.encode_text(text_buf);
single_value->field_extension__octet__4.encode_text(text_buf);
single_value->field_extendedHighLayerCharId.encode_text(text_buf);
single_value->field_extension__octet__4a.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 @MobileL3_CC_Types.HLC_octet4.");
}
}

void HLC__octet4_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_highLayerCharId.decode_text(text_buf);
single_value->field_extension__octet__4.decode_text(text_buf);
single_value->field_extendedHighLayerCharId.decode_text(text_buf);
single_value->field_extension__octet__4a.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 HLC__octet4_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 @MobileL3_CC_Types.HLC_octet4.");
}
}

void HLC__octet4_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: {
    HLC__octet4_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 @MobileL3_CC_Types.HLC_octet4 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) highLayerCharId().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) extension__octet__4().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) extendedHighLayerCharId().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) extension__octet__4a().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(), "highLayerCharId")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          highLayerCharId().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__4().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extendedHighLayerCharId")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extendedHighLayerCharId().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "extension_octet_4a")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          extension__octet__4a().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 @MobileL3_CC_Types.HLC_octet4: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    HLC__octet4_template* precondition = new HLC__octet4_template;
    precondition->set_param(*param.get_elem(0));
    HLC__octet4_template* implied_template = new HLC__octet4_template;
    implied_template->set_param(*param.get_elem(1));
    *this = HLC__octet4_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.HLC_octet4");
  }
  is_ifpresent = param.get_ifpresent();
}

void HLC__octet4_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_highLayerCharId.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.HLC_octet4");
single_value->field_extension__octet__4.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.HLC_octet4");
single_value->field_extendedHighLayerCharId.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.HLC_octet4");
single_value->field_extension__octet__4a.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.HLC_octet4");
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 : "@MobileL3_CC_Types.HLC_octet4");
}

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

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

HighLayerCompatibility::HighLayerCompatibility()
{
}

HighLayerCompatibility::HighLayerCompatibility(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const OPTIONAL< HLC__octet3 >& par_octet3,
    const OPTIONAL< HLC__octet4 >& par_octet4)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_octet3(par_octet3),
  field_octet4(par_octet4)
{
}

HighLayerCompatibility::HighLayerCompatibility(const HighLayerCompatibility& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.HighLayerCompatibility.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.octet3().is_bound()) field_octet3 = other_value.octet3();
else field_octet3.clean_up();
if (other_value.octet4().is_bound()) field_octet4 = other_value.octet4();
else field_octet4.clean_up();
}

void HighLayerCompatibility::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_octet3.clean_up();
field_octet4.clean_up();
}

const TTCN_Typedescriptor_t* HighLayerCompatibility::get_descriptor() const { return &HighLayerCompatibility_descr_; }
HighLayerCompatibility& HighLayerCompatibility::operator=(const HighLayerCompatibility& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.HighLayerCompatibility.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.octet3().is_bound()) field_octet3 = other_value.octet3();
  else field_octet3.clean_up();
  if (other_value.octet4().is_bound()) field_octet4 = other_value.octet4();
  else field_octet4.clean_up();
}
return *this;
}

boolean HighLayerCompatibility::operator==(const HighLayerCompatibility& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_octet3==other_value.field_octet3
  && field_octet4==other_value.field_octet4;
}

boolean HighLayerCompatibility::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (OPTIONAL_OMIT == field_octet3.get_selection() || field_octet3.is_bound())
  || (OPTIONAL_OMIT == field_octet4.get_selection() || field_octet4.is_bound());
}
boolean HighLayerCompatibility::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && (OPTIONAL_OMIT == field_octet3.get_selection() || field_octet3.is_value())
  && (OPTIONAL_OMIT == field_octet4.get_selection() || field_octet4.is_value());
}
int HighLayerCompatibility::size_of() const
{
  int ret_val = 2;
  if (field_octet3.ispresent()) ret_val++;
  if (field_octet4.ispresent()) ret_val++;
  return ret_val;
}

void HighLayerCompatibility::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", octet3 := ");
field_octet3.log();
TTCN_Logger::log_event_str(", octet4 := ");
field_octet4.log();
TTCN_Logger::log_event_str(" }");
}

void HighLayerCompatibility::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (!octet3().is_bound()) octet3() = OMIT_VALUE;
else octet3().set_implicit_omit();
if (!octet4().is_bound()) octet4() = OMIT_VALUE;
else octet4().set_implicit_omit();
}

void HighLayerCompatibility::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 @MobileL3_CC_Types.HighLayerCompatibility 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) octet3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) octet4().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet4().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 @MobileL3_CC_Types.HighLayerCompatibility: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.HighLayerCompatibility");
  }
}

void HighLayerCompatibility::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_octet3.encode_text(text_buf);
field_octet4.encode_text(text_buf);
}

void HighLayerCompatibility::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_octet3.decode_text(text_buf);
field_octet4.decode_text(text_buf);
}

void HighLayerCompatibility::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 HighLayerCompatibility::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 HighLayerCompatibility::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, HighLayerCompatibility_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(HighLayerCompatibility_lengthIndicator_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_lengthIndicator.convert_to_Integer(HighLayerCompatibility_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_octet3 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, HLC__octet3_descr_.raw->forceomit);
  decoded_field_length = field_octet3().RAW_decode(HLC__octet3_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_octet3 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_octet3=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_octet4 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, HLC__octet4_descr_.raw->forceomit);
  decoded_field_length = field_octet4().RAW_decode(HLC__octet4_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_octet4 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_octet4=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int HighLayerCompatibility::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, HighLayerCompatibility_lengthIndicator_descr_.raw);
  if (field_octet3.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, HLC__octet3_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_octet4.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, HLC__octet4_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &HighLayerCompatibility_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 2;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(2);
  myleaf.body.node.nodes[1]->length = 8;
  if (field_octet3.ispresent()) {
  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;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = 0;
  }
  if (field_octet4.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = 0;
  }
  if (field_octet3.ispresent()) {
  encoded_length += field_octet3().RAW_encode(HLC__octet3_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_octet4.ispresent()) {
  encoded_length += field_octet4().RAW_encode(HLC__octet4_descr_, *myleaf.body.node.nodes[3]);
  }
  return myleaf.length = encoded_length;
}

struct HighLayerCompatibility_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
HLC__octet3_template field_octet3;
HLC__octet4_template field_octet4;
};

void HighLayerCompatibility_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_octet3 = ANY_OR_OMIT;
single_value->field_octet4 = ANY_OR_OMIT;
}
}
}

void HighLayerCompatibility_template::copy_value(const HighLayerCompatibility& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.octet3().is_bound()) {
  if (other_value.octet3().ispresent()) single_value->field_octet3 = other_value.octet3()();
  else single_value->field_octet3 = OMIT_VALUE;
} else {
  single_value->field_octet3.clean_up();
}
if (other_value.octet4().is_bound()) {
  if (other_value.octet4().ispresent()) single_value->field_octet4 = other_value.octet4()();
  else single_value->field_octet4 = OMIT_VALUE;
} else {
  single_value->field_octet4.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void HighLayerCompatibility_template::copy_template(const HighLayerCompatibility_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet3().get_selection()) {
single_value->field_octet3 = other_value.octet3();
} else {
single_value->field_octet3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.octet4().get_selection()) {
single_value->field_octet4 = other_value.octet4();
} else {
single_value->field_octet4.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 HighLayerCompatibility_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 HighLayerCompatibility_template(*other_value.implication_.precondition);
implication_.implied_template = new HighLayerCompatibility_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 @MobileL3_CC_Types.HighLayerCompatibility.");
break;
}
set_selection(other_value);
}

HighLayerCompatibility_template::HighLayerCompatibility_template()
{
}

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

HighLayerCompatibility_template::HighLayerCompatibility_template(const HighLayerCompatibility& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean HighLayerCompatibility_template::match(const HighLayerCompatibility& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.octet3().is_bound()) return FALSE;
if((other_value.octet3().ispresent() ? !single_value->field_octet3.match((const HLC__octet3&)other_value.octet3(), legacy) : !single_value->field_octet3.match_omit(legacy)))return FALSE;
if(!other_value.octet4().is_bound()) return FALSE;
if((other_value.octet4().ispresent() ? !single_value->field_octet4.match((const HLC__octet4&)other_value.octet4(), legacy) : !single_value->field_octet4.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 @MobileL3_CC_Types.HighLayerCompatibility.");
}
return FALSE;
}

boolean HighLayerCompatibility_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || (single_value->field_octet3.is_omit() || single_value->field_octet3.is_bound())
 || (single_value->field_octet4.is_omit() || single_value->field_octet4.is_bound());
}

boolean HighLayerCompatibility_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && (single_value->field_octet3.is_omit() || single_value->field_octet3.is_value())
 && (single_value->field_octet4.is_omit() || single_value->field_octet4.is_value());
}

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

HighLayerCompatibility HighLayerCompatibility_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 @MobileL3_CC_Types.HighLayerCompatibility.");
HighLayerCompatibility ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_octet3.is_omit()) ret_val.octet3() = OMIT_VALUE;
else if (single_value->field_octet3.is_bound()) {
ret_val.octet3() = single_value->field_octet3.valueof();
}
if (single_value->field_octet4.is_omit()) ret_val.octet4() = OMIT_VALUE;
else if (single_value->field_octet4.is_bound()) {
ret_val.octet4() = single_value->field_octet4.valueof();
}
return ret_val;
}

void HighLayerCompatibility_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 @MobileL3_CC_Types.HighLayerCompatibility.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new HighLayerCompatibility_template[list_length];
}

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

OCTETSTRING_template& HighLayerCompatibility_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& HighLayerCompatibility_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.HighLayerCompatibility.");
return single_value->field_elementIdentifier;
}

INTEGER_template& HighLayerCompatibility_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& HighLayerCompatibility_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.HighLayerCompatibility.");
return single_value->field_lengthIndicator;
}

HLC__octet3_template& HighLayerCompatibility_template::octet3()
{
set_specific();
return single_value->field_octet3;
}

const HLC__octet3_template& HighLayerCompatibility_template::octet3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet3 of a non-specific template of type @MobileL3_CC_Types.HighLayerCompatibility.");
return single_value->field_octet3;
}

HLC__octet4_template& HighLayerCompatibility_template::octet4()
{
set_specific();
return single_value->field_octet4;
}

const HLC__octet4_template& HighLayerCompatibility_template::octet4() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field octet4 of a non-specific template of type @MobileL3_CC_Types.HighLayerCompatibility.");
return single_value->field_octet4;
}

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

void HighLayerCompatibility_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", octet3 := ");
single_value->field_octet3.log();
TTCN_Logger::log_event_str(", octet4 := ");
single_value->field_octet4.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 HighLayerCompatibility_template::log_match(const HighLayerCompatibility& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.octet3().ispresent()){
if(!single_value->field_octet3.match(match_value.octet3(), legacy)){
TTCN_Logger::log_logmatch_info(".octet3");
single_value->field_octet3.log_match(match_value.octet3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_octet3.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".octet3 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_octet3.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.octet4().ispresent()){
if(!single_value->field_octet4.match(match_value.octet4(), legacy)){
TTCN_Logger::log_logmatch_info(".octet4");
single_value->field_octet4.log_match(match_value.octet4(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_octet4.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".octet4 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_octet4.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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", octet3 := ");
if (match_value.octet3().ispresent()) {
single_value->field_octet3.log_match(match_value.octet3(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_octet3.log();
if (single_value->field_octet3.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", octet4 := ");
if (match_value.octet4().ispresent()) {
single_value->field_octet4.log_match(match_value.octet4(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_octet4.log();
if (single_value->field_octet4.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 HighLayerCompatibility_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (!octet3().is_bound()) octet3() = OMIT_VALUE;
else octet3().set_implicit_omit();
if (!octet4().is_bound()) octet4() = OMIT_VALUE;
else octet4().set_implicit_omit();
}

void HighLayerCompatibility_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_octet3.encode_text(text_buf);
single_value->field_octet4.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 @MobileL3_CC_Types.HighLayerCompatibility.");
}
}

void HighLayerCompatibility_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_octet3.decode_text(text_buf);
single_value->field_octet4.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 HighLayerCompatibility_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 @MobileL3_CC_Types.HighLayerCompatibility.");
}
}

void HighLayerCompatibility_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: {
    HighLayerCompatibility_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 @MobileL3_CC_Types.HighLayerCompatibility 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) octet3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) octet4().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "octet4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          octet4().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 @MobileL3_CC_Types.HighLayerCompatibility: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    HighLayerCompatibility_template* precondition = new HighLayerCompatibility_template;
    precondition->set_param(*param.get_elem(0));
    HighLayerCompatibility_template* implied_template = new HighLayerCompatibility_template;
    implied_template->set_param(*param.get_elem(1));
    *this = HighLayerCompatibility_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.HighLayerCompatibility");
  }
  is_ifpresent = param.get_ifpresent();
}

void HighLayerCompatibility_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.HighLayerCompatibility");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.HighLayerCompatibility");
single_value->field_octet3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.HighLayerCompatibility");
single_value->field_octet4.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.HighLayerCompatibility");
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 : "@MobileL3_CC_Types.HighLayerCompatibility");
}

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

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

KeypadFacility::KeypadFacility()
{
}

KeypadFacility::KeypadFacility(const OCTETSTRING& par_elementIdentifier,
    const BITSTRING& par_keypadInformation,
    const BITSTRING& par_spare__1)
  :   field_elementIdentifier(par_elementIdentifier),
  field_keypadInformation(par_keypadInformation),
  field_spare__1(par_spare__1)
{
}

KeypadFacility::KeypadFacility(const KeypadFacility& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.KeypadFacility.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.keypadInformation().is_bound()) field_keypadInformation = other_value.keypadInformation();
else field_keypadInformation.clean_up();
if (other_value.spare__1().is_bound()) field_spare__1 = other_value.spare__1();
else field_spare__1.clean_up();
}

void KeypadFacility::clean_up()
{
field_elementIdentifier.clean_up();
field_keypadInformation.clean_up();
field_spare__1.clean_up();
}

const TTCN_Typedescriptor_t* KeypadFacility::get_descriptor() const { return &KeypadFacility_descr_; }
KeypadFacility& KeypadFacility::operator=(const KeypadFacility& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.KeypadFacility.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.keypadInformation().is_bound()) field_keypadInformation = other_value.keypadInformation();
  else field_keypadInformation.clean_up();
  if (other_value.spare__1().is_bound()) field_spare__1 = other_value.spare__1();
  else field_spare__1.clean_up();
}
return *this;
}

boolean KeypadFacility::operator==(const KeypadFacility& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_keypadInformation==other_value.field_keypadInformation
  && field_spare__1==other_value.field_spare__1;
}

boolean KeypadFacility::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_keypadInformation.is_bound())
  || (field_spare__1.is_bound());
}
boolean KeypadFacility::is_value() const
{
return field_elementIdentifier.is_value()
  && field_keypadInformation.is_value()
  && field_spare__1.is_value();
}
void KeypadFacility::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", keypadInformation := ");
field_keypadInformation.log();
TTCN_Logger::log_event_str(", spare_1 := ");
field_spare__1.log();
TTCN_Logger::log_event_str(" }");
}

void KeypadFacility::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (keypadInformation().is_bound()) keypadInformation().set_implicit_omit();
if (spare__1().is_bound()) spare__1().set_implicit_omit();
}

void KeypadFacility::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 @MobileL3_CC_Types.KeypadFacility 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) keypadInformation().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare__1().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "keypadInformation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          keypadInformation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare__1().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 @MobileL3_CC_Types.KeypadFacility: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.KeypadFacility");
  }
}

void KeypadFacility::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_keypadInformation.encode_text(text_buf);
field_spare__1.encode_text(text_buf);
}

void KeypadFacility::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_keypadInformation.decode_text(text_buf);
field_spare__1.decode_text(text_buf);
}

void KeypadFacility::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 KeypadFacility::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 KeypadFacility::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, General__Types::BIT7_descr_.raw->forceomit);
  decoded_field_length = field_keypadInformation.RAW_decode(General__Types::BIT7_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, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_spare__1.RAW_decode(General__Types::BIT1_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int KeypadFacility::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT7_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT1_descr_.raw);
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_keypadInformation.RAW_encode(General__Types::BIT7_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_spare__1.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[2]);
  return myleaf.length = encoded_length;
}

struct KeypadFacility_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
BITSTRING_template field_keypadInformation;
BITSTRING_template field_spare__1;
};

void KeypadFacility_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_elementIdentifier = ANY_VALUE;
single_value->field_keypadInformation = ANY_VALUE;
single_value->field_spare__1 = ANY_VALUE;
}
}
}

void KeypadFacility_template::copy_value(const KeypadFacility& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.keypadInformation().is_bound()) {
  single_value->field_keypadInformation = other_value.keypadInformation();
} else {
  single_value->field_keypadInformation.clean_up();
}
if (other_value.spare__1().is_bound()) {
  single_value->field_spare__1 = other_value.spare__1();
} else {
  single_value->field_spare__1.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void KeypadFacility_template::copy_template(const KeypadFacility_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.keypadInformation().get_selection()) {
single_value->field_keypadInformation = other_value.keypadInformation();
} else {
single_value->field_keypadInformation.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare__1().get_selection()) {
single_value->field_spare__1 = other_value.spare__1();
} else {
single_value->field_spare__1.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 KeypadFacility_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 KeypadFacility_template(*other_value.implication_.precondition);
implication_.implied_template = new KeypadFacility_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 @MobileL3_CC_Types.KeypadFacility.");
break;
}
set_selection(other_value);
}

KeypadFacility_template::KeypadFacility_template()
{
}

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

KeypadFacility_template::KeypadFacility_template(const KeypadFacility& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean KeypadFacility_template::match(const KeypadFacility& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.keypadInformation().is_bound()) return FALSE;
if(!single_value->field_keypadInformation.match(other_value.keypadInformation(), legacy))return FALSE;
if(!other_value.spare__1().is_bound()) return FALSE;
if(!single_value->field_spare__1.match(other_value.spare__1(), 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 @MobileL3_CC_Types.KeypadFacility.");
}
return FALSE;
}

boolean KeypadFacility_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_keypadInformation.is_bound()
 || single_value->field_spare__1.is_bound();
}

boolean KeypadFacility_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_keypadInformation.is_value()
 && single_value->field_spare__1.is_value();
}

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

KeypadFacility KeypadFacility_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 @MobileL3_CC_Types.KeypadFacility.");
KeypadFacility ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_keypadInformation.is_bound()) {
ret_val.keypadInformation() = single_value->field_keypadInformation.valueof();
}
if (single_value->field_spare__1.is_bound()) {
ret_val.spare__1() = single_value->field_spare__1.valueof();
}
return ret_val;
}

void KeypadFacility_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 @MobileL3_CC_Types.KeypadFacility.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new KeypadFacility_template[list_length];
}

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

OCTETSTRING_template& KeypadFacility_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& KeypadFacility_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.KeypadFacility.");
return single_value->field_elementIdentifier;
}

BITSTRING_template& KeypadFacility_template::keypadInformation()
{
set_specific();
return single_value->field_keypadInformation;
}

const BITSTRING_template& KeypadFacility_template::keypadInformation() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field keypadInformation of a non-specific template of type @MobileL3_CC_Types.KeypadFacility.");
return single_value->field_keypadInformation;
}

BITSTRING_template& KeypadFacility_template::spare__1()
{
set_specific();
return single_value->field_spare__1;
}

const BITSTRING_template& KeypadFacility_template::spare__1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare_1 of a non-specific template of type @MobileL3_CC_Types.KeypadFacility.");
return single_value->field_spare__1;
}

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

void KeypadFacility_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", keypadInformation := ");
single_value->field_keypadInformation.log();
TTCN_Logger::log_event_str(", spare_1 := ");
single_value->field_spare__1.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 KeypadFacility_template::log_match(const KeypadFacility& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_keypadInformation.match(match_value.keypadInformation(), legacy)){
TTCN_Logger::log_logmatch_info(".keypadInformation");
single_value->field_keypadInformation.log_match(match_value.keypadInformation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare__1.match(match_value.spare__1(), legacy)){
TTCN_Logger::log_logmatch_info(".spare_1");
single_value->field_spare__1.log_match(match_value.spare__1(), 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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", keypadInformation := ");
single_value->field_keypadInformation.log_match(match_value.keypadInformation(), legacy);
TTCN_Logger::log_event_str(", spare_1 := ");
single_value->field_spare__1.log_match(match_value.spare__1(), 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 KeypadFacility_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (keypadInformation().is_bound()) keypadInformation().set_implicit_omit();
if (spare__1().is_bound()) spare__1().set_implicit_omit();
}

void KeypadFacility_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_keypadInformation.encode_text(text_buf);
single_value->field_spare__1.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 @MobileL3_CC_Types.KeypadFacility.");
}
}

void KeypadFacility_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_elementIdentifier.decode_text(text_buf);
single_value->field_keypadInformation.decode_text(text_buf);
single_value->field_spare__1.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 KeypadFacility_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 @MobileL3_CC_Types.KeypadFacility.");
}
}

void KeypadFacility_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: {
    KeypadFacility_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 @MobileL3_CC_Types.KeypadFacility 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) keypadInformation().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare__1().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "keypadInformation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          keypadInformation().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare__1().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 @MobileL3_CC_Types.KeypadFacility: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    KeypadFacility_template* precondition = new KeypadFacility_template;
    precondition->set_param(*param.get_elem(0));
    KeypadFacility_template* implied_template = new KeypadFacility_template;
    implied_template->set_param(*param.get_elem(1));
    *this = KeypadFacility_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.KeypadFacility");
  }
  is_ifpresent = param.get_ifpresent();
}

void KeypadFacility_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.KeypadFacility");
single_value->field_keypadInformation.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.KeypadFacility");
single_value->field_spare__1.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.KeypadFacility");
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 : "@MobileL3_CC_Types.KeypadFacility");
}

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

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

LowLayerCompatibility::LowLayerCompatibility()
{
}

LowLayerCompatibility::LowLayerCompatibility(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const OPTIONAL< OCTETSTRING >& par_lowLayerCompatibilityContents)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_lowLayerCompatibilityContents(par_lowLayerCompatibilityContents)
{
}

LowLayerCompatibility::LowLayerCompatibility(const LowLayerCompatibility& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.LowLayerCompatibility.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.lowLayerCompatibilityContents().is_bound()) field_lowLayerCompatibilityContents = other_value.lowLayerCompatibilityContents();
else field_lowLayerCompatibilityContents.clean_up();
}

void LowLayerCompatibility::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_lowLayerCompatibilityContents.clean_up();
}

const TTCN_Typedescriptor_t* LowLayerCompatibility::get_descriptor() const { return &LowLayerCompatibility_descr_; }
LowLayerCompatibility& LowLayerCompatibility::operator=(const LowLayerCompatibility& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.LowLayerCompatibility.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.lowLayerCompatibilityContents().is_bound()) field_lowLayerCompatibilityContents = other_value.lowLayerCompatibilityContents();
  else field_lowLayerCompatibilityContents.clean_up();
}
return *this;
}

boolean LowLayerCompatibility::operator==(const LowLayerCompatibility& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_lowLayerCompatibilityContents==other_value.field_lowLayerCompatibilityContents;
}

boolean LowLayerCompatibility::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (OPTIONAL_OMIT == field_lowLayerCompatibilityContents.get_selection() || field_lowLayerCompatibilityContents.is_bound());
}
boolean LowLayerCompatibility::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && (OPTIONAL_OMIT == field_lowLayerCompatibilityContents.get_selection() || field_lowLayerCompatibilityContents.is_value());
}
int LowLayerCompatibility::size_of() const
{
  int ret_val = 2;
  if (field_lowLayerCompatibilityContents.ispresent()) ret_val++;
  return ret_val;
}

void LowLayerCompatibility::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", lowLayerCompatibilityContents := ");
field_lowLayerCompatibilityContents.log();
TTCN_Logger::log_event_str(" }");
}

void LowLayerCompatibility::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (!lowLayerCompatibilityContents().is_bound()) lowLayerCompatibilityContents() = OMIT_VALUE;
else lowLayerCompatibilityContents().set_implicit_omit();
}

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

void LowLayerCompatibility::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_lowLayerCompatibilityContents.encode_text(text_buf);
}

void LowLayerCompatibility::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_lowLayerCompatibilityContents.decode_text(text_buf);
}

void LowLayerCompatibility::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 LowLayerCompatibility::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 LowLayerCompatibility::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, LowLayerCompatibility_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(LowLayerCompatibility_lengthIndicator_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_lengthIndicator.convert_to_Integer(LowLayerCompatibility_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_lowLayerCompatibilityContents = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, OCTETSTRING_descr_.raw->forceomit);
  decoded_field_length = field_lowLayerCompatibilityContents().RAW_decode(OCTETSTRING_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_lowLayerCompatibilityContents = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_lowLayerCompatibilityContents=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int LowLayerCompatibility::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, LowLayerCompatibility_lengthIndicator_descr_.raw);
  if (field_lowLayerCompatibilityContents.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, OCTETSTRING_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &LowLayerCompatibility_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 1;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(1);
  myleaf.body.node.nodes[1]->length = 8;
  if (field_lowLayerCompatibilityContents.ispresent()) {
  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;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = 0;
  }
  if (field_lowLayerCompatibilityContents.ispresent()) {
  encoded_length += field_lowLayerCompatibilityContents().RAW_encode(OCTETSTRING_descr_, *myleaf.body.node.nodes[2]);
  }
  return myleaf.length = encoded_length;
}

struct LowLayerCompatibility_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
OCTETSTRING_template field_lowLayerCompatibilityContents;
};

void LowLayerCompatibility_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_lowLayerCompatibilityContents = ANY_OR_OMIT;
}
}
}

void LowLayerCompatibility_template::copy_value(const LowLayerCompatibility& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.lowLayerCompatibilityContents().is_bound()) {
  if (other_value.lowLayerCompatibilityContents().ispresent()) single_value->field_lowLayerCompatibilityContents = other_value.lowLayerCompatibilityContents()();
  else single_value->field_lowLayerCompatibilityContents = OMIT_VALUE;
} else {
  single_value->field_lowLayerCompatibilityContents.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void LowLayerCompatibility_template::copy_template(const LowLayerCompatibility_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lowLayerCompatibilityContents().get_selection()) {
single_value->field_lowLayerCompatibilityContents = other_value.lowLayerCompatibilityContents();
} else {
single_value->field_lowLayerCompatibilityContents.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 LowLayerCompatibility_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 LowLayerCompatibility_template(*other_value.implication_.precondition);
implication_.implied_template = new LowLayerCompatibility_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 @MobileL3_CC_Types.LowLayerCompatibility.");
break;
}
set_selection(other_value);
}

LowLayerCompatibility_template::LowLayerCompatibility_template()
{
}

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

LowLayerCompatibility_template::LowLayerCompatibility_template(const LowLayerCompatibility& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean LowLayerCompatibility_template::match(const LowLayerCompatibility& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.lowLayerCompatibilityContents().is_bound()) return FALSE;
if((other_value.lowLayerCompatibilityContents().ispresent() ? !single_value->field_lowLayerCompatibilityContents.match((const OCTETSTRING&)other_value.lowLayerCompatibilityContents(), legacy) : !single_value->field_lowLayerCompatibilityContents.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 @MobileL3_CC_Types.LowLayerCompatibility.");
}
return FALSE;
}

boolean LowLayerCompatibility_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || (single_value->field_lowLayerCompatibilityContents.is_omit() || single_value->field_lowLayerCompatibilityContents.is_bound());
}

boolean LowLayerCompatibility_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && (single_value->field_lowLayerCompatibilityContents.is_omit() || single_value->field_lowLayerCompatibilityContents.is_value());
}

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

LowLayerCompatibility LowLayerCompatibility_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 @MobileL3_CC_Types.LowLayerCompatibility.");
LowLayerCompatibility ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_lowLayerCompatibilityContents.is_omit()) ret_val.lowLayerCompatibilityContents() = OMIT_VALUE;
else if (single_value->field_lowLayerCompatibilityContents.is_bound()) {
ret_val.lowLayerCompatibilityContents() = single_value->field_lowLayerCompatibilityContents.valueof();
}
return ret_val;
}

void LowLayerCompatibility_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 @MobileL3_CC_Types.LowLayerCompatibility.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new LowLayerCompatibility_template[list_length];
}

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

OCTETSTRING_template& LowLayerCompatibility_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& LowLayerCompatibility_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.LowLayerCompatibility.");
return single_value->field_elementIdentifier;
}

INTEGER_template& LowLayerCompatibility_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& LowLayerCompatibility_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.LowLayerCompatibility.");
return single_value->field_lengthIndicator;
}

OCTETSTRING_template& LowLayerCompatibility_template::lowLayerCompatibilityContents()
{
set_specific();
return single_value->field_lowLayerCompatibilityContents;
}

const OCTETSTRING_template& LowLayerCompatibility_template::lowLayerCompatibilityContents() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lowLayerCompatibilityContents of a non-specific template of type @MobileL3_CC_Types.LowLayerCompatibility.");
return single_value->field_lowLayerCompatibilityContents;
}

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

void LowLayerCompatibility_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", lowLayerCompatibilityContents := ");
single_value->field_lowLayerCompatibilityContents.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 LowLayerCompatibility_template::log_match(const LowLayerCompatibility& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.lowLayerCompatibilityContents().ispresent()){
if(!single_value->field_lowLayerCompatibilityContents.match(match_value.lowLayerCompatibilityContents(), legacy)){
TTCN_Logger::log_logmatch_info(".lowLayerCompatibilityContents");
single_value->field_lowLayerCompatibilityContents.log_match(match_value.lowLayerCompatibilityContents(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_lowLayerCompatibilityContents.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".lowLayerCompatibilityContents := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_lowLayerCompatibilityContents.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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", lowLayerCompatibilityContents := ");
if (match_value.lowLayerCompatibilityContents().ispresent()) {
single_value->field_lowLayerCompatibilityContents.log_match(match_value.lowLayerCompatibilityContents(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_lowLayerCompatibilityContents.log();
if (single_value->field_lowLayerCompatibilityContents.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 LowLayerCompatibility_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (!lowLayerCompatibilityContents().is_bound()) lowLayerCompatibilityContents() = OMIT_VALUE;
else lowLayerCompatibilityContents().set_implicit_omit();
}

void LowLayerCompatibility_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_lowLayerCompatibilityContents.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 @MobileL3_CC_Types.LowLayerCompatibility.");
}
}

void LowLayerCompatibility_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_lowLayerCompatibilityContents.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 LowLayerCompatibility_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 @MobileL3_CC_Types.LowLayerCompatibility.");
}
}

void LowLayerCompatibility_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: {
    LowLayerCompatibility_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 @MobileL3_CC_Types.LowLayerCompatibility 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) lowLayerCompatibilityContents().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lowLayerCompatibilityContents")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lowLayerCompatibilityContents().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 @MobileL3_CC_Types.LowLayerCompatibility: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    LowLayerCompatibility_template* precondition = new LowLayerCompatibility_template;
    precondition->set_param(*param.get_elem(0));
    LowLayerCompatibility_template* implied_template = new LowLayerCompatibility_template;
    implied_template->set_param(*param.get_elem(1));
    *this = LowLayerCompatibility_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.LowLayerCompatibility");
  }
  is_ifpresent = param.get_ifpresent();
}

void LowLayerCompatibility_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.LowLayerCompatibility");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.LowLayerCompatibility");
single_value->field_lowLayerCompatibilityContents.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.LowLayerCompatibility");
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 : "@MobileL3_CC_Types.LowLayerCompatibility");
}

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

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

NotificationIndicator::NotificationIndicator()
{
}

NotificationIndicator::NotificationIndicator(const OCTETSTRING& par_notificationDescription)
  :   field_notificationDescription(par_notificationDescription)
{
}

NotificationIndicator::NotificationIndicator(const NotificationIndicator& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.NotificationIndicator.");
if (other_value.notificationDescription().is_bound()) field_notificationDescription = other_value.notificationDescription();
else field_notificationDescription.clean_up();
}

void NotificationIndicator::clean_up()
{
field_notificationDescription.clean_up();
}

const TTCN_Typedescriptor_t* NotificationIndicator::get_descriptor() const { return &NotificationIndicator_descr_; }
NotificationIndicator& NotificationIndicator::operator=(const NotificationIndicator& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.NotificationIndicator.");
  if (other_value.notificationDescription().is_bound()) field_notificationDescription = other_value.notificationDescription();
  else field_notificationDescription.clean_up();
}
return *this;
}

boolean NotificationIndicator::operator==(const NotificationIndicator& other_value) const
{
return field_notificationDescription==other_value.field_notificationDescription;
}

boolean NotificationIndicator::is_bound() const
{
return (field_notificationDescription.is_bound());
}
boolean NotificationIndicator::is_value() const
{
return field_notificationDescription.is_value();
}
void NotificationIndicator::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ notificationDescription := ");
field_notificationDescription.log();
TTCN_Logger::log_event_str(" }");
}

void NotificationIndicator::set_implicit_omit()
{
if (notificationDescription().is_bound()) notificationDescription().set_implicit_omit();
}

void NotificationIndicator::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (1<param.get_size()) {
      param.error("record value of type @MobileL3_CC_Types.NotificationIndicator has 1 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) notificationDescription().set_param(*param.get_elem(0));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "notificationDescription")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          notificationDescription().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 @MobileL3_CC_Types.NotificationIndicator: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.NotificationIndicator");
  }
}

void NotificationIndicator::encode_text(Text_Buf& text_buf) const
{
field_notificationDescription.encode_text(text_buf);
}

void NotificationIndicator::decode_text(Text_Buf& text_buf)
{
field_notificationDescription.decode_text(text_buf);
}

void NotificationIndicator::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 NotificationIndicator::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 NotificationIndicator::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_notificationDescription.RAW_decode(General__Types::OCT1_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

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

struct NotificationIndicator_template::single_value_struct {
OCTETSTRING_template field_notificationDescription;
};

void NotificationIndicator_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_notificationDescription = ANY_VALUE;
}
}
}

void NotificationIndicator_template::copy_value(const NotificationIndicator& other_value)
{
single_value = new single_value_struct;
if (other_value.notificationDescription().is_bound()) {
  single_value->field_notificationDescription = other_value.notificationDescription();
} else {
  single_value->field_notificationDescription.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void NotificationIndicator_template::copy_template(const NotificationIndicator_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.notificationDescription().get_selection()) {
single_value->field_notificationDescription = other_value.notificationDescription();
} else {
single_value->field_notificationDescription.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 NotificationIndicator_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 NotificationIndicator_template(*other_value.implication_.precondition);
implication_.implied_template = new NotificationIndicator_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 @MobileL3_CC_Types.NotificationIndicator.");
break;
}
set_selection(other_value);
}

NotificationIndicator_template::NotificationIndicator_template()
{
}

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

NotificationIndicator_template::NotificationIndicator_template(const NotificationIndicator& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean NotificationIndicator_template::match(const NotificationIndicator& 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.notificationDescription().is_bound()) return FALSE;
if(!single_value->field_notificationDescription.match(other_value.notificationDescription(), 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 @MobileL3_CC_Types.NotificationIndicator.");
}
return FALSE;
}

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

boolean NotificationIndicator_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_notificationDescription.is_value();
}

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

NotificationIndicator NotificationIndicator_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 @MobileL3_CC_Types.NotificationIndicator.");
NotificationIndicator ret_val;
if (single_value->field_notificationDescription.is_bound()) {
ret_val.notificationDescription() = single_value->field_notificationDescription.valueof();
}
return ret_val;
}

void NotificationIndicator_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 @MobileL3_CC_Types.NotificationIndicator.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new NotificationIndicator_template[list_length];
}

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

OCTETSTRING_template& NotificationIndicator_template::notificationDescription()
{
set_specific();
return single_value->field_notificationDescription;
}

const OCTETSTRING_template& NotificationIndicator_template::notificationDescription() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field notificationDescription of a non-specific template of type @MobileL3_CC_Types.NotificationIndicator.");
return single_value->field_notificationDescription;
}

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

void NotificationIndicator_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ notificationDescription := ");
single_value->field_notificationDescription.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 NotificationIndicator_template::log_match(const NotificationIndicator& 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_notificationDescription.match(match_value.notificationDescription(), legacy)){
TTCN_Logger::log_logmatch_info(".notificationDescription");
single_value->field_notificationDescription.log_match(match_value.notificationDescription(), 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("{ notificationDescription := ");
single_value->field_notificationDescription.log_match(match_value.notificationDescription(), 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 NotificationIndicator_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (notificationDescription().is_bound()) notificationDescription().set_implicit_omit();
}

void NotificationIndicator_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_notificationDescription.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 @MobileL3_CC_Types.NotificationIndicator.");
}
}

void NotificationIndicator_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_notificationDescription.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 NotificationIndicator_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 @MobileL3_CC_Types.NotificationIndicator.");
}
}

void NotificationIndicator_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: {
    NotificationIndicator_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (1<param.get_size()) {
      param.error("record template of type @MobileL3_CC_Types.NotificationIndicator has 1 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) notificationDescription().set_param(*param.get_elem(0));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "notificationDescription")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          notificationDescription().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 @MobileL3_CC_Types.NotificationIndicator: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    NotificationIndicator_template* precondition = new NotificationIndicator_template;
    precondition->set_param(*param.get_elem(0));
    NotificationIndicator_template* implied_template = new NotificationIndicator_template;
    implied_template->set_param(*param.get_elem(1));
    *this = NotificationIndicator_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.NotificationIndicator");
  }
  is_ifpresent = param.get_ifpresent();
}

void NotificationIndicator_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_notificationDescription.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.NotificationIndicator");
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 : "@MobileL3_CC_Types.NotificationIndicator");
}

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

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

ProgressIndicator__LV::ProgressIndicator__LV()
{
}

ProgressIndicator__LV::ProgressIndicator__LV(const INTEGER& par_lengthIndicator,
    const BITSTRING& par_location,
    const BITSTRING& par_spare1__1,
    const BITSTRING& par_codingStandard,
    const BITSTRING& par_ext1,
    const BITSTRING& par_progressDescription,
    const BITSTRING& par_ext2)
  :   field_lengthIndicator(par_lengthIndicator),
  field_location(par_location),
  field_spare1__1(par_spare1__1),
  field_codingStandard(par_codingStandard),
  field_ext1(par_ext1),
  field_progressDescription(par_progressDescription),
  field_ext2(par_ext2)
{
}

ProgressIndicator__LV::ProgressIndicator__LV(const ProgressIndicator__LV& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.ProgressIndicator_LV.");
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.location().is_bound()) field_location = other_value.location();
else field_location.clean_up();
if (other_value.spare1__1().is_bound()) field_spare1__1 = other_value.spare1__1();
else field_spare1__1.clean_up();
if (other_value.codingStandard().is_bound()) field_codingStandard = other_value.codingStandard();
else field_codingStandard.clean_up();
if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
else field_ext1.clean_up();
if (other_value.progressDescription().is_bound()) field_progressDescription = other_value.progressDescription();
else field_progressDescription.clean_up();
if (other_value.ext2().is_bound()) field_ext2 = other_value.ext2();
else field_ext2.clean_up();
}

void ProgressIndicator__LV::clean_up()
{
field_lengthIndicator.clean_up();
field_location.clean_up();
field_spare1__1.clean_up();
field_codingStandard.clean_up();
field_ext1.clean_up();
field_progressDescription.clean_up();
field_ext2.clean_up();
}

const TTCN_Typedescriptor_t* ProgressIndicator__LV::get_descriptor() const { return &ProgressIndicator__LV_descr_; }
ProgressIndicator__LV& ProgressIndicator__LV::operator=(const ProgressIndicator__LV& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.ProgressIndicator_LV.");
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.location().is_bound()) field_location = other_value.location();
  else field_location.clean_up();
  if (other_value.spare1__1().is_bound()) field_spare1__1 = other_value.spare1__1();
  else field_spare1__1.clean_up();
  if (other_value.codingStandard().is_bound()) field_codingStandard = other_value.codingStandard();
  else field_codingStandard.clean_up();
  if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
  else field_ext1.clean_up();
  if (other_value.progressDescription().is_bound()) field_progressDescription = other_value.progressDescription();
  else field_progressDescription.clean_up();
  if (other_value.ext2().is_bound()) field_ext2 = other_value.ext2();
  else field_ext2.clean_up();
}
return *this;
}

boolean ProgressIndicator__LV::operator==(const ProgressIndicator__LV& other_value) const
{
return field_lengthIndicator==other_value.field_lengthIndicator
  && field_location==other_value.field_location
  && field_spare1__1==other_value.field_spare1__1
  && field_codingStandard==other_value.field_codingStandard
  && field_ext1==other_value.field_ext1
  && field_progressDescription==other_value.field_progressDescription
  && field_ext2==other_value.field_ext2;
}

boolean ProgressIndicator__LV::is_bound() const
{
return (field_lengthIndicator.is_bound())
  || (field_location.is_bound())
  || (field_spare1__1.is_bound())
  || (field_codingStandard.is_bound())
  || (field_ext1.is_bound())
  || (field_progressDescription.is_bound())
  || (field_ext2.is_bound());
}
boolean ProgressIndicator__LV::is_value() const
{
return field_lengthIndicator.is_value()
  && field_location.is_value()
  && field_spare1__1.is_value()
  && field_codingStandard.is_value()
  && field_ext1.is_value()
  && field_progressDescription.is_value()
  && field_ext2.is_value();
}
void ProgressIndicator__LV::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", location := ");
field_location.log();
TTCN_Logger::log_event_str(", spare1_1 := ");
field_spare1__1.log();
TTCN_Logger::log_event_str(", codingStandard := ");
field_codingStandard.log();
TTCN_Logger::log_event_str(", ext1 := ");
field_ext1.log();
TTCN_Logger::log_event_str(", progressDescription := ");
field_progressDescription.log();
TTCN_Logger::log_event_str(", ext2 := ");
field_ext2.log();
TTCN_Logger::log_event_str(" }");
}

void ProgressIndicator__LV::set_implicit_omit()
{
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (location().is_bound()) location().set_implicit_omit();
if (spare1__1().is_bound()) spare1__1().set_implicit_omit();
if (codingStandard().is_bound()) codingStandard().set_implicit_omit();
if (ext1().is_bound()) ext1().set_implicit_omit();
if (progressDescription().is_bound()) progressDescription().set_implicit_omit();
if (ext2().is_bound()) ext2().set_implicit_omit();
}

void ProgressIndicator__LV::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 @MobileL3_CC_Types.ProgressIndicator_LV 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) lengthIndicator().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) location().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare1__1().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) codingStandard().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) progressDescription().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) ext2().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(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "location")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          location().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "codingStandard")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          codingStandard().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "progressDescription")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          progressDescription().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext2")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext2().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 @MobileL3_CC_Types.ProgressIndicator_LV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.ProgressIndicator_LV");
  }
}

void ProgressIndicator__LV::encode_text(Text_Buf& text_buf) const
{
field_lengthIndicator.encode_text(text_buf);
field_location.encode_text(text_buf);
field_spare1__1.encode_text(text_buf);
field_codingStandard.encode_text(text_buf);
field_ext1.encode_text(text_buf);
field_progressDescription.encode_text(text_buf);
field_ext2.encode_text(text_buf);
}

void ProgressIndicator__LV::decode_text(Text_Buf& text_buf)
{
field_lengthIndicator.decode_text(text_buf);
field_location.decode_text(text_buf);
field_spare1__1.decode_text(text_buf);
field_codingStandard.decode_text(text_buf);
field_ext1.decode_text(text_buf);
field_progressDescription.decode_text(text_buf);
field_ext2.decode_text(text_buf);
}

void ProgressIndicator__LV::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 ProgressIndicator__LV::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 ProgressIndicator__LV::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_field0 = 0;
  RAW_Force_Omit field_0_force_omit(0, force_omit, ProgressIndicator__LV_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(ProgressIndicator__LV_lengthIndicator_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());
  INTEGER tmp0 = field_lengthIndicator.convert_to_Integer(ProgressIndicator__LV_lengthIndicator_descr_);
  field_lengthIndicator = tmp0;
  value_of_length_field0 += tmp0.get_long_long_val() * 8;
  RAW_Force_Omit field_1_force_omit(1, force_omit, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_location.RAW_decode(General__Types::BIT4_descr_, p_buf, min_of_ints(2, limit, value_of_length_field0), 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());
  value_of_length_field0 -= decoded_field_length;
  RAW_Force_Omit field_2_force_omit(2, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_spare1__1.RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field0), 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_field0 -= decoded_field_length;
  RAW_Force_Omit field_3_force_omit(3, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_codingStandard.RAW_decode(General__Types::BIT2_descr_, p_buf, min_of_ints(2, limit, value_of_length_field0), 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());
  value_of_length_field0 -= decoded_field_length;
  RAW_Force_Omit field_4_force_omit(4, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_ext1.RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field0), 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());
  value_of_length_field0 -= decoded_field_length;
  RAW_Force_Omit field_5_force_omit(5, force_omit, General__Types::BIT7_descr_.raw->forceomit);
  decoded_field_length = field_progressDescription.RAW_decode(General__Types::BIT7_descr_, p_buf, min_of_ints(2, limit, value_of_length_field0), 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());
  value_of_length_field0 -= decoded_field_length;
  RAW_Force_Omit field_6_force_omit(6, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_ext2.RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field0), 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());
  value_of_length_field0 -= 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 ProgressIndicator__LV::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, ProgressIndicator__LV_lengthIndicator_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT4_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, General__Types::BIT7_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, General__Types::BIT1_descr_.raw);
  encoded_length += 8;
  myleaf.body.node.nodes[0]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[0]->coding_descr = &ProgressIndicator__LV_lengthIndicator_descr_;
  myleaf.body.node.nodes[0]->calcof.lengthto.num_of_fields = 6;
  myleaf.body.node.nodes[0]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[0]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields = init_lengthto_fields_list(6);
  myleaf.body.node.nodes[0]->length = 8;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[1]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[1]->curr_pos.pos;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[2]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[2]->curr_pos.pos;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[2].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[2].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[3].level = myleaf.body.node.nodes[4]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[3].pos = myleaf.body.node.nodes[4]->curr_pos.pos;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[4].level = myleaf.body.node.nodes[5]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[4].pos = myleaf.body.node.nodes[5]->curr_pos.pos;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[5].level = myleaf.body.node.nodes[6]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[5].pos = myleaf.body.node.nodes[6]->curr_pos.pos;
  encoded_length += field_location.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_spare1__1.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_codingStandard.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_ext1.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_progressDescription.RAW_encode(General__Types::BIT7_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_ext2.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[6]);
  return myleaf.length = encoded_length;
}

struct ProgressIndicator__LV_template::single_value_struct {
INTEGER_template field_lengthIndicator;
BITSTRING_template field_location;
BITSTRING_template field_spare1__1;
BITSTRING_template field_codingStandard;
BITSTRING_template field_ext1;
BITSTRING_template field_progressDescription;
BITSTRING_template field_ext2;
};

void ProgressIndicator__LV_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_lengthIndicator = ANY_VALUE;
single_value->field_location = ANY_VALUE;
single_value->field_spare1__1 = ANY_VALUE;
single_value->field_codingStandard = ANY_VALUE;
single_value->field_ext1 = ANY_VALUE;
single_value->field_progressDescription = ANY_VALUE;
single_value->field_ext2 = ANY_VALUE;
}
}
}

void ProgressIndicator__LV_template::copy_value(const ProgressIndicator__LV& other_value)
{
single_value = new single_value_struct;
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.location().is_bound()) {
  single_value->field_location = other_value.location();
} else {
  single_value->field_location.clean_up();
}
if (other_value.spare1__1().is_bound()) {
  single_value->field_spare1__1 = other_value.spare1__1();
} else {
  single_value->field_spare1__1.clean_up();
}
if (other_value.codingStandard().is_bound()) {
  single_value->field_codingStandard = other_value.codingStandard();
} else {
  single_value->field_codingStandard.clean_up();
}
if (other_value.ext1().is_bound()) {
  single_value->field_ext1 = other_value.ext1();
} else {
  single_value->field_ext1.clean_up();
}
if (other_value.progressDescription().is_bound()) {
  single_value->field_progressDescription = other_value.progressDescription();
} else {
  single_value->field_progressDescription.clean_up();
}
if (other_value.ext2().is_bound()) {
  single_value->field_ext2 = other_value.ext2();
} else {
  single_value->field_ext2.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ProgressIndicator__LV_template::copy_template(const ProgressIndicator__LV_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.location().get_selection()) {
single_value->field_location = other_value.location();
} else {
single_value->field_location.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare1__1().get_selection()) {
single_value->field_spare1__1 = other_value.spare1__1();
} else {
single_value->field_spare1__1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.codingStandard().get_selection()) {
single_value->field_codingStandard = other_value.codingStandard();
} else {
single_value->field_codingStandard.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext1().get_selection()) {
single_value->field_ext1 = other_value.ext1();
} else {
single_value->field_ext1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.progressDescription().get_selection()) {
single_value->field_progressDescription = other_value.progressDescription();
} else {
single_value->field_progressDescription.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext2().get_selection()) {
single_value->field_ext2 = other_value.ext2();
} else {
single_value->field_ext2.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 ProgressIndicator__LV_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 ProgressIndicator__LV_template(*other_value.implication_.precondition);
implication_.implied_template = new ProgressIndicator__LV_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 @MobileL3_CC_Types.ProgressIndicator_LV.");
break;
}
set_selection(other_value);
}

ProgressIndicator__LV_template::ProgressIndicator__LV_template()
{
}

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

ProgressIndicator__LV_template::ProgressIndicator__LV_template(const ProgressIndicator__LV& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ProgressIndicator__LV_template::match(const ProgressIndicator__LV& 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.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.location().is_bound()) return FALSE;
if(!single_value->field_location.match(other_value.location(), legacy))return FALSE;
if(!other_value.spare1__1().is_bound()) return FALSE;
if(!single_value->field_spare1__1.match(other_value.spare1__1(), legacy))return FALSE;
if(!other_value.codingStandard().is_bound()) return FALSE;
if(!single_value->field_codingStandard.match(other_value.codingStandard(), legacy))return FALSE;
if(!other_value.ext1().is_bound()) return FALSE;
if(!single_value->field_ext1.match(other_value.ext1(), legacy))return FALSE;
if(!other_value.progressDescription().is_bound()) return FALSE;
if(!single_value->field_progressDescription.match(other_value.progressDescription(), legacy))return FALSE;
if(!other_value.ext2().is_bound()) return FALSE;
if(!single_value->field_ext2.match(other_value.ext2(), 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 @MobileL3_CC_Types.ProgressIndicator_LV.");
}
return FALSE;
}

boolean ProgressIndicator__LV_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_lengthIndicator.is_bound()
 || single_value->field_location.is_bound()
 || single_value->field_spare1__1.is_bound()
 || single_value->field_codingStandard.is_bound()
 || single_value->field_ext1.is_bound()
 || single_value->field_progressDescription.is_bound()
 || single_value->field_ext2.is_bound();
}

boolean ProgressIndicator__LV_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_lengthIndicator.is_value()
 && single_value->field_location.is_value()
 && single_value->field_spare1__1.is_value()
 && single_value->field_codingStandard.is_value()
 && single_value->field_ext1.is_value()
 && single_value->field_progressDescription.is_value()
 && single_value->field_ext2.is_value();
}

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

ProgressIndicator__LV ProgressIndicator__LV_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 @MobileL3_CC_Types.ProgressIndicator_LV.");
ProgressIndicator__LV ret_val;
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_location.is_bound()) {
ret_val.location() = single_value->field_location.valueof();
}
if (single_value->field_spare1__1.is_bound()) {
ret_val.spare1__1() = single_value->field_spare1__1.valueof();
}
if (single_value->field_codingStandard.is_bound()) {
ret_val.codingStandard() = single_value->field_codingStandard.valueof();
}
if (single_value->field_ext1.is_bound()) {
ret_val.ext1() = single_value->field_ext1.valueof();
}
if (single_value->field_progressDescription.is_bound()) {
ret_val.progressDescription() = single_value->field_progressDescription.valueof();
}
if (single_value->field_ext2.is_bound()) {
ret_val.ext2() = single_value->field_ext2.valueof();
}
return ret_val;
}

void ProgressIndicator__LV_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 @MobileL3_CC_Types.ProgressIndicator_LV.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new ProgressIndicator__LV_template[list_length];
}

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

INTEGER_template& ProgressIndicator__LV_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& ProgressIndicator__LV_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.ProgressIndicator_LV.");
return single_value->field_lengthIndicator;
}

BITSTRING_template& ProgressIndicator__LV_template::location()
{
set_specific();
return single_value->field_location;
}

const BITSTRING_template& ProgressIndicator__LV_template::location() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field location of a non-specific template of type @MobileL3_CC_Types.ProgressIndicator_LV.");
return single_value->field_location;
}

BITSTRING_template& ProgressIndicator__LV_template::spare1__1()
{
set_specific();
return single_value->field_spare1__1;
}

const BITSTRING_template& ProgressIndicator__LV_template::spare1__1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare1_1 of a non-specific template of type @MobileL3_CC_Types.ProgressIndicator_LV.");
return single_value->field_spare1__1;
}

BITSTRING_template& ProgressIndicator__LV_template::codingStandard()
{
set_specific();
return single_value->field_codingStandard;
}

const BITSTRING_template& ProgressIndicator__LV_template::codingStandard() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field codingStandard of a non-specific template of type @MobileL3_CC_Types.ProgressIndicator_LV.");
return single_value->field_codingStandard;
}

BITSTRING_template& ProgressIndicator__LV_template::ext1()
{
set_specific();
return single_value->field_ext1;
}

const BITSTRING_template& ProgressIndicator__LV_template::ext1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext1 of a non-specific template of type @MobileL3_CC_Types.ProgressIndicator_LV.");
return single_value->field_ext1;
}

BITSTRING_template& ProgressIndicator__LV_template::progressDescription()
{
set_specific();
return single_value->field_progressDescription;
}

const BITSTRING_template& ProgressIndicator__LV_template::progressDescription() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field progressDescription of a non-specific template of type @MobileL3_CC_Types.ProgressIndicator_LV.");
return single_value->field_progressDescription;
}

BITSTRING_template& ProgressIndicator__LV_template::ext2()
{
set_specific();
return single_value->field_ext2;
}

const BITSTRING_template& ProgressIndicator__LV_template::ext2() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext2 of a non-specific template of type @MobileL3_CC_Types.ProgressIndicator_LV.");
return single_value->field_ext2;
}

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

void ProgressIndicator__LV_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", location := ");
single_value->field_location.log();
TTCN_Logger::log_event_str(", spare1_1 := ");
single_value->field_spare1__1.log();
TTCN_Logger::log_event_str(", codingStandard := ");
single_value->field_codingStandard.log();
TTCN_Logger::log_event_str(", ext1 := ");
single_value->field_ext1.log();
TTCN_Logger::log_event_str(", progressDescription := ");
single_value->field_progressDescription.log();
TTCN_Logger::log_event_str(", ext2 := ");
single_value->field_ext2.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 ProgressIndicator__LV_template::log_match(const ProgressIndicator__LV& 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_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_location.match(match_value.location(), legacy)){
TTCN_Logger::log_logmatch_info(".location");
single_value->field_location.log_match(match_value.location(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare1__1.match(match_value.spare1__1(), legacy)){
TTCN_Logger::log_logmatch_info(".spare1_1");
single_value->field_spare1__1.log_match(match_value.spare1__1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_codingStandard.match(match_value.codingStandard(), legacy)){
TTCN_Logger::log_logmatch_info(".codingStandard");
single_value->field_codingStandard.log_match(match_value.codingStandard(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ext1.match(match_value.ext1(), legacy)){
TTCN_Logger::log_logmatch_info(".ext1");
single_value->field_ext1.log_match(match_value.ext1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_progressDescription.match(match_value.progressDescription(), legacy)){
TTCN_Logger::log_logmatch_info(".progressDescription");
single_value->field_progressDescription.log_match(match_value.progressDescription(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ext2.match(match_value.ext2(), legacy)){
TTCN_Logger::log_logmatch_info(".ext2");
single_value->field_ext2.log_match(match_value.ext2(), 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("{ lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", location := ");
single_value->field_location.log_match(match_value.location(), legacy);
TTCN_Logger::log_event_str(", spare1_1 := ");
single_value->field_spare1__1.log_match(match_value.spare1__1(), legacy);
TTCN_Logger::log_event_str(", codingStandard := ");
single_value->field_codingStandard.log_match(match_value.codingStandard(), legacy);
TTCN_Logger::log_event_str(", ext1 := ");
single_value->field_ext1.log_match(match_value.ext1(), legacy);
TTCN_Logger::log_event_str(", progressDescription := ");
single_value->field_progressDescription.log_match(match_value.progressDescription(), legacy);
TTCN_Logger::log_event_str(", ext2 := ");
single_value->field_ext2.log_match(match_value.ext2(), 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 ProgressIndicator__LV_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (location().is_bound()) location().set_implicit_omit();
if (spare1__1().is_bound()) spare1__1().set_implicit_omit();
if (codingStandard().is_bound()) codingStandard().set_implicit_omit();
if (ext1().is_bound()) ext1().set_implicit_omit();
if (progressDescription().is_bound()) progressDescription().set_implicit_omit();
if (ext2().is_bound()) ext2().set_implicit_omit();
}

void ProgressIndicator__LV_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_location.encode_text(text_buf);
single_value->field_spare1__1.encode_text(text_buf);
single_value->field_codingStandard.encode_text(text_buf);
single_value->field_ext1.encode_text(text_buf);
single_value->field_progressDescription.encode_text(text_buf);
single_value->field_ext2.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 @MobileL3_CC_Types.ProgressIndicator_LV.");
}
}

void ProgressIndicator__LV_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_lengthIndicator.decode_text(text_buf);
single_value->field_location.decode_text(text_buf);
single_value->field_spare1__1.decode_text(text_buf);
single_value->field_codingStandard.decode_text(text_buf);
single_value->field_ext1.decode_text(text_buf);
single_value->field_progressDescription.decode_text(text_buf);
single_value->field_ext2.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 ProgressIndicator__LV_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 @MobileL3_CC_Types.ProgressIndicator_LV.");
}
}

void ProgressIndicator__LV_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: {
    ProgressIndicator__LV_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 @MobileL3_CC_Types.ProgressIndicator_LV 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) lengthIndicator().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) location().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare1__1().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) codingStandard().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) progressDescription().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) ext2().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(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "location")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          location().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "codingStandard")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          codingStandard().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "progressDescription")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          progressDescription().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext2")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext2().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 @MobileL3_CC_Types.ProgressIndicator_LV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    ProgressIndicator__LV_template* precondition = new ProgressIndicator__LV_template;
    precondition->set_param(*param.get_elem(0));
    ProgressIndicator__LV_template* implied_template = new ProgressIndicator__LV_template;
    implied_template->set_param(*param.get_elem(1));
    *this = ProgressIndicator__LV_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.ProgressIndicator_LV");
  }
  is_ifpresent = param.get_ifpresent();
}

void ProgressIndicator__LV_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_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ProgressIndicator_LV");
single_value->field_location.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ProgressIndicator_LV");
single_value->field_spare1__1.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ProgressIndicator_LV");
single_value->field_codingStandard.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ProgressIndicator_LV");
single_value->field_ext1.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ProgressIndicator_LV");
single_value->field_progressDescription.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ProgressIndicator_LV");
single_value->field_ext2.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ProgressIndicator_LV");
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 : "@MobileL3_CC_Types.ProgressIndicator_LV");
}

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

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

ProgressIndicator__TLV::ProgressIndicator__TLV()
{
}

ProgressIndicator__TLV::ProgressIndicator__TLV(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const BITSTRING& par_location,
    const BITSTRING& par_spare1__1,
    const BITSTRING& par_codingStandard,
    const BITSTRING& par_ext1,
    const BITSTRING& par_progressDescription,
    const BITSTRING& par_ext2)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_location(par_location),
  field_spare1__1(par_spare1__1),
  field_codingStandard(par_codingStandard),
  field_ext1(par_ext1),
  field_progressDescription(par_progressDescription),
  field_ext2(par_ext2)
{
}

ProgressIndicator__TLV::ProgressIndicator__TLV(const ProgressIndicator__TLV& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.ProgressIndicator_TLV.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.location().is_bound()) field_location = other_value.location();
else field_location.clean_up();
if (other_value.spare1__1().is_bound()) field_spare1__1 = other_value.spare1__1();
else field_spare1__1.clean_up();
if (other_value.codingStandard().is_bound()) field_codingStandard = other_value.codingStandard();
else field_codingStandard.clean_up();
if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
else field_ext1.clean_up();
if (other_value.progressDescription().is_bound()) field_progressDescription = other_value.progressDescription();
else field_progressDescription.clean_up();
if (other_value.ext2().is_bound()) field_ext2 = other_value.ext2();
else field_ext2.clean_up();
}

void ProgressIndicator__TLV::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_location.clean_up();
field_spare1__1.clean_up();
field_codingStandard.clean_up();
field_ext1.clean_up();
field_progressDescription.clean_up();
field_ext2.clean_up();
}

const TTCN_Typedescriptor_t* ProgressIndicator__TLV::get_descriptor() const { return &ProgressIndicator__TLV_descr_; }
ProgressIndicator__TLV& ProgressIndicator__TLV::operator=(const ProgressIndicator__TLV& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.ProgressIndicator_TLV.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.location().is_bound()) field_location = other_value.location();
  else field_location.clean_up();
  if (other_value.spare1__1().is_bound()) field_spare1__1 = other_value.spare1__1();
  else field_spare1__1.clean_up();
  if (other_value.codingStandard().is_bound()) field_codingStandard = other_value.codingStandard();
  else field_codingStandard.clean_up();
  if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
  else field_ext1.clean_up();
  if (other_value.progressDescription().is_bound()) field_progressDescription = other_value.progressDescription();
  else field_progressDescription.clean_up();
  if (other_value.ext2().is_bound()) field_ext2 = other_value.ext2();
  else field_ext2.clean_up();
}
return *this;
}

boolean ProgressIndicator__TLV::operator==(const ProgressIndicator__TLV& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_location==other_value.field_location
  && field_spare1__1==other_value.field_spare1__1
  && field_codingStandard==other_value.field_codingStandard
  && field_ext1==other_value.field_ext1
  && field_progressDescription==other_value.field_progressDescription
  && field_ext2==other_value.field_ext2;
}

boolean ProgressIndicator__TLV::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (field_location.is_bound())
  || (field_spare1__1.is_bound())
  || (field_codingStandard.is_bound())
  || (field_ext1.is_bound())
  || (field_progressDescription.is_bound())
  || (field_ext2.is_bound());
}
boolean ProgressIndicator__TLV::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && field_location.is_value()
  && field_spare1__1.is_value()
  && field_codingStandard.is_value()
  && field_ext1.is_value()
  && field_progressDescription.is_value()
  && field_ext2.is_value();
}
void ProgressIndicator__TLV::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", location := ");
field_location.log();
TTCN_Logger::log_event_str(", spare1_1 := ");
field_spare1__1.log();
TTCN_Logger::log_event_str(", codingStandard := ");
field_codingStandard.log();
TTCN_Logger::log_event_str(", ext1 := ");
field_ext1.log();
TTCN_Logger::log_event_str(", progressDescription := ");
field_progressDescription.log();
TTCN_Logger::log_event_str(", ext2 := ");
field_ext2.log();
TTCN_Logger::log_event_str(" }");
}

void ProgressIndicator__TLV::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (location().is_bound()) location().set_implicit_omit();
if (spare1__1().is_bound()) spare1__1().set_implicit_omit();
if (codingStandard().is_bound()) codingStandard().set_implicit_omit();
if (ext1().is_bound()) ext1().set_implicit_omit();
if (progressDescription().is_bound()) progressDescription().set_implicit_omit();
if (ext2().is_bound()) ext2().set_implicit_omit();
}

void ProgressIndicator__TLV::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (8<param.get_size()) {
      param.error("record value of type @MobileL3_CC_Types.ProgressIndicator_TLV has 8 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) location().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) spare1__1().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) codingStandard().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) progressDescription().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) ext2().set_param(*param.get_elem(7));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "location")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          location().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "codingStandard")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          codingStandard().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "progressDescription")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          progressDescription().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext2")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext2().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 @MobileL3_CC_Types.ProgressIndicator_TLV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.ProgressIndicator_TLV");
  }
}

void ProgressIndicator__TLV::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_location.encode_text(text_buf);
field_spare1__1.encode_text(text_buf);
field_codingStandard.encode_text(text_buf);
field_ext1.encode_text(text_buf);
field_progressDescription.encode_text(text_buf);
field_ext2.encode_text(text_buf);
}

void ProgressIndicator__TLV::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_location.decode_text(text_buf);
field_spare1__1.decode_text(text_buf);
field_codingStandard.decode_text(text_buf);
field_ext1.decode_text(text_buf);
field_progressDescription.decode_text(text_buf);
field_ext2.decode_text(text_buf);
}

void ProgressIndicator__TLV::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 ProgressIndicator__TLV::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 ProgressIndicator__TLV::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, ProgressIndicator__TLV_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(ProgressIndicator__TLV_lengthIndicator_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_lengthIndicator.convert_to_Integer(ProgressIndicator__TLV_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  RAW_Force_Omit field_2_force_omit(2, force_omit, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_location.RAW_decode(General__Types::BIT4_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;
  RAW_Force_Omit field_3_force_omit(3, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_spare1__1.RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), 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());
  value_of_length_field1 -= decoded_field_length;
  RAW_Force_Omit field_4_force_omit(4, force_omit, General__Types::BIT2_descr_.raw->forceomit);
  decoded_field_length = field_codingStandard.RAW_decode(General__Types::BIT2_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), 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());
  value_of_length_field1 -= decoded_field_length;
  RAW_Force_Omit field_5_force_omit(5, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_ext1.RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), 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());
  value_of_length_field1 -= decoded_field_length;
  RAW_Force_Omit field_6_force_omit(6, force_omit, General__Types::BIT7_descr_.raw->forceomit);
  decoded_field_length = field_progressDescription.RAW_decode(General__Types::BIT7_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), 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());
  value_of_length_field1 -= decoded_field_length;
  RAW_Force_Omit field_7_force_omit(7, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_ext2.RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), 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());
  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 ProgressIndicator__TLV::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 8;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(8);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, ProgressIndicator__TLV_lengthIndicator_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT4_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT2_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, General__Types::BIT1_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, General__Types::BIT7_descr_.raw);
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, General__Types::BIT1_descr_.raw);
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &ProgressIndicator__TLV_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 6;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(6);
  myleaf.body.node.nodes[1]->length = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[2]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[2]->curr_pos.pos;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = myleaf.body.node.nodes[4]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = myleaf.body.node.nodes[4]->curr_pos.pos;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = myleaf.body.node.nodes[5]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = myleaf.body.node.nodes[5]->curr_pos.pos;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].level = myleaf.body.node.nodes[6]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].pos = myleaf.body.node.nodes[6]->curr_pos.pos;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[5].level = myleaf.body.node.nodes[7]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[5].pos = myleaf.body.node.nodes[7]->curr_pos.pos;
  encoded_length += field_location.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_spare1__1.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_codingStandard.RAW_encode(General__Types::BIT2_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_ext1.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_progressDescription.RAW_encode(General__Types::BIT7_descr_, *myleaf.body.node.nodes[6]);
  encoded_length += field_ext2.RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[7]);
  return myleaf.length = encoded_length;
}

struct ProgressIndicator__TLV_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
BITSTRING_template field_location;
BITSTRING_template field_spare1__1;
BITSTRING_template field_codingStandard;
BITSTRING_template field_ext1;
BITSTRING_template field_progressDescription;
BITSTRING_template field_ext2;
};

void ProgressIndicator__TLV_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_location = ANY_VALUE;
single_value->field_spare1__1 = ANY_VALUE;
single_value->field_codingStandard = ANY_VALUE;
single_value->field_ext1 = ANY_VALUE;
single_value->field_progressDescription = ANY_VALUE;
single_value->field_ext2 = ANY_VALUE;
}
}
}

void ProgressIndicator__TLV_template::copy_value(const ProgressIndicator__TLV& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.location().is_bound()) {
  single_value->field_location = other_value.location();
} else {
  single_value->field_location.clean_up();
}
if (other_value.spare1__1().is_bound()) {
  single_value->field_spare1__1 = other_value.spare1__1();
} else {
  single_value->field_spare1__1.clean_up();
}
if (other_value.codingStandard().is_bound()) {
  single_value->field_codingStandard = other_value.codingStandard();
} else {
  single_value->field_codingStandard.clean_up();
}
if (other_value.ext1().is_bound()) {
  single_value->field_ext1 = other_value.ext1();
} else {
  single_value->field_ext1.clean_up();
}
if (other_value.progressDescription().is_bound()) {
  single_value->field_progressDescription = other_value.progressDescription();
} else {
  single_value->field_progressDescription.clean_up();
}
if (other_value.ext2().is_bound()) {
  single_value->field_ext2 = other_value.ext2();
} else {
  single_value->field_ext2.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ProgressIndicator__TLV_template::copy_template(const ProgressIndicator__TLV_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.location().get_selection()) {
single_value->field_location = other_value.location();
} else {
single_value->field_location.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare1__1().get_selection()) {
single_value->field_spare1__1 = other_value.spare1__1();
} else {
single_value->field_spare1__1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.codingStandard().get_selection()) {
single_value->field_codingStandard = other_value.codingStandard();
} else {
single_value->field_codingStandard.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext1().get_selection()) {
single_value->field_ext1 = other_value.ext1();
} else {
single_value->field_ext1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.progressDescription().get_selection()) {
single_value->field_progressDescription = other_value.progressDescription();
} else {
single_value->field_progressDescription.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext2().get_selection()) {
single_value->field_ext2 = other_value.ext2();
} else {
single_value->field_ext2.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 ProgressIndicator__TLV_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 ProgressIndicator__TLV_template(*other_value.implication_.precondition);
implication_.implied_template = new ProgressIndicator__TLV_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 @MobileL3_CC_Types.ProgressIndicator_TLV.");
break;
}
set_selection(other_value);
}

ProgressIndicator__TLV_template::ProgressIndicator__TLV_template()
{
}

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

ProgressIndicator__TLV_template::ProgressIndicator__TLV_template(const ProgressIndicator__TLV& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ProgressIndicator__TLV_template::match(const ProgressIndicator__TLV& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.location().is_bound()) return FALSE;
if(!single_value->field_location.match(other_value.location(), legacy))return FALSE;
if(!other_value.spare1__1().is_bound()) return FALSE;
if(!single_value->field_spare1__1.match(other_value.spare1__1(), legacy))return FALSE;
if(!other_value.codingStandard().is_bound()) return FALSE;
if(!single_value->field_codingStandard.match(other_value.codingStandard(), legacy))return FALSE;
if(!other_value.ext1().is_bound()) return FALSE;
if(!single_value->field_ext1.match(other_value.ext1(), legacy))return FALSE;
if(!other_value.progressDescription().is_bound()) return FALSE;
if(!single_value->field_progressDescription.match(other_value.progressDescription(), legacy))return FALSE;
if(!other_value.ext2().is_bound()) return FALSE;
if(!single_value->field_ext2.match(other_value.ext2(), 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 @MobileL3_CC_Types.ProgressIndicator_TLV.");
}
return FALSE;
}

boolean ProgressIndicator__TLV_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || single_value->field_location.is_bound()
 || single_value->field_spare1__1.is_bound()
 || single_value->field_codingStandard.is_bound()
 || single_value->field_ext1.is_bound()
 || single_value->field_progressDescription.is_bound()
 || single_value->field_ext2.is_bound();
}

boolean ProgressIndicator__TLV_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && single_value->field_location.is_value()
 && single_value->field_spare1__1.is_value()
 && single_value->field_codingStandard.is_value()
 && single_value->field_ext1.is_value()
 && single_value->field_progressDescription.is_value()
 && single_value->field_ext2.is_value();
}

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

ProgressIndicator__TLV ProgressIndicator__TLV_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 @MobileL3_CC_Types.ProgressIndicator_TLV.");
ProgressIndicator__TLV ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_location.is_bound()) {
ret_val.location() = single_value->field_location.valueof();
}
if (single_value->field_spare1__1.is_bound()) {
ret_val.spare1__1() = single_value->field_spare1__1.valueof();
}
if (single_value->field_codingStandard.is_bound()) {
ret_val.codingStandard() = single_value->field_codingStandard.valueof();
}
if (single_value->field_ext1.is_bound()) {
ret_val.ext1() = single_value->field_ext1.valueof();
}
if (single_value->field_progressDescription.is_bound()) {
ret_val.progressDescription() = single_value->field_progressDescription.valueof();
}
if (single_value->field_ext2.is_bound()) {
ret_val.ext2() = single_value->field_ext2.valueof();
}
return ret_val;
}

void ProgressIndicator__TLV_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 @MobileL3_CC_Types.ProgressIndicator_TLV.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new ProgressIndicator__TLV_template[list_length];
}

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

OCTETSTRING_template& ProgressIndicator__TLV_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& ProgressIndicator__TLV_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.ProgressIndicator_TLV.");
return single_value->field_elementIdentifier;
}

INTEGER_template& ProgressIndicator__TLV_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& ProgressIndicator__TLV_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.ProgressIndicator_TLV.");
return single_value->field_lengthIndicator;
}

BITSTRING_template& ProgressIndicator__TLV_template::location()
{
set_specific();
return single_value->field_location;
}

const BITSTRING_template& ProgressIndicator__TLV_template::location() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field location of a non-specific template of type @MobileL3_CC_Types.ProgressIndicator_TLV.");
return single_value->field_location;
}

BITSTRING_template& ProgressIndicator__TLV_template::spare1__1()
{
set_specific();
return single_value->field_spare1__1;
}

const BITSTRING_template& ProgressIndicator__TLV_template::spare1__1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare1_1 of a non-specific template of type @MobileL3_CC_Types.ProgressIndicator_TLV.");
return single_value->field_spare1__1;
}

BITSTRING_template& ProgressIndicator__TLV_template::codingStandard()
{
set_specific();
return single_value->field_codingStandard;
}

const BITSTRING_template& ProgressIndicator__TLV_template::codingStandard() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field codingStandard of a non-specific template of type @MobileL3_CC_Types.ProgressIndicator_TLV.");
return single_value->field_codingStandard;
}

BITSTRING_template& ProgressIndicator__TLV_template::ext1()
{
set_specific();
return single_value->field_ext1;
}

const BITSTRING_template& ProgressIndicator__TLV_template::ext1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext1 of a non-specific template of type @MobileL3_CC_Types.ProgressIndicator_TLV.");
return single_value->field_ext1;
}

BITSTRING_template& ProgressIndicator__TLV_template::progressDescription()
{
set_specific();
return single_value->field_progressDescription;
}

const BITSTRING_template& ProgressIndicator__TLV_template::progressDescription() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field progressDescription of a non-specific template of type @MobileL3_CC_Types.ProgressIndicator_TLV.");
return single_value->field_progressDescription;
}

BITSTRING_template& ProgressIndicator__TLV_template::ext2()
{
set_specific();
return single_value->field_ext2;
}

const BITSTRING_template& ProgressIndicator__TLV_template::ext2() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext2 of a non-specific template of type @MobileL3_CC_Types.ProgressIndicator_TLV.");
return single_value->field_ext2;
}

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

void ProgressIndicator__TLV_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", location := ");
single_value->field_location.log();
TTCN_Logger::log_event_str(", spare1_1 := ");
single_value->field_spare1__1.log();
TTCN_Logger::log_event_str(", codingStandard := ");
single_value->field_codingStandard.log();
TTCN_Logger::log_event_str(", ext1 := ");
single_value->field_ext1.log();
TTCN_Logger::log_event_str(", progressDescription := ");
single_value->field_progressDescription.log();
TTCN_Logger::log_event_str(", ext2 := ");
single_value->field_ext2.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 ProgressIndicator__TLV_template::log_match(const ProgressIndicator__TLV& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_location.match(match_value.location(), legacy)){
TTCN_Logger::log_logmatch_info(".location");
single_value->field_location.log_match(match_value.location(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare1__1.match(match_value.spare1__1(), legacy)){
TTCN_Logger::log_logmatch_info(".spare1_1");
single_value->field_spare1__1.log_match(match_value.spare1__1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_codingStandard.match(match_value.codingStandard(), legacy)){
TTCN_Logger::log_logmatch_info(".codingStandard");
single_value->field_codingStandard.log_match(match_value.codingStandard(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ext1.match(match_value.ext1(), legacy)){
TTCN_Logger::log_logmatch_info(".ext1");
single_value->field_ext1.log_match(match_value.ext1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_progressDescription.match(match_value.progressDescription(), legacy)){
TTCN_Logger::log_logmatch_info(".progressDescription");
single_value->field_progressDescription.log_match(match_value.progressDescription(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ext2.match(match_value.ext2(), legacy)){
TTCN_Logger::log_logmatch_info(".ext2");
single_value->field_ext2.log_match(match_value.ext2(), 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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", location := ");
single_value->field_location.log_match(match_value.location(), legacy);
TTCN_Logger::log_event_str(", spare1_1 := ");
single_value->field_spare1__1.log_match(match_value.spare1__1(), legacy);
TTCN_Logger::log_event_str(", codingStandard := ");
single_value->field_codingStandard.log_match(match_value.codingStandard(), legacy);
TTCN_Logger::log_event_str(", ext1 := ");
single_value->field_ext1.log_match(match_value.ext1(), legacy);
TTCN_Logger::log_event_str(", progressDescription := ");
single_value->field_progressDescription.log_match(match_value.progressDescription(), legacy);
TTCN_Logger::log_event_str(", ext2 := ");
single_value->field_ext2.log_match(match_value.ext2(), 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 ProgressIndicator__TLV_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (location().is_bound()) location().set_implicit_omit();
if (spare1__1().is_bound()) spare1__1().set_implicit_omit();
if (codingStandard().is_bound()) codingStandard().set_implicit_omit();
if (ext1().is_bound()) ext1().set_implicit_omit();
if (progressDescription().is_bound()) progressDescription().set_implicit_omit();
if (ext2().is_bound()) ext2().set_implicit_omit();
}

void ProgressIndicator__TLV_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_location.encode_text(text_buf);
single_value->field_spare1__1.encode_text(text_buf);
single_value->field_codingStandard.encode_text(text_buf);
single_value->field_ext1.encode_text(text_buf);
single_value->field_progressDescription.encode_text(text_buf);
single_value->field_ext2.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 @MobileL3_CC_Types.ProgressIndicator_TLV.");
}
}

void ProgressIndicator__TLV_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_location.decode_text(text_buf);
single_value->field_spare1__1.decode_text(text_buf);
single_value->field_codingStandard.decode_text(text_buf);
single_value->field_ext1.decode_text(text_buf);
single_value->field_progressDescription.decode_text(text_buf);
single_value->field_ext2.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 ProgressIndicator__TLV_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 @MobileL3_CC_Types.ProgressIndicator_TLV.");
}
}

void ProgressIndicator__TLV_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: {
    ProgressIndicator__TLV_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (8<param.get_size()) {
      param.error("record template of type @MobileL3_CC_Types.ProgressIndicator_TLV has 8 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) location().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) spare1__1().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) codingStandard().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) progressDescription().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) ext2().set_param(*param.get_elem(7));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "location")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          location().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "codingStandard")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          codingStandard().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "progressDescription")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          progressDescription().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext2")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext2().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 @MobileL3_CC_Types.ProgressIndicator_TLV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    ProgressIndicator__TLV_template* precondition = new ProgressIndicator__TLV_template;
    precondition->set_param(*param.get_elem(0));
    ProgressIndicator__TLV_template* implied_template = new ProgressIndicator__TLV_template;
    implied_template->set_param(*param.get_elem(1));
    *this = ProgressIndicator__TLV_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.ProgressIndicator_TLV");
  }
  is_ifpresent = param.get_ifpresent();
}

void ProgressIndicator__TLV_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ProgressIndicator_TLV");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ProgressIndicator_TLV");
single_value->field_location.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ProgressIndicator_TLV");
single_value->field_spare1__1.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ProgressIndicator_TLV");
single_value->field_codingStandard.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ProgressIndicator_TLV");
single_value->field_ext1.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ProgressIndicator_TLV");
single_value->field_progressDescription.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ProgressIndicator_TLV");
single_value->field_ext2.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ProgressIndicator_TLV");
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 : "@MobileL3_CC_Types.ProgressIndicator_TLV");
}

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

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

RecallType::RecallType()
{
}

RecallType::RecallType(const OCTETSTRING& par_elementIdentifier,
    const BITSTRING& par_recallType,
    const BITSTRING& par_spare__5)
  :   field_elementIdentifier(par_elementIdentifier),
  field_recallType(par_recallType),
  field_spare__5(par_spare__5)
{
}

RecallType::RecallType(const RecallType& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.RecallType.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.recallType().is_bound()) field_recallType = other_value.recallType();
else field_recallType.clean_up();
if (other_value.spare__5().is_bound()) field_spare__5 = other_value.spare__5();
else field_spare__5.clean_up();
}

void RecallType::clean_up()
{
field_elementIdentifier.clean_up();
field_recallType.clean_up();
field_spare__5.clean_up();
}

const TTCN_Typedescriptor_t* RecallType::get_descriptor() const { return &RecallType_descr_; }
RecallType& RecallType::operator=(const RecallType& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.RecallType.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.recallType().is_bound()) field_recallType = other_value.recallType();
  else field_recallType.clean_up();
  if (other_value.spare__5().is_bound()) field_spare__5 = other_value.spare__5();
  else field_spare__5.clean_up();
}
return *this;
}

boolean RecallType::operator==(const RecallType& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_recallType==other_value.field_recallType
  && field_spare__5==other_value.field_spare__5;
}

boolean RecallType::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_recallType.is_bound())
  || (field_spare__5.is_bound());
}
boolean RecallType::is_value() const
{
return field_elementIdentifier.is_value()
  && field_recallType.is_value()
  && field_spare__5.is_value();
}
void RecallType::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", recallType := ");
field_recallType.log();
TTCN_Logger::log_event_str(", spare_5 := ");
field_spare__5.log();
TTCN_Logger::log_event_str(" }");
}

void RecallType::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (recallType().is_bound()) recallType().set_implicit_omit();
if (spare__5().is_bound()) spare__5().set_implicit_omit();
}

void RecallType::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 @MobileL3_CC_Types.RecallType 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) recallType().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare__5().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "recallType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          recallType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_5")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare__5().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 @MobileL3_CC_Types.RecallType: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.RecallType");
  }
}

void RecallType::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_recallType.encode_text(text_buf);
field_spare__5.encode_text(text_buf);
}

void RecallType::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_recallType.decode_text(text_buf);
field_spare__5.decode_text(text_buf);
}

void RecallType::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 RecallType::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 RecallType::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_recallType.RAW_decode(General__Types::BIT3_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, General__Types::BIT5_descr_.raw->forceomit);
  decoded_field_length = field_spare__5.RAW_decode(General__Types::BIT5_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int RecallType::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT3_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT5_descr_.raw);
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_recallType.RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_spare__5.RAW_encode(General__Types::BIT5_descr_, *myleaf.body.node.nodes[2]);
  return myleaf.length = encoded_length;
}

struct RecallType_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
BITSTRING_template field_recallType;
BITSTRING_template field_spare__5;
};

void RecallType_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_elementIdentifier = ANY_VALUE;
single_value->field_recallType = ANY_VALUE;
single_value->field_spare__5 = ANY_VALUE;
}
}
}

void RecallType_template::copy_value(const RecallType& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.recallType().is_bound()) {
  single_value->field_recallType = other_value.recallType();
} else {
  single_value->field_recallType.clean_up();
}
if (other_value.spare__5().is_bound()) {
  single_value->field_spare__5 = other_value.spare__5();
} else {
  single_value->field_spare__5.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void RecallType_template::copy_template(const RecallType_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.recallType().get_selection()) {
single_value->field_recallType = other_value.recallType();
} else {
single_value->field_recallType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare__5().get_selection()) {
single_value->field_spare__5 = other_value.spare__5();
} else {
single_value->field_spare__5.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 RecallType_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 RecallType_template(*other_value.implication_.precondition);
implication_.implied_template = new RecallType_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 @MobileL3_CC_Types.RecallType.");
break;
}
set_selection(other_value);
}

RecallType_template::RecallType_template()
{
}

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

RecallType_template::RecallType_template(const RecallType& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean RecallType_template::match(const RecallType& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.recallType().is_bound()) return FALSE;
if(!single_value->field_recallType.match(other_value.recallType(), legacy))return FALSE;
if(!other_value.spare__5().is_bound()) return FALSE;
if(!single_value->field_spare__5.match(other_value.spare__5(), 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 @MobileL3_CC_Types.RecallType.");
}
return FALSE;
}

boolean RecallType_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_recallType.is_bound()
 || single_value->field_spare__5.is_bound();
}

boolean RecallType_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_recallType.is_value()
 && single_value->field_spare__5.is_value();
}

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

RecallType RecallType_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 @MobileL3_CC_Types.RecallType.");
RecallType ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_recallType.is_bound()) {
ret_val.recallType() = single_value->field_recallType.valueof();
}
if (single_value->field_spare__5.is_bound()) {
ret_val.spare__5() = single_value->field_spare__5.valueof();
}
return ret_val;
}

void RecallType_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 @MobileL3_CC_Types.RecallType.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new RecallType_template[list_length];
}

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

OCTETSTRING_template& RecallType_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& RecallType_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.RecallType.");
return single_value->field_elementIdentifier;
}

BITSTRING_template& RecallType_template::recallType()
{
set_specific();
return single_value->field_recallType;
}

const BITSTRING_template& RecallType_template::recallType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field recallType of a non-specific template of type @MobileL3_CC_Types.RecallType.");
return single_value->field_recallType;
}

BITSTRING_template& RecallType_template::spare__5()
{
set_specific();
return single_value->field_spare__5;
}

const BITSTRING_template& RecallType_template::spare__5() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare_5 of a non-specific template of type @MobileL3_CC_Types.RecallType.");
return single_value->field_spare__5;
}

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

void RecallType_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", recallType := ");
single_value->field_recallType.log();
TTCN_Logger::log_event_str(", spare_5 := ");
single_value->field_spare__5.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 RecallType_template::log_match(const RecallType& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_recallType.match(match_value.recallType(), legacy)){
TTCN_Logger::log_logmatch_info(".recallType");
single_value->field_recallType.log_match(match_value.recallType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare__5.match(match_value.spare__5(), legacy)){
TTCN_Logger::log_logmatch_info(".spare_5");
single_value->field_spare__5.log_match(match_value.spare__5(), 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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", recallType := ");
single_value->field_recallType.log_match(match_value.recallType(), legacy);
TTCN_Logger::log_event_str(", spare_5 := ");
single_value->field_spare__5.log_match(match_value.spare__5(), 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 RecallType_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (recallType().is_bound()) recallType().set_implicit_omit();
if (spare__5().is_bound()) spare__5().set_implicit_omit();
}

void RecallType_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_recallType.encode_text(text_buf);
single_value->field_spare__5.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 @MobileL3_CC_Types.RecallType.");
}
}

void RecallType_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_elementIdentifier.decode_text(text_buf);
single_value->field_recallType.decode_text(text_buf);
single_value->field_spare__5.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 RecallType_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 @MobileL3_CC_Types.RecallType.");
}
}

void RecallType_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: {
    RecallType_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 @MobileL3_CC_Types.RecallType 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) recallType().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare__5().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "recallType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          recallType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_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_5")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare__5().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 @MobileL3_CC_Types.RecallType: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    RecallType_template* precondition = new RecallType_template;
    precondition->set_param(*param.get_elem(0));
    RecallType_template* implied_template = new RecallType_template;
    implied_template->set_param(*param.get_elem(1));
    *this = RecallType_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.RecallType");
  }
  is_ifpresent = param.get_ifpresent();
}

void RecallType_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RecallType");
single_value->field_recallType.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RecallType");
single_value->field_spare__5.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RecallType");
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 : "@MobileL3_CC_Types.RecallType");
}

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

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

RedirectingPartyBCDNumberTLV::RedirectingPartyBCDNumberTLV()
{
}

RedirectingPartyBCDNumberTLV::RedirectingPartyBCDNumberTLV(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const CallingOrCalled__Number__oct3& par_oct3,
    const OPTIONAL< HEXSTRING >& par_digits)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_oct3(par_oct3),
  field_digits(par_digits)
{
}

RedirectingPartyBCDNumberTLV::RedirectingPartyBCDNumberTLV(const RedirectingPartyBCDNumberTLV& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.oct3().is_bound()) field_oct3 = other_value.oct3();
else field_oct3.clean_up();
if (other_value.digits().is_bound()) field_digits = other_value.digits();
else field_digits.clean_up();
}

void RedirectingPartyBCDNumberTLV::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_oct3.clean_up();
field_digits.clean_up();
}

const TTCN_Typedescriptor_t* RedirectingPartyBCDNumberTLV::get_descriptor() const { return &RedirectingPartyBCDNumberTLV_descr_; }
RedirectingPartyBCDNumberTLV& RedirectingPartyBCDNumberTLV::operator=(const RedirectingPartyBCDNumberTLV& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.oct3().is_bound()) field_oct3 = other_value.oct3();
  else field_oct3.clean_up();
  if (other_value.digits().is_bound()) field_digits = other_value.digits();
  else field_digits.clean_up();
}
return *this;
}

boolean RedirectingPartyBCDNumberTLV::operator==(const RedirectingPartyBCDNumberTLV& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_oct3==other_value.field_oct3
  && field_digits==other_value.field_digits;
}

boolean RedirectingPartyBCDNumberTLV::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (field_oct3.is_bound())
  || (OPTIONAL_OMIT == field_digits.get_selection() || field_digits.is_bound());
}
boolean RedirectingPartyBCDNumberTLV::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && field_oct3.is_value()
  && (OPTIONAL_OMIT == field_digits.get_selection() || field_digits.is_value());
}
int RedirectingPartyBCDNumberTLV::size_of() const
{
  int ret_val = 3;
  if (field_digits.ispresent()) ret_val++;
  return ret_val;
}

void RedirectingPartyBCDNumberTLV::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", oct3 := ");
field_oct3.log();
TTCN_Logger::log_event_str(", digits := ");
field_digits.log();
TTCN_Logger::log_event_str(" }");
}

void RedirectingPartyBCDNumberTLV::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (oct3().is_bound()) oct3().set_implicit_omit();
if (!digits().is_bound()) digits() = OMIT_VALUE;
else digits().set_implicit_omit();
}

void RedirectingPartyBCDNumberTLV::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 @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) oct3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) digits().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "oct3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          oct3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "digits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          digits().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 @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.RedirectingPartyBCDNumberTLV");
  }
}

void RedirectingPartyBCDNumberTLV::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_oct3.encode_text(text_buf);
field_digits.encode_text(text_buf);
}

void RedirectingPartyBCDNumberTLV::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_oct3.decode_text(text_buf);
field_digits.decode_text(text_buf);
}

void RedirectingPartyBCDNumberTLV::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 RedirectingPartyBCDNumberTLV::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 RedirectingPartyBCDNumberTLV::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, RedirectingPartyBCDNumberTLV_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(RedirectingPartyBCDNumberTLV_lengthIndicator_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_lengthIndicator.convert_to_Integer(RedirectingPartyBCDNumberTLV_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  RAW_Force_Omit field_2_force_omit(2, force_omit, CallingOrCalled__Number__oct3_descr_.raw->forceomit);
  decoded_field_length = field_oct3.RAW_decode(CallingOrCalled__Number__oct3_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;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_digits = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, RedirectingPartyBCDNumberTLV_digits_descr_.raw->forceomit);
  decoded_field_length = field_digits().RAW_decode(RedirectingPartyBCDNumberTLV_digits_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_digits = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_digits=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int RedirectingPartyBCDNumberTLV::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, RedirectingPartyBCDNumberTLV_lengthIndicator_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, CallingOrCalled__Number__oct3_descr_.raw);
  if (field_digits.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, RedirectingPartyBCDNumberTLV_digits_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &RedirectingPartyBCDNumberTLV_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 2;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(2);
  myleaf.body.node.nodes[1]->length = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[2]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[2]->curr_pos.pos;
  if (field_digits.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = 0;
  }
  encoded_length += field_oct3.RAW_encode(CallingOrCalled__Number__oct3_descr_, *myleaf.body.node.nodes[2]);
  if (field_digits.ispresent()) {
  encoded_length += field_digits().RAW_encode(RedirectingPartyBCDNumberTLV_digits_descr_, *myleaf.body.node.nodes[3]);
  }
  return myleaf.length = encoded_length;
}

struct RedirectingPartyBCDNumberTLV_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
CallingOrCalled__Number__oct3_template field_oct3;
HEXSTRING_template field_digits;
};

void RedirectingPartyBCDNumberTLV_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_oct3 = ANY_VALUE;
single_value->field_digits = ANY_OR_OMIT;
}
}
}

void RedirectingPartyBCDNumberTLV_template::copy_value(const RedirectingPartyBCDNumberTLV& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.oct3().is_bound()) {
  single_value->field_oct3 = other_value.oct3();
} else {
  single_value->field_oct3.clean_up();
}
if (other_value.digits().is_bound()) {
  if (other_value.digits().ispresent()) single_value->field_digits = other_value.digits()();
  else single_value->field_digits = OMIT_VALUE;
} else {
  single_value->field_digits.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void RedirectingPartyBCDNumberTLV_template::copy_template(const RedirectingPartyBCDNumberTLV_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.oct3().get_selection()) {
single_value->field_oct3 = other_value.oct3();
} else {
single_value->field_oct3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.digits().get_selection()) {
single_value->field_digits = other_value.digits();
} else {
single_value->field_digits.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 RedirectingPartyBCDNumberTLV_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 RedirectingPartyBCDNumberTLV_template(*other_value.implication_.precondition);
implication_.implied_template = new RedirectingPartyBCDNumberTLV_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 @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV.");
break;
}
set_selection(other_value);
}

RedirectingPartyBCDNumberTLV_template::RedirectingPartyBCDNumberTLV_template()
{
}

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

RedirectingPartyBCDNumberTLV_template::RedirectingPartyBCDNumberTLV_template(const RedirectingPartyBCDNumberTLV& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean RedirectingPartyBCDNumberTLV_template::match(const RedirectingPartyBCDNumberTLV& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.oct3().is_bound()) return FALSE;
if(!single_value->field_oct3.match(other_value.oct3(), legacy))return FALSE;
if(!other_value.digits().is_bound()) return FALSE;
if((other_value.digits().ispresent() ? !single_value->field_digits.match((const HEXSTRING&)other_value.digits(), legacy) : !single_value->field_digits.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 @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV.");
}
return FALSE;
}

boolean RedirectingPartyBCDNumberTLV_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || single_value->field_oct3.is_bound()
 || (single_value->field_digits.is_omit() || single_value->field_digits.is_bound());
}

boolean RedirectingPartyBCDNumberTLV_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && single_value->field_oct3.is_value()
 && (single_value->field_digits.is_omit() || single_value->field_digits.is_value());
}

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

RedirectingPartyBCDNumberTLV RedirectingPartyBCDNumberTLV_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 @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV.");
RedirectingPartyBCDNumberTLV ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_oct3.is_bound()) {
ret_val.oct3() = single_value->field_oct3.valueof();
}
if (single_value->field_digits.is_omit()) ret_val.digits() = OMIT_VALUE;
else if (single_value->field_digits.is_bound()) {
ret_val.digits() = single_value->field_digits.valueof();
}
return ret_val;
}

void RedirectingPartyBCDNumberTLV_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 @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new RedirectingPartyBCDNumberTLV_template[list_length];
}

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

OCTETSTRING_template& RedirectingPartyBCDNumberTLV_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& RedirectingPartyBCDNumberTLV_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV.");
return single_value->field_elementIdentifier;
}

INTEGER_template& RedirectingPartyBCDNumberTLV_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& RedirectingPartyBCDNumberTLV_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV.");
return single_value->field_lengthIndicator;
}

CallingOrCalled__Number__oct3_template& RedirectingPartyBCDNumberTLV_template::oct3()
{
set_specific();
return single_value->field_oct3;
}

const CallingOrCalled__Number__oct3_template& RedirectingPartyBCDNumberTLV_template::oct3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field oct3 of a non-specific template of type @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV.");
return single_value->field_oct3;
}

HEXSTRING_template& RedirectingPartyBCDNumberTLV_template::digits()
{
set_specific();
return single_value->field_digits;
}

const HEXSTRING_template& RedirectingPartyBCDNumberTLV_template::digits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field digits of a non-specific template of type @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV.");
return single_value->field_digits;
}

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

void RedirectingPartyBCDNumberTLV_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", oct3 := ");
single_value->field_oct3.log();
TTCN_Logger::log_event_str(", digits := ");
single_value->field_digits.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 RedirectingPartyBCDNumberTLV_template::log_match(const RedirectingPartyBCDNumberTLV& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_oct3.match(match_value.oct3(), legacy)){
TTCN_Logger::log_logmatch_info(".oct3");
single_value->field_oct3.log_match(match_value.oct3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.digits().ispresent()){
if(!single_value->field_digits.match(match_value.digits(), legacy)){
TTCN_Logger::log_logmatch_info(".digits");
single_value->field_digits.log_match(match_value.digits(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_digits.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".digits := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_digits.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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", oct3 := ");
single_value->field_oct3.log_match(match_value.oct3(), legacy);
TTCN_Logger::log_event_str(", digits := ");
if (match_value.digits().ispresent()) {
single_value->field_digits.log_match(match_value.digits(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_digits.log();
if (single_value->field_digits.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 RedirectingPartyBCDNumberTLV_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (oct3().is_bound()) oct3().set_implicit_omit();
if (!digits().is_bound()) digits() = OMIT_VALUE;
else digits().set_implicit_omit();
}

void RedirectingPartyBCDNumberTLV_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_oct3.encode_text(text_buf);
single_value->field_digits.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 @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV.");
}
}

void RedirectingPartyBCDNumberTLV_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_oct3.decode_text(text_buf);
single_value->field_digits.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 RedirectingPartyBCDNumberTLV_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 @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV.");
}
}

void RedirectingPartyBCDNumberTLV_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: {
    RedirectingPartyBCDNumberTLV_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 @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) oct3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) digits().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "oct3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          oct3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "digits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          digits().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 @MobileL3_CC_Types.RedirectingPartyBCDNumberTLV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    RedirectingPartyBCDNumberTLV_template* precondition = new RedirectingPartyBCDNumberTLV_template;
    precondition->set_param(*param.get_elem(0));
    RedirectingPartyBCDNumberTLV_template* implied_template = new RedirectingPartyBCDNumberTLV_template;
    implied_template->set_param(*param.get_elem(1));
    *this = RedirectingPartyBCDNumberTLV_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.RedirectingPartyBCDNumberTLV");
  }
  is_ifpresent = param.get_ifpresent();
}

void RedirectingPartyBCDNumberTLV_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RedirectingPartyBCDNumberTLV");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RedirectingPartyBCDNumberTLV");
single_value->field_oct3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RedirectingPartyBCDNumberTLV");
single_value->field_digits.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RedirectingPartyBCDNumberTLV");
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 : "@MobileL3_CC_Types.RedirectingPartyBCDNumberTLV");
}

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

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

RedirectingPartySubaddressTLV::RedirectingPartySubaddressTLV()
{
}

RedirectingPartySubaddressTLV::RedirectingPartySubaddressTLV(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const OPTIONAL< BITSTRING >& par_spare1__3,
    const OPTIONAL< BITSTRING >& par_odd__evenIndicator,
    const OPTIONAL< BITSTRING >& par_typeOfSubAddress,
    const OPTIONAL< BITSTRING >& par_ext1,
    const OPTIONAL< OCTETSTRING >& par_subAddressInformation)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_spare1__3(par_spare1__3),
  field_odd__evenIndicator(par_odd__evenIndicator),
  field_typeOfSubAddress(par_typeOfSubAddress),
  field_ext1(par_ext1),
  field_subAddressInformation(par_subAddressInformation)
{
}

RedirectingPartySubaddressTLV::RedirectingPartySubaddressTLV(const RedirectingPartySubaddressTLV& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.RedirectingPartySubaddressTLV.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.spare1__3().is_bound()) field_spare1__3 = other_value.spare1__3();
else field_spare1__3.clean_up();
if (other_value.odd__evenIndicator().is_bound()) field_odd__evenIndicator = other_value.odd__evenIndicator();
else field_odd__evenIndicator.clean_up();
if (other_value.typeOfSubAddress().is_bound()) field_typeOfSubAddress = other_value.typeOfSubAddress();
else field_typeOfSubAddress.clean_up();
if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
else field_ext1.clean_up();
if (other_value.subAddressInformation().is_bound()) field_subAddressInformation = other_value.subAddressInformation();
else field_subAddressInformation.clean_up();
}

void RedirectingPartySubaddressTLV::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_spare1__3.clean_up();
field_odd__evenIndicator.clean_up();
field_typeOfSubAddress.clean_up();
field_ext1.clean_up();
field_subAddressInformation.clean_up();
}

const TTCN_Typedescriptor_t* RedirectingPartySubaddressTLV::get_descriptor() const { return &RedirectingPartySubaddressTLV_descr_; }
RedirectingPartySubaddressTLV& RedirectingPartySubaddressTLV::operator=(const RedirectingPartySubaddressTLV& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.RedirectingPartySubaddressTLV.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.spare1__3().is_bound()) field_spare1__3 = other_value.spare1__3();
  else field_spare1__3.clean_up();
  if (other_value.odd__evenIndicator().is_bound()) field_odd__evenIndicator = other_value.odd__evenIndicator();
  else field_odd__evenIndicator.clean_up();
  if (other_value.typeOfSubAddress().is_bound()) field_typeOfSubAddress = other_value.typeOfSubAddress();
  else field_typeOfSubAddress.clean_up();
  if (other_value.ext1().is_bound()) field_ext1 = other_value.ext1();
  else field_ext1.clean_up();
  if (other_value.subAddressInformation().is_bound()) field_subAddressInformation = other_value.subAddressInformation();
  else field_subAddressInformation.clean_up();
}
return *this;
}

boolean RedirectingPartySubaddressTLV::operator==(const RedirectingPartySubaddressTLV& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_spare1__3==other_value.field_spare1__3
  && field_odd__evenIndicator==other_value.field_odd__evenIndicator
  && field_typeOfSubAddress==other_value.field_typeOfSubAddress
  && field_ext1==other_value.field_ext1
  && field_subAddressInformation==other_value.field_subAddressInformation;
}

boolean RedirectingPartySubaddressTLV::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (OPTIONAL_OMIT == field_spare1__3.get_selection() || field_spare1__3.is_bound())
  || (OPTIONAL_OMIT == field_odd__evenIndicator.get_selection() || field_odd__evenIndicator.is_bound())
  || (OPTIONAL_OMIT == field_typeOfSubAddress.get_selection() || field_typeOfSubAddress.is_bound())
  || (OPTIONAL_OMIT == field_ext1.get_selection() || field_ext1.is_bound())
  || (OPTIONAL_OMIT == field_subAddressInformation.get_selection() || field_subAddressInformation.is_bound());
}
boolean RedirectingPartySubaddressTLV::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && (OPTIONAL_OMIT == field_spare1__3.get_selection() || field_spare1__3.is_value())
  && (OPTIONAL_OMIT == field_odd__evenIndicator.get_selection() || field_odd__evenIndicator.is_value())
  && (OPTIONAL_OMIT == field_typeOfSubAddress.get_selection() || field_typeOfSubAddress.is_value())
  && (OPTIONAL_OMIT == field_ext1.get_selection() || field_ext1.is_value())
  && (OPTIONAL_OMIT == field_subAddressInformation.get_selection() || field_subAddressInformation.is_value());
}
int RedirectingPartySubaddressTLV::size_of() const
{
  int ret_val = 2;
  if (field_spare1__3.ispresent()) ret_val++;
  if (field_odd__evenIndicator.ispresent()) ret_val++;
  if (field_typeOfSubAddress.ispresent()) ret_val++;
  if (field_ext1.ispresent()) ret_val++;
  if (field_subAddressInformation.ispresent()) ret_val++;
  return ret_val;
}

void RedirectingPartySubaddressTLV::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", spare1_3 := ");
field_spare1__3.log();
TTCN_Logger::log_event_str(", odd_evenIndicator := ");
field_odd__evenIndicator.log();
TTCN_Logger::log_event_str(", typeOfSubAddress := ");
field_typeOfSubAddress.log();
TTCN_Logger::log_event_str(", ext1 := ");
field_ext1.log();
TTCN_Logger::log_event_str(", subAddressInformation := ");
field_subAddressInformation.log();
TTCN_Logger::log_event_str(" }");
}

void RedirectingPartySubaddressTLV::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (!spare1__3().is_bound()) spare1__3() = OMIT_VALUE;
else spare1__3().set_implicit_omit();
if (!odd__evenIndicator().is_bound()) odd__evenIndicator() = OMIT_VALUE;
else odd__evenIndicator().set_implicit_omit();
if (!typeOfSubAddress().is_bound()) typeOfSubAddress() = OMIT_VALUE;
else typeOfSubAddress().set_implicit_omit();
if (!ext1().is_bound()) ext1() = OMIT_VALUE;
else ext1().set_implicit_omit();
if (!subAddressInformation().is_bound()) subAddressInformation() = OMIT_VALUE;
else subAddressInformation().set_implicit_omit();
}

void RedirectingPartySubaddressTLV::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 @MobileL3_CC_Types.RedirectingPartySubaddressTLV 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare1__3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) odd__evenIndicator().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) typeOfSubAddress().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) subAddressInformation().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "odd_evenIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          odd__evenIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "typeOfSubAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          typeOfSubAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "subAddressInformation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          subAddressInformation().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 @MobileL3_CC_Types.RedirectingPartySubaddressTLV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.RedirectingPartySubaddressTLV");
  }
}

void RedirectingPartySubaddressTLV::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_spare1__3.encode_text(text_buf);
field_odd__evenIndicator.encode_text(text_buf);
field_typeOfSubAddress.encode_text(text_buf);
field_ext1.encode_text(text_buf);
field_subAddressInformation.encode_text(text_buf);
}

void RedirectingPartySubaddressTLV::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_spare1__3.decode_text(text_buf);
field_odd__evenIndicator.decode_text(text_buf);
field_typeOfSubAddress.decode_text(text_buf);
field_ext1.decode_text(text_buf);
field_subAddressInformation.decode_text(text_buf);
}

void RedirectingPartySubaddressTLV::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 RedirectingPartySubaddressTLV::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 RedirectingPartySubaddressTLV::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, RedirectingPartySubaddressTLV_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(RedirectingPartySubaddressTLV_lengthIndicator_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_lengthIndicator.convert_to_Integer(RedirectingPartySubaddressTLV_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_spare1__3 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_spare1__3().RAW_decode(General__Types::BIT3_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_spare1__3 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_spare1__3=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_odd__evenIndicator = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_odd__evenIndicator().RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_odd__evenIndicator = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_odd__evenIndicator=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_typeOfSubAddress = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, General__Types::BIT3_descr_.raw->forceomit);
  decoded_field_length = field_typeOfSubAddress().RAW_decode(General__Types::BIT3_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_typeOfSubAddress = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_typeOfSubAddress=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_ext1 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, General__Types::BIT1_descr_.raw->forceomit);
  decoded_field_length = field_ext1().RAW_decode(General__Types::BIT1_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_ext1 = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_ext1=OMIT_VALUE;
  if (limit > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_subAddressInformation = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, General__Types::OCTN_descr_.raw->forceomit);
  decoded_field_length = field_subAddressInformation().RAW_decode(General__Types::OCTN_descr_, p_buf, min_of_ints(2, limit, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_subAddressInformation = 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());
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_subAddressInformation=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int RedirectingPartySubaddressTLV::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, RedirectingPartySubaddressTLV_lengthIndicator_descr_.raw);
  if (field_spare1__3.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT3_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_odd__evenIndicator.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_typeOfSubAddress.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT3_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_ext1.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, General__Types::BIT1_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_subAddressInformation.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, General__Types::OCTN_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &RedirectingPartySubaddressTLV_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 5;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(5);
  myleaf.body.node.nodes[1]->length = 8;
  if (field_spare1__3.ispresent()) {
  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;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = 0;
  }
  if (field_odd__evenIndicator.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[1].pos = 0;
  }
  if (field_typeOfSubAddress.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = myleaf.body.node.nodes[4]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = myleaf.body.node.nodes[4]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[2].pos = 0;
  }
  if (field_ext1.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = myleaf.body.node.nodes[5]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = myleaf.body.node.nodes[5]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[3].pos = 0;
  }
  if (field_subAddressInformation.ispresent()) {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].level = myleaf.body.node.nodes[6]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].pos = myleaf.body.node.nodes[6]->curr_pos.pos;
  } else {
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].level = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[4].pos = 0;
  }
  if (field_spare1__3.ispresent()) {
  encoded_length += field_spare1__3().RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_odd__evenIndicator.ispresent()) {
  encoded_length += field_odd__evenIndicator().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_typeOfSubAddress.ispresent()) {
  encoded_length += field_typeOfSubAddress().RAW_encode(General__Types::BIT3_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_ext1.ispresent()) {
  encoded_length += field_ext1().RAW_encode(General__Types::BIT1_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_subAddressInformation.ispresent()) {
  encoded_length += field_subAddressInformation().RAW_encode(General__Types::OCTN_descr_, *myleaf.body.node.nodes[6]);
  }
  return myleaf.length = encoded_length;
}

struct RedirectingPartySubaddressTLV_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
BITSTRING_template field_spare1__3;
BITSTRING_template field_odd__evenIndicator;
BITSTRING_template field_typeOfSubAddress;
BITSTRING_template field_ext1;
OCTETSTRING_template field_subAddressInformation;
};

void RedirectingPartySubaddressTLV_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_spare1__3 = ANY_OR_OMIT;
single_value->field_odd__evenIndicator = ANY_OR_OMIT;
single_value->field_typeOfSubAddress = ANY_OR_OMIT;
single_value->field_ext1 = ANY_OR_OMIT;
single_value->field_subAddressInformation = ANY_OR_OMIT;
}
}
}

void RedirectingPartySubaddressTLV_template::copy_value(const RedirectingPartySubaddressTLV& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.spare1__3().is_bound()) {
  if (other_value.spare1__3().ispresent()) single_value->field_spare1__3 = other_value.spare1__3()();
  else single_value->field_spare1__3 = OMIT_VALUE;
} else {
  single_value->field_spare1__3.clean_up();
}
if (other_value.odd__evenIndicator().is_bound()) {
  if (other_value.odd__evenIndicator().ispresent()) single_value->field_odd__evenIndicator = other_value.odd__evenIndicator()();
  else single_value->field_odd__evenIndicator = OMIT_VALUE;
} else {
  single_value->field_odd__evenIndicator.clean_up();
}
if (other_value.typeOfSubAddress().is_bound()) {
  if (other_value.typeOfSubAddress().ispresent()) single_value->field_typeOfSubAddress = other_value.typeOfSubAddress()();
  else single_value->field_typeOfSubAddress = OMIT_VALUE;
} else {
  single_value->field_typeOfSubAddress.clean_up();
}
if (other_value.ext1().is_bound()) {
  if (other_value.ext1().ispresent()) single_value->field_ext1 = other_value.ext1()();
  else single_value->field_ext1 = OMIT_VALUE;
} else {
  single_value->field_ext1.clean_up();
}
if (other_value.subAddressInformation().is_bound()) {
  if (other_value.subAddressInformation().ispresent()) single_value->field_subAddressInformation = other_value.subAddressInformation()();
  else single_value->field_subAddressInformation = OMIT_VALUE;
} else {
  single_value->field_subAddressInformation.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void RedirectingPartySubaddressTLV_template::copy_template(const RedirectingPartySubaddressTLV_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare1__3().get_selection()) {
single_value->field_spare1__3 = other_value.spare1__3();
} else {
single_value->field_spare1__3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.odd__evenIndicator().get_selection()) {
single_value->field_odd__evenIndicator = other_value.odd__evenIndicator();
} else {
single_value->field_odd__evenIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.typeOfSubAddress().get_selection()) {
single_value->field_typeOfSubAddress = other_value.typeOfSubAddress();
} else {
single_value->field_typeOfSubAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext1().get_selection()) {
single_value->field_ext1 = other_value.ext1();
} else {
single_value->field_ext1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.subAddressInformation().get_selection()) {
single_value->field_subAddressInformation = other_value.subAddressInformation();
} else {
single_value->field_subAddressInformation.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 RedirectingPartySubaddressTLV_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 RedirectingPartySubaddressTLV_template(*other_value.implication_.precondition);
implication_.implied_template = new RedirectingPartySubaddressTLV_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 @MobileL3_CC_Types.RedirectingPartySubaddressTLV.");
break;
}
set_selection(other_value);
}

RedirectingPartySubaddressTLV_template::RedirectingPartySubaddressTLV_template()
{
}

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

RedirectingPartySubaddressTLV_template::RedirectingPartySubaddressTLV_template(const RedirectingPartySubaddressTLV& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean RedirectingPartySubaddressTLV_template::match(const RedirectingPartySubaddressTLV& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.spare1__3().is_bound()) return FALSE;
if((other_value.spare1__3().ispresent() ? !single_value->field_spare1__3.match((const BITSTRING&)other_value.spare1__3(), legacy) : !single_value->field_spare1__3.match_omit(legacy)))return FALSE;
if(!other_value.odd__evenIndicator().is_bound()) return FALSE;
if((other_value.odd__evenIndicator().ispresent() ? !single_value->field_odd__evenIndicator.match((const BITSTRING&)other_value.odd__evenIndicator(), legacy) : !single_value->field_odd__evenIndicator.match_omit(legacy)))return FALSE;
if(!other_value.typeOfSubAddress().is_bound()) return FALSE;
if((other_value.typeOfSubAddress().ispresent() ? !single_value->field_typeOfSubAddress.match((const BITSTRING&)other_value.typeOfSubAddress(), legacy) : !single_value->field_typeOfSubAddress.match_omit(legacy)))return FALSE;
if(!other_value.ext1().is_bound()) return FALSE;
if((other_value.ext1().ispresent() ? !single_value->field_ext1.match((const BITSTRING&)other_value.ext1(), legacy) : !single_value->field_ext1.match_omit(legacy)))return FALSE;
if(!other_value.subAddressInformation().is_bound()) return FALSE;
if((other_value.subAddressInformation().ispresent() ? !single_value->field_subAddressInformation.match((const OCTETSTRING&)other_value.subAddressInformation(), legacy) : !single_value->field_subAddressInformation.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 @MobileL3_CC_Types.RedirectingPartySubaddressTLV.");
}
return FALSE;
}

boolean RedirectingPartySubaddressTLV_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || (single_value->field_spare1__3.is_omit() || single_value->field_spare1__3.is_bound())
 || (single_value->field_odd__evenIndicator.is_omit() || single_value->field_odd__evenIndicator.is_bound())
 || (single_value->field_typeOfSubAddress.is_omit() || single_value->field_typeOfSubAddress.is_bound())
 || (single_value->field_ext1.is_omit() || single_value->field_ext1.is_bound())
 || (single_value->field_subAddressInformation.is_omit() || single_value->field_subAddressInformation.is_bound());
}

boolean RedirectingPartySubaddressTLV_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && (single_value->field_spare1__3.is_omit() || single_value->field_spare1__3.is_value())
 && (single_value->field_odd__evenIndicator.is_omit() || single_value->field_odd__evenIndicator.is_value())
 && (single_value->field_typeOfSubAddress.is_omit() || single_value->field_typeOfSubAddress.is_value())
 && (single_value->field_ext1.is_omit() || single_value->field_ext1.is_value())
 && (single_value->field_subAddressInformation.is_omit() || single_value->field_subAddressInformation.is_value());
}

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

RedirectingPartySubaddressTLV RedirectingPartySubaddressTLV_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 @MobileL3_CC_Types.RedirectingPartySubaddressTLV.");
RedirectingPartySubaddressTLV ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_spare1__3.is_omit()) ret_val.spare1__3() = OMIT_VALUE;
else if (single_value->field_spare1__3.is_bound()) {
ret_val.spare1__3() = single_value->field_spare1__3.valueof();
}
if (single_value->field_odd__evenIndicator.is_omit()) ret_val.odd__evenIndicator() = OMIT_VALUE;
else if (single_value->field_odd__evenIndicator.is_bound()) {
ret_val.odd__evenIndicator() = single_value->field_odd__evenIndicator.valueof();
}
if (single_value->field_typeOfSubAddress.is_omit()) ret_val.typeOfSubAddress() = OMIT_VALUE;
else if (single_value->field_typeOfSubAddress.is_bound()) {
ret_val.typeOfSubAddress() = single_value->field_typeOfSubAddress.valueof();
}
if (single_value->field_ext1.is_omit()) ret_val.ext1() = OMIT_VALUE;
else if (single_value->field_ext1.is_bound()) {
ret_val.ext1() = single_value->field_ext1.valueof();
}
if (single_value->field_subAddressInformation.is_omit()) ret_val.subAddressInformation() = OMIT_VALUE;
else if (single_value->field_subAddressInformation.is_bound()) {
ret_val.subAddressInformation() = single_value->field_subAddressInformation.valueof();
}
return ret_val;
}

void RedirectingPartySubaddressTLV_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 @MobileL3_CC_Types.RedirectingPartySubaddressTLV.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new RedirectingPartySubaddressTLV_template[list_length];
}

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

OCTETSTRING_template& RedirectingPartySubaddressTLV_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& RedirectingPartySubaddressTLV_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.RedirectingPartySubaddressTLV.");
return single_value->field_elementIdentifier;
}

INTEGER_template& RedirectingPartySubaddressTLV_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& RedirectingPartySubaddressTLV_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.RedirectingPartySubaddressTLV.");
return single_value->field_lengthIndicator;
}

BITSTRING_template& RedirectingPartySubaddressTLV_template::spare1__3()
{
set_specific();
return single_value->field_spare1__3;
}

const BITSTRING_template& RedirectingPartySubaddressTLV_template::spare1__3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare1_3 of a non-specific template of type @MobileL3_CC_Types.RedirectingPartySubaddressTLV.");
return single_value->field_spare1__3;
}

BITSTRING_template& RedirectingPartySubaddressTLV_template::odd__evenIndicator()
{
set_specific();
return single_value->field_odd__evenIndicator;
}

const BITSTRING_template& RedirectingPartySubaddressTLV_template::odd__evenIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field odd_evenIndicator of a non-specific template of type @MobileL3_CC_Types.RedirectingPartySubaddressTLV.");
return single_value->field_odd__evenIndicator;
}

BITSTRING_template& RedirectingPartySubaddressTLV_template::typeOfSubAddress()
{
set_specific();
return single_value->field_typeOfSubAddress;
}

const BITSTRING_template& RedirectingPartySubaddressTLV_template::typeOfSubAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field typeOfSubAddress of a non-specific template of type @MobileL3_CC_Types.RedirectingPartySubaddressTLV.");
return single_value->field_typeOfSubAddress;
}

BITSTRING_template& RedirectingPartySubaddressTLV_template::ext1()
{
set_specific();
return single_value->field_ext1;
}

const BITSTRING_template& RedirectingPartySubaddressTLV_template::ext1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext1 of a non-specific template of type @MobileL3_CC_Types.RedirectingPartySubaddressTLV.");
return single_value->field_ext1;
}

OCTETSTRING_template& RedirectingPartySubaddressTLV_template::subAddressInformation()
{
set_specific();
return single_value->field_subAddressInformation;
}

const OCTETSTRING_template& RedirectingPartySubaddressTLV_template::subAddressInformation() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field subAddressInformation of a non-specific template of type @MobileL3_CC_Types.RedirectingPartySubaddressTLV.");
return single_value->field_subAddressInformation;
}

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

void RedirectingPartySubaddressTLV_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", spare1_3 := ");
single_value->field_spare1__3.log();
TTCN_Logger::log_event_str(", odd_evenIndicator := ");
single_value->field_odd__evenIndicator.log();
TTCN_Logger::log_event_str(", typeOfSubAddress := ");
single_value->field_typeOfSubAddress.log();
TTCN_Logger::log_event_str(", ext1 := ");
single_value->field_ext1.log();
TTCN_Logger::log_event_str(", subAddressInformation := ");
single_value->field_subAddressInformation.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 RedirectingPartySubaddressTLV_template::log_match(const RedirectingPartySubaddressTLV& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.spare1__3().ispresent()){
if(!single_value->field_spare1__3.match(match_value.spare1__3(), legacy)){
TTCN_Logger::log_logmatch_info(".spare1_3");
single_value->field_spare1__3.log_match(match_value.spare1__3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_spare1__3.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".spare1_3 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_spare1__3.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.odd__evenIndicator().ispresent()){
if(!single_value->field_odd__evenIndicator.match(match_value.odd__evenIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".odd_evenIndicator");
single_value->field_odd__evenIndicator.log_match(match_value.odd__evenIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_odd__evenIndicator.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".odd_evenIndicator := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_odd__evenIndicator.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.typeOfSubAddress().ispresent()){
if(!single_value->field_typeOfSubAddress.match(match_value.typeOfSubAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".typeOfSubAddress");
single_value->field_typeOfSubAddress.log_match(match_value.typeOfSubAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_typeOfSubAddress.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".typeOfSubAddress := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_typeOfSubAddress.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.ext1().ispresent()){
if(!single_value->field_ext1.match(match_value.ext1(), legacy)){
TTCN_Logger::log_logmatch_info(".ext1");
single_value->field_ext1.log_match(match_value.ext1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_ext1.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".ext1 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_ext1.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.subAddressInformation().ispresent()){
if(!single_value->field_subAddressInformation.match(match_value.subAddressInformation(), legacy)){
TTCN_Logger::log_logmatch_info(".subAddressInformation");
single_value->field_subAddressInformation.log_match(match_value.subAddressInformation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_subAddressInformation.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".subAddressInformation := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_subAddressInformation.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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", spare1_3 := ");
if (match_value.spare1__3().ispresent()) {
single_value->field_spare1__3.log_match(match_value.spare1__3(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_spare1__3.log();
if (single_value->field_spare1__3.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", odd_evenIndicator := ");
if (match_value.odd__evenIndicator().ispresent()) {
single_value->field_odd__evenIndicator.log_match(match_value.odd__evenIndicator(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_odd__evenIndicator.log();
if (single_value->field_odd__evenIndicator.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", typeOfSubAddress := ");
if (match_value.typeOfSubAddress().ispresent()) {
single_value->field_typeOfSubAddress.log_match(match_value.typeOfSubAddress(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_typeOfSubAddress.log();
if (single_value->field_typeOfSubAddress.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", ext1 := ");
if (match_value.ext1().ispresent()) {
single_value->field_ext1.log_match(match_value.ext1(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_ext1.log();
if (single_value->field_ext1.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", subAddressInformation := ");
if (match_value.subAddressInformation().ispresent()) {
single_value->field_subAddressInformation.log_match(match_value.subAddressInformation(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_subAddressInformation.log();
if (single_value->field_subAddressInformation.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 RedirectingPartySubaddressTLV_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (!spare1__3().is_bound()) spare1__3() = OMIT_VALUE;
else spare1__3().set_implicit_omit();
if (!odd__evenIndicator().is_bound()) odd__evenIndicator() = OMIT_VALUE;
else odd__evenIndicator().set_implicit_omit();
if (!typeOfSubAddress().is_bound()) typeOfSubAddress() = OMIT_VALUE;
else typeOfSubAddress().set_implicit_omit();
if (!ext1().is_bound()) ext1() = OMIT_VALUE;
else ext1().set_implicit_omit();
if (!subAddressInformation().is_bound()) subAddressInformation() = OMIT_VALUE;
else subAddressInformation().set_implicit_omit();
}

void RedirectingPartySubaddressTLV_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_spare1__3.encode_text(text_buf);
single_value->field_odd__evenIndicator.encode_text(text_buf);
single_value->field_typeOfSubAddress.encode_text(text_buf);
single_value->field_ext1.encode_text(text_buf);
single_value->field_subAddressInformation.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 @MobileL3_CC_Types.RedirectingPartySubaddressTLV.");
}
}

void RedirectingPartySubaddressTLV_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_spare1__3.decode_text(text_buf);
single_value->field_odd__evenIndicator.decode_text(text_buf);
single_value->field_typeOfSubAddress.decode_text(text_buf);
single_value->field_ext1.decode_text(text_buf);
single_value->field_subAddressInformation.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 RedirectingPartySubaddressTLV_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 @MobileL3_CC_Types.RedirectingPartySubaddressTLV.");
}
}

void RedirectingPartySubaddressTLV_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: {
    RedirectingPartySubaddressTLV_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 @MobileL3_CC_Types.RedirectingPartySubaddressTLV 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare1__3().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) odd__evenIndicator().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) typeOfSubAddress().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) ext1().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) subAddressInformation().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare1_3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare1__3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "odd_evenIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          odd__evenIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "typeOfSubAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          typeOfSubAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ext1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "subAddressInformation")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          subAddressInformation().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 @MobileL3_CC_Types.RedirectingPartySubaddressTLV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    RedirectingPartySubaddressTLV_template* precondition = new RedirectingPartySubaddressTLV_template;
    precondition->set_param(*param.get_elem(0));
    RedirectingPartySubaddressTLV_template* implied_template = new RedirectingPartySubaddressTLV_template;
    implied_template->set_param(*param.get_elem(1));
    *this = RedirectingPartySubaddressTLV_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.RedirectingPartySubaddressTLV");
  }
  is_ifpresent = param.get_ifpresent();
}

void RedirectingPartySubaddressTLV_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RedirectingPartySubaddressTLV");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RedirectingPartySubaddressTLV");
single_value->field_spare1__3.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RedirectingPartySubaddressTLV");
single_value->field_odd__evenIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RedirectingPartySubaddressTLV");
single_value->field_typeOfSubAddress.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RedirectingPartySubaddressTLV");
single_value->field_ext1.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RedirectingPartySubaddressTLV");
single_value->field_subAddressInformation.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RedirectingPartySubaddressTLV");
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 : "@MobileL3_CC_Types.RedirectingPartySubaddressTLV");
}

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

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

RepeatIndicator::RepeatIndicator()
{
}

RepeatIndicator::RepeatIndicator(const BITSTRING& par_RepeatIndication,
    const BITSTRING& par_elementIdentifier)
  :   field_RepeatIndication(par_RepeatIndication),
  field_elementIdentifier(par_elementIdentifier)
{
}

RepeatIndicator::RepeatIndicator(const RepeatIndicator& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.RepeatIndicator.");
if (other_value.RepeatIndication().is_bound()) field_RepeatIndication = other_value.RepeatIndication();
else field_RepeatIndication.clean_up();
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
}

void RepeatIndicator::clean_up()
{
field_RepeatIndication.clean_up();
field_elementIdentifier.clean_up();
}

const TTCN_Typedescriptor_t* RepeatIndicator::get_descriptor() const { return &RepeatIndicator_descr_; }
RepeatIndicator& RepeatIndicator::operator=(const RepeatIndicator& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.RepeatIndicator.");
  if (other_value.RepeatIndication().is_bound()) field_RepeatIndication = other_value.RepeatIndication();
  else field_RepeatIndication.clean_up();
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
}
return *this;
}

boolean RepeatIndicator::operator==(const RepeatIndicator& other_value) const
{
return field_RepeatIndication==other_value.field_RepeatIndication
  && field_elementIdentifier==other_value.field_elementIdentifier;
}

boolean RepeatIndicator::is_bound() const
{
return (field_RepeatIndication.is_bound())
  || (field_elementIdentifier.is_bound());
}
boolean RepeatIndicator::is_value() const
{
return field_RepeatIndication.is_value()
  && field_elementIdentifier.is_value();
}
void RepeatIndicator::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ RepeatIndication := ");
field_RepeatIndication.log();
TTCN_Logger::log_event_str(", elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(" }");
}

void RepeatIndicator::set_implicit_omit()
{
if (RepeatIndication().is_bound()) RepeatIndication().set_implicit_omit();
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
}

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

void RepeatIndicator::encode_text(Text_Buf& text_buf) const
{
field_RepeatIndication.encode_text(text_buf);
field_elementIdentifier.encode_text(text_buf);
}

void RepeatIndicator::decode_text(Text_Buf& text_buf)
{
field_RepeatIndication.decode_text(text_buf);
field_elementIdentifier.decode_text(text_buf);
}

void RepeatIndicator::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 RepeatIndicator::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 RepeatIndicator::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, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_RepeatIndication.RAW_decode(General__Types::BIT4_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, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::BIT4_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 RepeatIndicator::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, General__Types::BIT4_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT4_descr_.raw);
  encoded_length += field_RepeatIndication.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct RepeatIndicator_template::single_value_struct {
BITSTRING_template field_RepeatIndication;
BITSTRING_template field_elementIdentifier;
};

void RepeatIndicator_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_RepeatIndication = ANY_VALUE;
single_value->field_elementIdentifier = ANY_VALUE;
}
}
}

void RepeatIndicator_template::copy_value(const RepeatIndicator& other_value)
{
single_value = new single_value_struct;
if (other_value.RepeatIndication().is_bound()) {
  single_value->field_RepeatIndication = other_value.RepeatIndication();
} else {
  single_value->field_RepeatIndication.clean_up();
}
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void RepeatIndicator_template::copy_template(const RepeatIndicator_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.RepeatIndication().get_selection()) {
single_value->field_RepeatIndication = other_value.RepeatIndication();
} else {
single_value->field_RepeatIndication.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.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 RepeatIndicator_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 RepeatIndicator_template(*other_value.implication_.precondition);
implication_.implied_template = new RepeatIndicator_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 @MobileL3_CC_Types.RepeatIndicator.");
break;
}
set_selection(other_value);
}

RepeatIndicator_template::RepeatIndicator_template()
{
}

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

RepeatIndicator_template::RepeatIndicator_template(const RepeatIndicator& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean RepeatIndicator_template::match(const RepeatIndicator& 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.RepeatIndication().is_bound()) return FALSE;
if(!single_value->field_RepeatIndication.match(other_value.RepeatIndication(), legacy))return FALSE;
if(!other_value.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), 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 @MobileL3_CC_Types.RepeatIndicator.");
}
return FALSE;
}

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

boolean RepeatIndicator_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_RepeatIndication.is_value()
 && single_value->field_elementIdentifier.is_value();
}

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

RepeatIndicator RepeatIndicator_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 @MobileL3_CC_Types.RepeatIndicator.");
RepeatIndicator ret_val;
if (single_value->field_RepeatIndication.is_bound()) {
ret_val.RepeatIndication() = single_value->field_RepeatIndication.valueof();
}
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
return ret_val;
}

void RepeatIndicator_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 @MobileL3_CC_Types.RepeatIndicator.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new RepeatIndicator_template[list_length];
}

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

BITSTRING_template& RepeatIndicator_template::RepeatIndication()
{
set_specific();
return single_value->field_RepeatIndication;
}

const BITSTRING_template& RepeatIndicator_template::RepeatIndication() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field RepeatIndication of a non-specific template of type @MobileL3_CC_Types.RepeatIndicator.");
return single_value->field_RepeatIndication;
}

BITSTRING_template& RepeatIndicator_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const BITSTRING_template& RepeatIndicator_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.RepeatIndicator.");
return single_value->field_elementIdentifier;
}

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

void RepeatIndicator_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ RepeatIndication := ");
single_value->field_RepeatIndication.log();
TTCN_Logger::log_event_str(", elementIdentifier := ");
single_value->field_elementIdentifier.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 RepeatIndicator_template::log_match(const RepeatIndicator& 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_RepeatIndication.match(match_value.RepeatIndication(), legacy)){
TTCN_Logger::log_logmatch_info(".RepeatIndication");
single_value->field_RepeatIndication.log_match(match_value.RepeatIndication(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), 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("{ RepeatIndication := ");
single_value->field_RepeatIndication.log_match(match_value.RepeatIndication(), legacy);
TTCN_Logger::log_event_str(", elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), 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 RepeatIndicator_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (RepeatIndication().is_bound()) RepeatIndication().set_implicit_omit();
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
}

void RepeatIndicator_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_RepeatIndication.encode_text(text_buf);
single_value->field_elementIdentifier.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 @MobileL3_CC_Types.RepeatIndicator.");
}
}

void RepeatIndicator_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_RepeatIndication.decode_text(text_buf);
single_value->field_elementIdentifier.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 RepeatIndicator_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 @MobileL3_CC_Types.RepeatIndicator.");
}
}

void RepeatIndicator_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: {
    RepeatIndicator_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 @MobileL3_CC_Types.RepeatIndicator 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) RepeatIndication().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) elementIdentifier().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(), "RepeatIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          RepeatIndication().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().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 @MobileL3_CC_Types.RepeatIndicator: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    RepeatIndicator_template* precondition = new RepeatIndicator_template;
    precondition->set_param(*param.get_elem(0));
    RepeatIndicator_template* implied_template = new RepeatIndicator_template;
    implied_template->set_param(*param.get_elem(1));
    *this = RepeatIndicator_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.RepeatIndicator");
  }
  is_ifpresent = param.get_ifpresent();
}

void RepeatIndicator_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_RepeatIndication.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RepeatIndicator");
single_value->field_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.RepeatIndicator");
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 : "@MobileL3_CC_Types.RepeatIndicator");
}

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

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

ReverseCallSetupDirection::ReverseCallSetupDirection()
{
}

ReverseCallSetupDirection::ReverseCallSetupDirection(const OCTETSTRING& par_elementIdentifier)
  :   field_elementIdentifier(par_elementIdentifier)
{
}

ReverseCallSetupDirection::ReverseCallSetupDirection(const ReverseCallSetupDirection& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.ReverseCallSetupDirection.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
}

void ReverseCallSetupDirection::clean_up()
{
field_elementIdentifier.clean_up();
}

const TTCN_Typedescriptor_t* ReverseCallSetupDirection::get_descriptor() const { return &ReverseCallSetupDirection_descr_; }
ReverseCallSetupDirection& ReverseCallSetupDirection::operator=(const ReverseCallSetupDirection& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.ReverseCallSetupDirection.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
}
return *this;
}

boolean ReverseCallSetupDirection::operator==(const ReverseCallSetupDirection& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier;
}

boolean ReverseCallSetupDirection::is_bound() const
{
return (field_elementIdentifier.is_bound());
}
boolean ReverseCallSetupDirection::is_value() const
{
return field_elementIdentifier.is_value();
}
void ReverseCallSetupDirection::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(" }");
}

void ReverseCallSetupDirection::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
}

void ReverseCallSetupDirection::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (1<param.get_size()) {
      param.error("record value of type @MobileL3_CC_Types.ReverseCallSetupDirection has 1 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) elementIdentifier().set_param(*param.get_elem(0));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().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 @MobileL3_CC_Types.ReverseCallSetupDirection: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_CC_Types.ReverseCallSetupDirection");
  }
}

void ReverseCallSetupDirection::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
}

void ReverseCallSetupDirection::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
}

void ReverseCallSetupDirection::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 ReverseCallSetupDirection::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 ReverseCallSetupDirection::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

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

struct ReverseCallSetupDirection_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
};

void ReverseCallSetupDirection_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_elementIdentifier = ANY_VALUE;
}
}
}

void ReverseCallSetupDirection_template::copy_value(const ReverseCallSetupDirection& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ReverseCallSetupDirection_template::copy_template(const ReverseCallSetupDirection_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.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 ReverseCallSetupDirection_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 ReverseCallSetupDirection_template(*other_value.implication_.precondition);
implication_.implied_template = new ReverseCallSetupDirection_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 @MobileL3_CC_Types.ReverseCallSetupDirection.");
break;
}
set_selection(other_value);
}

ReverseCallSetupDirection_template::ReverseCallSetupDirection_template()
{
}

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

ReverseCallSetupDirection_template::ReverseCallSetupDirection_template(const ReverseCallSetupDirection& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ReverseCallSetupDirection_template::match(const ReverseCallSetupDirection& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), 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 @MobileL3_CC_Types.ReverseCallSetupDirection.");
}
return FALSE;
}

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

boolean ReverseCallSetupDirection_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value();
}

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

ReverseCallSetupDirection ReverseCallSetupDirection_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 @MobileL3_CC_Types.ReverseCallSetupDirection.");
ReverseCallSetupDirection ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
return ret_val;
}

void ReverseCallSetupDirection_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 @MobileL3_CC_Types.ReverseCallSetupDirection.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new ReverseCallSetupDirection_template[list_length];
}

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

OCTETSTRING_template& ReverseCallSetupDirection_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& ReverseCallSetupDirection_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.ReverseCallSetupDirection.");
return single_value->field_elementIdentifier;
}

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

void ReverseCallSetupDirection_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.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 ReverseCallSetupDirection_template::log_match(const ReverseCallSetupDirection& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), 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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), 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 ReverseCallSetupDirection_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
}

void ReverseCallSetupDirection_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.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 @MobileL3_CC_Types.ReverseCallSetupDirection.");
}
}

void ReverseCallSetupDirection_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_elementIdentifier.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 ReverseCallSetupDirection_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 @MobileL3_CC_Types.ReverseCallSetupDirection.");
}
}

void ReverseCallSetupDirection_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: {
    ReverseCallSetupDirection_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (1<param.get_size()) {
      param.error("record template of type @MobileL3_CC_Types.ReverseCallSetupDirection has 1 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) elementIdentifier().set_param(*param.get_elem(0));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().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 @MobileL3_CC_Types.ReverseCallSetupDirection: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    ReverseCallSetupDirection_template* precondition = new ReverseCallSetupDirection_template;
    precondition->set_param(*param.get_elem(0));
    ReverseCallSetupDirection_template* implied_template = new ReverseCallSetupDirection_template;
    implied_template->set_param(*param.get_elem(1));
    *this = ReverseCallSetupDirection_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.ReverseCallSetupDirection");
  }
  is_ifpresent = param.get_ifpresent();
}

void ReverseCallSetupDirection_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.ReverseCallSetupDirection");
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 : "@MobileL3_CC_Types.ReverseCallSetupDirection");
}

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

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

SetupContatinerCCBS::SetupContatinerCCBS()
{
}

SetupContatinerCCBS::SetupContatinerCCBS(const OCTETSTRING& par_elementIdentifier,
    const INTEGER& par_lengthIndicator,
    const OCTETSTRING& par_setupMessage)
  :   field_elementIdentifier(par_elementIdentifier),
  field_lengthIndicator(par_lengthIndicator),
  field_setupMessage(par_setupMessage)
{
}

SetupContatinerCCBS::SetupContatinerCCBS(const SetupContatinerCCBS& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_CC_Types.SetupContatinerCCBS.");
if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
else field_elementIdentifier.clean_up();
if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
else field_lengthIndicator.clean_up();
if (other_value.setupMessage().is_bound()) field_setupMessage = other_value.setupMessage();
else field_setupMessage.clean_up();
}

void SetupContatinerCCBS::clean_up()
{
field_elementIdentifier.clean_up();
field_lengthIndicator.clean_up();
field_setupMessage.clean_up();
}

const TTCN_Typedescriptor_t* SetupContatinerCCBS::get_descriptor() const { return &SetupContatinerCCBS_descr_; }
SetupContatinerCCBS& SetupContatinerCCBS::operator=(const SetupContatinerCCBS& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_CC_Types.SetupContatinerCCBS.");
  if (other_value.elementIdentifier().is_bound()) field_elementIdentifier = other_value.elementIdentifier();
  else field_elementIdentifier.clean_up();
  if (other_value.lengthIndicator().is_bound()) field_lengthIndicator = other_value.lengthIndicator();
  else field_lengthIndicator.clean_up();
  if (other_value.setupMessage().is_bound()) field_setupMessage = other_value.setupMessage();
  else field_setupMessage.clean_up();
}
return *this;
}

boolean SetupContatinerCCBS::operator==(const SetupContatinerCCBS& other_value) const
{
return field_elementIdentifier==other_value.field_elementIdentifier
  && field_lengthIndicator==other_value.field_lengthIndicator
  && field_setupMessage==other_value.field_setupMessage;
}

boolean SetupContatinerCCBS::is_bound() const
{
return (field_elementIdentifier.is_bound())
  || (field_lengthIndicator.is_bound())
  || (field_setupMessage.is_bound());
}
boolean SetupContatinerCCBS::is_value() const
{
return field_elementIdentifier.is_value()
  && field_lengthIndicator.is_value()
  && field_setupMessage.is_value();
}
void SetupContatinerCCBS::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ elementIdentifier := ");
field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
field_lengthIndicator.log();
TTCN_Logger::log_event_str(", setupMessage := ");
field_setupMessage.log();
TTCN_Logger::log_event_str(" }");
}

void SetupContatinerCCBS::set_implicit_omit()
{
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (setupMessage().is_bound()) setupMessage().set_implicit_omit();
}

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

void SetupContatinerCCBS::encode_text(Text_Buf& text_buf) const
{
field_elementIdentifier.encode_text(text_buf);
field_lengthIndicator.encode_text(text_buf);
field_setupMessage.encode_text(text_buf);
}

void SetupContatinerCCBS::decode_text(Text_Buf& text_buf)
{
field_elementIdentifier.decode_text(text_buf);
field_lengthIndicator.decode_text(text_buf);
field_setupMessage.decode_text(text_buf);
}

void SetupContatinerCCBS::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 SetupContatinerCCBS::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 SetupContatinerCCBS::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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_elementIdentifier.RAW_decode(General__Types::OCT1_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, SetupContatinerCCBS_lengthIndicator_descr_.raw->forceomit);
  decoded_field_length = field_lengthIndicator.RAW_decode(SetupContatinerCCBS_lengthIndicator_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_lengthIndicator.convert_to_Integer(SetupContatinerCCBS_lengthIndicator_descr_);
  field_lengthIndicator = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  RAW_Force_Omit field_2_force_omit(2, force_omit, General__Types::OCTN_descr_.raw->forceomit);
  decoded_field_length = field_setupMessage.RAW_decode(General__Types::OCTN_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 SetupContatinerCCBS::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, General__Types::OCT1_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, SetupContatinerCCBS_lengthIndicator_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::OCTN_descr_.raw);
  encoded_length += field_elementIdentifier.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &SetupContatinerCCBS_lengthIndicator_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 1;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(1);
  myleaf.body.node.nodes[1]->length = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[2]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[2]->curr_pos.pos;
  encoded_length += field_setupMessage.RAW_encode(General__Types::OCTN_descr_, *myleaf.body.node.nodes[2]);
  return myleaf.length = encoded_length;
}

struct SetupContatinerCCBS_template::single_value_struct {
OCTETSTRING_template field_elementIdentifier;
INTEGER_template field_lengthIndicator;
OCTETSTRING_template field_setupMessage;
};

void SetupContatinerCCBS_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_elementIdentifier = ANY_VALUE;
single_value->field_lengthIndicator = ANY_VALUE;
single_value->field_setupMessage = ANY_VALUE;
}
}
}

void SetupContatinerCCBS_template::copy_value(const SetupContatinerCCBS& other_value)
{
single_value = new single_value_struct;
if (other_value.elementIdentifier().is_bound()) {
  single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
  single_value->field_elementIdentifier.clean_up();
}
if (other_value.lengthIndicator().is_bound()) {
  single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
  single_value->field_lengthIndicator.clean_up();
}
if (other_value.setupMessage().is_bound()) {
  single_value->field_setupMessage = other_value.setupMessage();
} else {
  single_value->field_setupMessage.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void SetupContatinerCCBS_template::copy_template(const SetupContatinerCCBS_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.elementIdentifier().get_selection()) {
single_value->field_elementIdentifier = other_value.elementIdentifier();
} else {
single_value->field_elementIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lengthIndicator().get_selection()) {
single_value->field_lengthIndicator = other_value.lengthIndicator();
} else {
single_value->field_lengthIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.setupMessage().get_selection()) {
single_value->field_setupMessage = other_value.setupMessage();
} else {
single_value->field_setupMessage.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 SetupContatinerCCBS_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 SetupContatinerCCBS_template(*other_value.implication_.precondition);
implication_.implied_template = new SetupContatinerCCBS_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 @MobileL3_CC_Types.SetupContatinerCCBS.");
break;
}
set_selection(other_value);
}

SetupContatinerCCBS_template::SetupContatinerCCBS_template()
{
}

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

SetupContatinerCCBS_template::SetupContatinerCCBS_template(const SetupContatinerCCBS& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean SetupContatinerCCBS_template::match(const SetupContatinerCCBS& 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.elementIdentifier().is_bound()) return FALSE;
if(!single_value->field_elementIdentifier.match(other_value.elementIdentifier(), legacy))return FALSE;
if(!other_value.lengthIndicator().is_bound()) return FALSE;
if(!single_value->field_lengthIndicator.match(other_value.lengthIndicator(), legacy))return FALSE;
if(!other_value.setupMessage().is_bound()) return FALSE;
if(!single_value->field_setupMessage.match(other_value.setupMessage(), 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 @MobileL3_CC_Types.SetupContatinerCCBS.");
}
return FALSE;
}

boolean SetupContatinerCCBS_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_elementIdentifier.is_bound()
 || single_value->field_lengthIndicator.is_bound()
 || single_value->field_setupMessage.is_bound();
}

boolean SetupContatinerCCBS_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_elementIdentifier.is_value()
 && single_value->field_lengthIndicator.is_value()
 && single_value->field_setupMessage.is_value();
}

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

SetupContatinerCCBS SetupContatinerCCBS_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 @MobileL3_CC_Types.SetupContatinerCCBS.");
SetupContatinerCCBS ret_val;
if (single_value->field_elementIdentifier.is_bound()) {
ret_val.elementIdentifier() = single_value->field_elementIdentifier.valueof();
}
if (single_value->field_lengthIndicator.is_bound()) {
ret_val.lengthIndicator() = single_value->field_lengthIndicator.valueof();
}
if (single_value->field_setupMessage.is_bound()) {
ret_val.setupMessage() = single_value->field_setupMessage.valueof();
}
return ret_val;
}

void SetupContatinerCCBS_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 @MobileL3_CC_Types.SetupContatinerCCBS.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new SetupContatinerCCBS_template[list_length];
}

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

OCTETSTRING_template& SetupContatinerCCBS_template::elementIdentifier()
{
set_specific();
return single_value->field_elementIdentifier;
}

const OCTETSTRING_template& SetupContatinerCCBS_template::elementIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field elementIdentifier of a non-specific template of type @MobileL3_CC_Types.SetupContatinerCCBS.");
return single_value->field_elementIdentifier;
}

INTEGER_template& SetupContatinerCCBS_template::lengthIndicator()
{
set_specific();
return single_value->field_lengthIndicator;
}

const INTEGER_template& SetupContatinerCCBS_template::lengthIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lengthIndicator of a non-specific template of type @MobileL3_CC_Types.SetupContatinerCCBS.");
return single_value->field_lengthIndicator;
}

OCTETSTRING_template& SetupContatinerCCBS_template::setupMessage()
{
set_specific();
return single_value->field_setupMessage;
}

const OCTETSTRING_template& SetupContatinerCCBS_template::setupMessage() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field setupMessage of a non-specific template of type @MobileL3_CC_Types.SetupContatinerCCBS.");
return single_value->field_setupMessage;
}

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

void SetupContatinerCCBS_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ elementIdentifier := ");
single_value->field_elementIdentifier.log();
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log();
TTCN_Logger::log_event_str(", setupMessage := ");
single_value->field_setupMessage.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 SetupContatinerCCBS_template::log_match(const SetupContatinerCCBS& 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_elementIdentifier.match(match_value.elementIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".elementIdentifier");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lengthIndicator.match(match_value.lengthIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".lengthIndicator");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_setupMessage.match(match_value.setupMessage(), legacy)){
TTCN_Logger::log_logmatch_info(".setupMessage");
single_value->field_setupMessage.log_match(match_value.setupMessage(), 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("{ elementIdentifier := ");
single_value->field_elementIdentifier.log_match(match_value.elementIdentifier(), legacy);
TTCN_Logger::log_event_str(", lengthIndicator := ");
single_value->field_lengthIndicator.log_match(match_value.lengthIndicator(), legacy);
TTCN_Logger::log_event_str(", setupMessage := ");
single_value->field_setupMessage.log_match(match_value.setupMessage(), 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 SetupContatinerCCBS_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (elementIdentifier().is_bound()) elementIdentifier().set_implicit_omit();
if (lengthIndicator().is_bound()) lengthIndicator().set_implicit_omit();
if (setupMessage().is_bound()) setupMessage().set_implicit_omit();
}

void SetupContatinerCCBS_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_elementIdentifier.encode_text(text_buf);
single_value->field_lengthIndicator.encode_text(text_buf);
single_value->field_setupMessage.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 @MobileL3_CC_Types.SetupContatinerCCBS.");
}
}

void SetupContatinerCCBS_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_elementIdentifier.decode_text(text_buf);
single_value->field_lengthIndicator.decode_text(text_buf);
single_value->field_setupMessage.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 SetupContatinerCCBS_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 @MobileL3_CC_Types.SetupContatinerCCBS.");
}
}

void SetupContatinerCCBS_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: {
    SetupContatinerCCBS_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 @MobileL3_CC_Types.SetupContatinerCCBS 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) elementIdentifier().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) lengthIndicator().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) setupMessage().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(), "elementIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          elementIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "lengthIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          lengthIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "setupMessage")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          setupMessage().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 @MobileL3_CC_Types.SetupContatinerCCBS: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    SetupContatinerCCBS_template* precondition = new SetupContatinerCCBS_template;
    precondition->set_param(*param.get_elem(0));
    SetupContatinerCCBS_template* implied_template = new SetupContatinerCCBS_template;
    implied_template->set_param(*param.get_elem(1));
    *this = SetupContatinerCCBS_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_CC_Types.SetupContatinerCCBS");
  }
  is_ifpresent = param.get_ifpresent();
}

void SetupContatinerCCBS_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_elementIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.SetupContatinerCCBS");
single_value->field_lengthIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.SetupContatinerCCBS");
single_value->field_setupMessage.check_restriction(t_res, t_name ? t_name : "@MobileL3_CC_Types.SetupContatinerCCBS");
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 : "@MobileL3_CC_Types.SetupContatinerCCBS");
}

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

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


} /* end of namespace */
