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

namespace AbisOML__Types {

/* Literal string constants */

extern const CHARSTRING cs_0(13, "com.ipaccess\000");
const unsigned char module_checksum[] = { 0xf6, 0x10, 0xfd, 0x8b, 0x67, 0x6a, 0xd4, 0x61, 0xde, 0x0b, 0x79, 0x0f, 0x4b, 0x5d, 0x84, 0xcd };

/* Global variable definitions */

const TTCN_RAWdescriptor_t OML__MessageDiscriminator_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__MessageDiscriminator
const TTCN_Typedescriptor_t OML__MessageDiscriminator_descr_ = { "@AbisOML_Types.OML_MessageDiscriminator", NULL, &OML__MessageDiscriminator_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__MessageDiscriminator_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__Placement_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__Placement
const TTCN_Typedescriptor_t OML__Placement_descr_ = { "@AbisOML_Types.OML_Placement", NULL, &OML__Placement_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__Placement_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__Union_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__Union
const TTCN_Typedescriptor_t OML__Union_descr_ = { "@AbisOML_Types.OML_Union", NULL, &OML__Union_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t OML__FOM_len_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM_len_xer_ = { {"len>\n", "len>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t OML__FOM_len_descr_ = { "@AbisOML_Types.OML_FOM.len", &INTEGER_ber_, &OML__FOM_len_raw_, &INTEGER_text_, &OML__FOM_len_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM_len_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__MessageType_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__MessageType
const TTCN_Typedescriptor_t OML__FOM__MessageType_descr_ = { "@AbisOML_Types.OML_FOM_MessageType", NULL, &OML__FOM__MessageType_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__MessageType_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__Header_msg__type_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__Header_msg__type
const TTCN_Typedescriptor_t OML__FOM__Header_msg__type_descr_ = { "@AbisOML_Types.OML_FOM_Header.msg_type", NULL, &OML__FOM__Header_msg__type_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__Header_msg__type_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__ObjectClass_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__ObjectClass
const TTCN_Typedescriptor_t OML__FOM__ObjectClass_descr_ = { "@AbisOML_Types.OML_FOM_ObjectClass", NULL, &OML__FOM__ObjectClass_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__ObjectClass_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__Header_obj__class_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__Header_obj__class
const TTCN_Typedescriptor_t OML__FOM__Header_obj__class_descr_ = { "@AbisOML_Types.OML_FOM_Header.obj_class", NULL, &OML__FOM__Header_obj__class_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__Header_obj__class_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__ObjectInstance_bts__nr_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__ObjectInstance_bts__nr_xer_ = { {"bts_nr>\n", "bts_nr>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__ObjectInstance_bts__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__ObjectInstance_bts__nr_descr_ = { "@AbisOML_Types.OML_FOM_ObjectInstance.bts_nr", &INTEGER_ber_, &OML__FOM__ObjectInstance_bts__nr_raw_, &INTEGER_text_, &OML__FOM__ObjectInstance_bts__nr_xer_, &INTEGER_json_, &OML__FOM__ObjectInstance_bts__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__ObjectInstance_bts__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__ObjectInstance_trx__nr_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__ObjectInstance_trx__nr_xer_ = { {"trx_nr>\n", "trx_nr>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__ObjectInstance_trx__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__ObjectInstance_trx__nr_descr_ = { "@AbisOML_Types.OML_FOM_ObjectInstance.trx_nr", &INTEGER_ber_, &OML__FOM__ObjectInstance_trx__nr_raw_, &INTEGER_text_, &OML__FOM__ObjectInstance_trx__nr_xer_, &INTEGER_json_, &OML__FOM__ObjectInstance_trx__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__ObjectInstance_trx__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__ObjectInstance_ts__nr_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__ObjectInstance_ts__nr_xer_ = { {"ts_nr>\n", "ts_nr>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__ObjectInstance_ts__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__ObjectInstance_ts__nr_descr_ = { "@AbisOML_Types.OML_FOM_ObjectInstance.ts_nr", &INTEGER_ber_, &OML__FOM__ObjectInstance_ts__nr_raw_, &INTEGER_text_, &OML__FOM__ObjectInstance_ts__nr_xer_, &INTEGER_json_, &OML__FOM__ObjectInstance_ts__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__ObjectInstance_ts__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__ObjectInstance_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__ObjectInstance
const TTCN_Typedescriptor_t OML__FOM__ObjectInstance_descr_ = { "@AbisOML_Types.OML_FOM_ObjectInstance", NULL, &OML__FOM__ObjectInstance_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__ObjectInstance_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__Header_obj__inst_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__Header_obj__inst
const TTCN_Typedescriptor_t OML__FOM__Header_obj__inst_descr_ = { "@AbisOML_Types.OML_FOM_Header.obj_inst", NULL, &OML__FOM__Header_obj__inst_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__Header_obj__inst_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__Header_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__Header
const TTCN_Typedescriptor_t OML__FOM__Header_descr_ = { "@AbisOML_Types.OML_FOM_Header", NULL, &OML__FOM__Header_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__Header_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM_hdr_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM_hdr
const TTCN_Typedescriptor_t OML__FOM_hdr_descr_ = { "@AbisOML_Types.OML_FOM.hdr", NULL, &OML__FOM_hdr_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM_hdr_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM
const TTCN_Typedescriptor_t OML__FOM_descr_ = { "@AbisOML_Types.OML_FOM", NULL, &OML__FOM_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t OML__FOM__IE__List_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__List
const TTCN_Typedescriptor_t OML__FOM__IE__List_descr_ = { "@AbisOML_Types.OML_FOM_IE_List", NULL, &OML__FOM__IE__List_raw_, NULL, NULL, NULL, NULL, NULL, &OML__FOM__IE__List_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t OML__FOM__IE__Type_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Type
const TTCN_Typedescriptor_t OML__FOM__IE__Type_descr_ = { "@AbisOML_Types.OML_FOM_IE_Type", NULL, &OML__FOM__IE__Type_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Type_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE_iei_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE_iei
const TTCN_Typedescriptor_t OML__FOM__IE_iei_descr_ = { "@AbisOML_Types.OML_FOM_IE.iei", NULL, &OML__FOM__IE_iei_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE_iei_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body
const TTCN_Typedescriptor_t OML__FOM__IE__Body_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body", NULL, &OML__FOM__IE__Body_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t OML__FOM__AbisChannel_bts__port__nr_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__AbisChannel_bts__port__nr_xer_ = { {"bts_port_nr>\n", "bts_port_nr>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__AbisChannel_bts__port__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__AbisChannel_bts__port__nr_descr_ = { "@AbisOML_Types.OML_FOM_AbisChannel.bts_port_nr", &INTEGER_ber_, &OML__FOM__AbisChannel_bts__port__nr_raw_, &INTEGER_text_, &OML__FOM__AbisChannel_bts__port__nr_xer_, &INTEGER_json_, &OML__FOM__AbisChannel_bts__port__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__AbisChannel_bts__port__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__AbisChannel_timeslot__nr_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__AbisChannel_timeslot__nr_xer_ = { {"timeslot_nr>\n", "timeslot_nr>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__AbisChannel_timeslot__nr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__AbisChannel_timeslot__nr_descr_ = { "@AbisOML_Types.OML_FOM_AbisChannel.timeslot_nr", &INTEGER_ber_, &OML__FOM__AbisChannel_timeslot__nr_raw_, &INTEGER_text_, &OML__FOM__AbisChannel_timeslot__nr_xer_, &INTEGER_json_, &OML__FOM__AbisChannel_timeslot__nr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__AbisChannel_timeslot__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__Subslot_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__Subslot
const TTCN_Typedescriptor_t OML__FOM__Subslot_descr_ = { "@AbisOML_Types.OML_FOM_Subslot", NULL, &OML__FOM__Subslot_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__Subslot_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__AbisChannel_subslot__nr_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__AbisChannel_subslot__nr
const TTCN_Typedescriptor_t OML__FOM__AbisChannel_subslot__nr_descr_ = { "@AbisOML_Types.OML_FOM_AbisChannel.subslot_nr", NULL, &OML__FOM__AbisChannel_subslot__nr_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__AbisChannel_subslot__nr_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__AbisChannel_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__AbisChannel
const TTCN_Typedescriptor_t OML__FOM__AbisChannel_descr_ = { "@AbisOML_Types.OML_FOM_AbisChannel", NULL, &OML__FOM__AbisChannel_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__AbisChannel_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_abis__channel_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body_abis__channel
const TTCN_Typedescriptor_t OML__FOM__IE__Body_abis__channel_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.abis_channel", NULL, &OML__FOM__IE__Body_abis__channel_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_abis__channel_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__AdministrativeState_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__AdministrativeState
const TTCN_Typedescriptor_t OML__FOM__AdministrativeState_descr_ = { "@AbisOML_Types.OML_FOM_AdministrativeState", NULL, &OML__FOM__AdministrativeState_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__AdministrativeState_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_adm__state_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body_adm__state
const TTCN_Typedescriptor_t OML__FOM__IE__Body_adm__state_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.adm_state", NULL, &OML__FOM__IE__Body_adm__state_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_adm__state_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_auton__report_raw_ = {8,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_auton__report_xer_ = { {"auton_report>\n", "auton_report>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int OML__FOM__IE__Body_auton__report_oer_ext_arr_[0] = {};
const int OML__FOM__IE__Body_auton__report_oer_p_[0] = {};
const TTCN_OERdescriptor_t OML__FOM__IE__Body_auton__report_oer_ = { -1, TRUE, 1, FALSE, 0, 0, OML__FOM__IE__Body_auton__report_oer_ext_arr_, 0, OML__FOM__IE__Body_auton__report_oer_p_};
const TTCN_Typedescriptor_t OML__FOM__IE__Body_auton__report_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.auton_report", &OCTETSTRING_ber_, &OML__FOM__IE__Body_auton__report_raw_, &OCTETSTRING_text_, &OML__FOM__IE__Body_auton__report_xer_, &OCTETSTRING_json_, &OML__FOM__IE__Body_auton__report_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_auton__report_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_bcch__arfcn_raw_ = {16,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_bcch__arfcn_xer_ = { {"bcch_arfcn>\n", "bcch_arfcn>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_bcch__arfcn_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.bcch_arfcn", &INTEGER_ber_, &OML__FOM__IE__Body_bcch__arfcn_raw_, &INTEGER_text_, &OML__FOM__IE__Body_bcch__arfcn_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_bcch__arfcn_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_bsic_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_bsic_xer_ = { {"bsic>\n", "bsic>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_bsic_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_bsic_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.bsic", &INTEGER_ber_, &OML__FOM__IE__Body_bsic_raw_, &INTEGER_text_, &OML__FOM__IE__Body_bsic_xer_, &INTEGER_json_, &OML__FOM__IE__Body_bsic_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_bsic_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_air__timer_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_air__timer_xer_ = { {"air_timer>\n", "air_timer>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_air__timer_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_air__timer_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.air_timer", &INTEGER_ber_, &OML__FOM__IE__Body_air__timer_raw_, &INTEGER_text_, &OML__FOM__IE__Body_air__timer_xer_, &INTEGER_json_, &OML__FOM__IE__Body_air__timer_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_air__timer_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_load__ind__period_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_load__ind__period_xer_ = { {"load_ind_period>\n", "load_ind_period>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_load__ind__period_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_load__ind__period_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.load_ind_period", &INTEGER_ber_, &OML__FOM__IE__Body_load__ind__period_raw_, &INTEGER_text_, &OML__FOM__IE__Body_load__ind__period_xer_, &INTEGER_json_, &OML__FOM__IE__Body_load__ind__period_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_load__ind__period_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_load__threshold_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_load__threshold_xer_ = { {"load_threshold>\n", "load_threshold>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_load__threshold_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_load__threshold_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.load_threshold", &INTEGER_ber_, &OML__FOM__IE__Body_load__threshold_raw_, &INTEGER_text_, &OML__FOM__IE__Body_load__threshold_xer_, &INTEGER_json_, &OML__FOM__IE__Body_load__threshold_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_load__threshold_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__ChannelCombination_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__ChannelCombination
const TTCN_Typedescriptor_t OML__ChannelCombination_descr_ = { "@AbisOML_Types.OML_ChannelCombination", NULL, &OML__ChannelCombination_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__ChannelCombination_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_chan__comb_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body_chan__comb
const TTCN_Typedescriptor_t OML__FOM__IE__Body_chan__comb_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.chan_comb", NULL, &OML__FOM__IE__Body_chan__comb_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_chan__comb_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__EventType_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__EventType
const TTCN_Typedescriptor_t OML__FOM__EventType_descr_ = { "@AbisOML_Types.OML_FOM_EventType", NULL, &OML__FOM__EventType_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__EventType_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_event__type_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body_event__type
const TTCN_Typedescriptor_t OML__FOM__IE__Body_event__type_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.event_type", NULL, &OML__FOM__IE__Body_event__type_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_event__type_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_gsm__time_raw_ = {16,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_gsm__time_xer_ = { {"gsm_time>\n", "gsm_time>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_gsm__time_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_gsm__time_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.gsm_time", &INTEGER_ber_, &OML__FOM__IE__Body_gsm__time_raw_, &INTEGER_text_, &OML__FOM__IE__Body_gsm__time_xer_, &INTEGER_json_, &OML__FOM__IE__Body_gsm__time_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_gsm__time_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_hsn_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_hsn_xer_ = { {"hsn>\n", "hsn>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_hsn_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_hsn_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.hsn", &INTEGER_ber_, &OML__FOM__IE__Body_hsn_raw_, &INTEGER_text_, &OML__FOM__IE__Body_hsn_xer_, &INTEGER_json_, &OML__FOM__IE__Body_hsn_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_hsn_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_intave__param_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_intave__param_xer_ = { {"intave_param>\n", "intave_param>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_intave__param_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_intave__param_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.intave_param", &INTEGER_ber_, &OML__FOM__IE__Body_intave__param_raw_, &INTEGER_text_, &OML__FOM__IE__Body_intave__param_xer_, &INTEGER_json_, &OML__FOM__IE__Body_intave__param_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_intave__param_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__InterfLevBoundaries_raw_ = {6,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__InterfLevBoundaries
const TTCN_Typedescriptor_t OML__FOM__InterfLevBoundaries_descr_ = { "@AbisOML_Types.OML_FOM_InterfLevBoundaries", NULL, &OML__FOM__InterfLevBoundaries_raw_, NULL, NULL, NULL, NULL, NULL, &OML__FOM__InterfLevBoundaries_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t OML__FOM__InterfLevBoundaries_0_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__InterfLevBoundaries_0_xer_ = { {"uint8_t>\n", "uint8_t>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__InterfLevBoundaries_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__InterfLevBoundaries_0_descr_ = { "@AbisOML_Types.OML_FOM_InterfLevBoundaries.<oftype>", &INTEGER_ber_, &OML__FOM__InterfLevBoundaries_0_raw_, &INTEGER_text_, &OML__FOM__InterfLevBoundaries_0_xer_, &INTEGER_json_, &OML__FOM__InterfLevBoundaries_0_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__InterfLevBoundaries_0_default_coding("RAW");
UNIVERSAL_CHARSTRING OML__FOM__InterfLevBoundaries_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_interf__bound_raw_ = {6,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body_interf__bound
const TTCN_Typedescriptor_t OML__FOM__IE__Body_interf__bound_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.interf_bound", NULL, &OML__FOM__IE__Body_interf__bound_raw_, NULL, NULL, NULL, NULL, NULL, &OML__FOM__InterfLevBoundaries_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_interf__bound_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_maio_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_maio_xer_ = { {"maio>\n", "maio>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_maio_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_maio_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.maio", &INTEGER_ber_, &OML__FOM__IE__Body_maio_raw_, &INTEGER_text_, &OML__FOM__IE__Body_maio_xer_, &INTEGER_json_, &OML__FOM__IE__Body_maio_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_maio_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_manuf__state_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_manuf__state_xer_ = { {"manuf_state>\n", "manuf_state>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_manuf__state_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_manuf__state_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.manuf_state", &INTEGER_ber_, &OML__FOM__IE__Body_manuf__state_raw_, &INTEGER_text_, &OML__FOM__IE__Body_manuf__state_xer_, &INTEGER_json_, &OML__FOM__IE__Body_manuf__state_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_manuf__state_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_max__ta_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_max__ta_xer_ = { {"max_ta>\n", "max_ta>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_max__ta_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_max__ta_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.max_ta", &INTEGER_ber_, &OML__FOM__IE__Body_max__ta_raw_, &INTEGER_text_, &OML__FOM__IE__Body_max__ta_xer_, &INTEGER_json_, &OML__FOM__IE__Body_max__ta_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_max__ta_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__NackCause_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__NackCause
const TTCN_Typedescriptor_t OML__FOM__NackCause_descr_ = { "@AbisOML_Types.OML_FOM_NackCause", NULL, &OML__FOM__NackCause_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__NackCause_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_nack__causes_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body_nack__causes
const TTCN_Typedescriptor_t OML__FOM__IE__Body_nack__causes_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.nack_causes", NULL, &OML__FOM__IE__Body_nack__causes_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_nack__causes_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_ny1_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_ny1_xer_ = { {"ny1>\n", "ny1>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_ny1_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_ny1_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.ny1", &INTEGER_ber_, &OML__FOM__IE__Body_ny1_raw_, &INTEGER_text_, &OML__FOM__IE__Body_ny1_xer_, &INTEGER_json_, &OML__FOM__IE__Body_ny1_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_ny1_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__OperationalState_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__OperationalState
const TTCN_Typedescriptor_t OML__FOM__OperationalState_descr_ = { "@AbisOML_Types.OML_FOM_OperationalState", NULL, &OML__FOM__OperationalState_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__OperationalState_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_opstate_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body_opstate
const TTCN_Typedescriptor_t OML__FOM__IE__Body_opstate_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.opstate", NULL, &OML__FOM__IE__Body_opstate_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_opstate_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_power__class_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_power__class_xer_ = { {"power_class>\n", "power_class>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_power__class_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_power__class_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.power_class", &INTEGER_ber_, &OML__FOM__IE__Body_power__class_raw_, &INTEGER_text_, &OML__FOM__IE__Body_power__class_xer_, &INTEGER_json_, &OML__FOM__IE__Body_power__class_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_power__class_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__PowerOuthputThresholds_raw_ = {3,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__PowerOuthputThresholds
const TTCN_Typedescriptor_t OML__FOM__PowerOuthputThresholds_descr_ = { "@AbisOML_Types.OML_FOM_PowerOuthputThresholds", NULL, &OML__FOM__PowerOuthputThresholds_raw_, NULL, NULL, NULL, NULL, NULL, &OML__FOM__PowerOuthputThresholds_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t OML__FOM__PowerOuthputThresholds_0_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__PowerOuthputThresholds_0_xer_ = { {"uint8_t>\n", "uint8_t>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__PowerOuthputThresholds_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__PowerOuthputThresholds_0_descr_ = { "@AbisOML_Types.OML_FOM_PowerOuthputThresholds.<oftype>", &INTEGER_ber_, &OML__FOM__PowerOuthputThresholds_0_raw_, &INTEGER_text_, &OML__FOM__PowerOuthputThresholds_0_xer_, &INTEGER_json_, &OML__FOM__PowerOuthputThresholds_0_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__PowerOuthputThresholds_0_default_coding("RAW");
UNIVERSAL_CHARSTRING OML__FOM__PowerOuthputThresholds_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_power__thresh_raw_ = {3,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body_power__thresh
const TTCN_Typedescriptor_t OML__FOM__IE__Body_power__thresh_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.power_thresh", NULL, &OML__FOM__IE__Body_power__thresh_raw_, NULL, NULL, NULL, NULL, NULL, &OML__FOM__PowerOuthputThresholds_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_power__thresh_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__ProbableCauseType_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__ProbableCauseType
const TTCN_Typedescriptor_t OML__FOM__ProbableCauseType_descr_ = { "@AbisOML_Types.OML_FOM_ProbableCauseType", NULL, &OML__FOM__ProbableCauseType_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__ProbableCauseType_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__ProbableCause_cause__type_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__ProbableCause_cause__type
const TTCN_Typedescriptor_t OML__FOM__ProbableCause_cause__type_descr_ = { "@AbisOML_Types.OML_FOM_ProbableCause.cause_type", NULL, &OML__FOM__ProbableCause_cause__type_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__ProbableCause_cause__type_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__ProbableCause_cause__value_raw_ = {16,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,2,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__ProbableCause_cause__value_xer_ = { {"cause_value>\n", "cause_value>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int OML__FOM__ProbableCause_cause__value_oer_ext_arr_[0] = {};
const int OML__FOM__ProbableCause_cause__value_oer_p_[0] = {};
const TTCN_OERdescriptor_t OML__FOM__ProbableCause_cause__value_oer_ = { -1, TRUE, 2, FALSE, 0, 0, OML__FOM__ProbableCause_cause__value_oer_ext_arr_, 0, OML__FOM__ProbableCause_cause__value_oer_p_};
const TTCN_Typedescriptor_t OML__FOM__ProbableCause_cause__value_descr_ = { "@AbisOML_Types.OML_FOM_ProbableCause.cause_value", &OCTETSTRING_ber_, &OML__FOM__ProbableCause_cause__value_raw_, &OCTETSTRING_text_, &OML__FOM__ProbableCause_cause__value_xer_, &OCTETSTRING_json_, &OML__FOM__ProbableCause_cause__value_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__ProbableCause_cause__value_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__ProbableCause_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__ProbableCause
const TTCN_Typedescriptor_t OML__FOM__ProbableCause_descr_ = { "@AbisOML_Types.OML_FOM_ProbableCause", NULL, &OML__FOM__ProbableCause_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__ProbableCause_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_prob__cause_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body_prob__cause
const TTCN_Typedescriptor_t OML__FOM__IE__Body_prob__cause_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.prob_cause", NULL, &OML__FOM__IE__Body_prob__cause_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_prob__cause_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_rach__b__thresh_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_rach__b__thresh_xer_ = { {"rach_b_thresh>\n", "rach_b_thresh>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_rach__b__thresh_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_rach__b__thresh_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.rach_b_thresh", &INTEGER_ber_, &OML__FOM__IE__Body_rach__b__thresh_raw_, &INTEGER_text_, &OML__FOM__IE__Body_rach__b__thresh_xer_, &INTEGER_json_, &OML__FOM__IE__Body_rach__b__thresh_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_rach__b__thresh_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_loadavg__slots_raw_ = {16,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_loadavg__slots_xer_ = { {"loadavg_slots>\n", "loadavg_slots>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_loadavg__slots_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_loadavg__slots_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.loadavg_slots", &INTEGER_ber_, &OML__FOM__IE__Body_loadavg__slots_raw_, &INTEGER_text_, &OML__FOM__IE__Body_loadavg__slots_xer_, &INTEGER_json_, &OML__FOM__IE__Body_loadavg__slots_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_loadavg__slots_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_radio__subch_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_radio__subch_xer_ = { {"radio_subch>\n", "radio_subch>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_radio__subch_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_radio__subch_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.radio_subch", &INTEGER_ber_, &OML__FOM__IE__Body_radio__subch_raw_, &INTEGER_text_, &OML__FOM__IE__Body_radio__subch_xer_, &INTEGER_json_, &OML__FOM__IE__Body_radio__subch_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_radio__subch_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_rf__maxpwr__r_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_rf__maxpwr__r_xer_ = { {"rf_maxpwr_r>\n", "rf_maxpwr_r>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_rf__maxpwr__r_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_rf__maxpwr__r_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.rf_maxpwr_r", &INTEGER_ber_, &OML__FOM__IE__Body_rf__maxpwr__r_raw_, &INTEGER_text_, &OML__FOM__IE__Body_rf__maxpwr__r_xer_, &INTEGER_json_, &OML__FOM__IE__Body_rf__maxpwr__r_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_rf__maxpwr__r_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_spec__prob_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_spec__prob_xer_ = { {"spec_prob>\n", "spec_prob>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_spec__prob_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_spec__prob_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.spec_prob", &INTEGER_ber_, &OML__FOM__IE__Body_spec__prob_raw_, &INTEGER_text_, &OML__FOM__IE__Body_spec__prob_xer_, &INTEGER_json_, &OML__FOM__IE__Body_spec__prob_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_spec__prob_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_start__time_raw_ = {16,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_start__time_xer_ = { {"start_time>\n", "start_time>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_start__time_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_start__time_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.start_time", &INTEGER_ber_, &OML__FOM__IE__Body_start__time_raw_, &INTEGER_text_, &OML__FOM__IE__Body_start__time_xer_, &INTEGER_json_, &OML__FOM__IE__Body_start__time_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_start__time_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__T200_sdcch__5ms_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__T200_sdcch__5ms_xer_ = { {"sdcch_5ms>\n", "sdcch_5ms>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__T200_sdcch__5ms_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__T200_sdcch__5ms_descr_ = { "@AbisOML_Types.OML_FOM_T200.sdcch_5ms", &INTEGER_ber_, &OML__FOM__T200_sdcch__5ms_raw_, &INTEGER_text_, &OML__FOM__T200_sdcch__5ms_xer_, &INTEGER_json_, &OML__FOM__T200_sdcch__5ms_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__T200_sdcch__5ms_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__T200_facch__f__5ms_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__T200_facch__f__5ms_xer_ = { {"facch_f_5ms>\n", "facch_f_5ms>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__T200_facch__f__5ms_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__T200_facch__f__5ms_descr_ = { "@AbisOML_Types.OML_FOM_T200.facch_f_5ms", &INTEGER_ber_, &OML__FOM__T200_facch__f__5ms_raw_, &INTEGER_text_, &OML__FOM__T200_facch__f__5ms_xer_, &INTEGER_json_, &OML__FOM__T200_facch__f__5ms_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__T200_facch__f__5ms_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__T200_facch__h__5ms_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__T200_facch__h__5ms_xer_ = { {"facch_h_5ms>\n", "facch_h_5ms>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__T200_facch__h__5ms_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__T200_facch__h__5ms_descr_ = { "@AbisOML_Types.OML_FOM_T200.facch_h_5ms", &INTEGER_ber_, &OML__FOM__T200_facch__h__5ms_raw_, &INTEGER_text_, &OML__FOM__T200_facch__h__5ms_xer_, &INTEGER_json_, &OML__FOM__T200_facch__h__5ms_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__T200_facch__h__5ms_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__T200_sacch__tch__sapi0__10ms_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__T200_sacch__tch__sapi0__10ms_xer_ = { {"sacch_tch_sapi0_10ms>\n", "sacch_tch_sapi0_10ms>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__T200_sacch__tch__sapi0__10ms_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__T200_sacch__tch__sapi0__10ms_descr_ = { "@AbisOML_Types.OML_FOM_T200.sacch_tch_sapi0_10ms", &INTEGER_ber_, &OML__FOM__T200_sacch__tch__sapi0__10ms_raw_, &INTEGER_text_, &OML__FOM__T200_sacch__tch__sapi0__10ms_xer_, &INTEGER_json_, &OML__FOM__T200_sacch__tch__sapi0__10ms_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__T200_sacch__tch__sapi0__10ms_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__T200_sacch__sdcch__10ms_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__T200_sacch__sdcch__10ms_xer_ = { {"sacch_sdcch_10ms>\n", "sacch_sdcch_10ms>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__T200_sacch__sdcch__10ms_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__T200_sacch__sdcch__10ms_descr_ = { "@AbisOML_Types.OML_FOM_T200.sacch_sdcch_10ms", &INTEGER_ber_, &OML__FOM__T200_sacch__sdcch__10ms_raw_, &INTEGER_text_, &OML__FOM__T200_sacch__sdcch__10ms_xer_, &INTEGER_json_, &OML__FOM__T200_sacch__sdcch__10ms_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__T200_sacch__sdcch__10ms_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__T200_sdcch__sapi3__5ms_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__T200_sdcch__sapi3__5ms_xer_ = { {"sdcch_sapi3_5ms>\n", "sdcch_sapi3_5ms>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__T200_sdcch__sapi3__5ms_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__T200_sdcch__sapi3__5ms_descr_ = { "@AbisOML_Types.OML_FOM_T200.sdcch_sapi3_5ms", &INTEGER_ber_, &OML__FOM__T200_sdcch__sapi3__5ms_raw_, &INTEGER_text_, &OML__FOM__T200_sdcch__sapi3__5ms_xer_, &INTEGER_json_, &OML__FOM__T200_sdcch__sapi3__5ms_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__T200_sdcch__sapi3__5ms_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__T200_sacch__rch__sapi3__10ms_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__T200_sacch__rch__sapi3__10ms_xer_ = { {"sacch_rch_sapi3_10ms>\n", "sacch_rch_sapi3_10ms>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__T200_sacch__rch__sapi3__10ms_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__T200_sacch__rch__sapi3__10ms_descr_ = { "@AbisOML_Types.OML_FOM_T200.sacch_rch_sapi3_10ms", &INTEGER_ber_, &OML__FOM__T200_sacch__rch__sapi3__10ms_raw_, &INTEGER_text_, &OML__FOM__T200_sacch__rch__sapi3__10ms_xer_, &INTEGER_json_, &OML__FOM__T200_sacch__rch__sapi3__10ms_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__T200_sacch__rch__sapi3__10ms_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__T200_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__T200
const TTCN_Typedescriptor_t OML__FOM__T200_descr_ = { "@AbisOML_Types.OML_FOM_T200", NULL, &OML__FOM__T200_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__T200_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_t200_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body_t200
const TTCN_Typedescriptor_t OML__FOM__IE__Body_t200_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.t200", NULL, &OML__FOM__IE__Body_t200_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_t200_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_tei_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_tei_xer_ = { {"tei>\n", "tei>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_tei_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_tei_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.tei", &INTEGER_ber_, &OML__FOM__IE__Body_tei_raw_, &INTEGER_text_, &OML__FOM__IE__Body_tei_xer_, &INTEGER_json_, &OML__FOM__IE__Body_tei_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_tei_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_test__no_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_test__no_xer_ = { {"test_no>\n", "test_no>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_test__no_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_test__no_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.test_no", &INTEGER_ber_, &OML__FOM__IE__Body_test__no_raw_, &INTEGER_text_, &OML__FOM__IE__Body_test__no_xer_, &INTEGER_json_, &OML__FOM__IE__Body_test__no_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_test__no_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_vswr__thresh_raw_ = {16,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,2,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_vswr__thresh_xer_ = { {"vswr_thresh>\n", "vswr_thresh>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int OML__FOM__IE__Body_vswr__thresh_oer_ext_arr_[0] = {};
const int OML__FOM__IE__Body_vswr__thresh_oer_p_[0] = {};
const TTCN_OERdescriptor_t OML__FOM__IE__Body_vswr__thresh_oer_ = { -1, TRUE, 2, FALSE, 0, 0, OML__FOM__IE__Body_vswr__thresh_oer_ext_arr_, 0, OML__FOM__IE__Body_vswr__thresh_oer_p_};
const TTCN_Typedescriptor_t OML__FOM__IE__Body_vswr__thresh_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.vswr_thresh", &OCTETSTRING_ber_, &OML__FOM__IE__Body_vswr__thresh_raw_, &OCTETSTRING_text_, &OML__FOM__IE__Body_vswr__thresh_xer_, &OCTETSTRING_json_, &OML__FOM__IE__Body_vswr__thresh_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_vswr__thresh_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_window__size_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_window__size_xer_ = { {"window_size>\n", "window_size>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_window__size_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_window__size_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.window_size", &INTEGER_ber_, &OML__FOM__IE__Body_window__size_raw_, &INTEGER_text_, &OML__FOM__IE__Body_window__size_xer_, &INTEGER_json_, &OML__FOM__IE__Body_window__size_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_window__size_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_tsc_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_tsc_xer_ = { {"tsc>\n", "tsc>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_tsc_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_tsc_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.tsc", &INTEGER_ber_, &OML__FOM__IE__Body_tsc_raw_, &INTEGER_text_, &OML__FOM__IE__Body_tsc_xer_, &INTEGER_json_, &OML__FOM__IE__Body_tsc_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_tsc_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__Severity_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__Severity
const TTCN_Typedescriptor_t OML__FOM__Severity_descr_ = { "@AbisOML_Types.OML_FOM_Severity", NULL, &OML__FOM__Severity_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__Severity_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_severity_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body_severity
const TTCN_Typedescriptor_t OML__FOM__IE__Body_severity_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.severity", NULL, &OML__FOM__IE__Body_severity_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_severity_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_outst__alarm_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_outst__alarm_xer_ = { {"outst_alarm>\n", "outst_alarm>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_outst__alarm_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_outst__alarm_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.outst_alarm", &INTEGER_ber_, &OML__FOM__IE__Body_outst__alarm_raw_, &INTEGER_text_, &OML__FOM__IE__Body_outst__alarm_xer_, &INTEGER_json_, &OML__FOM__IE__Body_outst__alarm_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_outst__alarm_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_meas__type_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_meas__type_xer_ = { {"meas_type>\n", "meas_type>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_meas__type_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_meas__type_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.meas_type", &INTEGER_ber_, &OML__FOM__IE__Body_meas__type_raw_, &INTEGER_text_, &OML__FOM__IE__Body_meas__type_xer_, &INTEGER_json_, &OML__FOM__IE__Body_meas__type_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_meas__type_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__IE__AvailStatus_len_raw_ = {16,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__IE__AvailStatus_len_xer_ = { {"len>\n", "len>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__IE__AvailStatus_len_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__IE__AvailStatus_len_descr_ = { "@AbisOML_Types.OML_IE_AvailStatus.len", &INTEGER_ber_, &OML__IE__AvailStatus_len_raw_, &INTEGER_text_, &OML__IE__AvailStatus_len_xer_, &INTEGER_json_, &OML__IE__AvailStatus_len_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__IE__AvailStatus_len_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__AvailabilityStatus_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__AvailabilityStatus
const TTCN_Typedescriptor_t OML__FOM__AvailabilityStatus_descr_ = { "@AbisOML_Types.OML_FOM_AvailabilityStatus", NULL, &OML__FOM__AvailabilityStatus_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__AvailabilityStatus_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__IE__AvailStatus_avail__status_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__IE__AvailStatus_avail__status
const TTCN_Typedescriptor_t OML__IE__AvailStatus_avail__status_descr_ = { "@AbisOML_Types.OML_IE_AvailStatus.avail_status", NULL, &OML__IE__AvailStatus_avail__status_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__IE__AvailStatus_avail__status_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__IE__AvailStatus_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__IE__AvailStatus
const TTCN_Typedescriptor_t OML__IE__AvailStatus_descr_ = { "@AbisOML_Types.OML_IE_AvailStatus", NULL, &OML__IE__AvailStatus_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__IE__AvailStatus_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_avail__status_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body_avail__status
const TTCN_Typedescriptor_t OML__FOM__IE__Body_avail__status_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.avail_status", NULL, &OML__FOM__IE__Body_avail__status_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_avail__status_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__IE__ArfcnList_len_raw_ = {16,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__IE__ArfcnList_len_xer_ = { {"len>\n", "len>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__IE__ArfcnList_len_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__IE__ArfcnList_len_descr_ = { "@AbisOML_Types.OML_IE_ArfcnList.len", &INTEGER_ber_, &OML__IE__ArfcnList_len_raw_, &INTEGER_text_, &OML__IE__ArfcnList_len_xer_, &INTEGER_json_, &OML__IE__ArfcnList_len_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__IE__ArfcnList_len_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__ArfcnList_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__ArfcnList
const TTCN_Typedescriptor_t OML__ArfcnList_descr_ = { "@AbisOML_Types.OML_ArfcnList", NULL, &OML__ArfcnList_raw_, NULL, NULL, NULL, NULL, NULL, &OML__ArfcnList_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t OML__ArfcnList_0_raw_ = {16,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__ArfcnList_0_xer_ = { {"uint16_t>\n", "uint16_t>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__ArfcnList_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__ArfcnList_0_descr_ = { "@AbisOML_Types.OML_ArfcnList.<oftype>", &INTEGER_ber_, &OML__ArfcnList_0_raw_, &INTEGER_text_, &OML__ArfcnList_0_xer_, &INTEGER_json_, &OML__ArfcnList_0_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__ArfcnList_0_default_coding("RAW");
UNIVERSAL_CHARSTRING OML__ArfcnList_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__IE__ArfcnList_arfcn__list_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__IE__ArfcnList_arfcn__list
const TTCN_Typedescriptor_t OML__IE__ArfcnList_arfcn__list_descr_ = { "@AbisOML_Types.OML_IE_ArfcnList.arfcn_list", NULL, &OML__IE__ArfcnList_arfcn__list_raw_, NULL, NULL, NULL, NULL, NULL, &OML__ArfcnList_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__IE__ArfcnList_arfcn__list_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__IE__ArfcnList_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__IE__ArfcnList
const TTCN_Typedescriptor_t OML__IE__ArfcnList_descr_ = { "@AbisOML_Types.OML_IE_ArfcnList", NULL, &OML__IE__ArfcnList_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__IE__ArfcnList_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_arfcn__list_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body_arfcn__list
const TTCN_Typedescriptor_t OML__FOM__IE__Body_arfcn__list_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.arfcn_list", NULL, &OML__FOM__IE__Body_arfcn__list_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_arfcn__list_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_ip_raw_ = {32,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_ip_xer_ = { {"ip>\n", "ip>\n"}, {4, 4}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_ip_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.ip", &INTEGER_ber_, &OML__FOM__IE__Body_ip_raw_, &INTEGER_text_, &OML__FOM__IE__Body_ip_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_ip_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_portnr_raw_ = {16,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_portnr_xer_ = { {"portnr>\n", "portnr>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_portnr_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_portnr_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.portnr", &INTEGER_ber_, &OML__FOM__IE__Body_portnr_raw_, &INTEGER_text_, &OML__FOM__IE__Body_portnr_xer_, &INTEGER_json_, &OML__FOM__IE__Body_portnr_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_portnr_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_stream__id_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_stream__id_xer_ = { {"stream_id>\n", "stream_id>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_stream__id_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_stream__id_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.stream_id", &INTEGER_ber_, &OML__FOM__IE__Body_stream__id_raw_, &INTEGER_text_, &OML__FOM__IE__Body_stream__id_xer_, &INTEGER_json_, &OML__FOM__IE__Body_stream__id_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_stream__id_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_sec__oml__cfg_raw_ = {48,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,6,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_sec__oml__cfg_xer_ = { {"sec_oml_cfg>\n", "sec_oml_cfg>\n"}, {13, 13}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int OML__FOM__IE__Body_sec__oml__cfg_oer_ext_arr_[0] = {};
const int OML__FOM__IE__Body_sec__oml__cfg_oer_p_[0] = {};
const TTCN_OERdescriptor_t OML__FOM__IE__Body_sec__oml__cfg_oer_ = { -1, TRUE, 6, FALSE, 0, 0, OML__FOM__IE__Body_sec__oml__cfg_oer_ext_arr_, 0, OML__FOM__IE__Body_sec__oml__cfg_oer_p_};
const TTCN_Typedescriptor_t OML__FOM__IE__Body_sec__oml__cfg_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.sec_oml_cfg", &OCTETSTRING_ber_, &OML__FOM__IE__Body_sec__oml__cfg_raw_, &OCTETSTRING_text_, &OML__FOM__IE__Body_sec__oml__cfg_xer_, &OCTETSTRING_json_, &OML__FOM__IE__Body_sec__oml__cfg_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_sec__oml__cfg_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_ip__if__cfg_raw_ = {64,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,8,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_ip__if__cfg_xer_ = { {"ip_if_cfg>\n", "ip_if_cfg>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int OML__FOM__IE__Body_ip__if__cfg_oer_ext_arr_[0] = {};
const int OML__FOM__IE__Body_ip__if__cfg_oer_p_[0] = {};
const TTCN_OERdescriptor_t OML__FOM__IE__Body_ip__if__cfg_oer_ = { -1, TRUE, 8, FALSE, 0, 0, OML__FOM__IE__Body_ip__if__cfg_oer_ext_arr_, 0, OML__FOM__IE__Body_ip__if__cfg_oer_p_};
const TTCN_Typedescriptor_t OML__FOM__IE__Body_ip__if__cfg_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.ip_if_cfg", &OCTETSTRING_ber_, &OML__FOM__IE__Body_ip__if__cfg_raw_, &OCTETSTRING_text_, &OML__FOM__IE__Body_ip__if__cfg_xer_, &OCTETSTRING_json_, &OML__FOM__IE__Body_ip__if__cfg_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_ip__if__cfg_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_ip__gw__cfg_raw_ = {96,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,12,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_ip__gw__cfg_xer_ = { {"ip_gw_cfg>\n", "ip_gw_cfg>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int OML__FOM__IE__Body_ip__gw__cfg_oer_ext_arr_[0] = {};
const int OML__FOM__IE__Body_ip__gw__cfg_oer_p_[0] = {};
const TTCN_OERdescriptor_t OML__FOM__IE__Body_ip__gw__cfg_oer_ = { -1, TRUE, 12, FALSE, 0, 0, OML__FOM__IE__Body_ip__gw__cfg_oer_ext_arr_, 0, OML__FOM__IE__Body_ip__gw__cfg_oer_p_};
const TTCN_Typedescriptor_t OML__FOM__IE__Body_ip__gw__cfg_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.ip_gw_cfg", &OCTETSTRING_ber_, &OML__FOM__IE__Body_ip__gw__cfg_raw_, &OCTETSTRING_text_, &OML__FOM__IE__Body_ip__gw__cfg_xer_, &OCTETSTRING_json_, &OML__FOM__IE__Body_ip__gw__cfg_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_ip__gw__cfg_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_in__serv__time_raw_ = {32,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_in__serv__time_xer_ = { {"in_serv_time>\n", "in_serv_time>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_in__serv__time_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_in__serv__time_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.in_serv_time", &INTEGER_ber_, &OML__FOM__IE__Body_in__serv__time_raw_, &INTEGER_text_, &OML__FOM__IE__Body_in__serv__time_xer_, &INTEGER_json_, &OML__FOM__IE__Body_in__serv__time_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_in__serv__time_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_paging__cfg_raw_ = {16,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_paging__cfg_xer_ = { {"paging_cfg>\n", "paging_cfg>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__IE__Body_paging__cfg_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__IE__Body_paging__cfg_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.paging_cfg", &INTEGER_ber_, &OML__FOM__IE__Body_paging__cfg_raw_, &INTEGER_text_, &OML__FOM__IE__Body_paging__cfg_xer_, &INTEGER_json_, &OML__FOM__IE__Body_paging__cfg_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_paging__cfg_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_freq__ctrl_raw_ = {16,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,2,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__IE__Body_freq__ctrl_xer_ = { {"freq_ctrl>\n", "freq_ctrl>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int OML__FOM__IE__Body_freq__ctrl_oer_ext_arr_[0] = {};
const int OML__FOM__IE__Body_freq__ctrl_oer_p_[0] = {};
const TTCN_OERdescriptor_t OML__FOM__IE__Body_freq__ctrl_oer_ = { -1, TRUE, 2, FALSE, 0, 0, OML__FOM__IE__Body_freq__ctrl_oer_ext_arr_, 0, OML__FOM__IE__Body_freq__ctrl_oer_p_};
const TTCN_Typedescriptor_t OML__FOM__IE__Body_freq__ctrl_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.freq_ctrl", &OCTETSTRING_ber_, &OML__FOM__IE__Body_freq__ctrl_raw_, &OCTETSTRING_text_, &OML__FOM__IE__Body_freq__ctrl_xer_, &OCTETSTRING_json_, &OML__FOM__IE__Body_freq__ctrl_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_freq__ctrl_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__ARI_len_raw_ = {16,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__ARI_len_xer_ = { {"len>\n", "len>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__ARI_len_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__ARI_len_descr_ = { "@AbisOML_Types.OML_FOM_ARI.len", &INTEGER_ber_, &OML__FOM__ARI_len_raw_, &INTEGER_text_, &OML__FOM__ARI_len_xer_, &INTEGER_json_, &OML__FOM__ARI_len_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__ARI_len_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__ARI_non__reported__attr__len_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__ARI_non__reported__attr__len_xer_ = { {"non_reported_attr_len>\n", "non_reported_attr_len>\n"}, {23, 23}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__ARI_non__reported__attr__len_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__ARI_non__reported__attr__len_descr_ = { "@AbisOML_Types.OML_FOM_ARI.non_reported_attr_len", &INTEGER_ber_, &OML__FOM__ARI_non__reported__attr__len_raw_, &INTEGER_text_, &OML__FOM__ARI_non__reported__attr__len_xer_, &INTEGER_json_, &OML__FOM__ARI_non__reported__attr__len_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__ARI_non__reported__attr__len_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__ARI_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__ARI
const TTCN_Typedescriptor_t OML__FOM__ARI_descr_ = { "@AbisOML_Types.OML_FOM_ARI", NULL, &OML__FOM__ARI_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t OML__FOM__ARI_non__reported__attr_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__ARI_non__reported__attr
const TTCN_Typedescriptor_t OML__FOM__ARI_non__reported__attr_descr_ = { "@AbisOML_Types.OML_FOM_ARI.non_reported_attr", NULL, &OML__FOM__ARI_non__reported__attr_raw_, NULL, NULL, NULL, NULL, NULL, &OML__FOM__ARI_non__reported__attr_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t OML__FOM__ARI_non__reported__attr_0_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__FOM__ARI_non__reported__attr_0_xer_ = { {"uint8_t>\n", "uint8_t>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__FOM__ARI_non__reported__attr_0_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__FOM__ARI_non__reported__attr_0_descr_ = { "@AbisOML_Types.OML_FOM_ARI.non_reported_attr.<oftype>", &INTEGER_ber_, &OML__FOM__ARI_non__reported__attr_0_raw_, &INTEGER_text_, &OML__FOM__ARI_non__reported__attr_0_xer_, &INTEGER_json_, &OML__FOM__ARI_non__reported__attr_0_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__ARI_non__reported__attr_0_default_coding("RAW");
UNIVERSAL_CHARSTRING OML__FOM__ARI_non__reported__attr_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__ARI_ies_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__ARI_ies
const TTCN_Typedescriptor_t OML__FOM__ARI_ies_descr_ = { "@AbisOML_Types.OML_FOM_ARI.ies", NULL, &OML__FOM__ARI_ies_raw_, NULL, NULL, NULL, NULL, NULL, &OML__FOM__IE__List_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__ARI_ies_default_coding("RAW");
UNIVERSAL_CHARSTRING OML__FOM__ARI_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_ari_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body_ari
const TTCN_Typedescriptor_t OML__FOM__IE__Body_ari_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.ari", NULL, &OML__FOM__IE__Body_ari_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_ari_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__IE__L16V_len_raw_ = {16,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__IE__L16V_len_xer_ = { {"len>\n", "len>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__IE__L16V_len_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__IE__L16V_len_descr_ = { "@AbisOML_Types.OML_IE_L16V.len", &INTEGER_ber_, &OML__IE__L16V_len_raw_, &INTEGER_text_, &OML__IE__L16V_len_xer_, &INTEGER_json_, &OML__IE__L16V_len_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__IE__L16V_len_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__IE__L16V_payload_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__IE__L16V_payload_xer_ = { {"payload>\n", "payload>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int OML__IE__L16V_payload_oer_ext_arr_[0] = {};
const int OML__IE__L16V_payload_oer_p_[0] = {};
const TTCN_OERdescriptor_t OML__IE__L16V_payload_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OML__IE__L16V_payload_oer_ext_arr_, 0, OML__IE__L16V_payload_oer_p_};
const TTCN_Typedescriptor_t OML__IE__L16V_payload_descr_ = { "@AbisOML_Types.OML_IE_L16V.payload", &OCTETSTRING_ber_, &OML__IE__L16V_payload_raw_, &OCTETSTRING_text_, &OML__IE__L16V_payload_xer_, &OCTETSTRING_json_, &OML__IE__L16V_payload_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__IE__L16V_payload_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__IE__L16V_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__IE__L16V
const TTCN_Typedescriptor_t OML__IE__L16V_descr_ = { "@AbisOML_Types.OML_IE_L16V", NULL, &OML__IE__L16V_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__IE__L16V_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__Body_other_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__Body_other
const TTCN_Typedescriptor_t OML__FOM__IE__Body_other_descr_ = { "@AbisOML_Types.OML_FOM_IE_Body.other", NULL, &OML__FOM__IE__Body_other_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_other_default_coding("RAW");
UNIVERSAL_CHARSTRING OML__FOM__IE__Body_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE_body_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE_body
const TTCN_Typedescriptor_t OML__FOM__IE_body_descr_ = { "@AbisOML_Types.OML_FOM_IE.body", NULL, &OML__FOM__IE_body_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE_body_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE
const TTCN_Typedescriptor_t OML__FOM__IE_descr_ = { "@AbisOML_Types.OML_FOM_IE", NULL, &OML__FOM__IE_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM__IE__List_0_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM__IE__List_0
const TTCN_Typedescriptor_t OML__FOM__IE__List_0_descr_ = { "@AbisOML_Types.OML_FOM_IE_List.<oftype>", NULL, &OML__FOM__IE__List_0_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM__IE__List_0_default_coding("RAW");
UNIVERSAL_CHARSTRING OML__FOM__IE__List_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__FOM_ies_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__FOM_ies
const TTCN_Typedescriptor_t OML__FOM_ies_descr_ = { "@AbisOML_Types.OML_FOM.ies", NULL, &OML__FOM_ies_raw_, NULL, NULL, NULL, NULL, NULL, &OML__FOM__IE__List_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__FOM_ies_default_coding("RAW");
UNIVERSAL_CHARSTRING OML__FOM_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__Union_fom_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__Union_fom
const TTCN_Typedescriptor_t OML__Union_fom_descr_ = { "@AbisOML_Types.OML_Union.fom", NULL, &OML__Union_fom_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__Union_fom_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__MANUF_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__MANUF
const TTCN_Typedescriptor_t OML__MANUF_descr_ = { "@AbisOML_Types.OML_MANUF", NULL, &OML__MANUF_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t OML__MANUF__IPA_len_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__MANUF__IPA_len_xer_ = { {"len>\n", "len>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__MANUF__IPA_len_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__MANUF__IPA_len_descr_ = { "@AbisOML_Types.OML_MANUF_IPA.len", &INTEGER_ber_, &OML__MANUF__IPA_len_raw_, &INTEGER_text_, &OML__MANUF__IPA_len_xer_, &INTEGER_json_, &OML__MANUF__IPA_len_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__MANUF__IPA_len_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__MANUF__IPA_str__len_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__MANUF__IPA_str__len_xer_ = { {"str_len>\n", "str_len>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__MANUF__IPA_str__len_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__MANUF__IPA_str__len_descr_ = { "@AbisOML_Types.OML_MANUF_IPA.str_len", &INTEGER_ber_, &OML__MANUF__IPA_str__len_raw_, &INTEGER_text_, &OML__MANUF__IPA_str__len_xer_, &INTEGER_json_, &OML__MANUF__IPA_str__len_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__MANUF__IPA_str__len_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__MANUF__IPA_manuf__str_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__MANUF__IPA_manuf__str_xer_ = { {"manuf_str>\n", "manuf_str>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t OML__MANUF__IPA_manuf__str_descr_ = { "@AbisOML_Types.OML_MANUF_IPA.manuf_str", NULL, &OML__MANUF__IPA_manuf__str_raw_, &CHARSTRING_text_, &OML__MANUF__IPA_manuf__str_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__MANUF__IPA_manuf__str_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__MANUF__IPA_hdr_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__MANUF__IPA_hdr
const TTCN_Typedescriptor_t OML__MANUF__IPA_hdr_descr_ = { "@AbisOML_Types.OML_MANUF_IPA.hdr", NULL, &OML__MANUF__IPA_hdr_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__MANUF__IPA_hdr_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__MANUF__IPA_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__MANUF__IPA
const TTCN_Typedescriptor_t OML__MANUF__IPA_descr_ = { "@AbisOML_Types.OML_MANUF_IPA", NULL, &OML__MANUF__IPA_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const TTCN_RAWdescriptor_t OML__MANUF__IPA_ies_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__MANUF__IPA_ies
const TTCN_Typedescriptor_t OML__MANUF__IPA_ies_descr_ = { "@AbisOML_Types.OML_MANUF_IPA.ies", NULL, &OML__MANUF__IPA_ies_raw_, NULL, NULL, NULL, NULL, NULL, &OML__FOM__IE__List_0_descr_, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__MANUF__IPA_ies_default_coding("RAW");
UNIVERSAL_CHARSTRING OML__MANUF__IPA_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__MANUF_ipa_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__MANUF_ipa
const TTCN_Typedescriptor_t OML__MANUF_ipa_descr_ = { "@AbisOML_Types.OML_MANUF.ipa", NULL, &OML__MANUF_ipa_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__MANUF_ipa_default_coding("RAW");
UNIVERSAL_CHARSTRING OML__MANUF_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__Union_manuf_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__Union_manuf
const TTCN_Typedescriptor_t OML__Union_manuf_descr_ = { "@AbisOML_Types.OML_Union.manuf", NULL, &OML__Union_manuf_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__Union_manuf_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__Union_other_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__Union_other_xer_ = { {"other>\n", "other>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int OML__Union_other_oer_ext_arr_[0] = {};
const int OML__Union_other_oer_p_[0] = {};
const TTCN_OERdescriptor_t OML__Union_other_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OML__Union_other_oer_ext_arr_, 0, OML__Union_other_oer_p_};
const TTCN_Typedescriptor_t OML__Union_other_descr_ = { "@AbisOML_Types.OML_Union.other", &OCTETSTRING_ber_, &OML__Union_other_raw_, &OCTETSTRING_text_, &OML__Union_other_xer_, &OCTETSTRING_json_, &OML__Union_other_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__Union_other_default_coding("RAW");
UNIVERSAL_CHARSTRING OML__Union_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__PDU_mdisc_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__PDU_mdisc
const TTCN_Typedescriptor_t OML__PDU_mdisc_descr_ = { "@AbisOML_Types.OML_PDU.mdisc", NULL, &OML__PDU_mdisc_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__PDU_mdisc_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__PDU_placement_raw_ = {8,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__PDU_placement
const TTCN_Typedescriptor_t OML__PDU_placement_descr_ = { "@AbisOML_Types.OML_PDU.placement", NULL, &OML__PDU_placement_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__PDU_placement_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__PDU_sequence_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__PDU_sequence_xer_ = { {"sequence>\n", "sequence>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__PDU_sequence_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__PDU_sequence_descr_ = { "@AbisOML_Types.OML_PDU.sequence", &INTEGER_ber_, &OML__PDU_sequence_raw_, &INTEGER_text_, &OML__PDU_sequence_xer_, &INTEGER_json_, &OML__PDU_sequence_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__PDU_sequence_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__PDU_u_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__PDU_u
const TTCN_Typedescriptor_t OML__PDU_u_descr_ = { "@AbisOML_Types.OML_PDU.u", NULL, &OML__PDU_u_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__PDU_u_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__PDU_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__PDU
const TTCN_Typedescriptor_t OML__PDU_descr_ = { "@AbisOML_Types.OML_PDU", NULL, &OML__PDU_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__PDU_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__IE__LV_len_raw_ = {8,SG_NO,ORDER_MSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__IE__LV_len_xer_ = { {"len>\n", "len>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t OML__IE__LV_len_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t OML__IE__LV_len_descr_ = { "@AbisOML_Types.OML_IE_LV.len", &INTEGER_ber_, &OML__IE__LV_len_raw_, &INTEGER_text_, &OML__IE__LV_len_xer_, &INTEGER_json_, &OML__IE__LV_len_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__IE__LV_len_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__IE__LV_payload_raw_ = {0,SG_NO,ORDER_LSB,ORDER_MSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
const XERdescriptor_t       OML__IE__LV_payload_xer_ = { {"payload>\n", "payload>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int OML__IE__LV_payload_oer_ext_arr_[0] = {};
const int OML__IE__LV_payload_oer_p_[0] = {};
const TTCN_OERdescriptor_t OML__IE__LV_payload_oer_ = { -1, TRUE, -1, FALSE, 0, 0, OML__IE__LV_payload_oer_ext_arr_, 0, OML__IE__LV_payload_oer_p_};
const TTCN_Typedescriptor_t OML__IE__LV_payload_descr_ = { "@AbisOML_Types.OML_IE_LV.payload", &OCTETSTRING_ber_, &OML__IE__LV_payload_raw_, &OCTETSTRING_text_, &OML__IE__LV_payload_xer_, &OCTETSTRING_json_, &OML__IE__LV_payload_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__IE__LV_payload_default_coding("RAW");
const TTCN_RAWdescriptor_t OML__IE__LV_raw_ = {0,SG_NO,ORDER_LSB,ORDER_LSB,ORDER_LSB,ORDER_LSB,EXT_BIT_NO,ORDER_LSB,ORDER_MSB,TOP_BIT_INHERITED,0,0,0,8,0,NULL,-1,CharCoding::UNKNOWN_CHAR_CODING,NULL,false};
// No XER for OML__IE__LV
const TTCN_Typedescriptor_t OML__IE__LV_descr_ = { "@AbisOML_Types.OML_IE_LV", NULL, &OML__IE__LV_raw_, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING OML__IE__LV_default_coding("RAW");
OML__PDU_template template_tr__OML__FOM__only;
const OML__PDU_template& tr__OML__FOM__only = template_tr__OML__FOM__only;
OML__FOM__ObjectClass_template template_tr__OML__MsgType_obj__class_defval;
const OML__FOM__ObjectClass_template& tr__OML__MsgType_obj__class_defval = template_tr__OML__MsgType_obj__class_defval;
OML__FOM__ObjectInstance_template template_tr__OML__MsgType_obj__inst_defval;
const OML__FOM__ObjectInstance_template& tr__OML__MsgType_obj__inst_defval = template_tr__OML__MsgType_obj__inst_defval;
OML__FOM__IE__List_template template_tr__OML__MsgType_ies_defval;
const OML__FOM__IE__List_template& tr__OML__MsgType_ies_defval = template_tr__OML__MsgType_ies_defval;
OML__FOM__IE__List_template template_ts__OML__MsgType_ies_defval;
const OML__FOM__IE__List_template& ts__OML__MsgType_ies_defval = template_ts__OML__MsgType_ies_defval;
OML__FOM__IE__List_template template_ts__OML__IPA__MsgType_ies_defval;
const OML__FOM__IE__List_template& ts__OML__IPA__MsgType_ies_defval = template_ts__OML__IPA__MsgType_ies_defval;
OML__FOM__MessageType_template template_tr__OML__IPA__MsgType_msg__type_defval;
const OML__FOM__MessageType_template& tr__OML__IPA__MsgType_msg__type_defval = template_tr__OML__IPA__MsgType_msg__type_defval;
OML__FOM__ObjectClass_template template_tr__OML__IPA__MsgType_obj__class_defval;
const OML__FOM__ObjectClass_template& tr__OML__IPA__MsgType_obj__class_defval = template_tr__OML__IPA__MsgType_obj__class_defval;
OML__FOM__ObjectInstance_template template_tr__OML__IPA__MsgType_obj__inst_defval;
const OML__FOM__ObjectInstance_template& tr__OML__IPA__MsgType_obj__inst_defval = template_tr__OML__IPA__MsgType_obj__inst_defval;
OML__FOM__IE__List_template template_tr__OML__IPA__MsgType_ies_defval;
const OML__FOM__IE__List_template& tr__OML__IPA__MsgType_ies_defval = template_tr__OML__IPA__MsgType_ies_defval;
OML__FOM__OperationalState_template template_tr__OML__StateChgEvtRep_opstate_defval;
const OML__FOM__OperationalState_template& tr__OML__StateChgEvtRep_opstate_defval = template_tr__OML__StateChgEvtRep_opstate_defval;
OML__FOM__AvailabilityStatus_template template_tr__OML__StateChgEvtRep_avstate_defval;
const OML__FOM__AvailabilityStatus_template& tr__OML__StateChgEvtRep_avstate_defval = template_tr__OML__StateChgEvtRep_avstate_defval;
OML__FOM__AdministrativeState_template template_tr__OML__StateChgEvtRep_admstate_defval;
const OML__FOM__AdministrativeState_template& tr__OML__StateChgEvtRep_admstate_defval = template_tr__OML__StateChgEvtRep_admstate_defval;
OML__FOM__NackCause_template template_tr__OML__ChangeAdmStateNACK_cause_defval;
const OML__FOM__NackCause_template& tr__OML__ChangeAdmStateNACK_cause_defval = template_tr__OML__ChangeAdmStateNACK_cause_defval;
OML__FOM__NackCause_template template_tr__OML__OpstartNACK_cause_defval;
const OML__FOM__NackCause_template& tr__OML__OpstartNACK_cause_defval = template_tr__OML__OpstartNACK_cause_defval;
OML__FOM__ARI_template template_tr__OML__GetAttributesResponse_ari_defval;
const OML__FOM__ARI_template& tr__OML__GetAttributesResponse_ari_defval = template_tr__OML__GetAttributesResponse_ari_defval;
TTCN_Module module_object("AbisOML_Types", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

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

/* Member functions of C++ classes */

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

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

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

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

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

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

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

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

boolean OML__MessageDiscriminator::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_MessageDiscriminator.");
return enum_value == other_value;
}

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

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

boolean OML__MessageDiscriminator::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_MessageDiscriminator.");
return enum_value < other_value;
}

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

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

boolean OML__MessageDiscriminator::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_MessageDiscriminator.");
return enum_value > other_value;
}

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

const char *OML__MessageDiscriminator::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case ABIS__OM__MDISC__FOM: return "ABIS_OM_MDISC_FOM";
case ABIS__OM__MDISC__MMI: return "ABIS_OM_MDISC_MMI";
case ABIS__OM__MDISC__TRAU: return "ABIS_OM_MDISC_TRAU";
case ABIS__OM__MDISC__MANUF: return "ABIS_OM_MDISC_MANUF";
default:
return "<unknown>";
}
}

OML__MessageDiscriminator::enum_type OML__MessageDiscriminator::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "ABIS_OM_MDISC_FOM")) return ABIS__OM__MDISC__FOM;
if (!strcmp(str_par, "ABIS_OM_MDISC_MMI")) return ABIS__OM__MDISC__MMI;
if (!strcmp(str_par, "ABIS_OM_MDISC_TRAU")) return ABIS__OM__MDISC__TRAU;
if (!strcmp(str_par, "ABIS_OM_MDISC_MANUF")) return ABIS__OM__MDISC__MANUF;
}
return UNKNOWN_VALUE;
}

boolean OML__MessageDiscriminator::is_valid_enum(int int_par)
{
switch (int_par) {
case 128:
case 64:
case 32:
case 16:
return TRUE;
default:
return FALSE;
}
}

int OML__MessageDiscriminator::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_MessageDiscriminator.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int OML__MessageDiscriminator::enum2int(const OML__MessageDiscriminator& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_MessageDiscriminator.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

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

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

void OML__MessageDiscriminator::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void OML__MessageDiscriminator::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@AbisOML_Types.OML_MessageDiscriminator");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @AbisOML_Types.OML_MessageDiscriminator.");
  }
}

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

void OML__MessageDiscriminator::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @AbisOML_Types.OML_MessageDiscriminator.", enum_value);
}

void OML__MessageDiscriminator::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__MessageDiscriminator::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 OML__MessageDiscriminator::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
{
  int decoded_value = 0;
  int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 8, no_err);
  if (decoded_length < 0) return decoded_length;
  if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
  else {
    if(no_err){
     return -1;
    } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
    enum_value = UNKNOWN_VALUE;
    }
  }
  return decoded_length;
}

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

void OML__MessageDiscriminator_template::copy_template(const OML__MessageDiscriminator_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__MessageDiscriminator_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 OML__MessageDiscriminator_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__MessageDiscriminator_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_MessageDiscriminator.");
}
}

OML__MessageDiscriminator_template::OML__MessageDiscriminator_template()
{
}

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

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

OML__MessageDiscriminator_template::OML__MessageDiscriminator_template(OML__MessageDiscriminator::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

OML__MessageDiscriminator_template& OML__MessageDiscriminator_template::operator=(const OPTIONAL<OML__MessageDiscriminator>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (OML__MessageDiscriminator::enum_type)(const OML__MessageDiscriminator&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @AbisOML_Types.OML_MessageDiscriminator.");
}
return *this;
}

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

boolean OML__MessageDiscriminator_template::match(OML__MessageDiscriminator::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_MessageDiscriminator.");
}
return FALSE;
}

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

OML__MessageDiscriminator::enum_type OML__MessageDiscriminator_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @AbisOML_Types.OML_MessageDiscriminator.");
return single_value;
}

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

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

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

void OML__MessageDiscriminator_template::log_match(const OML__MessageDiscriminator& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

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

void OML__MessageDiscriminator_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (OML__MessageDiscriminator::enum_type)text_buf.pull_int().get_val();
if (!OML__MessageDiscriminator::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @AbisOML_Types.OML_MessageDiscriminator.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__MessageDiscriminator_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @AbisOML_Types.OML_MessageDiscriminator.");
}
}

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

boolean OML__MessageDiscriminator_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 OML__MessageDiscriminator_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__MessageDiscriminator_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    OML__MessageDiscriminator::enum_type enum_val = OML__MessageDiscriminator::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!OML__MessageDiscriminator::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @AbisOML_Types.OML_MessageDiscriminator.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__MessageDiscriminator_template* precondition = new OML__MessageDiscriminator_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__MessageDiscriminator_template* implied_template = new OML__MessageDiscriminator_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__MessageDiscriminator_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@AbisOML_Types.OML_MessageDiscriminator");
  }
  is_ifpresent = param.get_ifpresent();
}

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

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

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

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

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

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

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

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

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

boolean OML__Placement::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_Placement.");
return enum_value == other_value;
}

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

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

boolean OML__Placement::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_Placement.");
return enum_value < other_value;
}

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

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

boolean OML__Placement::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_Placement.");
return enum_value > other_value;
}

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

const char *OML__Placement::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case ABIS__OM__PLACEMENT__ONLY: return "ABIS_OM_PLACEMENT_ONLY";
case ABIS__OM__PLACEMENT__FIRST: return "ABIS_OM_PLACEMENT_FIRST";
case ABIS__OM__PLACEMENT__MIDDLE: return "ABIS_OM_PLACEMENT_MIDDLE";
case ABIS__OM__PLACEMENT__LAST: return "ABIS_OM_PLACEMENT_LAST";
default:
return "<unknown>";
}
}

OML__Placement::enum_type OML__Placement::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "ABIS_OM_PLACEMENT_ONLY")) return ABIS__OM__PLACEMENT__ONLY;
if (!strcmp(str_par, "ABIS_OM_PLACEMENT_FIRST")) return ABIS__OM__PLACEMENT__FIRST;
if (!strcmp(str_par, "ABIS_OM_PLACEMENT_MIDDLE")) return ABIS__OM__PLACEMENT__MIDDLE;
if (!strcmp(str_par, "ABIS_OM_PLACEMENT_LAST")) return ABIS__OM__PLACEMENT__LAST;
}
return UNKNOWN_VALUE;
}

boolean OML__Placement::is_valid_enum(int int_par)
{
switch (int_par) {
case 128:
case 64:
case 32:
case 16:
return TRUE;
default:
return FALSE;
}
}

int OML__Placement::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_Placement.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int OML__Placement::enum2int(const OML__Placement& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_Placement.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

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

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

void OML__Placement::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void OML__Placement::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@AbisOML_Types.OML_Placement");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @AbisOML_Types.OML_Placement.");
  }
}

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

void OML__Placement::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @AbisOML_Types.OML_Placement.", enum_value);
}

void OML__Placement::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__Placement::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 OML__Placement::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
{
  int decoded_value = 0;
  int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 8, no_err);
  if (decoded_length < 0) return decoded_length;
  if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
  else {
    if(no_err){
     return -1;
    } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
    enum_value = UNKNOWN_VALUE;
    }
  }
  return decoded_length;
}

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

void OML__Placement_template::copy_template(const OML__Placement_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__Placement_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 OML__Placement_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__Placement_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_Placement.");
}
}

OML__Placement_template::OML__Placement_template()
{
}

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

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

OML__Placement_template::OML__Placement_template(OML__Placement::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

OML__Placement_template& OML__Placement_template::operator=(const OPTIONAL<OML__Placement>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (OML__Placement::enum_type)(const OML__Placement&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @AbisOML_Types.OML_Placement.");
}
return *this;
}

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

boolean OML__Placement_template::match(OML__Placement::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_Placement.");
}
return FALSE;
}

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

OML__Placement::enum_type OML__Placement_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @AbisOML_Types.OML_Placement.");
return single_value;
}

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

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

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

void OML__Placement_template::log_match(const OML__Placement& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

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

void OML__Placement_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (OML__Placement::enum_type)text_buf.pull_int().get_val();
if (!OML__Placement::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @AbisOML_Types.OML_Placement.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__Placement_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @AbisOML_Types.OML_Placement.");
}
}

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

boolean OML__Placement_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 OML__Placement_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__Placement_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    OML__Placement::enum_type enum_val = OML__Placement::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!OML__Placement::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @AbisOML_Types.OML_Placement.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__Placement_template* precondition = new OML__Placement_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__Placement_template* implied_template = new OML__Placement_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__Placement_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@AbisOML_Types.OML_Placement");
  }
  is_ifpresent = param.get_ifpresent();
}

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

void OML__Union::copy_value(const OML__Union& other_value)
{
switch (other_value.union_selection) {
case ALT_fom:
field_fom = new OML__FOM(*other_value.field_fom);
break;
case ALT_manuf:
field_manuf = new OML__MANUF(*other_value.field_manuf);
break;
case ALT_other:
field_other = new OCTETSTRING(*other_value.field_other);
break;
default:
TTCN_error("Assignment of an unbound union value of type @AbisOML_Types.OML_Union.");
}
union_selection = other_value.union_selection;
}

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

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

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

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

boolean OML__Union::operator==(const OML__Union& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @AbisOML_Types.OML_Union.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @AbisOML_Types.OML_Union.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_fom:
return *field_fom == *other_value.field_fom;
case ALT_manuf:
return *field_manuf == *other_value.field_manuf;
case ALT_other:
return *field_other == *other_value.field_other;
default:
return FALSE;
}
}

OML__FOM& OML__Union::fom()
{
if (union_selection != ALT_fom) {
clean_up();
field_fom = new OML__FOM;
union_selection = ALT_fom;
}
return *field_fom;
}

const OML__FOM& OML__Union::fom() const
{
if (union_selection != ALT_fom) TTCN_error("Using non-selected field fom in a value of union type @AbisOML_Types.OML_Union.");
return *field_fom;
}

OML__MANUF& OML__Union::manuf()
{
if (union_selection != ALT_manuf) {
clean_up();
field_manuf = new OML__MANUF;
union_selection = ALT_manuf;
}
return *field_manuf;
}

const OML__MANUF& OML__Union::manuf() const
{
if (union_selection != ALT_manuf) TTCN_error("Using non-selected field manuf in a value of union type @AbisOML_Types.OML_Union.");
return *field_manuf;
}

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

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

boolean OML__Union::ischosen(union_selection_type checked_selection) const
{
if (checked_selection == UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @AbisOML_Types.OML_Union.");
return union_selection == checked_selection;
}

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

boolean OML__Union::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_fom: return field_fom->is_value();
case ALT_manuf: return field_manuf->is_value();
case ALT_other: return field_other->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void OML__Union::clean_up()
{
switch (union_selection) {
case ALT_fom:
  delete field_fom;
  break;
case ALT_manuf:
  delete field_manuf;
  break;
case ALT_other:
  delete field_other;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void OML__Union::log() const
{
switch (union_selection) {
case ALT_fom:
TTCN_Logger::log_event_str("{ fom := ");
field_fom->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_manuf:
TTCN_Logger::log_event_str("{ manuf := ");
field_manuf->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_other:
TTCN_Logger::log_event_str("{ other := ");
field_other->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

void OML__Union::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "union value");
  Module_Param_Ptr m_p = &param;
  if (m_p->get_type()==Module_Param::MP_Value_List && m_p->get_size()==0) return;
  if (m_p->get_type()!=Module_Param::MP_Assignment_List) {
    param.error("union value with field name was expected");
  }
  Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1);
  char* last_name = mp_last->get_id()->get_name();
  if (!strcmp(last_name, "fom")) {
    fom().set_param(*mp_last);
    if (!fom().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "manuf")) {
    manuf().set_param(*mp_last);
    if (!manuf().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "other")) {
    other().set_param(*mp_last);
    if (!other().is_bound()) clean_up();
    return;
  }
  mp_last->error("Field %s does not exist in type @AbisOML_Types.OML_Union.", last_name);
}

void OML__Union::set_implicit_omit()
{
switch (union_selection) {
case ALT_fom:
field_fom->set_implicit_omit(); break;
case ALT_manuf:
field_manuf->set_implicit_omit(); break;
case ALT_other:
field_other->set_implicit_omit(); break;
default: break;
}
}

void OML__Union::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_fom:
field_fom->encode_text(text_buf);
break;
case ALT_manuf:
field_manuf->encode_text(text_buf);
break;
case ALT_other:
field_other->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @AbisOML_Types.OML_Union.");
}
}

void OML__Union::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_fom:
fom().decode_text(text_buf);
break;
case ALT_manuf:
manuf().decode_text(text_buf);
break;
case ALT_other:
other().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @AbisOML_Types.OML_Union.");
}
}

void OML__Union::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__Union::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...)
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
    unsigned L_form=va_arg(pvar, unsigned);
    ASN_BER_TLV_t tlv;
    BER_decode_str2TLV(p_buf, tlv, L_form);
    BER_decode_TLV(p_td, tlv, L_form);
    if(tlv.isComplete) p_buf.increase_pos(tlv.get_len());
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-decoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    raw_order_t r_order;
    switch(p_td.raw->top_bit_order) {
    case TOP_BIT_LEFT:
      r_order=ORDER_LSB;
      break;
    case TOP_BIT_RIGHT:
    default:
      r_order=ORDER_MSB;
    }
    int rawr = RAW_decode(p_td, p_buf, p_buf.get_len()*8, r_order);
    if(rawr<0) switch (-rawr) {
    case TTCN_EncDec::ET_INCOMPL_MSG:
    case TTCN_EncDec::ET_LEN_ERR:
      ec.error((TTCN_EncDec::error_type_t)-rawr, "Can not decode type '%s', because incomplete message was received", p_td.name);
      break;
    case 1:
    default:
      ec.error(TTCN_EncDec::ET_INVAL_MSG, "Can not decode type '%s', because invalid message was received", p_td.name);
      break;
    }
    break;}
  case TTCN_EncDec::CT_TEXT: {
    Limit_Token_List limit;
    TTCN_EncDec_ErrorContext ec("While TEXT-decoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
        ("No TEXT descriptor available for type '%s'.", p_td.name);
    const unsigned char *b_data=p_buf.get_data();
    int null_added=0;
    if(b_data[p_buf.get_len()-1]!='\0'){
      null_added=1;
      p_buf.set_pos(p_buf.get_len());
      p_buf.put_zero(8,ORDER_LSB);
      p_buf.rewind();
    }
    if(TEXT_decode(p_td,p_buf,limit)<0)
      ec.error(TTCN_EncDec::ET_INCOMPL_MSG,"Can not decode type '%s', because invalid or incomplete message was received", p_td.name);
    if(null_added){
      size_t actpos=p_buf.get_pos();
      p_buf.set_pos(p_buf.get_len()-1);
      p_buf.cut_end();
      p_buf.set_pos(actpos);
    }
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-decoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XmlReaderWrap reader(p_buf);
    for (int rd_ok=reader.Read(); rd_ok==1; rd_ok=reader.Read()) {
      if (reader.NodeType() == XML_READER_TYPE_ELEMENT) break;
    }
    XER_decode(*(p_td.xer), reader, XER_coding | XER_TOPLEVEL, XER_NONE, 0);
    size_t bytes = reader.ByteConsumed();
    p_buf.set_pos(bytes);
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-decoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok((const char*)p_buf.get_data(), p_buf.get_len());
    if(JSON_decode(p_td, tok, FALSE, FALSE)<0)
      ec.error(TTCN_EncDec::ET_INCOMPL_MSG,"Can not decode type '%s', because invalid or incomplete message was received", p_td.name);
    p_buf.set_pos(tok.get_buf_pos());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-decoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
     OER_struct p_oer;
    OER_decode(p_td, p_buf, p_oer);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int OML__Union::RAW_decode(
const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, 
raw_order_t top_bit_ord, boolean no_err, int sel_field, boolean, const RAW_Force_Omit* force_omit)
{
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  int decoded_length=0;
  int starting_pos=p_buf.get_pos_bit();
  if(sel_field!=-1){
    switch(sel_field){
    case 0: {
      RAW_Force_Omit field_force_omit(0, force_omit, OML__Union_fom_descr_.raw->forceomit);
      decoded_length = fom().RAW_decode(OML__Union_fom_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 1: {
      RAW_Force_Omit field_force_omit(1, force_omit, OML__Union_manuf_descr_.raw->forceomit);
      decoded_length = manuf().RAW_decode(OML__Union_manuf_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 2: {
      RAW_Force_Omit field_force_omit(2, force_omit, OML__Union_other_descr_.raw->forceomit);
      decoded_length = other().RAW_decode(OML__Union_other_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    default: break;
    }
    return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
  } else {
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_0_force_omit(0, force_omit, OML__Union_fom_descr_.raw->forceomit);
      decoded_length = fom().RAW_decode(OML__Union_fom_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_0_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_1_force_omit(1, force_omit, OML__Union_manuf_descr_.raw->forceomit);
      decoded_length = manuf().RAW_decode(OML__Union_manuf_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_1_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_2_force_omit(2, force_omit, OML__Union_other_descr_.raw->forceomit);
      decoded_length = other().RAW_decode(OML__Union_other_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_2_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
 }
 clean_up();
 return -1;
}

int OML__Union::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
{
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 3;  myleaf.body.node.nodes = init_nodes_of_enc_tree(3);
  memset(myleaf.body.node.nodes, 0, 3 * sizeof(RAW_enc_tree *));
  switch (union_selection) {
  case ALT_fom:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, OML__Union_fom_descr_.raw);
    encoded_length = field_fom->RAW_encode(OML__Union_fom_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &OML__Union_fom_descr_;
    break;
  case ALT_manuf:
    myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, OML__Union_manuf_descr_.raw);
    encoded_length = field_manuf->RAW_encode(OML__Union_manuf_descr_, *myleaf.body.node.nodes[1]);
    myleaf.body.node.nodes[1]->coding_descr = &OML__Union_manuf_descr_;
    break;
  case ALT_other:
    myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, OML__Union_other_descr_.raw);
    encoded_length = field_other->RAW_encode(OML__Union_other_descr_, *myleaf.body.node.nodes[2]);
    myleaf.body.node.nodes[2]->coding_descr = &OML__Union_other_descr_;
    break;
  default:
    TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  }
  return encoded_length;
}

void OML__Union_template::copy_value(const OML__Union& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case OML__Union::ALT_fom:
single_value.field_fom = new OML__FOM_template(other_value.fom());
break;
case OML__Union::ALT_manuf:
single_value.field_manuf = new OML__MANUF_template(other_value.manuf());
break;
case OML__Union::ALT_other:
single_value.field_other = new OCTETSTRING_template(other_value.other());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @AbisOML_Types.OML_Union.");
}
set_selection(SPECIFIC_VALUE);
}

void OML__Union_template::copy_template(const OML__Union_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value.union_selection = other_value.single_value.union_selection;
switch (single_value.union_selection) {
case OML__Union::ALT_fom:
single_value.field_fom = new OML__FOM_template(*other_value.single_value.field_fom);
break;
case OML__Union::ALT_manuf:
single_value.field_manuf = new OML__MANUF_template(*other_value.single_value.field_manuf);
break;
case OML__Union::ALT_other:
single_value.field_other = new OCTETSTRING_template(*other_value.single_value.field_other);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @AbisOML_Types.OML_Union.");
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__Union_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new OML__Union_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__Union_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized template of union type @AbisOML_Types.OML_Union.");
}
set_selection(other_value);
}

OML__Union_template::OML__Union_template()
{
}

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

OML__Union_template::OML__Union_template(const OML__Union& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void OML__Union_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case OML__Union::ALT_fom:
delete single_value.field_fom;
break;
case OML__Union::ALT_manuf:
delete single_value.field_manuf;
break;
case OML__Union::ALT_other:
delete single_value.field_other;
default:
break;
}
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

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

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

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

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

boolean OML__Union_template::match(const OML__Union& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
{
OML__Union::union_selection_type value_selection = other_value.get_selection();
if (value_selection == OML__Union::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case OML__Union::ALT_fom:
return single_value.field_fom->match(other_value.fom(), legacy);
case OML__Union::ALT_manuf:
return single_value.field_manuf->match(other_value.manuf(), legacy);
case OML__Union::ALT_other:
return single_value.field_other->match(other_value.other(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @AbisOML_Types.OML_Union.");
}
}
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error ("Matching an uninitialized template of union type @AbisOML_Types.OML_Union.");
}
return FALSE;
}

boolean OML__Union_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case OML__Union::ALT_fom:
return single_value.field_fom->is_value();
case OML__Union::ALT_manuf:
return single_value.field_manuf->is_value();
case OML__Union::ALT_other:
return single_value.field_other->is_value();
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @AbisOML_Types.OML_Union.");
}
}

OML__Union OML__Union_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of union type @AbisOML_Types.OML_Union.");
OML__Union ret_val;
switch (single_value.union_selection) {
case OML__Union::ALT_fom:
ret_val.fom() = single_value.field_fom->valueof();
break;
case OML__Union::ALT_manuf:
ret_val.manuf() = single_value.field_manuf->valueof();
break;
case OML__Union::ALT_other:
ret_val.other() = single_value.field_other->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @AbisOML_Types.OML_Union.");
}
return ret_val;
}

OML__Union_template& OML__Union_template::list_item(unsigned int list_index) const
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Internal error: Accessing a list element of a non-list template of union type @AbisOML_Types.OML_Union.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @AbisOML_Types.OML_Union.");
return value_list.list_value[list_index];
}
void OML__Union_template::set_type(template_sel template_type, unsigned int list_length)
{
if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST && template_type != CONJUNCTION_MATCH) TTCN_error ("Internal error: Setting an invalid list for a template of union type @AbisOML_Types.OML_Union.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__Union_template[list_length];
}

OML__FOM_template& OML__Union_template::fom()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__Union::ALT_fom) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_fom = new OML__FOM_template(ANY_VALUE);
else single_value.field_fom = new OML__FOM_template;
single_value.union_selection = OML__Union::ALT_fom;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_fom;
}

const OML__FOM_template& OML__Union_template::fom() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field fom in a non-specific template of union type @AbisOML_Types.OML_Union.");
if (single_value.union_selection != OML__Union::ALT_fom) TTCN_error("Accessing non-selected field fom in a template of union type @AbisOML_Types.OML_Union.");
return *single_value.field_fom;
}

OML__MANUF_template& OML__Union_template::manuf()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__Union::ALT_manuf) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_manuf = new OML__MANUF_template(ANY_VALUE);
else single_value.field_manuf = new OML__MANUF_template;
single_value.union_selection = OML__Union::ALT_manuf;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_manuf;
}

const OML__MANUF_template& OML__Union_template::manuf() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field manuf in a non-specific template of union type @AbisOML_Types.OML_Union.");
if (single_value.union_selection != OML__Union::ALT_manuf) TTCN_error("Accessing non-selected field manuf in a template of union type @AbisOML_Types.OML_Union.");
return *single_value.field_manuf;
}

OCTETSTRING_template& OML__Union_template::other()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__Union::ALT_other) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_other = new OCTETSTRING_template(ANY_VALUE);
else single_value.field_other = new OCTETSTRING_template;
single_value.union_selection = OML__Union::ALT_other;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_other;
}

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

boolean OML__Union_template::ischosen(OML__Union::union_selection_type checked_selection) const
{
if (checked_selection == OML__Union::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @AbisOML_Types.OML_Union.");
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.union_selection == OML__Union::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @AbisOML_Types.OML_Union.");
return single_value.union_selection == checked_selection;
case VALUE_LIST:
{
if (value_list.n_values < 1)
TTCN_error("Internal error: Performing ischosen() operation on a template of union type @AbisOML_Types.OML_Union containing an empty list.");
boolean ret_val = value_list.list_value[0].ischosen(checked_selection);
for (unsigned int list_count = 1; ret_val == TRUE && list_count < value_list.n_values; list_count++) {
ret_val = value_list.list_value[list_count].ischosen(checked_selection);
}
return ret_val;
}
default:
return FALSE;
}
return FALSE;
}

void OML__Union_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case OML__Union::ALT_fom:
TTCN_Logger::log_event_str("{ fom := ");
single_value.field_fom->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__Union::ALT_manuf:
TTCN_Logger::log_event_str("{ manuf := ");
single_value.field_manuf->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__Union::ALT_other:
TTCN_Logger::log_event_str("{ other := ");
single_value.field_other->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_str("<invalid selector>");
}
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void OML__Union_template::log_match(const OML__Union& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity() && match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
return;
}
if (template_selection == SPECIFIC_VALUE && single_value.union_selection == match_value.get_selection()) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
switch (single_value.union_selection) {
case OML__Union::ALT_fom:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".fom");
single_value.field_fom->log_match(match_value.fom(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ fom := ");
single_value.field_fom->log_match(match_value.fom(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__Union::ALT_manuf:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".manuf");
single_value.field_manuf->log_match(match_value.manuf(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ manuf := ");
single_value.field_manuf->log_match(match_value.manuf(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__Union::ALT_other:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".other");
single_value.field_other->log_match(match_value.other(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ other := ");
single_value.field_other->log_match(match_value.other(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
default:
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str("<invalid selector>");
}
} else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void OML__Union_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
switch (single_value.union_selection) {
case OML__Union::ALT_fom:
single_value.field_fom->set_implicit_omit(); break;
case OML__Union::ALT_manuf:
single_value.field_manuf->set_implicit_omit(); break;
case OML__Union::ALT_other:
single_value.field_other->set_implicit_omit(); break;
default: break;
}
}

void OML__Union_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value.union_selection);
switch (single_value.union_selection) {
case OML__Union::ALT_fom:
single_value.field_fom->encode_text(text_buf);
break;
case OML__Union::ALT_manuf:
single_value.field_manuf->encode_text(text_buf);
break;
case OML__Union::ALT_other:
single_value.field_other->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @AbisOML_Types.OML_Union.");
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized template of type @AbisOML_Types.OML_Union.");
}
}

void OML__Union_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
{
single_value.union_selection = OML__Union::UNBOUND_VALUE;
OML__Union::union_selection_type new_selection = (OML__Union::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case OML__Union::ALT_fom:
single_value.field_fom = new OML__FOM_template;
single_value.field_fom->decode_text(text_buf);
break;
case OML__Union::ALT_manuf:
single_value.field_manuf = new OML__MANUF_template;
single_value.field_manuf->decode_text(text_buf);
break;
case OML__Union::ALT_other:
single_value.field_other = new OCTETSTRING_template;
single_value.field_other->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @AbisOML_Types.OML_Union.");
}
single_value.union_selection = new_selection;
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__Union_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized selector was received in a template of type @AbisOML_Types.OML_Union.");
}
}

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

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

void OML__Union_template::set_param(Module_Param& param)
{
  if (dynamic_cast<Module_Param_Name*>(param.get_id()) != NULL &&
      param.get_id()->next_name()) {
    char* param_field = param.get_id()->get_current_name();
    if (param_field[0] >= '0' && param_field[0] <= '9') {
      param.error("Unexpected array index in module parameter, expected a valid field"
        " name for union template type `@AbisOML_Types.OML_Union'");
    }
    if (strcmp("fom", param_field) == 0) {
      fom().set_param(param);
      return;
    } else if (strcmp("manuf", param_field) == 0) {
      manuf().set_param(param);
      return;
    } else if (strcmp("other", param_field) == 0) {
      other().set_param(param);
      return;
    } else param.error("Field `%s' not found in union template type `@AbisOML_Types.OML_Union'", param_field);
  }
  param.basic_check(Module_Param::BC_TEMPLATE, "union template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__Union_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (m_p->get_size()==0) break;
    param.type_error("union template", "@AbisOML_Types.OML_Union");
    break;
  case Module_Param::MP_Assignment_List: {
    Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1);
    char* last_name = mp_last->get_id()->get_name();
    if (!strcmp(last_name, "fom")) {
      fom().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "manuf")) {
      manuf().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "other")) {
      other().set_param(*mp_last);
      break;
    }
    mp_last->error("Field %s does not exist in type @AbisOML_Types.OML_Union.", last_name);
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__Union_template* precondition = new OML__Union_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__Union_template* implied_template = new OML__Union_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__Union_template(precondition, implied_template);
  } break;
  default:
    param.type_error("union template", "@AbisOML_Types.OML_Union");
  }
  is_ifpresent = param.get_ifpresent();
}

void OML__Union_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
switch (single_value.union_selection) {
case OML__Union::ALT_fom:
single_value.field_fom->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_Union");
return;
case OML__Union::ALT_manuf:
single_value.field_manuf->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_Union");
return;
case OML__Union::ALT_other:
single_value.field_other->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_Union");
return;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @AbisOML_Types.OML_Union.");
}
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@AbisOML_Types.OML_Union");
}

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

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

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

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

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

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

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

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

boolean OML__FOM__MessageType::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_MessageType.");
return enum_value == other_value;
}

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

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

boolean OML__FOM__MessageType::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_MessageType.");
return enum_value < other_value;
}

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

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

boolean OML__FOM__MessageType::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_MessageType.");
return enum_value > other_value;
}

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

const char *OML__FOM__MessageType::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case NM__MT__LOAD__INIT: return "NM_MT_LOAD_INIT";
case NM__MT__LOAD__INIT__ACK: return "NM_MT_LOAD_INIT_ACK";
case NM__MT__LOAD__INIT__NACK: return "NM_MT_LOAD_INIT_NACK";
case NM__MT__LOAD__SEG: return "NM_MT_LOAD_SEG";
case NM__MT__LOAD__SEG__ACK: return "NM_MT_LOAD_SEG_ACK";
case NM__MT__LOAD__ABORT: return "NM_MT_LOAD_ABORT";
case NM__MT__LOAD__END: return "NM_MT_LOAD_END";
case NM__MT__LOAD__END__ACK: return "NM_MT_LOAD_END_ACK";
case NM__MT__LOAD__END__NACK: return "NM_MT_LOAD_END_NACK";
case NM__MT__SW__ACT__REQ: return "NM_MT_SW_ACT_REQ";
case NM__MT__SW__ACT__REQ__ACK: return "NM_MT_SW_ACT_REQ_ACK";
case NM__MT__SW__ACT__REQ__NACK: return "NM_MT_SW_ACT_REQ_NACK";
case NM__MT__ACTIVATE__SW: return "NM_MT_ACTIVATE_SW";
case NM__MT__ACTIVATE__SW__ACK: return "NM_MT_ACTIVATE_SW_ACK";
case NM__MT__ACTIVATE__SW__NACK: return "NM_MT_ACTIVATE_SW_NACK";
case NM__MT__SW__ACTIVATED__REP: return "NM_MT_SW_ACTIVATED_REP";
case NM__MT__ESTABLISH__TEI: return "NM_MT_ESTABLISH_TEI";
case NM__MT__ESTABLISH__TEI__ACK: return "NM_MT_ESTABLISH_TEI_ACK";
case NM__MT__ESTABLISH__TEI__NACK: return "NM_MT_ESTABLISH_TEI_NACK";
case NM__MT__CONN__TERR__SIGN: return "NM_MT_CONN_TERR_SIGN";
case NM__MT__CONN__TERR__SIGN__ACK: return "NM_MT_CONN_TERR_SIGN_ACK";
case NM__MT__CONN__TERR__SIGN__NACK: return "NM_MT_CONN_TERR_SIGN_NACK";
case NM__MT__DISC__TERR__SIGN: return "NM_MT_DISC_TERR_SIGN";
case NM__MT__DISC__TERR__SIGN__ACK: return "NM_MT_DISC_TERR_SIGN_ACK";
case NM__MT__DISC__TERR__SIGN__NACK: return "NM_MT_DISC_TERR_SIGN_NACK";
case NM__MT__CONN__TERR__TRAF: return "NM_MT_CONN_TERR_TRAF";
case NM__MT__CONN__TERR__TRAF__ACK: return "NM_MT_CONN_TERR_TRAF_ACK";
case NM__MT__CONN__TERR__TRAF__NACK: return "NM_MT_CONN_TERR_TRAF_NACK";
case NM__MT__DISC__TERR__TRAF: return "NM_MT_DISC_TERR_TRAF";
case NM__MT__DISC__TERR__TRAF__ACK: return "NM_MT_DISC_TERR_TRAF_ACK";
case NM__MT__DISC__TERR__TRAF__NACK: return "NM_MT_DISC_TERR_TRAF_NACK";
case NM__MT__CONN__MDROP__LINK: return "NM_MT_CONN_MDROP_LINK";
case NM__MT__CONN__MDROP__LINK__ACK: return "NM_MT_CONN_MDROP_LINK_ACK";
case NM__MT__CONN__MDROP__LINK__NACK: return "NM_MT_CONN_MDROP_LINK_NACK";
case NM__MT__DISC__MDROP__LINK: return "NM_MT_DISC_MDROP_LINK";
case NM__MT__DISC__MDROP__LINK__ACK: return "NM_MT_DISC_MDROP_LINK_ACK";
case NM__MT__DISC__MDROP__LINK__NACK: return "NM_MT_DISC_MDROP_LINK_NACK";
case NM__MT__SET__BTS__ATTR: return "NM_MT_SET_BTS_ATTR";
case NM__MT__SET__BTS__ATTR__ACK: return "NM_MT_SET_BTS_ATTR_ACK";
case NM__MT__SET__BTS__ATTR__NACK: return "NM_MT_SET_BTS_ATTR_NACK";
case NM__MT__SET__RADIO__ATTR: return "NM_MT_SET_RADIO_ATTR";
case NM__MT__SET__RADIO__ATTR__ACK: return "NM_MT_SET_RADIO_ATTR_ACK";
case NM__MT__SET__RADIO__ATTR__NACK: return "NM_MT_SET_RADIO_ATTR_NACK";
case NM__MT__SET__CHAN__ATTR: return "NM_MT_SET_CHAN_ATTR";
case NM__MT__SET__CHAN__ATTR__ACK: return "NM_MT_SET_CHAN_ATTR_ACK";
case NM__MT__SET__CHAN__ATTR__NACK: return "NM_MT_SET_CHAN_ATTR_NACK";
case NM__MT__PERF__TEST: return "NM_MT_PERF_TEST";
case NM__MT__PERF__TEST__ACK: return "NM_MT_PERF_TEST_ACK";
case NM__MT__PERF__TEST__NACK: return "NM_MT_PERF_TEST_NACK";
case NM__MT__TEST__REP: return "NM_MT_TEST_REP";
case NM__MT__SEND__TEST__REP: return "NM_MT_SEND_TEST_REP";
case NM__MT__SEND__TEST__REP__ACK: return "NM_MT_SEND_TEST_REP_ACK";
case NM__MT__SEND__TEST__REP__NACK: return "NM_MT_SEND_TEST_REP_NACK";
case NM__MT__STOP__TEST: return "NM_MT_STOP_TEST";
case NM__MT__STOP__TEST__ACK: return "NM_MT_STOP_TEST_ACK";
case NM__MT__STOP__TEST__NACK: return "NM_MT_STOP_TEST_NACK";
case NM__MT__STATECHG__EVENT__REP: return "NM_MT_STATECHG_EVENT_REP";
case NM__MT__FAILURE__EVENT__REP: return "NM_MT_FAILURE_EVENT_REP";
case NM__MT__STOP__EVENT__REP: return "NM_MT_STOP_EVENT_REP";
case NM__MT__STOP__EVENT__REP__ACK: return "NM_MT_STOP_EVENT_REP_ACK";
case NM__MT__STOP__EVENT__REP__NACK: return "NM_MT_STOP_EVENT_REP_NACK";
case NM__MT__REST__EVENT__REP: return "NM_MT_REST_EVENT_REP";
case NM__MT__REST__EVENT__REP__ACK: return "NM_MT_REST_EVENT_REP_ACK";
case NM__MT__REST__EVENT__REP__NACK: return "NM_MT_REST_EVENT_REP_NACK";
case NM__MT__CHG__ADM__STATE: return "NM_MT_CHG_ADM_STATE";
case NM__MT__CHG__ADM__STATE__ACK: return "NM_MT_CHG_ADM_STATE_ACK";
case NM__MT__CHG__ADM__STATE__NACK: return "NM_MT_CHG_ADM_STATE_NACK";
case NM__MT__CHG__ADM__STATE__REQ: return "NM_MT_CHG_ADM_STATE_REQ";
case NM__MT__CHG__ADM__STATE__REQ__ACK: return "NM_MT_CHG_ADM_STATE_REQ_ACK";
case NM__MT__CHG__ADM__STATE__REQ__NACK: return "NM_MT_CHG_ADM_STATE_REQ_NACK";
case NM__MT__REP__OUTST__ALARMS: return "NM_MT_REP_OUTST_ALARMS";
case NM__MT__REP__OUTST__ALARMS__ACK: return "NM_MT_REP_OUTST_ALARMS_ACK";
case NM__MT__REP__OUTST__ALARMS__NACK: return "NM_MT_REP_OUTST_ALARMS_NACK";
case NM__MT__CHANGEOVER: return "NM_MT_CHANGEOVER";
case NM__MT__CHANGEOVER__ACK: return "NM_MT_CHANGEOVER_ACK";
case NM__MT__CHANGEOVER__NACK: return "NM_MT_CHANGEOVER_NACK";
case NM__MT__OPSTART: return "NM_MT_OPSTART";
case NM__MT__OPSTART__ACK: return "NM_MT_OPSTART_ACK";
case NM__MT__OPSTART__NACK: return "NM_MT_OPSTART_NACK";
case NM__MT__REINIT: return "NM_MT_REINIT";
case NM__MT__REINIT__ACK: return "NM_MT_REINIT_ACK";
case NM__MT__REINIT__NACK: return "NM_MT_REINIT_NACK";
case NM__MT__SET__SITE__OUT: return "NM_MT_SET_SITE_OUT";
case NM__MT__SET__SITE__OUT__ACK: return "NM_MT_SET_SITE_OUT_ACK";
case NM__MT__SET__SITE__OUT__NACK: return "NM_MT_SET_SITE_OUT_NACK";
case NM__MT__CHG__HW__CONF: return "NM_MT_CHG_HW_CONF";
case NM__MT__CHG__HW__CONF__ACK: return "NM_MT_CHG_HW_CONF_ACK";
case NM__MT__CHG__HW__CONF__NACK: return "NM_MT_CHG_HW_CONF_NACK";
case NM__MT__MEAS__RES__REQ: return "NM_MT_MEAS_RES_REQ";
case NM__MT__MEAS__RES__RESP: return "NM_MT_MEAS_RES_RESP";
case NM__MT__STOP__MEAS: return "NM_MT_STOP_MEAS";
case NM__MT__START__MEAS: return "NM_MT_START_MEAS";
case NM__MT__GET__ATTR: return "NM_MT_GET_ATTR";
case NM__MT__GET__ATTR__RESP: return "NM_MT_GET_ATTR_RESP";
case NM__MT__GET__ATTR__NACK: return "NM_MT_GET_ATTR_NACK";
case NM__MT__SET__ALARM__THRES: return "NM_MT_SET_ALARM_THRES";
case NM__MT__SET__ALARM__THRES__ACK: return "NM_MT_SET_ALARM_THRES_ACK";
case NM__MT__SET__ALARM__THRES__NACK: return "NM_MT_SET_ALARM_THRES_NACK";
case NM__MT__IPACC__RESTART: return "NM_MT_IPACC_RESTART";
case NM__MT__IPACC__RESTART__ACK: return "NM_MT_IPACC_RESTART_ACK";
case NM__MT__IPACC__RESTART__NACK: return "NM_MT_IPACC_RESTART_NACK";
case NM__MT__IPACC__RSL__CONNECT: return "NM_MT_IPACC_RSL_CONNECT";
case NM__MT__IPACC__RSL__CONNECT__ACK: return "NM_MT_IPACC_RSL_CONNECT_ACK";
case NM__MT__IPACC__RSL__CONNECT__NACK: return "NM_MT_IPACC_RSL_CONNECT_NACK";
case NM__MT__IPACC__RSL__DISCONNECT: return "NM_MT_IPACC_RSL_DISCONNECT";
case NM__MT__IPACC__RSL__DISCONNECT__ACK: return "NM_MT_IPACC_RSL_DISCONNECT_ACK";
case NM__MT__IPACC__RSL__DISCONNECT__NACK: return "NM_MT_IPACC_RSL_DISCONNECT_NACK";
case NM__MT__IPACC__CONN__TRAF: return "NM_MT_IPACC_CONN_TRAF";
case NM__MT__IPACC__CONN__TRAF__ACK: return "NM_MT_IPACC_CONN_TRAF_ACK";
case NM__MT__IPACC__CONN__TRAF__NACK: return "NM_MT_IPACC_CONN_TRAF_NACK";
case NM__MT__IPACC__DEF__BOOT__SW: return "NM_MT_IPACC_DEF_BOOT_SW";
case NM__MT__IPACC__DEF__BOOT__SW__ACK: return "NM_MT_IPACC_DEF_BOOT_SW_ACK";
case MN__MT__IPACC__DEF__BOOT__SW__NACK: return "MN_MT_IPACC_DEF_BOOT_SW_NACK";
case NM__MT__IPACC__SET__NVATTR: return "NM_MT_IPACC_SET_NVATTR";
case NM__MT__IPACC__SET__NVATTR__ACK: return "NM_MT_IPACC_SET_NVATTR_ACK";
case NM__MT__IPACC__SET__NVATTR__NACK: return "NM_MT_IPACC_SET_NVATTR_NACK";
case NM__MT__IPACC__GET__NVATTR: return "NM_MT_IPACC_GET_NVATTR";
case NM__MT__IPACC__GET__NVATTR__ACK: return "NM_MT_IPACC_GET_NVATTR_ACK";
case NM__MT__IPACC__GET__NVATTR__NACK: return "NM_MT_IPACC_GET_NVATTR_NACK";
case NM__MT__IPACC__SET__ATTR: return "NM_MT_IPACC_SET_ATTR";
case NM__MT__IPACC__SET__ATTR__ACK: return "NM_MT_IPACC_SET_ATTR_ACK";
case NM__MT__IPACC__SET__ATTR__NACK: return "NM_MT_IPACC_SET_ATTR_NACK";
default:
return "<unknown>";
}
}

OML__FOM__MessageType::enum_type OML__FOM__MessageType::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "NM_MT_LOAD_INIT")) return NM__MT__LOAD__INIT;
if (!strcmp(str_par, "NM_MT_LOAD_INIT_ACK")) return NM__MT__LOAD__INIT__ACK;
if (!strcmp(str_par, "NM_MT_LOAD_INIT_NACK")) return NM__MT__LOAD__INIT__NACK;
if (!strcmp(str_par, "NM_MT_LOAD_SEG")) return NM__MT__LOAD__SEG;
if (!strcmp(str_par, "NM_MT_LOAD_SEG_ACK")) return NM__MT__LOAD__SEG__ACK;
if (!strcmp(str_par, "NM_MT_LOAD_ABORT")) return NM__MT__LOAD__ABORT;
if (!strcmp(str_par, "NM_MT_LOAD_END")) return NM__MT__LOAD__END;
if (!strcmp(str_par, "NM_MT_LOAD_END_ACK")) return NM__MT__LOAD__END__ACK;
if (!strcmp(str_par, "NM_MT_LOAD_END_NACK")) return NM__MT__LOAD__END__NACK;
if (!strcmp(str_par, "NM_MT_SW_ACT_REQ")) return NM__MT__SW__ACT__REQ;
if (!strcmp(str_par, "NM_MT_SW_ACT_REQ_ACK")) return NM__MT__SW__ACT__REQ__ACK;
if (!strcmp(str_par, "NM_MT_SW_ACT_REQ_NACK")) return NM__MT__SW__ACT__REQ__NACK;
if (!strcmp(str_par, "NM_MT_ACTIVATE_SW")) return NM__MT__ACTIVATE__SW;
if (!strcmp(str_par, "NM_MT_ACTIVATE_SW_ACK")) return NM__MT__ACTIVATE__SW__ACK;
if (!strcmp(str_par, "NM_MT_ACTIVATE_SW_NACK")) return NM__MT__ACTIVATE__SW__NACK;
if (!strcmp(str_par, "NM_MT_SW_ACTIVATED_REP")) return NM__MT__SW__ACTIVATED__REP;
if (!strcmp(str_par, "NM_MT_ESTABLISH_TEI")) return NM__MT__ESTABLISH__TEI;
if (!strcmp(str_par, "NM_MT_ESTABLISH_TEI_ACK")) return NM__MT__ESTABLISH__TEI__ACK;
if (!strcmp(str_par, "NM_MT_ESTABLISH_TEI_NACK")) return NM__MT__ESTABLISH__TEI__NACK;
if (!strcmp(str_par, "NM_MT_CONN_TERR_SIGN")) return NM__MT__CONN__TERR__SIGN;
if (!strcmp(str_par, "NM_MT_CONN_TERR_SIGN_ACK")) return NM__MT__CONN__TERR__SIGN__ACK;
if (!strcmp(str_par, "NM_MT_CONN_TERR_SIGN_NACK")) return NM__MT__CONN__TERR__SIGN__NACK;
if (!strcmp(str_par, "NM_MT_DISC_TERR_SIGN")) return NM__MT__DISC__TERR__SIGN;
if (!strcmp(str_par, "NM_MT_DISC_TERR_SIGN_ACK")) return NM__MT__DISC__TERR__SIGN__ACK;
if (!strcmp(str_par, "NM_MT_DISC_TERR_SIGN_NACK")) return NM__MT__DISC__TERR__SIGN__NACK;
if (!strcmp(str_par, "NM_MT_CONN_TERR_TRAF")) return NM__MT__CONN__TERR__TRAF;
if (!strcmp(str_par, "NM_MT_CONN_TERR_TRAF_ACK")) return NM__MT__CONN__TERR__TRAF__ACK;
if (!strcmp(str_par, "NM_MT_CONN_TERR_TRAF_NACK")) return NM__MT__CONN__TERR__TRAF__NACK;
if (!strcmp(str_par, "NM_MT_DISC_TERR_TRAF")) return NM__MT__DISC__TERR__TRAF;
if (!strcmp(str_par, "NM_MT_DISC_TERR_TRAF_ACK")) return NM__MT__DISC__TERR__TRAF__ACK;
if (!strcmp(str_par, "NM_MT_DISC_TERR_TRAF_NACK")) return NM__MT__DISC__TERR__TRAF__NACK;
if (!strcmp(str_par, "NM_MT_CONN_MDROP_LINK")) return NM__MT__CONN__MDROP__LINK;
if (!strcmp(str_par, "NM_MT_CONN_MDROP_LINK_ACK")) return NM__MT__CONN__MDROP__LINK__ACK;
if (!strcmp(str_par, "NM_MT_CONN_MDROP_LINK_NACK")) return NM__MT__CONN__MDROP__LINK__NACK;
if (!strcmp(str_par, "NM_MT_DISC_MDROP_LINK")) return NM__MT__DISC__MDROP__LINK;
if (!strcmp(str_par, "NM_MT_DISC_MDROP_LINK_ACK")) return NM__MT__DISC__MDROP__LINK__ACK;
if (!strcmp(str_par, "NM_MT_DISC_MDROP_LINK_NACK")) return NM__MT__DISC__MDROP__LINK__NACK;
if (!strcmp(str_par, "NM_MT_SET_BTS_ATTR")) return NM__MT__SET__BTS__ATTR;
if (!strcmp(str_par, "NM_MT_SET_BTS_ATTR_ACK")) return NM__MT__SET__BTS__ATTR__ACK;
if (!strcmp(str_par, "NM_MT_SET_BTS_ATTR_NACK")) return NM__MT__SET__BTS__ATTR__NACK;
if (!strcmp(str_par, "NM_MT_SET_RADIO_ATTR")) return NM__MT__SET__RADIO__ATTR;
if (!strcmp(str_par, "NM_MT_SET_RADIO_ATTR_ACK")) return NM__MT__SET__RADIO__ATTR__ACK;
if (!strcmp(str_par, "NM_MT_SET_RADIO_ATTR_NACK")) return NM__MT__SET__RADIO__ATTR__NACK;
if (!strcmp(str_par, "NM_MT_SET_CHAN_ATTR")) return NM__MT__SET__CHAN__ATTR;
if (!strcmp(str_par, "NM_MT_SET_CHAN_ATTR_ACK")) return NM__MT__SET__CHAN__ATTR__ACK;
if (!strcmp(str_par, "NM_MT_SET_CHAN_ATTR_NACK")) return NM__MT__SET__CHAN__ATTR__NACK;
if (!strcmp(str_par, "NM_MT_PERF_TEST")) return NM__MT__PERF__TEST;
if (!strcmp(str_par, "NM_MT_PERF_TEST_ACK")) return NM__MT__PERF__TEST__ACK;
if (!strcmp(str_par, "NM_MT_PERF_TEST_NACK")) return NM__MT__PERF__TEST__NACK;
if (!strcmp(str_par, "NM_MT_TEST_REP")) return NM__MT__TEST__REP;
if (!strcmp(str_par, "NM_MT_SEND_TEST_REP")) return NM__MT__SEND__TEST__REP;
if (!strcmp(str_par, "NM_MT_SEND_TEST_REP_ACK")) return NM__MT__SEND__TEST__REP__ACK;
if (!strcmp(str_par, "NM_MT_SEND_TEST_REP_NACK")) return NM__MT__SEND__TEST__REP__NACK;
if (!strcmp(str_par, "NM_MT_STOP_TEST")) return NM__MT__STOP__TEST;
if (!strcmp(str_par, "NM_MT_STOP_TEST_ACK")) return NM__MT__STOP__TEST__ACK;
if (!strcmp(str_par, "NM_MT_STOP_TEST_NACK")) return NM__MT__STOP__TEST__NACK;
if (!strcmp(str_par, "NM_MT_STATECHG_EVENT_REP")) return NM__MT__STATECHG__EVENT__REP;
if (!strcmp(str_par, "NM_MT_FAILURE_EVENT_REP")) return NM__MT__FAILURE__EVENT__REP;
if (!strcmp(str_par, "NM_MT_STOP_EVENT_REP")) return NM__MT__STOP__EVENT__REP;
if (!strcmp(str_par, "NM_MT_STOP_EVENT_REP_ACK")) return NM__MT__STOP__EVENT__REP__ACK;
if (!strcmp(str_par, "NM_MT_STOP_EVENT_REP_NACK")) return NM__MT__STOP__EVENT__REP__NACK;
if (!strcmp(str_par, "NM_MT_REST_EVENT_REP")) return NM__MT__REST__EVENT__REP;
if (!strcmp(str_par, "NM_MT_REST_EVENT_REP_ACK")) return NM__MT__REST__EVENT__REP__ACK;
if (!strcmp(str_par, "NM_MT_REST_EVENT_REP_NACK")) return NM__MT__REST__EVENT__REP__NACK;
if (!strcmp(str_par, "NM_MT_CHG_ADM_STATE")) return NM__MT__CHG__ADM__STATE;
if (!strcmp(str_par, "NM_MT_CHG_ADM_STATE_ACK")) return NM__MT__CHG__ADM__STATE__ACK;
if (!strcmp(str_par, "NM_MT_CHG_ADM_STATE_NACK")) return NM__MT__CHG__ADM__STATE__NACK;
if (!strcmp(str_par, "NM_MT_CHG_ADM_STATE_REQ")) return NM__MT__CHG__ADM__STATE__REQ;
if (!strcmp(str_par, "NM_MT_CHG_ADM_STATE_REQ_ACK")) return NM__MT__CHG__ADM__STATE__REQ__ACK;
if (!strcmp(str_par, "NM_MT_CHG_ADM_STATE_REQ_NACK")) return NM__MT__CHG__ADM__STATE__REQ__NACK;
if (!strcmp(str_par, "NM_MT_REP_OUTST_ALARMS")) return NM__MT__REP__OUTST__ALARMS;
if (!strcmp(str_par, "NM_MT_REP_OUTST_ALARMS_ACK")) return NM__MT__REP__OUTST__ALARMS__ACK;
if (!strcmp(str_par, "NM_MT_REP_OUTST_ALARMS_NACK")) return NM__MT__REP__OUTST__ALARMS__NACK;
if (!strcmp(str_par, "NM_MT_CHANGEOVER")) return NM__MT__CHANGEOVER;
if (!strcmp(str_par, "NM_MT_CHANGEOVER_ACK")) return NM__MT__CHANGEOVER__ACK;
if (!strcmp(str_par, "NM_MT_CHANGEOVER_NACK")) return NM__MT__CHANGEOVER__NACK;
if (!strcmp(str_par, "NM_MT_OPSTART")) return NM__MT__OPSTART;
if (!strcmp(str_par, "NM_MT_OPSTART_ACK")) return NM__MT__OPSTART__ACK;
if (!strcmp(str_par, "NM_MT_OPSTART_NACK")) return NM__MT__OPSTART__NACK;
if (!strcmp(str_par, "NM_MT_REINIT")) return NM__MT__REINIT;
if (!strcmp(str_par, "NM_MT_REINIT_ACK")) return NM__MT__REINIT__ACK;
if (!strcmp(str_par, "NM_MT_REINIT_NACK")) return NM__MT__REINIT__NACK;
if (!strcmp(str_par, "NM_MT_SET_SITE_OUT")) return NM__MT__SET__SITE__OUT;
if (!strcmp(str_par, "NM_MT_SET_SITE_OUT_ACK")) return NM__MT__SET__SITE__OUT__ACK;
if (!strcmp(str_par, "NM_MT_SET_SITE_OUT_NACK")) return NM__MT__SET__SITE__OUT__NACK;
if (!strcmp(str_par, "NM_MT_CHG_HW_CONF")) return NM__MT__CHG__HW__CONF;
if (!strcmp(str_par, "NM_MT_CHG_HW_CONF_ACK")) return NM__MT__CHG__HW__CONF__ACK;
if (!strcmp(str_par, "NM_MT_CHG_HW_CONF_NACK")) return NM__MT__CHG__HW__CONF__NACK;
if (!strcmp(str_par, "NM_MT_MEAS_RES_REQ")) return NM__MT__MEAS__RES__REQ;
if (!strcmp(str_par, "NM_MT_MEAS_RES_RESP")) return NM__MT__MEAS__RES__RESP;
if (!strcmp(str_par, "NM_MT_STOP_MEAS")) return NM__MT__STOP__MEAS;
if (!strcmp(str_par, "NM_MT_START_MEAS")) return NM__MT__START__MEAS;
if (!strcmp(str_par, "NM_MT_GET_ATTR")) return NM__MT__GET__ATTR;
if (!strcmp(str_par, "NM_MT_GET_ATTR_RESP")) return NM__MT__GET__ATTR__RESP;
if (!strcmp(str_par, "NM_MT_GET_ATTR_NACK")) return NM__MT__GET__ATTR__NACK;
if (!strcmp(str_par, "NM_MT_SET_ALARM_THRES")) return NM__MT__SET__ALARM__THRES;
if (!strcmp(str_par, "NM_MT_SET_ALARM_THRES_ACK")) return NM__MT__SET__ALARM__THRES__ACK;
if (!strcmp(str_par, "NM_MT_SET_ALARM_THRES_NACK")) return NM__MT__SET__ALARM__THRES__NACK;
if (!strcmp(str_par, "NM_MT_IPACC_RESTART")) return NM__MT__IPACC__RESTART;
if (!strcmp(str_par, "NM_MT_IPACC_RESTART_ACK")) return NM__MT__IPACC__RESTART__ACK;
if (!strcmp(str_par, "NM_MT_IPACC_RESTART_NACK")) return NM__MT__IPACC__RESTART__NACK;
if (!strcmp(str_par, "NM_MT_IPACC_RSL_CONNECT")) return NM__MT__IPACC__RSL__CONNECT;
if (!strcmp(str_par, "NM_MT_IPACC_RSL_CONNECT_ACK")) return NM__MT__IPACC__RSL__CONNECT__ACK;
if (!strcmp(str_par, "NM_MT_IPACC_RSL_CONNECT_NACK")) return NM__MT__IPACC__RSL__CONNECT__NACK;
if (!strcmp(str_par, "NM_MT_IPACC_RSL_DISCONNECT")) return NM__MT__IPACC__RSL__DISCONNECT;
if (!strcmp(str_par, "NM_MT_IPACC_RSL_DISCONNECT_ACK")) return NM__MT__IPACC__RSL__DISCONNECT__ACK;
if (!strcmp(str_par, "NM_MT_IPACC_RSL_DISCONNECT_NACK")) return NM__MT__IPACC__RSL__DISCONNECT__NACK;
if (!strcmp(str_par, "NM_MT_IPACC_CONN_TRAF")) return NM__MT__IPACC__CONN__TRAF;
if (!strcmp(str_par, "NM_MT_IPACC_CONN_TRAF_ACK")) return NM__MT__IPACC__CONN__TRAF__ACK;
if (!strcmp(str_par, "NM_MT_IPACC_CONN_TRAF_NACK")) return NM__MT__IPACC__CONN__TRAF__NACK;
if (!strcmp(str_par, "NM_MT_IPACC_DEF_BOOT_SW")) return NM__MT__IPACC__DEF__BOOT__SW;
if (!strcmp(str_par, "NM_MT_IPACC_DEF_BOOT_SW_ACK")) return NM__MT__IPACC__DEF__BOOT__SW__ACK;
if (!strcmp(str_par, "MN_MT_IPACC_DEF_BOOT_SW_NACK")) return MN__MT__IPACC__DEF__BOOT__SW__NACK;
if (!strcmp(str_par, "NM_MT_IPACC_SET_NVATTR")) return NM__MT__IPACC__SET__NVATTR;
if (!strcmp(str_par, "NM_MT_IPACC_SET_NVATTR_ACK")) return NM__MT__IPACC__SET__NVATTR__ACK;
if (!strcmp(str_par, "NM_MT_IPACC_SET_NVATTR_NACK")) return NM__MT__IPACC__SET__NVATTR__NACK;
if (!strcmp(str_par, "NM_MT_IPACC_GET_NVATTR")) return NM__MT__IPACC__GET__NVATTR;
if (!strcmp(str_par, "NM_MT_IPACC_GET_NVATTR_ACK")) return NM__MT__IPACC__GET__NVATTR__ACK;
if (!strcmp(str_par, "NM_MT_IPACC_GET_NVATTR_NACK")) return NM__MT__IPACC__GET__NVATTR__NACK;
if (!strcmp(str_par, "NM_MT_IPACC_SET_ATTR")) return NM__MT__IPACC__SET__ATTR;
if (!strcmp(str_par, "NM_MT_IPACC_SET_ATTR_ACK")) return NM__MT__IPACC__SET__ATTR__ACK;
if (!strcmp(str_par, "NM_MT_IPACC_SET_ATTR_NACK")) return NM__MT__IPACC__SET__ATTR__NACK;
}
return UNKNOWN_VALUE;
}

boolean OML__FOM__MessageType::is_valid_enum(int int_par)
{
switch (int_par) {
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 33:
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:
case 43:
case 44:
case 45:
case 46:
case 47:
case 49:
case 50:
case 51:
case 52:
case 53:
case 54:
case 65:
case 66:
case 67:
case 68:
case 69:
case 70:
case 71:
case 72:
case 73:
case 81:
case 82:
case 83:
case 84:
case 85:
case 86:
case 87:
case 88:
case 89:
case 90:
case 97:
case 98:
case 99:
case 100:
case 101:
case 102:
case 103:
case 104:
case 105:
case 106:
case 107:
case 108:
case 109:
case 110:
case 147:
case 148:
case 149:
case 113:
case 114:
case 115:
case 116:
case 117:
case 118:
case 119:
case 120:
case 121:
case 122:
case 123:
case 124:
case 144:
case 145:
case 146:
case 138:
case 139:
case 140:
case 141:
case 129:
case 130:
case 131:
case 132:
case 133:
case 134:
case 135:
case 136:
case 137:
case 224:
case 225:
case 226:
case 227:
case 228:
case 229:
case 230:
case 231:
case 232:
case 236:
case 237:
case 238:
case 239:
case 240:
case 241:
case 242:
case 243:
case 244:
case 245:
case 246:
case 247:
return TRUE;
default:
return FALSE;
}
}

int OML__FOM__MessageType::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_MessageType.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int OML__FOM__MessageType::enum2int(const OML__FOM__MessageType& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_MessageType.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

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

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

void OML__FOM__MessageType::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void OML__FOM__MessageType::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@AbisOML_Types.OML_FOM_MessageType");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_MessageType.");
  }
}

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

void OML__FOM__MessageType::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @AbisOML_Types.OML_FOM_MessageType.", enum_value);
}

void OML__FOM__MessageType::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__FOM__MessageType::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 OML__FOM__MessageType::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
{
  int decoded_value = 0;
  int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 8, no_err);
  if (decoded_length < 0) return decoded_length;
  if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
  else {
    if(no_err){
     return -1;
    } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
    enum_value = UNKNOWN_VALUE;
    }
  }
  return decoded_length;
}

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

void OML__FOM__MessageType_template::copy_template(const OML__FOM__MessageType_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__FOM__MessageType_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 OML__FOM__MessageType_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__MessageType_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_MessageType.");
}
}

OML__FOM__MessageType_template::OML__FOM__MessageType_template()
{
}

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

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

OML__FOM__MessageType_template::OML__FOM__MessageType_template(OML__FOM__MessageType::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

OML__FOM__MessageType_template& OML__FOM__MessageType_template::operator=(const OPTIONAL<OML__FOM__MessageType>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (OML__FOM__MessageType::enum_type)(const OML__FOM__MessageType&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @AbisOML_Types.OML_FOM_MessageType.");
}
return *this;
}

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

boolean OML__FOM__MessageType_template::match(OML__FOM__MessageType::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_MessageType.");
}
return FALSE;
}

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

OML__FOM__MessageType::enum_type OML__FOM__MessageType_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @AbisOML_Types.OML_FOM_MessageType.");
return single_value;
}

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

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

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

void OML__FOM__MessageType_template::log_match(const OML__FOM__MessageType& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

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

void OML__FOM__MessageType_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (OML__FOM__MessageType::enum_type)text_buf.pull_int().get_val();
if (!OML__FOM__MessageType::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @AbisOML_Types.OML_FOM_MessageType.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__FOM__MessageType_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @AbisOML_Types.OML_FOM_MessageType.");
}
}

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

boolean OML__FOM__MessageType_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 OML__FOM__MessageType_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__FOM__MessageType_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    OML__FOM__MessageType::enum_type enum_val = OML__FOM__MessageType::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!OML__FOM__MessageType::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_MessageType.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__MessageType_template* precondition = new OML__FOM__MessageType_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__FOM__MessageType_template* implied_template = new OML__FOM__MessageType_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__FOM__MessageType_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@AbisOML_Types.OML_FOM_MessageType");
  }
  is_ifpresent = param.get_ifpresent();
}

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

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

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

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

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

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

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

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

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

boolean OML__FOM__ObjectClass::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_ObjectClass.");
return enum_value == other_value;
}

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

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

boolean OML__FOM__ObjectClass::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_ObjectClass.");
return enum_value < other_value;
}

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

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

boolean OML__FOM__ObjectClass::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_ObjectClass.");
return enum_value > other_value;
}

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

const char *OML__FOM__ObjectClass::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case NM__OC__SITE__MANAGER: return "NM_OC_SITE_MANAGER";
case NM__OC__BTS: return "NM_OC_BTS";
case NM__OC__RADIO__CARRIER: return "NM_OC_RADIO_CARRIER";
case NM__OC__CHANNEL: return "NM_OC_CHANNEL";
case NM__OC__BASEB__TRANSC: return "NM_OC_BASEB_TRANSC";
case NM__OC__IPAC__E1__TRUNK: return "NM_OC_IPAC_E1_TRUNK";
case NM__OC__IPAC__E1__PORT: return "NM_OC_IPAC_E1_PORT";
case NM__OC__IPAC__E1__CHAN: return "NM_OC_IPAC_E1_CHAN";
case NM__OC__IPAC__CLK__MODULE: return "NM_OC_IPAC_CLK_MODULE";
case NM__OC__GPRS__NSE: return "NM_OC_GPRS_NSE";
case NM__OC__GPRS__CELL: return "NM_OC_GPRS_CELL";
case NM__OC__GPRS__NSVC: return "NM_OC_GPRS_NSVC";
case NM__OC__NULL: return "NM_OC_NULL";
default:
return "<unknown>";
}
}

OML__FOM__ObjectClass::enum_type OML__FOM__ObjectClass::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "NM_OC_SITE_MANAGER")) return NM__OC__SITE__MANAGER;
if (!strcmp(str_par, "NM_OC_BTS")) return NM__OC__BTS;
if (!strcmp(str_par, "NM_OC_RADIO_CARRIER")) return NM__OC__RADIO__CARRIER;
if (!strcmp(str_par, "NM_OC_CHANNEL")) return NM__OC__CHANNEL;
if (!strcmp(str_par, "NM_OC_BASEB_TRANSC")) return NM__OC__BASEB__TRANSC;
if (!strcmp(str_par, "NM_OC_IPAC_E1_TRUNK")) return NM__OC__IPAC__E1__TRUNK;
if (!strcmp(str_par, "NM_OC_IPAC_E1_PORT")) return NM__OC__IPAC__E1__PORT;
if (!strcmp(str_par, "NM_OC_IPAC_E1_CHAN")) return NM__OC__IPAC__E1__CHAN;
if (!strcmp(str_par, "NM_OC_IPAC_CLK_MODULE")) return NM__OC__IPAC__CLK__MODULE;
if (!strcmp(str_par, "NM_OC_GPRS_NSE")) return NM__OC__GPRS__NSE;
if (!strcmp(str_par, "NM_OC_GPRS_CELL")) return NM__OC__GPRS__CELL;
if (!strcmp(str_par, "NM_OC_GPRS_NSVC")) return NM__OC__GPRS__NSVC;
if (!strcmp(str_par, "NM_OC_NULL")) return NM__OC__NULL;
}
return UNKNOWN_VALUE;
}

boolean OML__FOM__ObjectClass::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 14:
case 15:
case 16:
case 34:
case 240:
case 241:
case 242:
case 255:
return TRUE;
default:
return FALSE;
}
}

int OML__FOM__ObjectClass::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_ObjectClass.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int OML__FOM__ObjectClass::enum2int(const OML__FOM__ObjectClass& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_ObjectClass.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

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

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

void OML__FOM__ObjectClass::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void OML__FOM__ObjectClass::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@AbisOML_Types.OML_FOM_ObjectClass");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_ObjectClass.");
  }
}

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

void OML__FOM__ObjectClass::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @AbisOML_Types.OML_FOM_ObjectClass.", enum_value);
}

void OML__FOM__ObjectClass::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__FOM__ObjectClass::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 OML__FOM__ObjectClass::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
{
  int decoded_value = 0;
  int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 8, no_err);
  if (decoded_length < 0) return decoded_length;
  if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
  else {
    if(no_err){
     return -1;
    } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
    enum_value = UNKNOWN_VALUE;
    }
  }
  return decoded_length;
}

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

void OML__FOM__ObjectClass_template::copy_template(const OML__FOM__ObjectClass_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__FOM__ObjectClass_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 OML__FOM__ObjectClass_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__ObjectClass_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_ObjectClass.");
}
}

OML__FOM__ObjectClass_template::OML__FOM__ObjectClass_template()
{
}

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

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

OML__FOM__ObjectClass_template::OML__FOM__ObjectClass_template(OML__FOM__ObjectClass::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

OML__FOM__ObjectClass_template& OML__FOM__ObjectClass_template::operator=(const OPTIONAL<OML__FOM__ObjectClass>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (OML__FOM__ObjectClass::enum_type)(const OML__FOM__ObjectClass&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @AbisOML_Types.OML_FOM_ObjectClass.");
}
return *this;
}

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

boolean OML__FOM__ObjectClass_template::match(OML__FOM__ObjectClass::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_ObjectClass.");
}
return FALSE;
}

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

OML__FOM__ObjectClass::enum_type OML__FOM__ObjectClass_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @AbisOML_Types.OML_FOM_ObjectClass.");
return single_value;
}

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

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

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

void OML__FOM__ObjectClass_template::log_match(const OML__FOM__ObjectClass& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

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

void OML__FOM__ObjectClass_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (OML__FOM__ObjectClass::enum_type)text_buf.pull_int().get_val();
if (!OML__FOM__ObjectClass::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @AbisOML_Types.OML_FOM_ObjectClass.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__FOM__ObjectClass_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @AbisOML_Types.OML_FOM_ObjectClass.");
}
}

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

boolean OML__FOM__ObjectClass_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 OML__FOM__ObjectClass_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__FOM__ObjectClass_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    OML__FOM__ObjectClass::enum_type enum_val = OML__FOM__ObjectClass::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!OML__FOM__ObjectClass::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_ObjectClass.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__ObjectClass_template* precondition = new OML__FOM__ObjectClass_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__FOM__ObjectClass_template* implied_template = new OML__FOM__ObjectClass_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__FOM__ObjectClass_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@AbisOML_Types.OML_FOM_ObjectClass");
  }
  is_ifpresent = param.get_ifpresent();
}

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

OML__FOM__ObjectInstance::OML__FOM__ObjectInstance()
{
}

OML__FOM__ObjectInstance::OML__FOM__ObjectInstance(const INTEGER& par_bts__nr,
    const INTEGER& par_trx__nr,
    const INTEGER& par_ts__nr)
  :   field_bts__nr(par_bts__nr),
  field_trx__nr(par_trx__nr),
  field_ts__nr(par_ts__nr)
{
}

OML__FOM__ObjectInstance::OML__FOM__ObjectInstance(const OML__FOM__ObjectInstance& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @AbisOML_Types.OML_FOM_ObjectInstance.");
if (other_value.bts__nr().is_bound()) field_bts__nr = other_value.bts__nr();
else field_bts__nr.clean_up();
if (other_value.trx__nr().is_bound()) field_trx__nr = other_value.trx__nr();
else field_trx__nr.clean_up();
if (other_value.ts__nr().is_bound()) field_ts__nr = other_value.ts__nr();
else field_ts__nr.clean_up();
}

void OML__FOM__ObjectInstance::clean_up()
{
field_bts__nr.clean_up();
field_trx__nr.clean_up();
field_ts__nr.clean_up();
}

const TTCN_Typedescriptor_t* OML__FOM__ObjectInstance::get_descriptor() const { return &OML__FOM__ObjectInstance_descr_; }
OML__FOM__ObjectInstance& OML__FOM__ObjectInstance::operator=(const OML__FOM__ObjectInstance& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @AbisOML_Types.OML_FOM_ObjectInstance.");
  if (other_value.bts__nr().is_bound()) field_bts__nr = other_value.bts__nr();
  else field_bts__nr.clean_up();
  if (other_value.trx__nr().is_bound()) field_trx__nr = other_value.trx__nr();
  else field_trx__nr.clean_up();
  if (other_value.ts__nr().is_bound()) field_ts__nr = other_value.ts__nr();
  else field_ts__nr.clean_up();
}
return *this;
}

boolean OML__FOM__ObjectInstance::operator==(const OML__FOM__ObjectInstance& other_value) const
{
return field_bts__nr==other_value.field_bts__nr
  && field_trx__nr==other_value.field_trx__nr
  && field_ts__nr==other_value.field_ts__nr;
}

boolean OML__FOM__ObjectInstance::is_bound() const
{
return (field_bts__nr.is_bound())
  || (field_trx__nr.is_bound())
  || (field_ts__nr.is_bound());
}
boolean OML__FOM__ObjectInstance::is_value() const
{
return field_bts__nr.is_value()
  && field_trx__nr.is_value()
  && field_ts__nr.is_value();
}
void OML__FOM__ObjectInstance::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ bts_nr := ");
field_bts__nr.log();
TTCN_Logger::log_event_str(", trx_nr := ");
field_trx__nr.log();
TTCN_Logger::log_event_str(", ts_nr := ");
field_ts__nr.log();
TTCN_Logger::log_event_str(" }");
}

void OML__FOM__ObjectInstance::set_implicit_omit()
{
if (bts__nr().is_bound()) bts__nr().set_implicit_omit();
if (trx__nr().is_bound()) trx__nr().set_implicit_omit();
if (ts__nr().is_bound()) ts__nr().set_implicit_omit();
}

void OML__FOM__ObjectInstance::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 @AbisOML_Types.OML_FOM_ObjectInstance 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) bts__nr().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) trx__nr().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) ts__nr().set_param(*param.get_elem(2));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "bts_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bts__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "trx_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          trx__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ts_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ts__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @AbisOML_Types.OML_FOM_ObjectInstance: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@AbisOML_Types.OML_FOM_ObjectInstance");
  }
}

void OML__FOM__ObjectInstance::encode_text(Text_Buf& text_buf) const
{
field_bts__nr.encode_text(text_buf);
field_trx__nr.encode_text(text_buf);
field_ts__nr.encode_text(text_buf);
}

void OML__FOM__ObjectInstance::decode_text(Text_Buf& text_buf)
{
field_bts__nr.decode_text(text_buf);
field_trx__nr.decode_text(text_buf);
field_ts__nr.decode_text(text_buf);
}

void OML__FOM__ObjectInstance::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 OML__FOM__ObjectInstance::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 OML__FOM__ObjectInstance::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, OML__FOM__ObjectInstance_bts__nr_descr_.raw->forceomit);
  decoded_field_length = field_bts__nr.RAW_decode(OML__FOM__ObjectInstance_bts__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, OML__FOM__ObjectInstance_trx__nr_descr_.raw->forceomit);
  decoded_field_length = field_trx__nr.RAW_decode(OML__FOM__ObjectInstance_trx__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, OML__FOM__ObjectInstance_ts__nr_descr_.raw->forceomit);
  decoded_field_length = field_ts__nr.RAW_decode(OML__FOM__ObjectInstance_ts__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int OML__FOM__ObjectInstance::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, OML__FOM__ObjectInstance_bts__nr_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, OML__FOM__ObjectInstance_trx__nr_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, OML__FOM__ObjectInstance_ts__nr_descr_.raw);
  encoded_length += field_bts__nr.RAW_encode(OML__FOM__ObjectInstance_bts__nr_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_trx__nr.RAW_encode(OML__FOM__ObjectInstance_trx__nr_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_ts__nr.RAW_encode(OML__FOM__ObjectInstance_ts__nr_descr_, *myleaf.body.node.nodes[2]);
  return myleaf.length = encoded_length;
}

struct OML__FOM__ObjectInstance_template::single_value_struct {
INTEGER_template field_bts__nr;
INTEGER_template field_trx__nr;
INTEGER_template field_ts__nr;
};

void OML__FOM__ObjectInstance_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_bts__nr = ANY_VALUE;
single_value->field_trx__nr = ANY_VALUE;
single_value->field_ts__nr = ANY_VALUE;
}
}
}

void OML__FOM__ObjectInstance_template::copy_value(const OML__FOM__ObjectInstance& other_value)
{
single_value = new single_value_struct;
if (other_value.bts__nr().is_bound()) {
  single_value->field_bts__nr = other_value.bts__nr();
} else {
  single_value->field_bts__nr.clean_up();
}
if (other_value.trx__nr().is_bound()) {
  single_value->field_trx__nr = other_value.trx__nr();
} else {
  single_value->field_trx__nr.clean_up();
}
if (other_value.ts__nr().is_bound()) {
  single_value->field_ts__nr = other_value.ts__nr();
} else {
  single_value->field_ts__nr.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void OML__FOM__ObjectInstance_template::copy_template(const OML__FOM__ObjectInstance_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.bts__nr().get_selection()) {
single_value->field_bts__nr = other_value.bts__nr();
} else {
single_value->field_bts__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.trx__nr().get_selection()) {
single_value->field_trx__nr = other_value.trx__nr();
} else {
single_value->field_trx__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ts__nr().get_selection()) {
single_value->field_ts__nr = other_value.ts__nr();
} else {
single_value->field_ts__nr.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__FOM__ObjectInstance_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 OML__FOM__ObjectInstance_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__ObjectInstance_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 @AbisOML_Types.OML_FOM_ObjectInstance.");
break;
}
set_selection(other_value);
}

OML__FOM__ObjectInstance_template::OML__FOM__ObjectInstance_template()
{
}

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

OML__FOM__ObjectInstance_template::OML__FOM__ObjectInstance_template(const OML__FOM__ObjectInstance& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean OML__FOM__ObjectInstance_template::match(const OML__FOM__ObjectInstance& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.bts__nr().is_bound()) return FALSE;
if(!single_value->field_bts__nr.match(other_value.bts__nr(), legacy))return FALSE;
if(!other_value.trx__nr().is_bound()) return FALSE;
if(!single_value->field_trx__nr.match(other_value.trx__nr(), legacy))return FALSE;
if(!other_value.ts__nr().is_bound()) return FALSE;
if(!single_value->field_ts__nr.match(other_value.ts__nr(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @AbisOML_Types.OML_FOM_ObjectInstance.");
}
return FALSE;
}

boolean OML__FOM__ObjectInstance_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_bts__nr.is_bound()
 || single_value->field_trx__nr.is_bound()
 || single_value->field_ts__nr.is_bound();
}

boolean OML__FOM__ObjectInstance_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_bts__nr.is_value()
 && single_value->field_trx__nr.is_value()
 && single_value->field_ts__nr.is_value();
}

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

OML__FOM__ObjectInstance OML__FOM__ObjectInstance_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 @AbisOML_Types.OML_FOM_ObjectInstance.");
OML__FOM__ObjectInstance ret_val;
if (single_value->field_bts__nr.is_bound()) {
ret_val.bts__nr() = single_value->field_bts__nr.valueof();
}
if (single_value->field_trx__nr.is_bound()) {
ret_val.trx__nr() = single_value->field_trx__nr.valueof();
}
if (single_value->field_ts__nr.is_bound()) {
ret_val.ts__nr() = single_value->field_ts__nr.valueof();
}
return ret_val;
}

void OML__FOM__ObjectInstance_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 @AbisOML_Types.OML_FOM_ObjectInstance.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__FOM__ObjectInstance_template[list_length];
}

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

INTEGER_template& OML__FOM__ObjectInstance_template::bts__nr()
{
set_specific();
return single_value->field_bts__nr;
}

const INTEGER_template& OML__FOM__ObjectInstance_template::bts__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field bts_nr of a non-specific template of type @AbisOML_Types.OML_FOM_ObjectInstance.");
return single_value->field_bts__nr;
}

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

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

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

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

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

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

void OML__FOM__ObjectInstance_template::log_match(const OML__FOM__ObjectInstance& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_bts__nr.match(match_value.bts__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".bts_nr");
single_value->field_bts__nr.log_match(match_value.bts__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_trx__nr.match(match_value.trx__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".trx_nr");
single_value->field_trx__nr.log_match(match_value.trx__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ts__nr.match(match_value.ts__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".ts_nr");
single_value->field_ts__nr.log_match(match_value.ts__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ bts_nr := ");
single_value->field_bts__nr.log_match(match_value.bts__nr(), legacy);
TTCN_Logger::log_event_str(", trx_nr := ");
single_value->field_trx__nr.log_match(match_value.trx__nr(), legacy);
TTCN_Logger::log_event_str(", ts_nr := ");
single_value->field_ts__nr.log_match(match_value.ts__nr(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void OML__FOM__ObjectInstance_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (bts__nr().is_bound()) bts__nr().set_implicit_omit();
if (trx__nr().is_bound()) trx__nr().set_implicit_omit();
if (ts__nr().is_bound()) ts__nr().set_implicit_omit();
}

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

void OML__FOM__ObjectInstance_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_bts__nr.decode_text(text_buf);
single_value->field_trx__nr.decode_text(text_buf);
single_value->field_ts__nr.decode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__FOM__ObjectInstance_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 @AbisOML_Types.OML_FOM_ObjectInstance.");
}
}

void OML__FOM__ObjectInstance_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: {
    OML__FOM__ObjectInstance_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 @AbisOML_Types.OML_FOM_ObjectInstance 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) bts__nr().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) trx__nr().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) ts__nr().set_param(*param.get_elem(2));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "bts_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bts__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "trx_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          trx__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ts_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ts__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @AbisOML_Types.OML_FOM_ObjectInstance: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__ObjectInstance_template* precondition = new OML__FOM__ObjectInstance_template;
    precondition->set_param(*param.get_elem(0));
    OML__FOM__ObjectInstance_template* implied_template = new OML__FOM__ObjectInstance_template;
    implied_template->set_param(*param.get_elem(1));
    *this = OML__FOM__ObjectInstance_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@AbisOML_Types.OML_FOM_ObjectInstance");
  }
  is_ifpresent = param.get_ifpresent();
}

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

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

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

OML__FOM__Header::OML__FOM__Header()
{
}

OML__FOM__Header::OML__FOM__Header(const OML__FOM__MessageType& par_msg__type,
    const OML__FOM__ObjectClass& par_obj__class,
    const OML__FOM__ObjectInstance& par_obj__inst)
  :   field_msg__type(par_msg__type),
  field_obj__class(par_obj__class),
  field_obj__inst(par_obj__inst)
{
}

OML__FOM__Header::OML__FOM__Header(const OML__FOM__Header& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @AbisOML_Types.OML_FOM_Header.");
if (other_value.msg__type().is_bound()) field_msg__type = other_value.msg__type();
else field_msg__type.clean_up();
if (other_value.obj__class().is_bound()) field_obj__class = other_value.obj__class();
else field_obj__class.clean_up();
if (other_value.obj__inst().is_bound()) field_obj__inst = other_value.obj__inst();
else field_obj__inst.clean_up();
}

void OML__FOM__Header::clean_up()
{
field_msg__type.clean_up();
field_obj__class.clean_up();
field_obj__inst.clean_up();
}

const TTCN_Typedescriptor_t* OML__FOM__Header::get_descriptor() const { return &OML__FOM__Header_descr_; }
OML__FOM__Header& OML__FOM__Header::operator=(const OML__FOM__Header& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @AbisOML_Types.OML_FOM_Header.");
  if (other_value.msg__type().is_bound()) field_msg__type = other_value.msg__type();
  else field_msg__type.clean_up();
  if (other_value.obj__class().is_bound()) field_obj__class = other_value.obj__class();
  else field_obj__class.clean_up();
  if (other_value.obj__inst().is_bound()) field_obj__inst = other_value.obj__inst();
  else field_obj__inst.clean_up();
}
return *this;
}

boolean OML__FOM__Header::operator==(const OML__FOM__Header& other_value) const
{
return field_msg__type==other_value.field_msg__type
  && field_obj__class==other_value.field_obj__class
  && field_obj__inst==other_value.field_obj__inst;
}

boolean OML__FOM__Header::is_bound() const
{
return (field_msg__type.is_bound())
  || (field_obj__class.is_bound())
  || (field_obj__inst.is_bound());
}
boolean OML__FOM__Header::is_value() const
{
return field_msg__type.is_value()
  && field_obj__class.is_value()
  && field_obj__inst.is_value();
}
void OML__FOM__Header::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ msg_type := ");
field_msg__type.log();
TTCN_Logger::log_event_str(", obj_class := ");
field_obj__class.log();
TTCN_Logger::log_event_str(", obj_inst := ");
field_obj__inst.log();
TTCN_Logger::log_event_str(" }");
}

void OML__FOM__Header::set_implicit_omit()
{
if (msg__type().is_bound()) msg__type().set_implicit_omit();
if (obj__class().is_bound()) obj__class().set_implicit_omit();
if (obj__inst().is_bound()) obj__inst().set_implicit_omit();
}

void OML__FOM__Header::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 @AbisOML_Types.OML_FOM_Header 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) msg__type().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) obj__class().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) obj__inst().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(), "msg_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          msg__type().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "obj_class")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          obj__class().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "obj_inst")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          obj__inst().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 @AbisOML_Types.OML_FOM_Header: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@AbisOML_Types.OML_FOM_Header");
  }
}

void OML__FOM__Header::encode_text(Text_Buf& text_buf) const
{
field_msg__type.encode_text(text_buf);
field_obj__class.encode_text(text_buf);
field_obj__inst.encode_text(text_buf);
}

void OML__FOM__Header::decode_text(Text_Buf& text_buf)
{
field_msg__type.decode_text(text_buf);
field_obj__class.decode_text(text_buf);
field_obj__inst.decode_text(text_buf);
}

void OML__FOM__Header::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 OML__FOM__Header::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 OML__FOM__Header::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, OML__FOM__Header_msg__type_descr_.raw->forceomit);
  decoded_field_length = field_msg__type.RAW_decode(OML__FOM__Header_msg__type_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, OML__FOM__Header_obj__class_descr_.raw->forceomit);
  decoded_field_length = field_obj__class.RAW_decode(OML__FOM__Header_obj__class_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, OML__FOM__Header_obj__inst_descr_.raw->forceomit);
  decoded_field_length = field_obj__inst.RAW_decode(OML__FOM__Header_obj__inst_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 OML__FOM__Header::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, OML__FOM__Header_msg__type_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, OML__FOM__Header_obj__class_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, OML__FOM__Header_obj__inst_descr_.raw);
  encoded_length += field_msg__type.RAW_encode(OML__FOM__Header_msg__type_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_obj__class.RAW_encode(OML__FOM__Header_obj__class_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_obj__inst.RAW_encode(OML__FOM__Header_obj__inst_descr_, *myleaf.body.node.nodes[2]);
  return myleaf.length = encoded_length;
}

struct OML__FOM__Header_template::single_value_struct {
OML__FOM__MessageType_template field_msg__type;
OML__FOM__ObjectClass_template field_obj__class;
OML__FOM__ObjectInstance_template field_obj__inst;
};

void OML__FOM__Header_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_msg__type = ANY_VALUE;
single_value->field_obj__class = ANY_VALUE;
single_value->field_obj__inst = ANY_VALUE;
}
}
}

void OML__FOM__Header_template::copy_value(const OML__FOM__Header& other_value)
{
single_value = new single_value_struct;
if (other_value.msg__type().is_bound()) {
  single_value->field_msg__type = other_value.msg__type();
} else {
  single_value->field_msg__type.clean_up();
}
if (other_value.obj__class().is_bound()) {
  single_value->field_obj__class = other_value.obj__class();
} else {
  single_value->field_obj__class.clean_up();
}
if (other_value.obj__inst().is_bound()) {
  single_value->field_obj__inst = other_value.obj__inst();
} else {
  single_value->field_obj__inst.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void OML__FOM__Header_template::copy_template(const OML__FOM__Header_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.msg__type().get_selection()) {
single_value->field_msg__type = other_value.msg__type();
} else {
single_value->field_msg__type.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.obj__class().get_selection()) {
single_value->field_obj__class = other_value.obj__class();
} else {
single_value->field_obj__class.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.obj__inst().get_selection()) {
single_value->field_obj__inst = other_value.obj__inst();
} else {
single_value->field_obj__inst.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 OML__FOM__Header_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 OML__FOM__Header_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__Header_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 @AbisOML_Types.OML_FOM_Header.");
break;
}
set_selection(other_value);
}

OML__FOM__Header_template::OML__FOM__Header_template()
{
}

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

OML__FOM__Header_template::OML__FOM__Header_template(const OML__FOM__Header& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean OML__FOM__Header_template::match(const OML__FOM__Header& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.msg__type().is_bound()) return FALSE;
if(!single_value->field_msg__type.match(other_value.msg__type(), legacy))return FALSE;
if(!other_value.obj__class().is_bound()) return FALSE;
if(!single_value->field_obj__class.match(other_value.obj__class(), legacy))return FALSE;
if(!other_value.obj__inst().is_bound()) return FALSE;
if(!single_value->field_obj__inst.match(other_value.obj__inst(), 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 @AbisOML_Types.OML_FOM_Header.");
}
return FALSE;
}

boolean OML__FOM__Header_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_msg__type.is_bound()
 || single_value->field_obj__class.is_bound()
 || single_value->field_obj__inst.is_bound();
}

boolean OML__FOM__Header_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_msg__type.is_value()
 && single_value->field_obj__class.is_value()
 && single_value->field_obj__inst.is_value();
}

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

OML__FOM__Header OML__FOM__Header_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 @AbisOML_Types.OML_FOM_Header.");
OML__FOM__Header ret_val;
if (single_value->field_msg__type.is_bound()) {
ret_val.msg__type() = single_value->field_msg__type.valueof();
}
if (single_value->field_obj__class.is_bound()) {
ret_val.obj__class() = single_value->field_obj__class.valueof();
}
if (single_value->field_obj__inst.is_bound()) {
ret_val.obj__inst() = single_value->field_obj__inst.valueof();
}
return ret_val;
}

void OML__FOM__Header_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 @AbisOML_Types.OML_FOM_Header.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__FOM__Header_template[list_length];
}

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

OML__FOM__MessageType_template& OML__FOM__Header_template::msg__type()
{
set_specific();
return single_value->field_msg__type;
}

const OML__FOM__MessageType_template& OML__FOM__Header_template::msg__type() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field msg_type of a non-specific template of type @AbisOML_Types.OML_FOM_Header.");
return single_value->field_msg__type;
}

OML__FOM__ObjectClass_template& OML__FOM__Header_template::obj__class()
{
set_specific();
return single_value->field_obj__class;
}

const OML__FOM__ObjectClass_template& OML__FOM__Header_template::obj__class() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field obj_class of a non-specific template of type @AbisOML_Types.OML_FOM_Header.");
return single_value->field_obj__class;
}

OML__FOM__ObjectInstance_template& OML__FOM__Header_template::obj__inst()
{
set_specific();
return single_value->field_obj__inst;
}

const OML__FOM__ObjectInstance_template& OML__FOM__Header_template::obj__inst() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field obj_inst of a non-specific template of type @AbisOML_Types.OML_FOM_Header.");
return single_value->field_obj__inst;
}

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

void OML__FOM__Header_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ msg_type := ");
single_value->field_msg__type.log();
TTCN_Logger::log_event_str(", obj_class := ");
single_value->field_obj__class.log();
TTCN_Logger::log_event_str(", obj_inst := ");
single_value->field_obj__inst.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 OML__FOM__Header_template::log_match(const OML__FOM__Header& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_msg__type.match(match_value.msg__type(), legacy)){
TTCN_Logger::log_logmatch_info(".msg_type");
single_value->field_msg__type.log_match(match_value.msg__type(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_obj__class.match(match_value.obj__class(), legacy)){
TTCN_Logger::log_logmatch_info(".obj_class");
single_value->field_obj__class.log_match(match_value.obj__class(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_obj__inst.match(match_value.obj__inst(), legacy)){
TTCN_Logger::log_logmatch_info(".obj_inst");
single_value->field_obj__inst.log_match(match_value.obj__inst(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ msg_type := ");
single_value->field_msg__type.log_match(match_value.msg__type(), legacy);
TTCN_Logger::log_event_str(", obj_class := ");
single_value->field_obj__class.log_match(match_value.obj__class(), legacy);
TTCN_Logger::log_event_str(", obj_inst := ");
single_value->field_obj__inst.log_match(match_value.obj__inst(), 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 OML__FOM__Header_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (msg__type().is_bound()) msg__type().set_implicit_omit();
if (obj__class().is_bound()) obj__class().set_implicit_omit();
if (obj__inst().is_bound()) obj__inst().set_implicit_omit();
}

void OML__FOM__Header_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_msg__type.encode_text(text_buf);
single_value->field_obj__class.encode_text(text_buf);
single_value->field_obj__inst.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 @AbisOML_Types.OML_FOM_Header.");
}
}

void OML__FOM__Header_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_msg__type.decode_text(text_buf);
single_value->field_obj__class.decode_text(text_buf);
single_value->field_obj__inst.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 OML__FOM__Header_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 @AbisOML_Types.OML_FOM_Header.");
}
}

void OML__FOM__Header_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: {
    OML__FOM__Header_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 @AbisOML_Types.OML_FOM_Header 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) msg__type().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) obj__class().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) obj__inst().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(), "msg_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          msg__type().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "obj_class")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          obj__class().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "obj_inst")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          obj__inst().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 @AbisOML_Types.OML_FOM_Header: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__Header_template* precondition = new OML__FOM__Header_template;
    precondition->set_param(*param.get_elem(0));
    OML__FOM__Header_template* implied_template = new OML__FOM__Header_template;
    implied_template->set_param(*param.get_elem(1));
    *this = OML__FOM__Header_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@AbisOML_Types.OML_FOM_Header");
  }
  is_ifpresent = param.get_ifpresent();
}

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

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

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

OML__FOM::OML__FOM()
{
}

OML__FOM::OML__FOM(const INTEGER& par_len,
    const OML__FOM__Header& par_hdr,
    const OPTIONAL< OML__FOM__IE__List >& par_ies)
  :   field_len(par_len),
  field_hdr(par_hdr),
  field_ies(par_ies)
{
}

OML__FOM::OML__FOM(const OML__FOM& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @AbisOML_Types.OML_FOM.");
if (other_value.len().is_bound()) field_len = other_value.len();
else field_len.clean_up();
if (other_value.hdr().is_bound()) field_hdr = other_value.hdr();
else field_hdr.clean_up();
if (other_value.ies().is_bound()) field_ies = other_value.ies();
else field_ies.clean_up();
}

void OML__FOM::clean_up()
{
field_len.clean_up();
field_hdr.clean_up();
field_ies.clean_up();
}

const TTCN_Typedescriptor_t* OML__FOM::get_descriptor() const { return &OML__FOM_descr_; }
OML__FOM& OML__FOM::operator=(const OML__FOM& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @AbisOML_Types.OML_FOM.");
  if (other_value.len().is_bound()) field_len = other_value.len();
  else field_len.clean_up();
  if (other_value.hdr().is_bound()) field_hdr = other_value.hdr();
  else field_hdr.clean_up();
  if (other_value.ies().is_bound()) field_ies = other_value.ies();
  else field_ies.clean_up();
}
return *this;
}

boolean OML__FOM::operator==(const OML__FOM& other_value) const
{
return field_len==other_value.field_len
  && field_hdr==other_value.field_hdr
  && field_ies==other_value.field_ies;
}

boolean OML__FOM::is_bound() const
{
return (field_len.is_bound())
  || (field_hdr.is_bound())
  || (OPTIONAL_OMIT == field_ies.get_selection() || field_ies.is_bound());
}
boolean OML__FOM::is_value() const
{
return field_len.is_value()
  && field_hdr.is_value()
  && (OPTIONAL_OMIT == field_ies.get_selection() || field_ies.is_value());
}
int OML__FOM::size_of() const
{
  int ret_val = 2;
  if (field_ies.ispresent()) ret_val++;
  return ret_val;
}

void OML__FOM::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ len := ");
field_len.log();
TTCN_Logger::log_event_str(", hdr := ");
field_hdr.log();
TTCN_Logger::log_event_str(", ies := ");
field_ies.log();
TTCN_Logger::log_event_str(" }");
}

void OML__FOM::set_implicit_omit()
{
if (len().is_bound()) len().set_implicit_omit();
if (hdr().is_bound()) hdr().set_implicit_omit();
if (!ies().is_bound()) ies() = OMIT_VALUE;
else ies().set_implicit_omit();
}

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

void OML__FOM::encode_text(Text_Buf& text_buf) const
{
field_len.encode_text(text_buf);
field_hdr.encode_text(text_buf);
field_ies.encode_text(text_buf);
}

void OML__FOM::decode_text(Text_Buf& text_buf)
{
field_len.decode_text(text_buf);
field_hdr.decode_text(text_buf);
field_ies.decode_text(text_buf);
}

void OML__FOM::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 OML__FOM::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 OML__FOM::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, OML__FOM_len_descr_.raw->forceomit);
  decoded_field_length = field_len.RAW_decode(OML__FOM_len_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_len.convert_to_Integer(OML__FOM_len_descr_);
  field_len = tmp0;
  value_of_length_field0 += tmp0.get_long_long_val() * 8;
  RAW_Force_Omit field_1_force_omit(1, force_omit, OML__FOM_hdr_descr_.raw->forceomit);
  decoded_field_length = field_hdr.RAW_decode(OML__FOM_hdr_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_ies = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, OML__FOM_ies_descr_.raw->forceomit);
  decoded_field_length = field_ies().RAW_decode(OML__FOM_ies_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_ies = 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_ies=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int OML__FOM::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, OML__FOM_len_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, OML__FOM_hdr_descr_.raw);
  if (field_ies.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, OML__FOM_ies_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  encoded_length += 8;
  myleaf.body.node.nodes[0]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[0]->coding_descr = &OML__FOM_len_descr_;
  myleaf.body.node.nodes[0]->calcof.lengthto.num_of_fields = 2;
  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(2);
  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_ies.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;
  }
  encoded_length += field_hdr.RAW_encode(OML__FOM_hdr_descr_, *myleaf.body.node.nodes[1]);
  if (field_ies.ispresent()) {
  encoded_length += field_ies().RAW_encode(OML__FOM_ies_descr_, *myleaf.body.node.nodes[2]);
  }
  return myleaf.length = encoded_length;
}

struct OML__FOM_template::single_value_struct {
INTEGER_template field_len;
OML__FOM__Header_template field_hdr;
OML__FOM__IE__List_template field_ies;
};

void OML__FOM_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_len = ANY_VALUE;
single_value->field_hdr = ANY_VALUE;
single_value->field_ies = ANY_OR_OMIT;
}
}
}

void OML__FOM_template::copy_value(const OML__FOM& other_value)
{
single_value = new single_value_struct;
if (other_value.len().is_bound()) {
  single_value->field_len = other_value.len();
} else {
  single_value->field_len.clean_up();
}
if (other_value.hdr().is_bound()) {
  single_value->field_hdr = other_value.hdr();
} else {
  single_value->field_hdr.clean_up();
}
if (other_value.ies().is_bound()) {
  if (other_value.ies().ispresent()) single_value->field_ies = other_value.ies()();
  else single_value->field_ies = OMIT_VALUE;
} else {
  single_value->field_ies.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void OML__FOM_template::copy_template(const OML__FOM_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.len().get_selection()) {
single_value->field_len = other_value.len();
} else {
single_value->field_len.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.hdr().get_selection()) {
single_value->field_hdr = other_value.hdr();
} else {
single_value->field_hdr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ies().get_selection()) {
single_value->field_ies = other_value.ies();
} else {
single_value->field_ies.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 OML__FOM_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 OML__FOM_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM_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 @AbisOML_Types.OML_FOM.");
break;
}
set_selection(other_value);
}

OML__FOM_template::OML__FOM_template()
{
}

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

OML__FOM_template::OML__FOM_template(const OML__FOM& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean OML__FOM_template::match(const OML__FOM& 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.len().is_bound()) return FALSE;
if(!single_value->field_len.match(other_value.len(), legacy))return FALSE;
if(!other_value.hdr().is_bound()) return FALSE;
if(!single_value->field_hdr.match(other_value.hdr(), legacy))return FALSE;
if(!other_value.ies().is_bound()) return FALSE;
if((other_value.ies().ispresent() ? !single_value->field_ies.match((const OML__FOM__IE__List&)other_value.ies(), legacy) : !single_value->field_ies.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 @AbisOML_Types.OML_FOM.");
}
return FALSE;
}

boolean OML__FOM_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_len.is_bound()
 || single_value->field_hdr.is_bound()
 || (single_value->field_ies.is_omit() || single_value->field_ies.is_bound());
}

boolean OML__FOM_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_len.is_value()
 && single_value->field_hdr.is_value()
 && (single_value->field_ies.is_omit() || single_value->field_ies.is_value());
}

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

OML__FOM OML__FOM_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 @AbisOML_Types.OML_FOM.");
OML__FOM ret_val;
if (single_value->field_len.is_bound()) {
ret_val.len() = single_value->field_len.valueof();
}
if (single_value->field_hdr.is_bound()) {
ret_val.hdr() = single_value->field_hdr.valueof();
}
if (single_value->field_ies.is_omit()) ret_val.ies() = OMIT_VALUE;
else if (single_value->field_ies.is_bound()) {
ret_val.ies() = single_value->field_ies.valueof();
}
return ret_val;
}

void OML__FOM_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 @AbisOML_Types.OML_FOM.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__FOM_template[list_length];
}

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

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

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

OML__FOM__Header_template& OML__FOM_template::hdr()
{
set_specific();
return single_value->field_hdr;
}

const OML__FOM__Header_template& OML__FOM_template::hdr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field hdr of a non-specific template of type @AbisOML_Types.OML_FOM.");
return single_value->field_hdr;
}

OML__FOM__IE__List_template& OML__FOM_template::ies()
{
set_specific();
return single_value->field_ies;
}

const OML__FOM__IE__List_template& OML__FOM_template::ies() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ies of a non-specific template of type @AbisOML_Types.OML_FOM.");
return single_value->field_ies;
}

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

void OML__FOM_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ len := ");
single_value->field_len.log();
TTCN_Logger::log_event_str(", hdr := ");
single_value->field_hdr.log();
TTCN_Logger::log_event_str(", ies := ");
single_value->field_ies.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 OML__FOM_template::log_match(const OML__FOM& 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_len.match(match_value.len(), legacy)){
TTCN_Logger::log_logmatch_info(".len");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_hdr.match(match_value.hdr(), legacy)){
TTCN_Logger::log_logmatch_info(".hdr");
single_value->field_hdr.log_match(match_value.hdr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.ies().ispresent()){
if(!single_value->field_ies.match(match_value.ies(), legacy)){
TTCN_Logger::log_logmatch_info(".ies");
single_value->field_ies.log_match(match_value.ies(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_ies.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".ies := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_ies.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("{ len := ");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::log_event_str(", hdr := ");
single_value->field_hdr.log_match(match_value.hdr(), legacy);
TTCN_Logger::log_event_str(", ies := ");
if (match_value.ies().ispresent()) {
single_value->field_ies.log_match(match_value.ies(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_ies.log();
if (single_value->field_ies.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 OML__FOM_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (len().is_bound()) len().set_implicit_omit();
if (hdr().is_bound()) hdr().set_implicit_omit();
if (!ies().is_bound()) ies() = OMIT_VALUE;
else ies().set_implicit_omit();
}

void OML__FOM_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_len.encode_text(text_buf);
single_value->field_hdr.encode_text(text_buf);
single_value->field_ies.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 @AbisOML_Types.OML_FOM.");
}
}

void OML__FOM_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_len.decode_text(text_buf);
single_value->field_hdr.decode_text(text_buf);
single_value->field_ies.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 OML__FOM_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 @AbisOML_Types.OML_FOM.");
}
}

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

void OML__FOM_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_len.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM");
single_value->field_hdr.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM");
single_value->field_ies.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM");
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 : "@AbisOML_Types.OML_FOM");
}

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

boolean OML__FOM_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 OML__FOM__IE OML__FOM__IE__List::UNBOUND_ELEM;
OML__FOM__IE__List::OML__FOM__IE__List()
{
val_ptr = NULL;
}

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

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

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

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

OML__FOM__IE__List& OML__FOM__IE__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;
}

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

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

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

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

OML__FOM__IE& OML__FOM__IE__List::operator[](const INTEGER& index_value)
{
index_value.must_bound("Using an unbound integer value for indexing a value of type @AbisOML_Types.OML_FOM_IE_List.");
return (*this)[(int)index_value];
}

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

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

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

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

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

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

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

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

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

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

int OML__FOM__IE__List::lengthof() const
{
if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @AbisOML_Types.OML_FOM_IE_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 OML__FOM__IE__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 OML__FOM__IE__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 OML__FOM__IE__List::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value");
  switch (param.get_operation_type()) {
  case Module_Param::OT_ASSIGN:
    if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) {
      *this = NULL_VALUE;
      return;
    }
    switch (param.get_type()) {
    case Module_Param::MP_Value_List:
      set_size(param.get_size());
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        if (curr->get_type()!=Module_Param::MP_NotUsed) {
          (*this)[i].set_param(*curr);
          if (!(*this)[i].is_bound()) {
            delete val_ptr->value_elements[i];
            val_ptr->value_elements[i] = NULL;
          }
        }
      }
      break;
    case Module_Param::MP_Indexed_List:
      for (size_t i=0; i<param.get_size(); ++i) {
        Module_Param* const curr = param.get_elem(i);
        (*this)[curr->get_id()->get_index()].set_param(*curr);
        if (!(*this)[curr->get_id()->get_index()].is_bound()) {
          delete val_ptr->value_elements[curr->get_id()->get_index()];
          val_ptr->value_elements[curr->get_id()->get_index()] = NULL;
        }
      }
      break;
    default:
      param.type_error("record of value", "@AbisOML_Types.OML_FOM_IE_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("record of value", "@AbisOML_Types.OML_FOM_IE_List");
    }
    break;
  default:
    TTCN_error("Internal error: Unknown operation type.");
  }
}

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

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

int OML__FOM__IE__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 OML__FOM__IE__List_template::copy_value(const OML__FOM__IE__List& other_value)
{
if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @AbisOML_Types.OML_FOM_IE_List with an unbound value.");
single_value.n_elements = other_value.size_of();
single_value.value_elements = (OML__FOM__IE_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 OML__FOM__IE_template(other_value[elem_count]);
} else {
single_value.value_elements[elem_count] = new OML__FOM__IE_template;
}
}
set_selection(SPECIFIC_VALUE);
}

void OML__FOM__IE__List_template::copy_template(const OML__FOM__IE__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 = (OML__FOM__IE_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 OML__FOM__IE_template(*other_value.single_value.value_elements[elem_count]);
} else {
single_value.value_elements[elem_count] = new OML__FOM__IE_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 OML__FOM__IE__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 IMPLICATION_MATCH:
implication_.precondition = new OML__FOM__IE__List_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__IE__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 @AbisOML_Types.OML_FOM_IE_List.");
break;
}
set_selection(other_value);
}

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

OML__FOM__IE__List_template::OML__FOM__IE__List_template()
{
}

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

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

OML__FOM__IE__List_template::OML__FOM__IE__List_template(const OML__FOM__IE__List& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

const OML__FOM__IE_template& OML__FOM__IE__List_template::operator[](int index_value) const
{
if (index_value < 0) TTCN_error("Accessing an element of a template for type @AbisOML_Types.OML_FOM_IE_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 @AbisOML_Types.OML_FOM_IE_List.");
if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @AbisOML_Types.OML_FOM_IE_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 OML__FOM__IE_template& OML__FOM__IE__List_template::operator[](const INTEGER& index_value) const
{
index_value.must_bound("Using an unbound integer value for indexing a template of type @AbisOML_Types.OML_FOM_IE_List.");
return (*this)[(int)index_value];
}

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

int OML__FOM__IE__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 OML__FOM__IE__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 @AbisOML_Types.OML_FOM_IE_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 @AbisOML_Types.OML_FOM_IE_List containing omit element.", op_name);
    case ANY_OR_OMIT:
      has_any_or_none = TRUE;
      break;
    default:
      min_size++;
      break;
    }
  }
} break;
case OMIT_VALUE:
  TTCN_error("Performing %sof() operation on a template of type @AbisOML_Types.OML_FOM_IE_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 @AbisOML_Types.OML_FOM_IE_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 @AbisOML_Types.OML_FOM_IE_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 @AbisOML_Types.OML_FOM_IE_List containing complemented list.", op_name);
default:
  TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @AbisOML_Types.OML_FOM_IE_List.", op_name);
}
return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @AbisOML_Types.OML_FOM_IE_List");
}

boolean OML__FOM__IE__List_template::match(const OML__FOM__IE__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_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy);
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching with an uninitialized/unsupported template of type @AbisOML_Types.OML_FOM_IE_List.");
}
return FALSE;
}

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

OML__FOM__IE__List OML__FOM__IE__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 @AbisOML_Types.OML_FOM_IE_List.");
OML__FOM__IE__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;
}

OML__FOM__IE__List OML__FOM__IE__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);
}

OML__FOM__IE__List OML__FOM__IE__List_template::replace(int index, int len, const OML__FOM__IE__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());
}

OML__FOM__IE__List OML__FOM__IE__List_template::replace(int index, int len, const OML__FOM__IE__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 OML__FOM__IE__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 OML__FOM__IE__List_template[list_length];
break;
default:
TTCN_error("Internal error: Setting an invalid type for a template of type @AbisOML_Types.OML_FOM_IE_List.");
}
set_selection(template_type);
}

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

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

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

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

void OML__FOM__IE__List_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_permutation(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value.n_elements = text_buf.pull_int().get_val();
if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @AbisOML_Types.OML_FOM_IE_List.");
single_value.value_elements = (OML__FOM__IE_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 OML__FOM__IE_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 OML__FOM__IE__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;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of type @AbisOML_Types.OML_FOM_IE_List.");
}
}

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

boolean OML__FOM__IE__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 OML__FOM__IE__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 OML__FOM__IE__List_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE|Module_Param::BC_LIST, "record of template");
  switch (param.get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__FOM__IE__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());
    int curr_idx = 0;
    for (size_t p_i=0; p_i<param.get_size(); ++p_i) {
      switch (param.get_elem(p_i)->get_type()) {
      case Module_Param::MP_NotUsed:
        curr_idx++;
        break;
      case Module_Param::MP_Permutation_Template: {
        int perm_start_idx = curr_idx;
        Module_Param* param_i = param.get_elem(p_i);
        for (size_t perm_i=0; perm_i<param_i->get_size(); perm_i++) {
          (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i)));
          curr_idx++;
        }
        int perm_end_idx = curr_idx - 1;
        add_permutation(perm_start_idx, perm_end_idx);
      } break;
      default:
        (*this)[curr_idx].set_param(*param.get_elem(p_i));
        curr_idx++;
      }
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__IE__List_template* precondition = new OML__FOM__IE__List_template;
    precondition->set_param(*param.get_elem(0));
    OML__FOM__IE__List_template* implied_template = new OML__FOM__IE__List_template;
    implied_template->set_param(*param.get_elem(1));
    *this = OML__FOM__IE__List_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record of template", "@AbisOML_Types.OML_FOM_IE_List");
  }
  is_ifpresent = param.get_ifpresent();
  set_length_range(param);
}

void OML__FOM__IE__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 : "@AbisOML_Types.OML_FOM_IE_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 : "@AbisOML_Types.OML_FOM_IE_List");
}

boolean OML__FOM__IE__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 number_of_permutations;
} else if (!strcmp(type, "length")) {
  return length_restriction_type != NO_LENGTH_RESTRICTION;
} else {
  return Base_Template::get_istemplate_kind(type);
}
}
OML__FOM__IE__Type::OML__FOM__IE__Type()
{
enum_value = UNBOUND_VALUE;
}

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

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

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

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

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

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

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

boolean OML__FOM__IE__Type::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_IE_Type.");
return enum_value == other_value;
}

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

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

boolean OML__FOM__IE__Type::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_IE_Type.");
return enum_value < other_value;
}

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

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

boolean OML__FOM__IE__Type::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_IE_Type.");
return enum_value > other_value;
}

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

const char *OML__FOM__IE__Type::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case NM__ATT__ABIS__CHANNEL: return "NM_ATT_ABIS_CHANNEL";
case NM__ATT__ADD__INFO: return "NM_ATT_ADD_INFO";
case NM__ATT__ADD__TEXT: return "NM_ATT_ADD_TEXT";
case NM__ATT__ADM__STATE: return "NM_ATT_ADM_STATE";
case NM__ATT__ARFCN__LIST: return "NM_ATT_ARFCN_LIST";
case NM__ATT__AUTON__REPORT: return "NM_ATT_AUTON_REPORT";
case NM__ATT__AVAIL__STATUS: return "NM_ATT_AVAIL_STATUS";
case NM__ATT__BCCH__ARFCN: return "NM_ATT_BCCH_ARFCN";
case NM__ATT__BSIC: return "NM_ATT_BSIC";
case NM__ATT__BTS__AIR__TIMER: return "NM_ATT_BTS_AIR_TIMER";
case NM__ATT__CCCH__L__I__P: return "NM_ATT_CCCH_L_I_P";
case NM__ATT__CCCH__L__T: return "NM_ATT_CCCH_L_T";
case NM__ATT__CHAN__COMB: return "NM_ATT_CHAN_COMB";
case NM__ATT__CONN__FAIL__CRIT: return "NM_ATT_CONN_FAIL_CRIT";
case NM__ATT__DEST: return "NM_ATT_DEST";
case NM__ATT__EVENT__TYPE: return "NM_ATT_EVENT_TYPE";
case NM__ATT__FILE__ID: return "NM_ATT_FILE_ID";
case NM__ATT__FILE__VERSION: return "NM_ATT_FILE_VERSION";
case NM__ATT__GSM__TIME: return "NM_ATT_GSM_TIME";
case NM__ATT__HSN: return "NM_ATT_HSN";
case NM__ATT__HW__CONFIG: return "NM_ATT_HW_CONFIG";
case NM__ATT__HW__DESC: return "NM_ATT_HW_DESC";
case NM__ATT__INTAVE__PARAM: return "NM_ATT_INTAVE_PARAM";
case NM__ATT__INTERF__BOUND: return "NM_ATT_INTERF_BOUND";
case NM__ATT__LIST__REQ__ATTR: return "NM_ATT_LIST_REQ_ATTR";
case NM__ATT__MAIO: return "NM_ATT_MAIO";
case NM__ATT__MANUF__STATE: return "NM_ATT_MANUF_STATE";
case NM__ATT__MANUF__THRESH: return "NM_ATT_MANUF_THRESH";
case NM__ATT__MANUF__ID: return "NM_ATT_MANUF_ID";
case NM__ATT__MAX__TA: return "NM_ATT_MAX_TA";
case NM__ATT__MDROP__LINK: return "NM_ATT_MDROP_LINK";
case NM__ATT__MDROP__NEXT: return "NM_ATT_MDROP_NEXT";
case NM__ATT__NACK__CAUSES: return "NM_ATT_NACK_CAUSES";
case NM__ATT__NY1: return "NM_ATT_NY1";
case NM__ATT__OPER__STATE: return "NM_ATT_OPER_STATE";
case NM__ATT__OVERL__PERIOD: return "NM_ATT_OVERL_PERIOD";
case NM__ATT__PHYS__CONF: return "NM_ATT_PHYS_CONF";
case NM__ATT__POWER__CLASS: return "NM_ATT_POWER_CLASS";
case NM__ATT__POWER__THRESH: return "NM_ATT_POWER_THRESH";
case NM__ATT__PROB__CAUSE: return "NM_ATT_PROB_CAUSE";
case NM__ATT__RACH__B__THRESH: return "NM_ATT_RACH_B_THRESH";
case NM__ATT__LDAVG__SLOTS: return "NM_ATT_LDAVG_SLOTS";
case NM__ATT__RAD__SUBC: return "NM_ATT_RAD_SUBC";
case NM__ATT__RF__MAXPOWR__R: return "NM_ATT_RF_MAXPOWR_R";
case NM__ATT__SITE__INPUTS: return "NM_ATT_SITE_INPUTS";
case NM__ATT__SITE__OUTPUTS: return "NM_ATT_SITE_OUTPUTS";
case NM__ATT__SOURCE: return "NM_ATT_SOURCE";
case NM__ATT__SPEC__PROB: return "NM_ATT_SPEC_PROB";
case NM__ATT__START__TIME: return "NM_ATT_START_TIME";
case NM__ATT__T200: return "NM_ATT_T200";
case NM__ATT__TEI: return "NM_ATT_TEI";
case NM__ATT__TEST__DUR: return "NM_ATT_TEST_DUR";
case NM__ATT__TEST__NO: return "NM_ATT_TEST_NO";
case NM__ATT__TEST__REPORT: return "NM_ATT_TEST_REPORT";
case NM__ATT__VSWR__THRESH: return "NM_ATT_VSWR_THRESH";
case NM__ATT__WINDOW__SIZE: return "NM_ATT_WINDOW_SIZE";
case NM__ATT__BS11__RSSI__OFFS: return "NM_ATT_BS11_RSSI_OFFS";
case NM__ATT__BS11__TXPWR: return "NM_ATT_BS11_TXPWR";
case NM__ATT__BS11__DIVERSITY: return "NM_ATT_BS11_DIVERSITY";
case NM__ATT__TSC: return "NM_ATT_TSC";
case NM__ATT__SW__CONFIG: return "NM_ATT_SW_CONFIG";
case NM__ATT__SW__DESCR: return "NM_ATT_SW_DESCR";
case NM__ATT__SEVERITY: return "NM_ATT_SEVERITY";
case NM__ATT__GET__ARI: return "NM_ATT_GET_ARI";
case NM__ATT__HW__CONF__CHG: return "NM_ATT_HW_CONF_CHG";
case NM__ATT__OUTST__ALARM: return "NM_ATT_OUTST_ALARM";
case NM__ATT__FILE__DATA: return "NM_ATT_FILE_DATA";
case NM__ATT__MEAS__RES: return "NM_ATT_MEAS_RES";
case NM__ATT__MEAS__TYPE: return "NM_ATT_MEAS_TYPE";
case NM__ATT__BS11__ESN__FW__CODE__NO: return "NM_ATT_BS11_ESN_FW_CODE_NO";
case NM__ATT__BS11__ESN__HW__CODE__NO: return "NM_ATT_BS11_ESN_HW_CODE_NO";
case NM__ATT__BS11__ESN__PCB__SERIAL: return "NM_ATT_BS11_ESN_PCB_SERIAL";
case NM__ATT__BS11__EXCESSIVE__DISTANCE: return "NM_ATT_BS11_EXCESSIVE_DISTANCE";
case NM__ATT__BS11__ALL__TEST__CATG: return "NM_ATT_BS11_ALL_TEST_CATG";
case NM__ATT__BS11__BTSLS__HOPPING: return "NM_ATT_BS11_BTSLS_HOPPING";
case NM__ATT__BS11__CELL__ALLOC__NR: return "NM_ATT_BS11_CELL_ALLOC_NR";
case NM__ATT__BS11__CELL__GLOBAL__ID: return "NM_ATT_BS11_CELL_GLOBAL_ID";
case NM__ATT__BS11__ENA__INTERF__CLASS: return "NM_ATT_BS11_ENA_INTERF_CLASS";
case NM__ATT__BS11__ENA__INT__INTEC__HANDO: return "NM_ATT_BS11_ENA_INT_INTEC_HANDO";
case NM__ATT__BS11__ENA__INT__INTRC__HANDO: return "NM_ATT_BS11_ENA_INT_INTRC_HANDO";
case NM__ATT__BS11__ENA__MS__PWR__CTRL: return "NM_ATT_BS11_ENA_MS_PWR_CTRL";
case NM__ATT__BS11__ENA__PWR__BDGT__HO: return "NM_ATT_BS11_ENA_PWR_BDGT_HO";
case NM__ATT__BS11__ENA__PWR__CTRL__RLFW: return "NM_ATT_BS11_ENA_PWR_CTRL_RLFW";
case NM__ATT__BS11__ENA__RXLEV__HO: return "NM_ATT_BS11_ENA_RXLEV_HO";
case NM__ATT__BS11__ENA__RXQUAL__HO: return "NM_ATT_BS11_ENA_RXQUAL_HO";
case NM__ATT__BS11__FACCH__QUAL: return "NM_ATT_BS11_FACCH_QUAL";
case NM__ATT__IPACC__DST__IP: return "NM_ATT_IPACC_DST_IP";
case NM__ATT__IPACC__DST__IP__PORT: return "NM_ATT_IPACC_DST_IP_PORT";
case NM__ATT__IPACC__SSRC: return "NM_ATT_IPACC_SSRC";
case NM__ATT__IPACC__RTP__PAYLD__TYPE: return "NM_ATT_IPACC_RTP_PAYLD_TYPE";
case NM__ATT__IPACC__BASEB__ID: return "NM_ATT_IPACC_BASEB_ID";
case NM__ATT__IPACC__STREAM__ID: return "NM_ATT_IPACC_STREAM_ID";
case NM__ATT__IPACC__NV__FLAGS: return "NM_ATT_IPACC_NV_FLAGS";
case NM__ATT__IPACC__FREQ__CTRL: return "NM_ATT_IPACC_FREQ_CTRL";
case NM__ATT__IPACC__PRIM__OML__CFG: return "NM_ATT_IPACC_PRIM_OML_CFG";
case NM__ATT__IPACC__SEC__OML__CFG: return "NM_ATT_IPACC_SEC_OML_CFG";
case NM__ATT__IPACC__IP__IF__CFG: return "NM_ATT_IPACC_IP_IF_CFG";
case NM__ATT__IPACC__IP__GW__CFG: return "NM_ATT_IPACC_IP_GW_CFG";
case NM__ATT__IPACC__IN__SERV__TIME: return "NM_ATT_IPACC_IN_SERV_TIME";
case NM__ATT__IPACC__TRX__BTS__ASS: return "NM_ATT_IPACC_TRX_BTS_ASS";
case NM__ATT__IPACC__LOCATION: return "NM_ATT_IPACC_LOCATION";
case NM__ATT__IPACC__PAGING__CFG: return "NM_ATT_IPACC_PAGING_CFG";
case NM__ATT__IPACC__FILE__DATA: return "NM_ATT_IPACC_FILE_DATA";
case NM__ATT__IPACC__UNIT__ID: return "NM_ATT_IPACC_UNIT_ID";
case NM__ATT__IPACC__PARENT__UNIT__ID: return "NM_ATT_IPACC_PARENT_UNIT_ID";
case NM__ATT__IPACC__UNIT__NAME: return "NM_ATT_IPACC_UNIT_NAME";
case NM__ATT__IPACC__SNMP__CFG: return "NM_ATT_IPACC_SNMP_CFG";
case NM__ATT__IPACC__PRIM__OML__CFG__LIST: return "NM_ATT_IPACC_PRIM_OML_CFG_LIST";
case NM__ATT__IPACC__PRIM__OML__FB__TOUT: return "NM_ATT_IPACC_PRIM_OML_FB_TOUT";
case NM__ATT__IPACC__CUR__SW__CFG: return "NM_ATT_IPACC_CUR_SW_CFG";
case NM__ATT__IPACC__TIMING__BUS: return "NM_ATT_IPACC_TIMING_BUS";
case NM__ATT__IPACC__CGI: return "NM_ATT_IPACC_CGI";
case NM__ATT__IPACC__RAC: return "NM_ATT_IPACC_RAC";
case NM__ATT__IPACC__OBJ__VERSION: return "NM_ATT_IPACC_OBJ_VERSION";
case NM__ATT__IPACC__GPRS__PAGING__CFG: return "NM_ATT_IPACC_GPRS_PAGING_CFG";
case NM__ATT__IPACC__NSEI: return "NM_ATT_IPACC_NSEI";
case NM__ATT__IPACC__BVCI: return "NM_ATT_IPACC_BVCI";
case NM__ATT__IPACC__NSVCI: return "NM_ATT_IPACC_NSVCI";
case NM__ATT__IPACC__NS__CFG: return "NM_ATT_IPACC_NS_CFG";
case NM__ATT__IPACC__BSSGP__CFG: return "NM_ATT_IPACC_BSSGP_CFG";
case NM__ATT__IPACC__NS__LINK__CFG: return "NM_ATT_IPACC_NS_LINK_CFG";
case NM__ATT__IPACC__RLC__CFG: return "NM_ATT_IPACC_RLC_CFG";
case NM__ATT__IPACC__ALM__THRESH__LIST: return "NM_ATT_IPACC_ALM_THRESH_LIST";
case NM__ATT__IPACC__MONIT__VAL__LIST: return "NM_ATT_IPACC_MONIT_VAL_LIST";
case NM__ATT__IPACC__TIB__CONTROL: return "NM_ATT_IPACC_TIB_CONTROL";
case NM__ATT__IPACC__SUPP__FEATURES: return "NM_ATT_IPACC_SUPP_FEATURES";
case NM__ATT__IPACC__CODING__SCHEMES: return "NM_ATT_IPACC_CODING_SCHEMES";
case NM__ATT__IPACC__RLC__CFG__2: return "NM_ATT_IPACC_RLC_CFG_2";
case NM__ATT__IPACC__HEARTB__TOUT: return "NM_ATT_IPACC_HEARTB_TOUT";
case NM__ATT__IPACC__UPTIME: return "NM_ATT_IPACC_UPTIME";
case NM__ATT__IPACC__RLC__CFG__3: return "NM_ATT_IPACC_RLC_CFG_3";
case NM__ATT__IPACC__SSL__CFG: return "NM_ATT_IPACC_SSL_CFG";
case NM__ATT__IPACC__SEC__POSSIBLE: return "NM_ATT_IPACC_SEC_POSSIBLE";
case NM__ATT__IPACC__IML__SSL__STATE: return "NM_ATT_IPACC_IML_SSL_STATE";
case NM__ATT__IPACC__REVOC__DATE: return "NM_ATT_IPACC_REVOC_DATE";
case NM__ATT__OSMO__REDUCEPOWER: return "NM_ATT_OSMO_REDUCEPOWER";
default:
return "<unknown>";
}
}

OML__FOM__IE__Type::enum_type OML__FOM__IE__Type::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "NM_ATT_ABIS_CHANNEL")) return NM__ATT__ABIS__CHANNEL;
if (!strcmp(str_par, "NM_ATT_ADD_INFO")) return NM__ATT__ADD__INFO;
if (!strcmp(str_par, "NM_ATT_ADD_TEXT")) return NM__ATT__ADD__TEXT;
if (!strcmp(str_par, "NM_ATT_ADM_STATE")) return NM__ATT__ADM__STATE;
if (!strcmp(str_par, "NM_ATT_ARFCN_LIST")) return NM__ATT__ARFCN__LIST;
if (!strcmp(str_par, "NM_ATT_AUTON_REPORT")) return NM__ATT__AUTON__REPORT;
if (!strcmp(str_par, "NM_ATT_AVAIL_STATUS")) return NM__ATT__AVAIL__STATUS;
if (!strcmp(str_par, "NM_ATT_BCCH_ARFCN")) return NM__ATT__BCCH__ARFCN;
if (!strcmp(str_par, "NM_ATT_BSIC")) return NM__ATT__BSIC;
if (!strcmp(str_par, "NM_ATT_BTS_AIR_TIMER")) return NM__ATT__BTS__AIR__TIMER;
if (!strcmp(str_par, "NM_ATT_CCCH_L_I_P")) return NM__ATT__CCCH__L__I__P;
if (!strcmp(str_par, "NM_ATT_CCCH_L_T")) return NM__ATT__CCCH__L__T;
if (!strcmp(str_par, "NM_ATT_CHAN_COMB")) return NM__ATT__CHAN__COMB;
if (!strcmp(str_par, "NM_ATT_CONN_FAIL_CRIT")) return NM__ATT__CONN__FAIL__CRIT;
if (!strcmp(str_par, "NM_ATT_DEST")) return NM__ATT__DEST;
if (!strcmp(str_par, "NM_ATT_EVENT_TYPE")) return NM__ATT__EVENT__TYPE;
if (!strcmp(str_par, "NM_ATT_FILE_ID")) return NM__ATT__FILE__ID;
if (!strcmp(str_par, "NM_ATT_FILE_VERSION")) return NM__ATT__FILE__VERSION;
if (!strcmp(str_par, "NM_ATT_GSM_TIME")) return NM__ATT__GSM__TIME;
if (!strcmp(str_par, "NM_ATT_HSN")) return NM__ATT__HSN;
if (!strcmp(str_par, "NM_ATT_HW_CONFIG")) return NM__ATT__HW__CONFIG;
if (!strcmp(str_par, "NM_ATT_HW_DESC")) return NM__ATT__HW__DESC;
if (!strcmp(str_par, "NM_ATT_INTAVE_PARAM")) return NM__ATT__INTAVE__PARAM;
if (!strcmp(str_par, "NM_ATT_INTERF_BOUND")) return NM__ATT__INTERF__BOUND;
if (!strcmp(str_par, "NM_ATT_LIST_REQ_ATTR")) return NM__ATT__LIST__REQ__ATTR;
if (!strcmp(str_par, "NM_ATT_MAIO")) return NM__ATT__MAIO;
if (!strcmp(str_par, "NM_ATT_MANUF_STATE")) return NM__ATT__MANUF__STATE;
if (!strcmp(str_par, "NM_ATT_MANUF_THRESH")) return NM__ATT__MANUF__THRESH;
if (!strcmp(str_par, "NM_ATT_MANUF_ID")) return NM__ATT__MANUF__ID;
if (!strcmp(str_par, "NM_ATT_MAX_TA")) return NM__ATT__MAX__TA;
if (!strcmp(str_par, "NM_ATT_MDROP_LINK")) return NM__ATT__MDROP__LINK;
if (!strcmp(str_par, "NM_ATT_MDROP_NEXT")) return NM__ATT__MDROP__NEXT;
if (!strcmp(str_par, "NM_ATT_NACK_CAUSES")) return NM__ATT__NACK__CAUSES;
if (!strcmp(str_par, "NM_ATT_NY1")) return NM__ATT__NY1;
if (!strcmp(str_par, "NM_ATT_OPER_STATE")) return NM__ATT__OPER__STATE;
if (!strcmp(str_par, "NM_ATT_OVERL_PERIOD")) return NM__ATT__OVERL__PERIOD;
if (!strcmp(str_par, "NM_ATT_PHYS_CONF")) return NM__ATT__PHYS__CONF;
if (!strcmp(str_par, "NM_ATT_POWER_CLASS")) return NM__ATT__POWER__CLASS;
if (!strcmp(str_par, "NM_ATT_POWER_THRESH")) return NM__ATT__POWER__THRESH;
if (!strcmp(str_par, "NM_ATT_PROB_CAUSE")) return NM__ATT__PROB__CAUSE;
if (!strcmp(str_par, "NM_ATT_RACH_B_THRESH")) return NM__ATT__RACH__B__THRESH;
if (!strcmp(str_par, "NM_ATT_LDAVG_SLOTS")) return NM__ATT__LDAVG__SLOTS;
if (!strcmp(str_par, "NM_ATT_RAD_SUBC")) return NM__ATT__RAD__SUBC;
if (!strcmp(str_par, "NM_ATT_RF_MAXPOWR_R")) return NM__ATT__RF__MAXPOWR__R;
if (!strcmp(str_par, "NM_ATT_SITE_INPUTS")) return NM__ATT__SITE__INPUTS;
if (!strcmp(str_par, "NM_ATT_SITE_OUTPUTS")) return NM__ATT__SITE__OUTPUTS;
if (!strcmp(str_par, "NM_ATT_SOURCE")) return NM__ATT__SOURCE;
if (!strcmp(str_par, "NM_ATT_SPEC_PROB")) return NM__ATT__SPEC__PROB;
if (!strcmp(str_par, "NM_ATT_START_TIME")) return NM__ATT__START__TIME;
if (!strcmp(str_par, "NM_ATT_T200")) return NM__ATT__T200;
if (!strcmp(str_par, "NM_ATT_TEI")) return NM__ATT__TEI;
if (!strcmp(str_par, "NM_ATT_TEST_DUR")) return NM__ATT__TEST__DUR;
if (!strcmp(str_par, "NM_ATT_TEST_NO")) return NM__ATT__TEST__NO;
if (!strcmp(str_par, "NM_ATT_TEST_REPORT")) return NM__ATT__TEST__REPORT;
if (!strcmp(str_par, "NM_ATT_VSWR_THRESH")) return NM__ATT__VSWR__THRESH;
if (!strcmp(str_par, "NM_ATT_WINDOW_SIZE")) return NM__ATT__WINDOW__SIZE;
if (!strcmp(str_par, "NM_ATT_BS11_RSSI_OFFS")) return NM__ATT__BS11__RSSI__OFFS;
if (!strcmp(str_par, "NM_ATT_BS11_TXPWR")) return NM__ATT__BS11__TXPWR;
if (!strcmp(str_par, "NM_ATT_BS11_DIVERSITY")) return NM__ATT__BS11__DIVERSITY;
if (!strcmp(str_par, "NM_ATT_TSC")) return NM__ATT__TSC;
if (!strcmp(str_par, "NM_ATT_SW_CONFIG")) return NM__ATT__SW__CONFIG;
if (!strcmp(str_par, "NM_ATT_SW_DESCR")) return NM__ATT__SW__DESCR;
if (!strcmp(str_par, "NM_ATT_SEVERITY")) return NM__ATT__SEVERITY;
if (!strcmp(str_par, "NM_ATT_GET_ARI")) return NM__ATT__GET__ARI;
if (!strcmp(str_par, "NM_ATT_HW_CONF_CHG")) return NM__ATT__HW__CONF__CHG;
if (!strcmp(str_par, "NM_ATT_OUTST_ALARM")) return NM__ATT__OUTST__ALARM;
if (!strcmp(str_par, "NM_ATT_FILE_DATA")) return NM__ATT__FILE__DATA;
if (!strcmp(str_par, "NM_ATT_MEAS_RES")) return NM__ATT__MEAS__RES;
if (!strcmp(str_par, "NM_ATT_MEAS_TYPE")) return NM__ATT__MEAS__TYPE;
if (!strcmp(str_par, "NM_ATT_BS11_ESN_FW_CODE_NO")) return NM__ATT__BS11__ESN__FW__CODE__NO;
if (!strcmp(str_par, "NM_ATT_BS11_ESN_HW_CODE_NO")) return NM__ATT__BS11__ESN__HW__CODE__NO;
if (!strcmp(str_par, "NM_ATT_BS11_ESN_PCB_SERIAL")) return NM__ATT__BS11__ESN__PCB__SERIAL;
if (!strcmp(str_par, "NM_ATT_BS11_EXCESSIVE_DISTANCE")) return NM__ATT__BS11__EXCESSIVE__DISTANCE;
if (!strcmp(str_par, "NM_ATT_BS11_ALL_TEST_CATG")) return NM__ATT__BS11__ALL__TEST__CATG;
if (!strcmp(str_par, "NM_ATT_BS11_BTSLS_HOPPING")) return NM__ATT__BS11__BTSLS__HOPPING;
if (!strcmp(str_par, "NM_ATT_BS11_CELL_ALLOC_NR")) return NM__ATT__BS11__CELL__ALLOC__NR;
if (!strcmp(str_par, "NM_ATT_BS11_CELL_GLOBAL_ID")) return NM__ATT__BS11__CELL__GLOBAL__ID;
if (!strcmp(str_par, "NM_ATT_BS11_ENA_INTERF_CLASS")) return NM__ATT__BS11__ENA__INTERF__CLASS;
if (!strcmp(str_par, "NM_ATT_BS11_ENA_INT_INTEC_HANDO")) return NM__ATT__BS11__ENA__INT__INTEC__HANDO;
if (!strcmp(str_par, "NM_ATT_BS11_ENA_INT_INTRC_HANDO")) return NM__ATT__BS11__ENA__INT__INTRC__HANDO;
if (!strcmp(str_par, "NM_ATT_BS11_ENA_MS_PWR_CTRL")) return NM__ATT__BS11__ENA__MS__PWR__CTRL;
if (!strcmp(str_par, "NM_ATT_BS11_ENA_PWR_BDGT_HO")) return NM__ATT__BS11__ENA__PWR__BDGT__HO;
if (!strcmp(str_par, "NM_ATT_BS11_ENA_PWR_CTRL_RLFW")) return NM__ATT__BS11__ENA__PWR__CTRL__RLFW;
if (!strcmp(str_par, "NM_ATT_BS11_ENA_RXLEV_HO")) return NM__ATT__BS11__ENA__RXLEV__HO;
if (!strcmp(str_par, "NM_ATT_BS11_ENA_RXQUAL_HO")) return NM__ATT__BS11__ENA__RXQUAL__HO;
if (!strcmp(str_par, "NM_ATT_BS11_FACCH_QUAL")) return NM__ATT__BS11__FACCH__QUAL;
if (!strcmp(str_par, "NM_ATT_IPACC_DST_IP")) return NM__ATT__IPACC__DST__IP;
if (!strcmp(str_par, "NM_ATT_IPACC_DST_IP_PORT")) return NM__ATT__IPACC__DST__IP__PORT;
if (!strcmp(str_par, "NM_ATT_IPACC_SSRC")) return NM__ATT__IPACC__SSRC;
if (!strcmp(str_par, "NM_ATT_IPACC_RTP_PAYLD_TYPE")) return NM__ATT__IPACC__RTP__PAYLD__TYPE;
if (!strcmp(str_par, "NM_ATT_IPACC_BASEB_ID")) return NM__ATT__IPACC__BASEB__ID;
if (!strcmp(str_par, "NM_ATT_IPACC_STREAM_ID")) return NM__ATT__IPACC__STREAM__ID;
if (!strcmp(str_par, "NM_ATT_IPACC_NV_FLAGS")) return NM__ATT__IPACC__NV__FLAGS;
if (!strcmp(str_par, "NM_ATT_IPACC_FREQ_CTRL")) return NM__ATT__IPACC__FREQ__CTRL;
if (!strcmp(str_par, "NM_ATT_IPACC_PRIM_OML_CFG")) return NM__ATT__IPACC__PRIM__OML__CFG;
if (!strcmp(str_par, "NM_ATT_IPACC_SEC_OML_CFG")) return NM__ATT__IPACC__SEC__OML__CFG;
if (!strcmp(str_par, "NM_ATT_IPACC_IP_IF_CFG")) return NM__ATT__IPACC__IP__IF__CFG;
if (!strcmp(str_par, "NM_ATT_IPACC_IP_GW_CFG")) return NM__ATT__IPACC__IP__GW__CFG;
if (!strcmp(str_par, "NM_ATT_IPACC_IN_SERV_TIME")) return NM__ATT__IPACC__IN__SERV__TIME;
if (!strcmp(str_par, "NM_ATT_IPACC_TRX_BTS_ASS")) return NM__ATT__IPACC__TRX__BTS__ASS;
if (!strcmp(str_par, "NM_ATT_IPACC_LOCATION")) return NM__ATT__IPACC__LOCATION;
if (!strcmp(str_par, "NM_ATT_IPACC_PAGING_CFG")) return NM__ATT__IPACC__PAGING__CFG;
if (!strcmp(str_par, "NM_ATT_IPACC_FILE_DATA")) return NM__ATT__IPACC__FILE__DATA;
if (!strcmp(str_par, "NM_ATT_IPACC_UNIT_ID")) return NM__ATT__IPACC__UNIT__ID;
if (!strcmp(str_par, "NM_ATT_IPACC_PARENT_UNIT_ID")) return NM__ATT__IPACC__PARENT__UNIT__ID;
if (!strcmp(str_par, "NM_ATT_IPACC_UNIT_NAME")) return NM__ATT__IPACC__UNIT__NAME;
if (!strcmp(str_par, "NM_ATT_IPACC_SNMP_CFG")) return NM__ATT__IPACC__SNMP__CFG;
if (!strcmp(str_par, "NM_ATT_IPACC_PRIM_OML_CFG_LIST")) return NM__ATT__IPACC__PRIM__OML__CFG__LIST;
if (!strcmp(str_par, "NM_ATT_IPACC_PRIM_OML_FB_TOUT")) return NM__ATT__IPACC__PRIM__OML__FB__TOUT;
if (!strcmp(str_par, "NM_ATT_IPACC_CUR_SW_CFG")) return NM__ATT__IPACC__CUR__SW__CFG;
if (!strcmp(str_par, "NM_ATT_IPACC_TIMING_BUS")) return NM__ATT__IPACC__TIMING__BUS;
if (!strcmp(str_par, "NM_ATT_IPACC_CGI")) return NM__ATT__IPACC__CGI;
if (!strcmp(str_par, "NM_ATT_IPACC_RAC")) return NM__ATT__IPACC__RAC;
if (!strcmp(str_par, "NM_ATT_IPACC_OBJ_VERSION")) return NM__ATT__IPACC__OBJ__VERSION;
if (!strcmp(str_par, "NM_ATT_IPACC_GPRS_PAGING_CFG")) return NM__ATT__IPACC__GPRS__PAGING__CFG;
if (!strcmp(str_par, "NM_ATT_IPACC_NSEI")) return NM__ATT__IPACC__NSEI;
if (!strcmp(str_par, "NM_ATT_IPACC_BVCI")) return NM__ATT__IPACC__BVCI;
if (!strcmp(str_par, "NM_ATT_IPACC_NSVCI")) return NM__ATT__IPACC__NSVCI;
if (!strcmp(str_par, "NM_ATT_IPACC_NS_CFG")) return NM__ATT__IPACC__NS__CFG;
if (!strcmp(str_par, "NM_ATT_IPACC_BSSGP_CFG")) return NM__ATT__IPACC__BSSGP__CFG;
if (!strcmp(str_par, "NM_ATT_IPACC_NS_LINK_CFG")) return NM__ATT__IPACC__NS__LINK__CFG;
if (!strcmp(str_par, "NM_ATT_IPACC_RLC_CFG")) return NM__ATT__IPACC__RLC__CFG;
if (!strcmp(str_par, "NM_ATT_IPACC_ALM_THRESH_LIST")) return NM__ATT__IPACC__ALM__THRESH__LIST;
if (!strcmp(str_par, "NM_ATT_IPACC_MONIT_VAL_LIST")) return NM__ATT__IPACC__MONIT__VAL__LIST;
if (!strcmp(str_par, "NM_ATT_IPACC_TIB_CONTROL")) return NM__ATT__IPACC__TIB__CONTROL;
if (!strcmp(str_par, "NM_ATT_IPACC_SUPP_FEATURES")) return NM__ATT__IPACC__SUPP__FEATURES;
if (!strcmp(str_par, "NM_ATT_IPACC_CODING_SCHEMES")) return NM__ATT__IPACC__CODING__SCHEMES;
if (!strcmp(str_par, "NM_ATT_IPACC_RLC_CFG_2")) return NM__ATT__IPACC__RLC__CFG__2;
if (!strcmp(str_par, "NM_ATT_IPACC_HEARTB_TOUT")) return NM__ATT__IPACC__HEARTB__TOUT;
if (!strcmp(str_par, "NM_ATT_IPACC_UPTIME")) return NM__ATT__IPACC__UPTIME;
if (!strcmp(str_par, "NM_ATT_IPACC_RLC_CFG_3")) return NM__ATT__IPACC__RLC__CFG__3;
if (!strcmp(str_par, "NM_ATT_IPACC_SSL_CFG")) return NM__ATT__IPACC__SSL__CFG;
if (!strcmp(str_par, "NM_ATT_IPACC_SEC_POSSIBLE")) return NM__ATT__IPACC__SEC__POSSIBLE;
if (!strcmp(str_par, "NM_ATT_IPACC_IML_SSL_STATE")) return NM__ATT__IPACC__IML__SSL__STATE;
if (!strcmp(str_par, "NM_ATT_IPACC_REVOC_DATE")) return NM__ATT__IPACC__REVOC__DATE;
if (!strcmp(str_par, "NM_ATT_OSMO_REDUCEPOWER")) return NM__ATT__OSMO__REDUCEPOWER;
}
return UNKNOWN_VALUE;
}

boolean OML__FOM__IE__Type::is_valid_enum(int int_par)
{
switch (int_par) {
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
case 17:
case 18:
case 19:
case 20:
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
case 27:
case 28:
case 29:
case 30:
case 31:
case 32:
case 33:
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:
case 43:
case 44:
case 45:
case 46:
case 47:
case 48:
case 49:
case 50:
case 51:
case 52:
case 53:
case 54:
case 55:
case 56:
case 57:
case 61:
case 62:
case 63:
case 64:
case 65:
case 66:
case 67:
case 68:
case 69:
case 70:
case 71:
case 72:
case 73:
case 76:
case 79:
case 85:
case 88:
case 96:
case 97:
case 98:
case 99:
case 102:
case 103:
case 104:
case 105:
case 106:
case 107:
case 108:
case 109:
case 110:
case 128:
case 129:
case 130:
case 131:
case 132:
case 133:
case 134:
case 135:
case 136:
case 137:
case 138:
case 139:
case 140:
case 141:
case 142:
case 143:
case 144:
case 145:
case 146:
case 147:
case 148:
case 149:
case 150:
case 151:
case 152:
case 153:
case 154:
case 155:
case 156:
case 157:
case 158:
case 159:
case 160:
case 161:
case 162:
case 163:
case 164:
case 165:
case 166:
case 167:
case 168:
case 169:
case 170:
case 171:
case 172:
case 173:
case 174:
case 175:
case 176:
case 254:
return TRUE;
default:
return FALSE;
}
}

int OML__FOM__IE__Type::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_IE_Type.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int OML__FOM__IE__Type::enum2int(const OML__FOM__IE__Type& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_IE_Type.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

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

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

void OML__FOM__IE__Type::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void OML__FOM__IE__Type::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@AbisOML_Types.OML_FOM_IE_Type");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_IE_Type.");
  }
}

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

void OML__FOM__IE__Type::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @AbisOML_Types.OML_FOM_IE_Type.", enum_value);
}

void OML__FOM__IE__Type::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__FOM__IE__Type::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...)
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
    unsigned L_form=va_arg(pvar, unsigned);
    ASN_BER_TLV_t tlv;
    BER_decode_str2TLV(p_buf, tlv, L_form);
    BER_decode_TLV(p_td, tlv, L_form);
    if(tlv.isComplete) p_buf.increase_pos(tlv.get_len());
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-decoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    raw_order_t r_order;
    switch(p_td.raw->top_bit_order) {
    case TOP_BIT_LEFT:
      r_order=ORDER_LSB;
      break;
    case TOP_BIT_RIGHT:
    default:
      r_order=ORDER_MSB;
    }
    int rawr = RAW_decode(p_td, p_buf, p_buf.get_len()*8, r_order);
    if(rawr<0) switch (-rawr) {
    case TTCN_EncDec::ET_INCOMPL_MSG:
    case TTCN_EncDec::ET_LEN_ERR:
      ec.error((TTCN_EncDec::error_type_t)-rawr, "Can not decode type '%s', because incomplete message was received", p_td.name);
      break;
    case 1:
    default:
      ec.error(TTCN_EncDec::ET_INVAL_MSG, "Can not decode type '%s', because invalid message was received", p_td.name);
      break;
    }
    break;}
  case TTCN_EncDec::CT_TEXT: {
    Limit_Token_List limit;
    TTCN_EncDec_ErrorContext ec("While TEXT-decoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
        ("No TEXT descriptor available for type '%s'.", p_td.name);
    const unsigned char *b_data=p_buf.get_data();
    int null_added=0;
    if(b_data[p_buf.get_len()-1]!='\0'){
      null_added=1;
      p_buf.set_pos(p_buf.get_len());
      p_buf.put_zero(8,ORDER_LSB);
      p_buf.rewind();
    }
    if(TEXT_decode(p_td,p_buf,limit)<0)
      ec.error(TTCN_EncDec::ET_INCOMPL_MSG,"Can not decode type '%s', because invalid or incomplete message was received", p_td.name);
    if(null_added){
      size_t actpos=p_buf.get_pos();
      p_buf.set_pos(p_buf.get_len()-1);
      p_buf.cut_end();
      p_buf.set_pos(actpos);
    }
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-decoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XmlReaderWrap reader(p_buf);
    for (int rd_ok=reader.Read(); rd_ok==1; rd_ok=reader.Read()) {
      if (reader.NodeType() == XML_READER_TYPE_ELEMENT) break;
    }
    XER_decode(*(p_td.xer), reader, XER_coding | XER_TOPLEVEL, XER_NONE, 0);
    size_t bytes = reader.ByteConsumed();
    p_buf.set_pos(bytes);
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-decoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok((const char*)p_buf.get_data(), p_buf.get_len());
    if(JSON_decode(p_td, tok, FALSE, FALSE)<0)
      ec.error(TTCN_EncDec::ET_INCOMPL_MSG,"Can not decode type '%s', because invalid or incomplete message was received", p_td.name);
    p_buf.set_pos(tok.get_buf_pos());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-decoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
     OER_struct p_oer;
    OER_decode(p_td, p_buf, p_oer);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int OML__FOM__IE__Type::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
{
  int decoded_value = 0;
  int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 8, no_err);
  if (decoded_length < 0) return decoded_length;
  if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
  else {
    if(no_err){
     return -1;
    } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
    enum_value = UNKNOWN_VALUE;
    }
  }
  return decoded_length;
}

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

void OML__FOM__IE__Type_template::copy_template(const OML__FOM__IE__Type_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__FOM__IE__Type_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new OML__FOM__IE__Type_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__IE__Type_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_IE_Type.");
}
}

OML__FOM__IE__Type_template::OML__FOM__IE__Type_template()
{
}

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

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

OML__FOM__IE__Type_template::OML__FOM__IE__Type_template(OML__FOM__IE__Type::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

OML__FOM__IE__Type_template& OML__FOM__IE__Type_template::operator=(const OPTIONAL<OML__FOM__IE__Type>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (OML__FOM__IE__Type::enum_type)(const OML__FOM__IE__Type&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @AbisOML_Types.OML_FOM_IE_Type.");
}
return *this;
}

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

boolean OML__FOM__IE__Type_template::match(OML__FOM__IE__Type::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_IE_Type.");
}
return FALSE;
}

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

OML__FOM__IE__Type::enum_type OML__FOM__IE__Type_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @AbisOML_Types.OML_FOM_IE_Type.");
return single_value;
}

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

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

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

void OML__FOM__IE__Type_template::log_match(const OML__FOM__IE__Type& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

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

void OML__FOM__IE__Type_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (OML__FOM__IE__Type::enum_type)text_buf.pull_int().get_val();
if (!OML__FOM__IE__Type::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @AbisOML_Types.OML_FOM_IE_Type.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__FOM__IE__Type_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @AbisOML_Types.OML_FOM_IE_Type.");
}
}

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

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

void OML__FOM__IE__Type_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__FOM__IE__Type_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    OML__FOM__IE__Type::enum_type enum_val = OML__FOM__IE__Type::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!OML__FOM__IE__Type::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_IE_Type.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__IE__Type_template* precondition = new OML__FOM__IE__Type_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__FOM__IE__Type_template* implied_template = new OML__FOM__IE__Type_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__FOM__IE__Type_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@AbisOML_Types.OML_FOM_IE_Type");
  }
  is_ifpresent = param.get_ifpresent();
}

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

void OML__FOM__IE__Body::copy_value(const OML__FOM__IE__Body& other_value)
{
switch (other_value.union_selection) {
case ALT_abis__channel:
field_abis__channel = new OML__FOM__AbisChannel(*other_value.field_abis__channel);
break;
case ALT_adm__state:
field_adm__state = new OML__FOM__AdministrativeState(*other_value.field_adm__state);
break;
case ALT_auton__report:
field_auton__report = new OCTETSTRING(*other_value.field_auton__report);
break;
case ALT_bcch__arfcn:
field_bcch__arfcn = new INTEGER(*other_value.field_bcch__arfcn);
break;
case ALT_bsic:
field_bsic = new INTEGER(*other_value.field_bsic);
break;
case ALT_air__timer:
field_air__timer = new INTEGER(*other_value.field_air__timer);
break;
case ALT_load__ind__period:
field_load__ind__period = new INTEGER(*other_value.field_load__ind__period);
break;
case ALT_load__threshold:
field_load__threshold = new INTEGER(*other_value.field_load__threshold);
break;
case ALT_chan__comb:
field_chan__comb = new OML__ChannelCombination(*other_value.field_chan__comb);
break;
case ALT_event__type:
field_event__type = new OML__FOM__EventType(*other_value.field_event__type);
break;
case ALT_gsm__time:
field_gsm__time = new INTEGER(*other_value.field_gsm__time);
break;
case ALT_hsn:
field_hsn = new INTEGER(*other_value.field_hsn);
break;
case ALT_intave__param:
field_intave__param = new INTEGER(*other_value.field_intave__param);
break;
case ALT_interf__bound:
field_interf__bound = new OML__FOM__InterfLevBoundaries(*other_value.field_interf__bound);
break;
case ALT_maio:
field_maio = new INTEGER(*other_value.field_maio);
break;
case ALT_manuf__state:
field_manuf__state = new INTEGER(*other_value.field_manuf__state);
break;
case ALT_max__ta:
field_max__ta = new INTEGER(*other_value.field_max__ta);
break;
case ALT_nack__causes:
field_nack__causes = new OML__FOM__NackCause(*other_value.field_nack__causes);
break;
case ALT_ny1:
field_ny1 = new INTEGER(*other_value.field_ny1);
break;
case ALT_opstate:
field_opstate = new OML__FOM__OperationalState(*other_value.field_opstate);
break;
case ALT_power__class:
field_power__class = new INTEGER(*other_value.field_power__class);
break;
case ALT_power__thresh:
field_power__thresh = new OML__FOM__PowerOuthputThresholds(*other_value.field_power__thresh);
break;
case ALT_prob__cause:
field_prob__cause = new OML__FOM__ProbableCause(*other_value.field_prob__cause);
break;
case ALT_rach__b__thresh:
field_rach__b__thresh = new INTEGER(*other_value.field_rach__b__thresh);
break;
case ALT_loadavg__slots:
field_loadavg__slots = new INTEGER(*other_value.field_loadavg__slots);
break;
case ALT_radio__subch:
field_radio__subch = new INTEGER(*other_value.field_radio__subch);
break;
case ALT_rf__maxpwr__r:
field_rf__maxpwr__r = new INTEGER(*other_value.field_rf__maxpwr__r);
break;
case ALT_spec__prob:
field_spec__prob = new INTEGER(*other_value.field_spec__prob);
break;
case ALT_start__time:
field_start__time = new INTEGER(*other_value.field_start__time);
break;
case ALT_t200:
field_t200 = new OML__FOM__T200(*other_value.field_t200);
break;
case ALT_tei:
field_tei = new INTEGER(*other_value.field_tei);
break;
case ALT_test__no:
field_test__no = new INTEGER(*other_value.field_test__no);
break;
case ALT_vswr__thresh:
field_vswr__thresh = new OCTETSTRING(*other_value.field_vswr__thresh);
break;
case ALT_window__size:
field_window__size = new INTEGER(*other_value.field_window__size);
break;
case ALT_tsc:
field_tsc = new INTEGER(*other_value.field_tsc);
break;
case ALT_severity:
field_severity = new OML__FOM__Severity(*other_value.field_severity);
break;
case ALT_outst__alarm:
field_outst__alarm = new INTEGER(*other_value.field_outst__alarm);
break;
case ALT_meas__type:
field_meas__type = new INTEGER(*other_value.field_meas__type);
break;
case ALT_avail__status:
field_avail__status = new OML__IE__AvailStatus(*other_value.field_avail__status);
break;
case ALT_arfcn__list:
field_arfcn__list = new OML__IE__ArfcnList(*other_value.field_arfcn__list);
break;
case ALT_ip:
field_ip = new INTEGER(*other_value.field_ip);
break;
case ALT_portnr:
field_portnr = new INTEGER(*other_value.field_portnr);
break;
case ALT_stream__id:
field_stream__id = new INTEGER(*other_value.field_stream__id);
break;
case ALT_sec__oml__cfg:
field_sec__oml__cfg = new OCTETSTRING(*other_value.field_sec__oml__cfg);
break;
case ALT_ip__if__cfg:
field_ip__if__cfg = new OCTETSTRING(*other_value.field_ip__if__cfg);
break;
case ALT_ip__gw__cfg:
field_ip__gw__cfg = new OCTETSTRING(*other_value.field_ip__gw__cfg);
break;
case ALT_in__serv__time:
field_in__serv__time = new INTEGER(*other_value.field_in__serv__time);
break;
case ALT_paging__cfg:
field_paging__cfg = new INTEGER(*other_value.field_paging__cfg);
break;
case ALT_freq__ctrl:
field_freq__ctrl = new OCTETSTRING(*other_value.field_freq__ctrl);
break;
case ALT_ari:
field_ari = new OML__FOM__ARI(*other_value.field_ari);
break;
case ALT_other:
field_other = new OML__IE__L16V(*other_value.field_other);
break;
default:
TTCN_error("Assignment of an unbound union value of type @AbisOML_Types.OML_FOM_IE_Body.");
}
union_selection = other_value.union_selection;
}

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

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

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

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

boolean OML__FOM__IE__Body::operator==(const OML__FOM__IE__Body& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_abis__channel:
return *field_abis__channel == *other_value.field_abis__channel;
case ALT_adm__state:
return *field_adm__state == *other_value.field_adm__state;
case ALT_auton__report:
return *field_auton__report == *other_value.field_auton__report;
case ALT_bcch__arfcn:
return *field_bcch__arfcn == *other_value.field_bcch__arfcn;
case ALT_bsic:
return *field_bsic == *other_value.field_bsic;
case ALT_air__timer:
return *field_air__timer == *other_value.field_air__timer;
case ALT_load__ind__period:
return *field_load__ind__period == *other_value.field_load__ind__period;
case ALT_load__threshold:
return *field_load__threshold == *other_value.field_load__threshold;
case ALT_chan__comb:
return *field_chan__comb == *other_value.field_chan__comb;
case ALT_event__type:
return *field_event__type == *other_value.field_event__type;
case ALT_gsm__time:
return *field_gsm__time == *other_value.field_gsm__time;
case ALT_hsn:
return *field_hsn == *other_value.field_hsn;
case ALT_intave__param:
return *field_intave__param == *other_value.field_intave__param;
case ALT_interf__bound:
return *field_interf__bound == *other_value.field_interf__bound;
case ALT_maio:
return *field_maio == *other_value.field_maio;
case ALT_manuf__state:
return *field_manuf__state == *other_value.field_manuf__state;
case ALT_max__ta:
return *field_max__ta == *other_value.field_max__ta;
case ALT_nack__causes:
return *field_nack__causes == *other_value.field_nack__causes;
case ALT_ny1:
return *field_ny1 == *other_value.field_ny1;
case ALT_opstate:
return *field_opstate == *other_value.field_opstate;
case ALT_power__class:
return *field_power__class == *other_value.field_power__class;
case ALT_power__thresh:
return *field_power__thresh == *other_value.field_power__thresh;
case ALT_prob__cause:
return *field_prob__cause == *other_value.field_prob__cause;
case ALT_rach__b__thresh:
return *field_rach__b__thresh == *other_value.field_rach__b__thresh;
case ALT_loadavg__slots:
return *field_loadavg__slots == *other_value.field_loadavg__slots;
case ALT_radio__subch:
return *field_radio__subch == *other_value.field_radio__subch;
case ALT_rf__maxpwr__r:
return *field_rf__maxpwr__r == *other_value.field_rf__maxpwr__r;
case ALT_spec__prob:
return *field_spec__prob == *other_value.field_spec__prob;
case ALT_start__time:
return *field_start__time == *other_value.field_start__time;
case ALT_t200:
return *field_t200 == *other_value.field_t200;
case ALT_tei:
return *field_tei == *other_value.field_tei;
case ALT_test__no:
return *field_test__no == *other_value.field_test__no;
case ALT_vswr__thresh:
return *field_vswr__thresh == *other_value.field_vswr__thresh;
case ALT_window__size:
return *field_window__size == *other_value.field_window__size;
case ALT_tsc:
return *field_tsc == *other_value.field_tsc;
case ALT_severity:
return *field_severity == *other_value.field_severity;
case ALT_outst__alarm:
return *field_outst__alarm == *other_value.field_outst__alarm;
case ALT_meas__type:
return *field_meas__type == *other_value.field_meas__type;
case ALT_avail__status:
return *field_avail__status == *other_value.field_avail__status;
case ALT_arfcn__list:
return *field_arfcn__list == *other_value.field_arfcn__list;
case ALT_ip:
return *field_ip == *other_value.field_ip;
case ALT_portnr:
return *field_portnr == *other_value.field_portnr;
case ALT_stream__id:
return *field_stream__id == *other_value.field_stream__id;
case ALT_sec__oml__cfg:
return *field_sec__oml__cfg == *other_value.field_sec__oml__cfg;
case ALT_ip__if__cfg:
return *field_ip__if__cfg == *other_value.field_ip__if__cfg;
case ALT_ip__gw__cfg:
return *field_ip__gw__cfg == *other_value.field_ip__gw__cfg;
case ALT_in__serv__time:
return *field_in__serv__time == *other_value.field_in__serv__time;
case ALT_paging__cfg:
return *field_paging__cfg == *other_value.field_paging__cfg;
case ALT_freq__ctrl:
return *field_freq__ctrl == *other_value.field_freq__ctrl;
case ALT_ari:
return *field_ari == *other_value.field_ari;
case ALT_other:
return *field_other == *other_value.field_other;
default:
return FALSE;
}
}

OML__FOM__AbisChannel& OML__FOM__IE__Body::abis__channel()
{
if (union_selection != ALT_abis__channel) {
clean_up();
field_abis__channel = new OML__FOM__AbisChannel;
union_selection = ALT_abis__channel;
}
return *field_abis__channel;
}

const OML__FOM__AbisChannel& OML__FOM__IE__Body::abis__channel() const
{
if (union_selection != ALT_abis__channel) TTCN_error("Using non-selected field abis_channel in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_abis__channel;
}

OML__FOM__AdministrativeState& OML__FOM__IE__Body::adm__state()
{
if (union_selection != ALT_adm__state) {
clean_up();
field_adm__state = new OML__FOM__AdministrativeState;
union_selection = ALT_adm__state;
}
return *field_adm__state;
}

const OML__FOM__AdministrativeState& OML__FOM__IE__Body::adm__state() const
{
if (union_selection != ALT_adm__state) TTCN_error("Using non-selected field adm_state in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_adm__state;
}

OCTETSTRING& OML__FOM__IE__Body::auton__report()
{
if (union_selection != ALT_auton__report) {
clean_up();
field_auton__report = new OCTETSTRING;
union_selection = ALT_auton__report;
}
return *field_auton__report;
}

const OCTETSTRING& OML__FOM__IE__Body::auton__report() const
{
if (union_selection != ALT_auton__report) TTCN_error("Using non-selected field auton_report in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_auton__report;
}

INTEGER& OML__FOM__IE__Body::bcch__arfcn()
{
if (union_selection != ALT_bcch__arfcn) {
clean_up();
field_bcch__arfcn = new INTEGER;
union_selection = ALT_bcch__arfcn;
}
return *field_bcch__arfcn;
}

const INTEGER& OML__FOM__IE__Body::bcch__arfcn() const
{
if (union_selection != ALT_bcch__arfcn) TTCN_error("Using non-selected field bcch_arfcn in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_bcch__arfcn;
}

INTEGER& OML__FOM__IE__Body::bsic()
{
if (union_selection != ALT_bsic) {
clean_up();
field_bsic = new INTEGER;
union_selection = ALT_bsic;
}
return *field_bsic;
}

const INTEGER& OML__FOM__IE__Body::bsic() const
{
if (union_selection != ALT_bsic) TTCN_error("Using non-selected field bsic in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_bsic;
}

INTEGER& OML__FOM__IE__Body::air__timer()
{
if (union_selection != ALT_air__timer) {
clean_up();
field_air__timer = new INTEGER;
union_selection = ALT_air__timer;
}
return *field_air__timer;
}

const INTEGER& OML__FOM__IE__Body::air__timer() const
{
if (union_selection != ALT_air__timer) TTCN_error("Using non-selected field air_timer in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_air__timer;
}

INTEGER& OML__FOM__IE__Body::load__ind__period()
{
if (union_selection != ALT_load__ind__period) {
clean_up();
field_load__ind__period = new INTEGER;
union_selection = ALT_load__ind__period;
}
return *field_load__ind__period;
}

const INTEGER& OML__FOM__IE__Body::load__ind__period() const
{
if (union_selection != ALT_load__ind__period) TTCN_error("Using non-selected field load_ind_period in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_load__ind__period;
}

INTEGER& OML__FOM__IE__Body::load__threshold()
{
if (union_selection != ALT_load__threshold) {
clean_up();
field_load__threshold = new INTEGER;
union_selection = ALT_load__threshold;
}
return *field_load__threshold;
}

const INTEGER& OML__FOM__IE__Body::load__threshold() const
{
if (union_selection != ALT_load__threshold) TTCN_error("Using non-selected field load_threshold in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_load__threshold;
}

OML__ChannelCombination& OML__FOM__IE__Body::chan__comb()
{
if (union_selection != ALT_chan__comb) {
clean_up();
field_chan__comb = new OML__ChannelCombination;
union_selection = ALT_chan__comb;
}
return *field_chan__comb;
}

const OML__ChannelCombination& OML__FOM__IE__Body::chan__comb() const
{
if (union_selection != ALT_chan__comb) TTCN_error("Using non-selected field chan_comb in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_chan__comb;
}

OML__FOM__EventType& OML__FOM__IE__Body::event__type()
{
if (union_selection != ALT_event__type) {
clean_up();
field_event__type = new OML__FOM__EventType;
union_selection = ALT_event__type;
}
return *field_event__type;
}

const OML__FOM__EventType& OML__FOM__IE__Body::event__type() const
{
if (union_selection != ALT_event__type) TTCN_error("Using non-selected field event_type in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_event__type;
}

INTEGER& OML__FOM__IE__Body::gsm__time()
{
if (union_selection != ALT_gsm__time) {
clean_up();
field_gsm__time = new INTEGER;
union_selection = ALT_gsm__time;
}
return *field_gsm__time;
}

const INTEGER& OML__FOM__IE__Body::gsm__time() const
{
if (union_selection != ALT_gsm__time) TTCN_error("Using non-selected field gsm_time in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_gsm__time;
}

INTEGER& OML__FOM__IE__Body::hsn()
{
if (union_selection != ALT_hsn) {
clean_up();
field_hsn = new INTEGER;
union_selection = ALT_hsn;
}
return *field_hsn;
}

const INTEGER& OML__FOM__IE__Body::hsn() const
{
if (union_selection != ALT_hsn) TTCN_error("Using non-selected field hsn in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_hsn;
}

INTEGER& OML__FOM__IE__Body::intave__param()
{
if (union_selection != ALT_intave__param) {
clean_up();
field_intave__param = new INTEGER;
union_selection = ALT_intave__param;
}
return *field_intave__param;
}

const INTEGER& OML__FOM__IE__Body::intave__param() const
{
if (union_selection != ALT_intave__param) TTCN_error("Using non-selected field intave_param in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_intave__param;
}

OML__FOM__InterfLevBoundaries& OML__FOM__IE__Body::interf__bound()
{
if (union_selection != ALT_interf__bound) {
clean_up();
field_interf__bound = new OML__FOM__InterfLevBoundaries;
union_selection = ALT_interf__bound;
}
return *field_interf__bound;
}

const OML__FOM__InterfLevBoundaries& OML__FOM__IE__Body::interf__bound() const
{
if (union_selection != ALT_interf__bound) TTCN_error("Using non-selected field interf_bound in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_interf__bound;
}

INTEGER& OML__FOM__IE__Body::maio()
{
if (union_selection != ALT_maio) {
clean_up();
field_maio = new INTEGER;
union_selection = ALT_maio;
}
return *field_maio;
}

const INTEGER& OML__FOM__IE__Body::maio() const
{
if (union_selection != ALT_maio) TTCN_error("Using non-selected field maio in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_maio;
}

INTEGER& OML__FOM__IE__Body::manuf__state()
{
if (union_selection != ALT_manuf__state) {
clean_up();
field_manuf__state = new INTEGER;
union_selection = ALT_manuf__state;
}
return *field_manuf__state;
}

const INTEGER& OML__FOM__IE__Body::manuf__state() const
{
if (union_selection != ALT_manuf__state) TTCN_error("Using non-selected field manuf_state in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_manuf__state;
}

INTEGER& OML__FOM__IE__Body::max__ta()
{
if (union_selection != ALT_max__ta) {
clean_up();
field_max__ta = new INTEGER;
union_selection = ALT_max__ta;
}
return *field_max__ta;
}

const INTEGER& OML__FOM__IE__Body::max__ta() const
{
if (union_selection != ALT_max__ta) TTCN_error("Using non-selected field max_ta in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_max__ta;
}

OML__FOM__NackCause& OML__FOM__IE__Body::nack__causes()
{
if (union_selection != ALT_nack__causes) {
clean_up();
field_nack__causes = new OML__FOM__NackCause;
union_selection = ALT_nack__causes;
}
return *field_nack__causes;
}

const OML__FOM__NackCause& OML__FOM__IE__Body::nack__causes() const
{
if (union_selection != ALT_nack__causes) TTCN_error("Using non-selected field nack_causes in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_nack__causes;
}

INTEGER& OML__FOM__IE__Body::ny1()
{
if (union_selection != ALT_ny1) {
clean_up();
field_ny1 = new INTEGER;
union_selection = ALT_ny1;
}
return *field_ny1;
}

const INTEGER& OML__FOM__IE__Body::ny1() const
{
if (union_selection != ALT_ny1) TTCN_error("Using non-selected field ny1 in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_ny1;
}

OML__FOM__OperationalState& OML__FOM__IE__Body::opstate()
{
if (union_selection != ALT_opstate) {
clean_up();
field_opstate = new OML__FOM__OperationalState;
union_selection = ALT_opstate;
}
return *field_opstate;
}

const OML__FOM__OperationalState& OML__FOM__IE__Body::opstate() const
{
if (union_selection != ALT_opstate) TTCN_error("Using non-selected field opstate in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_opstate;
}

INTEGER& OML__FOM__IE__Body::power__class()
{
if (union_selection != ALT_power__class) {
clean_up();
field_power__class = new INTEGER;
union_selection = ALT_power__class;
}
return *field_power__class;
}

const INTEGER& OML__FOM__IE__Body::power__class() const
{
if (union_selection != ALT_power__class) TTCN_error("Using non-selected field power_class in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_power__class;
}

OML__FOM__PowerOuthputThresholds& OML__FOM__IE__Body::power__thresh()
{
if (union_selection != ALT_power__thresh) {
clean_up();
field_power__thresh = new OML__FOM__PowerOuthputThresholds;
union_selection = ALT_power__thresh;
}
return *field_power__thresh;
}

const OML__FOM__PowerOuthputThresholds& OML__FOM__IE__Body::power__thresh() const
{
if (union_selection != ALT_power__thresh) TTCN_error("Using non-selected field power_thresh in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_power__thresh;
}

OML__FOM__ProbableCause& OML__FOM__IE__Body::prob__cause()
{
if (union_selection != ALT_prob__cause) {
clean_up();
field_prob__cause = new OML__FOM__ProbableCause;
union_selection = ALT_prob__cause;
}
return *field_prob__cause;
}

const OML__FOM__ProbableCause& OML__FOM__IE__Body::prob__cause() const
{
if (union_selection != ALT_prob__cause) TTCN_error("Using non-selected field prob_cause in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_prob__cause;
}

INTEGER& OML__FOM__IE__Body::rach__b__thresh()
{
if (union_selection != ALT_rach__b__thresh) {
clean_up();
field_rach__b__thresh = new INTEGER;
union_selection = ALT_rach__b__thresh;
}
return *field_rach__b__thresh;
}

const INTEGER& OML__FOM__IE__Body::rach__b__thresh() const
{
if (union_selection != ALT_rach__b__thresh) TTCN_error("Using non-selected field rach_b_thresh in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_rach__b__thresh;
}

INTEGER& OML__FOM__IE__Body::loadavg__slots()
{
if (union_selection != ALT_loadavg__slots) {
clean_up();
field_loadavg__slots = new INTEGER;
union_selection = ALT_loadavg__slots;
}
return *field_loadavg__slots;
}

const INTEGER& OML__FOM__IE__Body::loadavg__slots() const
{
if (union_selection != ALT_loadavg__slots) TTCN_error("Using non-selected field loadavg_slots in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_loadavg__slots;
}

INTEGER& OML__FOM__IE__Body::radio__subch()
{
if (union_selection != ALT_radio__subch) {
clean_up();
field_radio__subch = new INTEGER;
union_selection = ALT_radio__subch;
}
return *field_radio__subch;
}

const INTEGER& OML__FOM__IE__Body::radio__subch() const
{
if (union_selection != ALT_radio__subch) TTCN_error("Using non-selected field radio_subch in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_radio__subch;
}

INTEGER& OML__FOM__IE__Body::rf__maxpwr__r()
{
if (union_selection != ALT_rf__maxpwr__r) {
clean_up();
field_rf__maxpwr__r = new INTEGER;
union_selection = ALT_rf__maxpwr__r;
}
return *field_rf__maxpwr__r;
}

const INTEGER& OML__FOM__IE__Body::rf__maxpwr__r() const
{
if (union_selection != ALT_rf__maxpwr__r) TTCN_error("Using non-selected field rf_maxpwr_r in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_rf__maxpwr__r;
}

INTEGER& OML__FOM__IE__Body::spec__prob()
{
if (union_selection != ALT_spec__prob) {
clean_up();
field_spec__prob = new INTEGER;
union_selection = ALT_spec__prob;
}
return *field_spec__prob;
}

const INTEGER& OML__FOM__IE__Body::spec__prob() const
{
if (union_selection != ALT_spec__prob) TTCN_error("Using non-selected field spec_prob in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_spec__prob;
}

INTEGER& OML__FOM__IE__Body::start__time()
{
if (union_selection != ALT_start__time) {
clean_up();
field_start__time = new INTEGER;
union_selection = ALT_start__time;
}
return *field_start__time;
}

const INTEGER& OML__FOM__IE__Body::start__time() const
{
if (union_selection != ALT_start__time) TTCN_error("Using non-selected field start_time in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_start__time;
}

OML__FOM__T200& OML__FOM__IE__Body::t200()
{
if (union_selection != ALT_t200) {
clean_up();
field_t200 = new OML__FOM__T200;
union_selection = ALT_t200;
}
return *field_t200;
}

const OML__FOM__T200& OML__FOM__IE__Body::t200() const
{
if (union_selection != ALT_t200) TTCN_error("Using non-selected field t200 in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_t200;
}

INTEGER& OML__FOM__IE__Body::tei()
{
if (union_selection != ALT_tei) {
clean_up();
field_tei = new INTEGER;
union_selection = ALT_tei;
}
return *field_tei;
}

const INTEGER& OML__FOM__IE__Body::tei() const
{
if (union_selection != ALT_tei) TTCN_error("Using non-selected field tei in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_tei;
}

INTEGER& OML__FOM__IE__Body::test__no()
{
if (union_selection != ALT_test__no) {
clean_up();
field_test__no = new INTEGER;
union_selection = ALT_test__no;
}
return *field_test__no;
}

const INTEGER& OML__FOM__IE__Body::test__no() const
{
if (union_selection != ALT_test__no) TTCN_error("Using non-selected field test_no in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_test__no;
}

OCTETSTRING& OML__FOM__IE__Body::vswr__thresh()
{
if (union_selection != ALT_vswr__thresh) {
clean_up();
field_vswr__thresh = new OCTETSTRING;
union_selection = ALT_vswr__thresh;
}
return *field_vswr__thresh;
}

const OCTETSTRING& OML__FOM__IE__Body::vswr__thresh() const
{
if (union_selection != ALT_vswr__thresh) TTCN_error("Using non-selected field vswr_thresh in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_vswr__thresh;
}

INTEGER& OML__FOM__IE__Body::window__size()
{
if (union_selection != ALT_window__size) {
clean_up();
field_window__size = new INTEGER;
union_selection = ALT_window__size;
}
return *field_window__size;
}

const INTEGER& OML__FOM__IE__Body::window__size() const
{
if (union_selection != ALT_window__size) TTCN_error("Using non-selected field window_size in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_window__size;
}

INTEGER& OML__FOM__IE__Body::tsc()
{
if (union_selection != ALT_tsc) {
clean_up();
field_tsc = new INTEGER;
union_selection = ALT_tsc;
}
return *field_tsc;
}

const INTEGER& OML__FOM__IE__Body::tsc() const
{
if (union_selection != ALT_tsc) TTCN_error("Using non-selected field tsc in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_tsc;
}

OML__FOM__Severity& OML__FOM__IE__Body::severity()
{
if (union_selection != ALT_severity) {
clean_up();
field_severity = new OML__FOM__Severity;
union_selection = ALT_severity;
}
return *field_severity;
}

const OML__FOM__Severity& OML__FOM__IE__Body::severity() const
{
if (union_selection != ALT_severity) TTCN_error("Using non-selected field severity in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_severity;
}

INTEGER& OML__FOM__IE__Body::outst__alarm()
{
if (union_selection != ALT_outst__alarm) {
clean_up();
field_outst__alarm = new INTEGER;
union_selection = ALT_outst__alarm;
}
return *field_outst__alarm;
}

const INTEGER& OML__FOM__IE__Body::outst__alarm() const
{
if (union_selection != ALT_outst__alarm) TTCN_error("Using non-selected field outst_alarm in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_outst__alarm;
}

INTEGER& OML__FOM__IE__Body::meas__type()
{
if (union_selection != ALT_meas__type) {
clean_up();
field_meas__type = new INTEGER;
union_selection = ALT_meas__type;
}
return *field_meas__type;
}

const INTEGER& OML__FOM__IE__Body::meas__type() const
{
if (union_selection != ALT_meas__type) TTCN_error("Using non-selected field meas_type in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_meas__type;
}

OML__IE__AvailStatus& OML__FOM__IE__Body::avail__status()
{
if (union_selection != ALT_avail__status) {
clean_up();
field_avail__status = new OML__IE__AvailStatus;
union_selection = ALT_avail__status;
}
return *field_avail__status;
}

const OML__IE__AvailStatus& OML__FOM__IE__Body::avail__status() const
{
if (union_selection != ALT_avail__status) TTCN_error("Using non-selected field avail_status in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_avail__status;
}

OML__IE__ArfcnList& OML__FOM__IE__Body::arfcn__list()
{
if (union_selection != ALT_arfcn__list) {
clean_up();
field_arfcn__list = new OML__IE__ArfcnList;
union_selection = ALT_arfcn__list;
}
return *field_arfcn__list;
}

const OML__IE__ArfcnList& OML__FOM__IE__Body::arfcn__list() const
{
if (union_selection != ALT_arfcn__list) TTCN_error("Using non-selected field arfcn_list in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_arfcn__list;
}

INTEGER& OML__FOM__IE__Body::ip()
{
if (union_selection != ALT_ip) {
clean_up();
field_ip = new INTEGER;
union_selection = ALT_ip;
}
return *field_ip;
}

const INTEGER& OML__FOM__IE__Body::ip() const
{
if (union_selection != ALT_ip) TTCN_error("Using non-selected field ip in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_ip;
}

INTEGER& OML__FOM__IE__Body::portnr()
{
if (union_selection != ALT_portnr) {
clean_up();
field_portnr = new INTEGER;
union_selection = ALT_portnr;
}
return *field_portnr;
}

const INTEGER& OML__FOM__IE__Body::portnr() const
{
if (union_selection != ALT_portnr) TTCN_error("Using non-selected field portnr in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_portnr;
}

INTEGER& OML__FOM__IE__Body::stream__id()
{
if (union_selection != ALT_stream__id) {
clean_up();
field_stream__id = new INTEGER;
union_selection = ALT_stream__id;
}
return *field_stream__id;
}

const INTEGER& OML__FOM__IE__Body::stream__id() const
{
if (union_selection != ALT_stream__id) TTCN_error("Using non-selected field stream_id in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_stream__id;
}

OCTETSTRING& OML__FOM__IE__Body::sec__oml__cfg()
{
if (union_selection != ALT_sec__oml__cfg) {
clean_up();
field_sec__oml__cfg = new OCTETSTRING;
union_selection = ALT_sec__oml__cfg;
}
return *field_sec__oml__cfg;
}

const OCTETSTRING& OML__FOM__IE__Body::sec__oml__cfg() const
{
if (union_selection != ALT_sec__oml__cfg) TTCN_error("Using non-selected field sec_oml_cfg in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_sec__oml__cfg;
}

OCTETSTRING& OML__FOM__IE__Body::ip__if__cfg()
{
if (union_selection != ALT_ip__if__cfg) {
clean_up();
field_ip__if__cfg = new OCTETSTRING;
union_selection = ALT_ip__if__cfg;
}
return *field_ip__if__cfg;
}

const OCTETSTRING& OML__FOM__IE__Body::ip__if__cfg() const
{
if (union_selection != ALT_ip__if__cfg) TTCN_error("Using non-selected field ip_if_cfg in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_ip__if__cfg;
}

OCTETSTRING& OML__FOM__IE__Body::ip__gw__cfg()
{
if (union_selection != ALT_ip__gw__cfg) {
clean_up();
field_ip__gw__cfg = new OCTETSTRING;
union_selection = ALT_ip__gw__cfg;
}
return *field_ip__gw__cfg;
}

const OCTETSTRING& OML__FOM__IE__Body::ip__gw__cfg() const
{
if (union_selection != ALT_ip__gw__cfg) TTCN_error("Using non-selected field ip_gw_cfg in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_ip__gw__cfg;
}

INTEGER& OML__FOM__IE__Body::in__serv__time()
{
if (union_selection != ALT_in__serv__time) {
clean_up();
field_in__serv__time = new INTEGER;
union_selection = ALT_in__serv__time;
}
return *field_in__serv__time;
}

const INTEGER& OML__FOM__IE__Body::in__serv__time() const
{
if (union_selection != ALT_in__serv__time) TTCN_error("Using non-selected field in_serv_time in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_in__serv__time;
}

INTEGER& OML__FOM__IE__Body::paging__cfg()
{
if (union_selection != ALT_paging__cfg) {
clean_up();
field_paging__cfg = new INTEGER;
union_selection = ALT_paging__cfg;
}
return *field_paging__cfg;
}

const INTEGER& OML__FOM__IE__Body::paging__cfg() const
{
if (union_selection != ALT_paging__cfg) TTCN_error("Using non-selected field paging_cfg in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_paging__cfg;
}

OCTETSTRING& OML__FOM__IE__Body::freq__ctrl()
{
if (union_selection != ALT_freq__ctrl) {
clean_up();
field_freq__ctrl = new OCTETSTRING;
union_selection = ALT_freq__ctrl;
}
return *field_freq__ctrl;
}

const OCTETSTRING& OML__FOM__IE__Body::freq__ctrl() const
{
if (union_selection != ALT_freq__ctrl) TTCN_error("Using non-selected field freq_ctrl in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_freq__ctrl;
}

OML__FOM__ARI& OML__FOM__IE__Body::ari()
{
if (union_selection != ALT_ari) {
clean_up();
field_ari = new OML__FOM__ARI;
union_selection = ALT_ari;
}
return *field_ari;
}

const OML__FOM__ARI& OML__FOM__IE__Body::ari() const
{
if (union_selection != ALT_ari) TTCN_error("Using non-selected field ari in a value of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *field_ari;
}

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

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

boolean OML__FOM__IE__Body::ischosen(union_selection_type checked_selection) const
{
if (checked_selection == UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @AbisOML_Types.OML_FOM_IE_Body.");
return union_selection == checked_selection;
}

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

boolean OML__FOM__IE__Body::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_abis__channel: return field_abis__channel->is_value();
case ALT_adm__state: return field_adm__state->is_value();
case ALT_auton__report: return field_auton__report->is_value();
case ALT_bcch__arfcn: return field_bcch__arfcn->is_value();
case ALT_bsic: return field_bsic->is_value();
case ALT_air__timer: return field_air__timer->is_value();
case ALT_load__ind__period: return field_load__ind__period->is_value();
case ALT_load__threshold: return field_load__threshold->is_value();
case ALT_chan__comb: return field_chan__comb->is_value();
case ALT_event__type: return field_event__type->is_value();
case ALT_gsm__time: return field_gsm__time->is_value();
case ALT_hsn: return field_hsn->is_value();
case ALT_intave__param: return field_intave__param->is_value();
case ALT_interf__bound: return field_interf__bound->is_value();
case ALT_maio: return field_maio->is_value();
case ALT_manuf__state: return field_manuf__state->is_value();
case ALT_max__ta: return field_max__ta->is_value();
case ALT_nack__causes: return field_nack__causes->is_value();
case ALT_ny1: return field_ny1->is_value();
case ALT_opstate: return field_opstate->is_value();
case ALT_power__class: return field_power__class->is_value();
case ALT_power__thresh: return field_power__thresh->is_value();
case ALT_prob__cause: return field_prob__cause->is_value();
case ALT_rach__b__thresh: return field_rach__b__thresh->is_value();
case ALT_loadavg__slots: return field_loadavg__slots->is_value();
case ALT_radio__subch: return field_radio__subch->is_value();
case ALT_rf__maxpwr__r: return field_rf__maxpwr__r->is_value();
case ALT_spec__prob: return field_spec__prob->is_value();
case ALT_start__time: return field_start__time->is_value();
case ALT_t200: return field_t200->is_value();
case ALT_tei: return field_tei->is_value();
case ALT_test__no: return field_test__no->is_value();
case ALT_vswr__thresh: return field_vswr__thresh->is_value();
case ALT_window__size: return field_window__size->is_value();
case ALT_tsc: return field_tsc->is_value();
case ALT_severity: return field_severity->is_value();
case ALT_outst__alarm: return field_outst__alarm->is_value();
case ALT_meas__type: return field_meas__type->is_value();
case ALT_avail__status: return field_avail__status->is_value();
case ALT_arfcn__list: return field_arfcn__list->is_value();
case ALT_ip: return field_ip->is_value();
case ALT_portnr: return field_portnr->is_value();
case ALT_stream__id: return field_stream__id->is_value();
case ALT_sec__oml__cfg: return field_sec__oml__cfg->is_value();
case ALT_ip__if__cfg: return field_ip__if__cfg->is_value();
case ALT_ip__gw__cfg: return field_ip__gw__cfg->is_value();
case ALT_in__serv__time: return field_in__serv__time->is_value();
case ALT_paging__cfg: return field_paging__cfg->is_value();
case ALT_freq__ctrl: return field_freq__ctrl->is_value();
case ALT_ari: return field_ari->is_value();
case ALT_other: return field_other->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void OML__FOM__IE__Body::clean_up()
{
switch (union_selection) {
case ALT_abis__channel:
  delete field_abis__channel;
  break;
case ALT_adm__state:
  delete field_adm__state;
  break;
case ALT_auton__report:
  delete field_auton__report;
  break;
case ALT_bcch__arfcn:
  delete field_bcch__arfcn;
  break;
case ALT_bsic:
  delete field_bsic;
  break;
case ALT_air__timer:
  delete field_air__timer;
  break;
case ALT_load__ind__period:
  delete field_load__ind__period;
  break;
case ALT_load__threshold:
  delete field_load__threshold;
  break;
case ALT_chan__comb:
  delete field_chan__comb;
  break;
case ALT_event__type:
  delete field_event__type;
  break;
case ALT_gsm__time:
  delete field_gsm__time;
  break;
case ALT_hsn:
  delete field_hsn;
  break;
case ALT_intave__param:
  delete field_intave__param;
  break;
case ALT_interf__bound:
  delete field_interf__bound;
  break;
case ALT_maio:
  delete field_maio;
  break;
case ALT_manuf__state:
  delete field_manuf__state;
  break;
case ALT_max__ta:
  delete field_max__ta;
  break;
case ALT_nack__causes:
  delete field_nack__causes;
  break;
case ALT_ny1:
  delete field_ny1;
  break;
case ALT_opstate:
  delete field_opstate;
  break;
case ALT_power__class:
  delete field_power__class;
  break;
case ALT_power__thresh:
  delete field_power__thresh;
  break;
case ALT_prob__cause:
  delete field_prob__cause;
  break;
case ALT_rach__b__thresh:
  delete field_rach__b__thresh;
  break;
case ALT_loadavg__slots:
  delete field_loadavg__slots;
  break;
case ALT_radio__subch:
  delete field_radio__subch;
  break;
case ALT_rf__maxpwr__r:
  delete field_rf__maxpwr__r;
  break;
case ALT_spec__prob:
  delete field_spec__prob;
  break;
case ALT_start__time:
  delete field_start__time;
  break;
case ALT_t200:
  delete field_t200;
  break;
case ALT_tei:
  delete field_tei;
  break;
case ALT_test__no:
  delete field_test__no;
  break;
case ALT_vswr__thresh:
  delete field_vswr__thresh;
  break;
case ALT_window__size:
  delete field_window__size;
  break;
case ALT_tsc:
  delete field_tsc;
  break;
case ALT_severity:
  delete field_severity;
  break;
case ALT_outst__alarm:
  delete field_outst__alarm;
  break;
case ALT_meas__type:
  delete field_meas__type;
  break;
case ALT_avail__status:
  delete field_avail__status;
  break;
case ALT_arfcn__list:
  delete field_arfcn__list;
  break;
case ALT_ip:
  delete field_ip;
  break;
case ALT_portnr:
  delete field_portnr;
  break;
case ALT_stream__id:
  delete field_stream__id;
  break;
case ALT_sec__oml__cfg:
  delete field_sec__oml__cfg;
  break;
case ALT_ip__if__cfg:
  delete field_ip__if__cfg;
  break;
case ALT_ip__gw__cfg:
  delete field_ip__gw__cfg;
  break;
case ALT_in__serv__time:
  delete field_in__serv__time;
  break;
case ALT_paging__cfg:
  delete field_paging__cfg;
  break;
case ALT_freq__ctrl:
  delete field_freq__ctrl;
  break;
case ALT_ari:
  delete field_ari;
  break;
case ALT_other:
  delete field_other;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void OML__FOM__IE__Body::log() const
{
switch (union_selection) {
case ALT_abis__channel:
TTCN_Logger::log_event_str("{ abis_channel := ");
field_abis__channel->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_adm__state:
TTCN_Logger::log_event_str("{ adm_state := ");
field_adm__state->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_auton__report:
TTCN_Logger::log_event_str("{ auton_report := ");
field_auton__report->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_bcch__arfcn:
TTCN_Logger::log_event_str("{ bcch_arfcn := ");
field_bcch__arfcn->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_bsic:
TTCN_Logger::log_event_str("{ bsic := ");
field_bsic->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_air__timer:
TTCN_Logger::log_event_str("{ air_timer := ");
field_air__timer->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_load__ind__period:
TTCN_Logger::log_event_str("{ load_ind_period := ");
field_load__ind__period->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_load__threshold:
TTCN_Logger::log_event_str("{ load_threshold := ");
field_load__threshold->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_chan__comb:
TTCN_Logger::log_event_str("{ chan_comb := ");
field_chan__comb->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_event__type:
TTCN_Logger::log_event_str("{ event_type := ");
field_event__type->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_gsm__time:
TTCN_Logger::log_event_str("{ gsm_time := ");
field_gsm__time->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_hsn:
TTCN_Logger::log_event_str("{ hsn := ");
field_hsn->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_intave__param:
TTCN_Logger::log_event_str("{ intave_param := ");
field_intave__param->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_interf__bound:
TTCN_Logger::log_event_str("{ interf_bound := ");
field_interf__bound->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_maio:
TTCN_Logger::log_event_str("{ maio := ");
field_maio->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_manuf__state:
TTCN_Logger::log_event_str("{ manuf_state := ");
field_manuf__state->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_max__ta:
TTCN_Logger::log_event_str("{ max_ta := ");
field_max__ta->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_nack__causes:
TTCN_Logger::log_event_str("{ nack_causes := ");
field_nack__causes->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_ny1:
TTCN_Logger::log_event_str("{ ny1 := ");
field_ny1->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_opstate:
TTCN_Logger::log_event_str("{ opstate := ");
field_opstate->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_power__class:
TTCN_Logger::log_event_str("{ power_class := ");
field_power__class->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_power__thresh:
TTCN_Logger::log_event_str("{ power_thresh := ");
field_power__thresh->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_prob__cause:
TTCN_Logger::log_event_str("{ prob_cause := ");
field_prob__cause->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_rach__b__thresh:
TTCN_Logger::log_event_str("{ rach_b_thresh := ");
field_rach__b__thresh->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_loadavg__slots:
TTCN_Logger::log_event_str("{ loadavg_slots := ");
field_loadavg__slots->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_radio__subch:
TTCN_Logger::log_event_str("{ radio_subch := ");
field_radio__subch->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_rf__maxpwr__r:
TTCN_Logger::log_event_str("{ rf_maxpwr_r := ");
field_rf__maxpwr__r->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_spec__prob:
TTCN_Logger::log_event_str("{ spec_prob := ");
field_spec__prob->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_start__time:
TTCN_Logger::log_event_str("{ start_time := ");
field_start__time->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_t200:
TTCN_Logger::log_event_str("{ t200 := ");
field_t200->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_tei:
TTCN_Logger::log_event_str("{ tei := ");
field_tei->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_test__no:
TTCN_Logger::log_event_str("{ test_no := ");
field_test__no->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_vswr__thresh:
TTCN_Logger::log_event_str("{ vswr_thresh := ");
field_vswr__thresh->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_window__size:
TTCN_Logger::log_event_str("{ window_size := ");
field_window__size->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_tsc:
TTCN_Logger::log_event_str("{ tsc := ");
field_tsc->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_severity:
TTCN_Logger::log_event_str("{ severity := ");
field_severity->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_outst__alarm:
TTCN_Logger::log_event_str("{ outst_alarm := ");
field_outst__alarm->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_meas__type:
TTCN_Logger::log_event_str("{ meas_type := ");
field_meas__type->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_avail__status:
TTCN_Logger::log_event_str("{ avail_status := ");
field_avail__status->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_arfcn__list:
TTCN_Logger::log_event_str("{ arfcn_list := ");
field_arfcn__list->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_ip:
TTCN_Logger::log_event_str("{ ip := ");
field_ip->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_portnr:
TTCN_Logger::log_event_str("{ portnr := ");
field_portnr->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_stream__id:
TTCN_Logger::log_event_str("{ stream_id := ");
field_stream__id->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_sec__oml__cfg:
TTCN_Logger::log_event_str("{ sec_oml_cfg := ");
field_sec__oml__cfg->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_ip__if__cfg:
TTCN_Logger::log_event_str("{ ip_if_cfg := ");
field_ip__if__cfg->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_ip__gw__cfg:
TTCN_Logger::log_event_str("{ ip_gw_cfg := ");
field_ip__gw__cfg->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_in__serv__time:
TTCN_Logger::log_event_str("{ in_serv_time := ");
field_in__serv__time->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_paging__cfg:
TTCN_Logger::log_event_str("{ paging_cfg := ");
field_paging__cfg->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_freq__ctrl:
TTCN_Logger::log_event_str("{ freq_ctrl := ");
field_freq__ctrl->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_ari:
TTCN_Logger::log_event_str("{ ari := ");
field_ari->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_other:
TTCN_Logger::log_event_str("{ other := ");
field_other->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

void OML__FOM__IE__Body::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "union value");
  Module_Param_Ptr m_p = &param;
  if (m_p->get_type()==Module_Param::MP_Value_List && m_p->get_size()==0) return;
  if (m_p->get_type()!=Module_Param::MP_Assignment_List) {
    param.error("union value with field name was expected");
  }
  Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1);
  char* last_name = mp_last->get_id()->get_name();
  if (!strcmp(last_name, "abis_channel")) {
    abis__channel().set_param(*mp_last);
    if (!abis__channel().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "adm_state")) {
    adm__state().set_param(*mp_last);
    if (!adm__state().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "auton_report")) {
    auton__report().set_param(*mp_last);
    if (!auton__report().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "bcch_arfcn")) {
    bcch__arfcn().set_param(*mp_last);
    if (!bcch__arfcn().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "bsic")) {
    bsic().set_param(*mp_last);
    if (!bsic().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "air_timer")) {
    air__timer().set_param(*mp_last);
    if (!air__timer().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "load_ind_period")) {
    load__ind__period().set_param(*mp_last);
    if (!load__ind__period().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "load_threshold")) {
    load__threshold().set_param(*mp_last);
    if (!load__threshold().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "chan_comb")) {
    chan__comb().set_param(*mp_last);
    if (!chan__comb().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "event_type")) {
    event__type().set_param(*mp_last);
    if (!event__type().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "gsm_time")) {
    gsm__time().set_param(*mp_last);
    if (!gsm__time().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "hsn")) {
    hsn().set_param(*mp_last);
    if (!hsn().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "intave_param")) {
    intave__param().set_param(*mp_last);
    if (!intave__param().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "interf_bound")) {
    interf__bound().set_param(*mp_last);
    if (!interf__bound().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "maio")) {
    maio().set_param(*mp_last);
    if (!maio().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "manuf_state")) {
    manuf__state().set_param(*mp_last);
    if (!manuf__state().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "max_ta")) {
    max__ta().set_param(*mp_last);
    if (!max__ta().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "nack_causes")) {
    nack__causes().set_param(*mp_last);
    if (!nack__causes().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "ny1")) {
    ny1().set_param(*mp_last);
    if (!ny1().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "opstate")) {
    opstate().set_param(*mp_last);
    if (!opstate().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "power_class")) {
    power__class().set_param(*mp_last);
    if (!power__class().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "power_thresh")) {
    power__thresh().set_param(*mp_last);
    if (!power__thresh().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "prob_cause")) {
    prob__cause().set_param(*mp_last);
    if (!prob__cause().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "rach_b_thresh")) {
    rach__b__thresh().set_param(*mp_last);
    if (!rach__b__thresh().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "loadavg_slots")) {
    loadavg__slots().set_param(*mp_last);
    if (!loadavg__slots().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "radio_subch")) {
    radio__subch().set_param(*mp_last);
    if (!radio__subch().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "rf_maxpwr_r")) {
    rf__maxpwr__r().set_param(*mp_last);
    if (!rf__maxpwr__r().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "spec_prob")) {
    spec__prob().set_param(*mp_last);
    if (!spec__prob().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "start_time")) {
    start__time().set_param(*mp_last);
    if (!start__time().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "t200")) {
    t200().set_param(*mp_last);
    if (!t200().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "tei")) {
    tei().set_param(*mp_last);
    if (!tei().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "test_no")) {
    test__no().set_param(*mp_last);
    if (!test__no().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "vswr_thresh")) {
    vswr__thresh().set_param(*mp_last);
    if (!vswr__thresh().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "window_size")) {
    window__size().set_param(*mp_last);
    if (!window__size().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "tsc")) {
    tsc().set_param(*mp_last);
    if (!tsc().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "severity")) {
    severity().set_param(*mp_last);
    if (!severity().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "outst_alarm")) {
    outst__alarm().set_param(*mp_last);
    if (!outst__alarm().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "meas_type")) {
    meas__type().set_param(*mp_last);
    if (!meas__type().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "avail_status")) {
    avail__status().set_param(*mp_last);
    if (!avail__status().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "arfcn_list")) {
    arfcn__list().set_param(*mp_last);
    if (!arfcn__list().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "ip")) {
    ip().set_param(*mp_last);
    if (!ip().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "portnr")) {
    portnr().set_param(*mp_last);
    if (!portnr().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "stream_id")) {
    stream__id().set_param(*mp_last);
    if (!stream__id().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "sec_oml_cfg")) {
    sec__oml__cfg().set_param(*mp_last);
    if (!sec__oml__cfg().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "ip_if_cfg")) {
    ip__if__cfg().set_param(*mp_last);
    if (!ip__if__cfg().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "ip_gw_cfg")) {
    ip__gw__cfg().set_param(*mp_last);
    if (!ip__gw__cfg().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "in_serv_time")) {
    in__serv__time().set_param(*mp_last);
    if (!in__serv__time().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "paging_cfg")) {
    paging__cfg().set_param(*mp_last);
    if (!paging__cfg().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "freq_ctrl")) {
    freq__ctrl().set_param(*mp_last);
    if (!freq__ctrl().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "ari")) {
    ari().set_param(*mp_last);
    if (!ari().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "other")) {
    other().set_param(*mp_last);
    if (!other().is_bound()) clean_up();
    return;
  }
  mp_last->error("Field %s does not exist in type @AbisOML_Types.OML_FOM_IE_Body.", last_name);
}

void OML__FOM__IE__Body::set_implicit_omit()
{
switch (union_selection) {
case ALT_abis__channel:
field_abis__channel->set_implicit_omit(); break;
case ALT_adm__state:
field_adm__state->set_implicit_omit(); break;
case ALT_auton__report:
field_auton__report->set_implicit_omit(); break;
case ALT_bcch__arfcn:
field_bcch__arfcn->set_implicit_omit(); break;
case ALT_bsic:
field_bsic->set_implicit_omit(); break;
case ALT_air__timer:
field_air__timer->set_implicit_omit(); break;
case ALT_load__ind__period:
field_load__ind__period->set_implicit_omit(); break;
case ALT_load__threshold:
field_load__threshold->set_implicit_omit(); break;
case ALT_chan__comb:
field_chan__comb->set_implicit_omit(); break;
case ALT_event__type:
field_event__type->set_implicit_omit(); break;
case ALT_gsm__time:
field_gsm__time->set_implicit_omit(); break;
case ALT_hsn:
field_hsn->set_implicit_omit(); break;
case ALT_intave__param:
field_intave__param->set_implicit_omit(); break;
case ALT_interf__bound:
field_interf__bound->set_implicit_omit(); break;
case ALT_maio:
field_maio->set_implicit_omit(); break;
case ALT_manuf__state:
field_manuf__state->set_implicit_omit(); break;
case ALT_max__ta:
field_max__ta->set_implicit_omit(); break;
case ALT_nack__causes:
field_nack__causes->set_implicit_omit(); break;
case ALT_ny1:
field_ny1->set_implicit_omit(); break;
case ALT_opstate:
field_opstate->set_implicit_omit(); break;
case ALT_power__class:
field_power__class->set_implicit_omit(); break;
case ALT_power__thresh:
field_power__thresh->set_implicit_omit(); break;
case ALT_prob__cause:
field_prob__cause->set_implicit_omit(); break;
case ALT_rach__b__thresh:
field_rach__b__thresh->set_implicit_omit(); break;
case ALT_loadavg__slots:
field_loadavg__slots->set_implicit_omit(); break;
case ALT_radio__subch:
field_radio__subch->set_implicit_omit(); break;
case ALT_rf__maxpwr__r:
field_rf__maxpwr__r->set_implicit_omit(); break;
case ALT_spec__prob:
field_spec__prob->set_implicit_omit(); break;
case ALT_start__time:
field_start__time->set_implicit_omit(); break;
case ALT_t200:
field_t200->set_implicit_omit(); break;
case ALT_tei:
field_tei->set_implicit_omit(); break;
case ALT_test__no:
field_test__no->set_implicit_omit(); break;
case ALT_vswr__thresh:
field_vswr__thresh->set_implicit_omit(); break;
case ALT_window__size:
field_window__size->set_implicit_omit(); break;
case ALT_tsc:
field_tsc->set_implicit_omit(); break;
case ALT_severity:
field_severity->set_implicit_omit(); break;
case ALT_outst__alarm:
field_outst__alarm->set_implicit_omit(); break;
case ALT_meas__type:
field_meas__type->set_implicit_omit(); break;
case ALT_avail__status:
field_avail__status->set_implicit_omit(); break;
case ALT_arfcn__list:
field_arfcn__list->set_implicit_omit(); break;
case ALT_ip:
field_ip->set_implicit_omit(); break;
case ALT_portnr:
field_portnr->set_implicit_omit(); break;
case ALT_stream__id:
field_stream__id->set_implicit_omit(); break;
case ALT_sec__oml__cfg:
field_sec__oml__cfg->set_implicit_omit(); break;
case ALT_ip__if__cfg:
field_ip__if__cfg->set_implicit_omit(); break;
case ALT_ip__gw__cfg:
field_ip__gw__cfg->set_implicit_omit(); break;
case ALT_in__serv__time:
field_in__serv__time->set_implicit_omit(); break;
case ALT_paging__cfg:
field_paging__cfg->set_implicit_omit(); break;
case ALT_freq__ctrl:
field_freq__ctrl->set_implicit_omit(); break;
case ALT_ari:
field_ari->set_implicit_omit(); break;
case ALT_other:
field_other->set_implicit_omit(); break;
default: break;
}
}

void OML__FOM__IE__Body::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_abis__channel:
field_abis__channel->encode_text(text_buf);
break;
case ALT_adm__state:
field_adm__state->encode_text(text_buf);
break;
case ALT_auton__report:
field_auton__report->encode_text(text_buf);
break;
case ALT_bcch__arfcn:
field_bcch__arfcn->encode_text(text_buf);
break;
case ALT_bsic:
field_bsic->encode_text(text_buf);
break;
case ALT_air__timer:
field_air__timer->encode_text(text_buf);
break;
case ALT_load__ind__period:
field_load__ind__period->encode_text(text_buf);
break;
case ALT_load__threshold:
field_load__threshold->encode_text(text_buf);
break;
case ALT_chan__comb:
field_chan__comb->encode_text(text_buf);
break;
case ALT_event__type:
field_event__type->encode_text(text_buf);
break;
case ALT_gsm__time:
field_gsm__time->encode_text(text_buf);
break;
case ALT_hsn:
field_hsn->encode_text(text_buf);
break;
case ALT_intave__param:
field_intave__param->encode_text(text_buf);
break;
case ALT_interf__bound:
field_interf__bound->encode_text(text_buf);
break;
case ALT_maio:
field_maio->encode_text(text_buf);
break;
case ALT_manuf__state:
field_manuf__state->encode_text(text_buf);
break;
case ALT_max__ta:
field_max__ta->encode_text(text_buf);
break;
case ALT_nack__causes:
field_nack__causes->encode_text(text_buf);
break;
case ALT_ny1:
field_ny1->encode_text(text_buf);
break;
case ALT_opstate:
field_opstate->encode_text(text_buf);
break;
case ALT_power__class:
field_power__class->encode_text(text_buf);
break;
case ALT_power__thresh:
field_power__thresh->encode_text(text_buf);
break;
case ALT_prob__cause:
field_prob__cause->encode_text(text_buf);
break;
case ALT_rach__b__thresh:
field_rach__b__thresh->encode_text(text_buf);
break;
case ALT_loadavg__slots:
field_loadavg__slots->encode_text(text_buf);
break;
case ALT_radio__subch:
field_radio__subch->encode_text(text_buf);
break;
case ALT_rf__maxpwr__r:
field_rf__maxpwr__r->encode_text(text_buf);
break;
case ALT_spec__prob:
field_spec__prob->encode_text(text_buf);
break;
case ALT_start__time:
field_start__time->encode_text(text_buf);
break;
case ALT_t200:
field_t200->encode_text(text_buf);
break;
case ALT_tei:
field_tei->encode_text(text_buf);
break;
case ALT_test__no:
field_test__no->encode_text(text_buf);
break;
case ALT_vswr__thresh:
field_vswr__thresh->encode_text(text_buf);
break;
case ALT_window__size:
field_window__size->encode_text(text_buf);
break;
case ALT_tsc:
field_tsc->encode_text(text_buf);
break;
case ALT_severity:
field_severity->encode_text(text_buf);
break;
case ALT_outst__alarm:
field_outst__alarm->encode_text(text_buf);
break;
case ALT_meas__type:
field_meas__type->encode_text(text_buf);
break;
case ALT_avail__status:
field_avail__status->encode_text(text_buf);
break;
case ALT_arfcn__list:
field_arfcn__list->encode_text(text_buf);
break;
case ALT_ip:
field_ip->encode_text(text_buf);
break;
case ALT_portnr:
field_portnr->encode_text(text_buf);
break;
case ALT_stream__id:
field_stream__id->encode_text(text_buf);
break;
case ALT_sec__oml__cfg:
field_sec__oml__cfg->encode_text(text_buf);
break;
case ALT_ip__if__cfg:
field_ip__if__cfg->encode_text(text_buf);
break;
case ALT_ip__gw__cfg:
field_ip__gw__cfg->encode_text(text_buf);
break;
case ALT_in__serv__time:
field_in__serv__time->encode_text(text_buf);
break;
case ALT_paging__cfg:
field_paging__cfg->encode_text(text_buf);
break;
case ALT_freq__ctrl:
field_freq__ctrl->encode_text(text_buf);
break;
case ALT_ari:
field_ari->encode_text(text_buf);
break;
case ALT_other:
field_other->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @AbisOML_Types.OML_FOM_IE_Body.");
}
}

void OML__FOM__IE__Body::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_abis__channel:
abis__channel().decode_text(text_buf);
break;
case ALT_adm__state:
adm__state().decode_text(text_buf);
break;
case ALT_auton__report:
auton__report().decode_text(text_buf);
break;
case ALT_bcch__arfcn:
bcch__arfcn().decode_text(text_buf);
break;
case ALT_bsic:
bsic().decode_text(text_buf);
break;
case ALT_air__timer:
air__timer().decode_text(text_buf);
break;
case ALT_load__ind__period:
load__ind__period().decode_text(text_buf);
break;
case ALT_load__threshold:
load__threshold().decode_text(text_buf);
break;
case ALT_chan__comb:
chan__comb().decode_text(text_buf);
break;
case ALT_event__type:
event__type().decode_text(text_buf);
break;
case ALT_gsm__time:
gsm__time().decode_text(text_buf);
break;
case ALT_hsn:
hsn().decode_text(text_buf);
break;
case ALT_intave__param:
intave__param().decode_text(text_buf);
break;
case ALT_interf__bound:
interf__bound().decode_text(text_buf);
break;
case ALT_maio:
maio().decode_text(text_buf);
break;
case ALT_manuf__state:
manuf__state().decode_text(text_buf);
break;
case ALT_max__ta:
max__ta().decode_text(text_buf);
break;
case ALT_nack__causes:
nack__causes().decode_text(text_buf);
break;
case ALT_ny1:
ny1().decode_text(text_buf);
break;
case ALT_opstate:
opstate().decode_text(text_buf);
break;
case ALT_power__class:
power__class().decode_text(text_buf);
break;
case ALT_power__thresh:
power__thresh().decode_text(text_buf);
break;
case ALT_prob__cause:
prob__cause().decode_text(text_buf);
break;
case ALT_rach__b__thresh:
rach__b__thresh().decode_text(text_buf);
break;
case ALT_loadavg__slots:
loadavg__slots().decode_text(text_buf);
break;
case ALT_radio__subch:
radio__subch().decode_text(text_buf);
break;
case ALT_rf__maxpwr__r:
rf__maxpwr__r().decode_text(text_buf);
break;
case ALT_spec__prob:
spec__prob().decode_text(text_buf);
break;
case ALT_start__time:
start__time().decode_text(text_buf);
break;
case ALT_t200:
t200().decode_text(text_buf);
break;
case ALT_tei:
tei().decode_text(text_buf);
break;
case ALT_test__no:
test__no().decode_text(text_buf);
break;
case ALT_vswr__thresh:
vswr__thresh().decode_text(text_buf);
break;
case ALT_window__size:
window__size().decode_text(text_buf);
break;
case ALT_tsc:
tsc().decode_text(text_buf);
break;
case ALT_severity:
severity().decode_text(text_buf);
break;
case ALT_outst__alarm:
outst__alarm().decode_text(text_buf);
break;
case ALT_meas__type:
meas__type().decode_text(text_buf);
break;
case ALT_avail__status:
avail__status().decode_text(text_buf);
break;
case ALT_arfcn__list:
arfcn__list().decode_text(text_buf);
break;
case ALT_ip:
ip().decode_text(text_buf);
break;
case ALT_portnr:
portnr().decode_text(text_buf);
break;
case ALT_stream__id:
stream__id().decode_text(text_buf);
break;
case ALT_sec__oml__cfg:
sec__oml__cfg().decode_text(text_buf);
break;
case ALT_ip__if__cfg:
ip__if__cfg().decode_text(text_buf);
break;
case ALT_ip__gw__cfg:
ip__gw__cfg().decode_text(text_buf);
break;
case ALT_in__serv__time:
in__serv__time().decode_text(text_buf);
break;
case ALT_paging__cfg:
paging__cfg().decode_text(text_buf);
break;
case ALT_freq__ctrl:
freq__ctrl().decode_text(text_buf);
break;
case ALT_ari:
ari().decode_text(text_buf);
break;
case ALT_other:
other().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @AbisOML_Types.OML_FOM_IE_Body.");
}
}

void OML__FOM__IE__Body::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__FOM__IE__Body::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 OML__FOM__IE__Body::RAW_decode(
const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, 
raw_order_t top_bit_ord, boolean no_err, int sel_field, boolean, const RAW_Force_Omit* force_omit)
{
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  int decoded_length=0;
  int starting_pos=p_buf.get_pos_bit();
  if(sel_field!=-1){
    switch(sel_field){
    case 0: {
      RAW_Force_Omit field_force_omit(0, force_omit, OML__FOM__IE__Body_abis__channel_descr_.raw->forceomit);
      decoded_length = abis__channel().RAW_decode(OML__FOM__IE__Body_abis__channel_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 1: {
      RAW_Force_Omit field_force_omit(1, force_omit, OML__FOM__IE__Body_adm__state_descr_.raw->forceomit);
      decoded_length = adm__state().RAW_decode(OML__FOM__IE__Body_adm__state_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 2: {
      RAW_Force_Omit field_force_omit(2, force_omit, OML__FOM__IE__Body_auton__report_descr_.raw->forceomit);
      decoded_length = auton__report().RAW_decode(OML__FOM__IE__Body_auton__report_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 3: {
      RAW_Force_Omit field_force_omit(3, force_omit, OML__FOM__IE__Body_bcch__arfcn_descr_.raw->forceomit);
      decoded_length = bcch__arfcn().RAW_decode(OML__FOM__IE__Body_bcch__arfcn_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 4: {
      RAW_Force_Omit field_force_omit(4, force_omit, OML__FOM__IE__Body_bsic_descr_.raw->forceomit);
      decoded_length = bsic().RAW_decode(OML__FOM__IE__Body_bsic_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 5: {
      RAW_Force_Omit field_force_omit(5, force_omit, OML__FOM__IE__Body_air__timer_descr_.raw->forceomit);
      decoded_length = air__timer().RAW_decode(OML__FOM__IE__Body_air__timer_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 6: {
      RAW_Force_Omit field_force_omit(6, force_omit, OML__FOM__IE__Body_load__ind__period_descr_.raw->forceomit);
      decoded_length = load__ind__period().RAW_decode(OML__FOM__IE__Body_load__ind__period_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 7: {
      RAW_Force_Omit field_force_omit(7, force_omit, OML__FOM__IE__Body_load__threshold_descr_.raw->forceomit);
      decoded_length = load__threshold().RAW_decode(OML__FOM__IE__Body_load__threshold_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 8: {
      RAW_Force_Omit field_force_omit(8, force_omit, OML__FOM__IE__Body_chan__comb_descr_.raw->forceomit);
      decoded_length = chan__comb().RAW_decode(OML__FOM__IE__Body_chan__comb_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 9: {
      RAW_Force_Omit field_force_omit(9, force_omit, OML__FOM__IE__Body_event__type_descr_.raw->forceomit);
      decoded_length = event__type().RAW_decode(OML__FOM__IE__Body_event__type_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 10: {
      RAW_Force_Omit field_force_omit(10, force_omit, OML__FOM__IE__Body_gsm__time_descr_.raw->forceomit);
      decoded_length = gsm__time().RAW_decode(OML__FOM__IE__Body_gsm__time_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 11: {
      RAW_Force_Omit field_force_omit(11, force_omit, OML__FOM__IE__Body_hsn_descr_.raw->forceomit);
      decoded_length = hsn().RAW_decode(OML__FOM__IE__Body_hsn_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 12: {
      RAW_Force_Omit field_force_omit(12, force_omit, OML__FOM__IE__Body_intave__param_descr_.raw->forceomit);
      decoded_length = intave__param().RAW_decode(OML__FOM__IE__Body_intave__param_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 13: {
      RAW_Force_Omit field_force_omit(13, force_omit, OML__FOM__IE__Body_interf__bound_descr_.raw->forceomit);
      decoded_length = interf__bound().RAW_decode(OML__FOM__IE__Body_interf__bound_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 14: {
      RAW_Force_Omit field_force_omit(14, force_omit, OML__FOM__IE__Body_maio_descr_.raw->forceomit);
      decoded_length = maio().RAW_decode(OML__FOM__IE__Body_maio_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 15: {
      RAW_Force_Omit field_force_omit(15, force_omit, OML__FOM__IE__Body_manuf__state_descr_.raw->forceomit);
      decoded_length = manuf__state().RAW_decode(OML__FOM__IE__Body_manuf__state_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 16: {
      RAW_Force_Omit field_force_omit(16, force_omit, OML__FOM__IE__Body_max__ta_descr_.raw->forceomit);
      decoded_length = max__ta().RAW_decode(OML__FOM__IE__Body_max__ta_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 17: {
      RAW_Force_Omit field_force_omit(17, force_omit, OML__FOM__IE__Body_nack__causes_descr_.raw->forceomit);
      decoded_length = nack__causes().RAW_decode(OML__FOM__IE__Body_nack__causes_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 18: {
      RAW_Force_Omit field_force_omit(18, force_omit, OML__FOM__IE__Body_ny1_descr_.raw->forceomit);
      decoded_length = ny1().RAW_decode(OML__FOM__IE__Body_ny1_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 19: {
      RAW_Force_Omit field_force_omit(19, force_omit, OML__FOM__IE__Body_opstate_descr_.raw->forceomit);
      decoded_length = opstate().RAW_decode(OML__FOM__IE__Body_opstate_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 20: {
      RAW_Force_Omit field_force_omit(20, force_omit, OML__FOM__IE__Body_power__class_descr_.raw->forceomit);
      decoded_length = power__class().RAW_decode(OML__FOM__IE__Body_power__class_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 21: {
      RAW_Force_Omit field_force_omit(21, force_omit, OML__FOM__IE__Body_power__thresh_descr_.raw->forceomit);
      decoded_length = power__thresh().RAW_decode(OML__FOM__IE__Body_power__thresh_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 22: {
      RAW_Force_Omit field_force_omit(22, force_omit, OML__FOM__IE__Body_prob__cause_descr_.raw->forceomit);
      decoded_length = prob__cause().RAW_decode(OML__FOM__IE__Body_prob__cause_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 23: {
      RAW_Force_Omit field_force_omit(23, force_omit, OML__FOM__IE__Body_rach__b__thresh_descr_.raw->forceomit);
      decoded_length = rach__b__thresh().RAW_decode(OML__FOM__IE__Body_rach__b__thresh_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 24: {
      RAW_Force_Omit field_force_omit(24, force_omit, OML__FOM__IE__Body_loadavg__slots_descr_.raw->forceomit);
      decoded_length = loadavg__slots().RAW_decode(OML__FOM__IE__Body_loadavg__slots_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 25: {
      RAW_Force_Omit field_force_omit(25, force_omit, OML__FOM__IE__Body_radio__subch_descr_.raw->forceomit);
      decoded_length = radio__subch().RAW_decode(OML__FOM__IE__Body_radio__subch_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 26: {
      RAW_Force_Omit field_force_omit(26, force_omit, OML__FOM__IE__Body_rf__maxpwr__r_descr_.raw->forceomit);
      decoded_length = rf__maxpwr__r().RAW_decode(OML__FOM__IE__Body_rf__maxpwr__r_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 27: {
      RAW_Force_Omit field_force_omit(27, force_omit, OML__FOM__IE__Body_spec__prob_descr_.raw->forceomit);
      decoded_length = spec__prob().RAW_decode(OML__FOM__IE__Body_spec__prob_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 28: {
      RAW_Force_Omit field_force_omit(28, force_omit, OML__FOM__IE__Body_start__time_descr_.raw->forceomit);
      decoded_length = start__time().RAW_decode(OML__FOM__IE__Body_start__time_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 29: {
      RAW_Force_Omit field_force_omit(29, force_omit, OML__FOM__IE__Body_t200_descr_.raw->forceomit);
      decoded_length = t200().RAW_decode(OML__FOM__IE__Body_t200_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 30: {
      RAW_Force_Omit field_force_omit(30, force_omit, OML__FOM__IE__Body_tei_descr_.raw->forceomit);
      decoded_length = tei().RAW_decode(OML__FOM__IE__Body_tei_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 31: {
      RAW_Force_Omit field_force_omit(31, force_omit, OML__FOM__IE__Body_test__no_descr_.raw->forceomit);
      decoded_length = test__no().RAW_decode(OML__FOM__IE__Body_test__no_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 32: {
      RAW_Force_Omit field_force_omit(32, force_omit, OML__FOM__IE__Body_vswr__thresh_descr_.raw->forceomit);
      decoded_length = vswr__thresh().RAW_decode(OML__FOM__IE__Body_vswr__thresh_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 33: {
      RAW_Force_Omit field_force_omit(33, force_omit, OML__FOM__IE__Body_window__size_descr_.raw->forceomit);
      decoded_length = window__size().RAW_decode(OML__FOM__IE__Body_window__size_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 34: {
      RAW_Force_Omit field_force_omit(34, force_omit, OML__FOM__IE__Body_tsc_descr_.raw->forceomit);
      decoded_length = tsc().RAW_decode(OML__FOM__IE__Body_tsc_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 35: {
      RAW_Force_Omit field_force_omit(35, force_omit, OML__FOM__IE__Body_severity_descr_.raw->forceomit);
      decoded_length = severity().RAW_decode(OML__FOM__IE__Body_severity_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 36: {
      RAW_Force_Omit field_force_omit(36, force_omit, OML__FOM__IE__Body_outst__alarm_descr_.raw->forceomit);
      decoded_length = outst__alarm().RAW_decode(OML__FOM__IE__Body_outst__alarm_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 37: {
      RAW_Force_Omit field_force_omit(37, force_omit, OML__FOM__IE__Body_meas__type_descr_.raw->forceomit);
      decoded_length = meas__type().RAW_decode(OML__FOM__IE__Body_meas__type_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 38: {
      RAW_Force_Omit field_force_omit(38, force_omit, OML__FOM__IE__Body_avail__status_descr_.raw->forceomit);
      decoded_length = avail__status().RAW_decode(OML__FOM__IE__Body_avail__status_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 39: {
      RAW_Force_Omit field_force_omit(39, force_omit, OML__FOM__IE__Body_arfcn__list_descr_.raw->forceomit);
      decoded_length = arfcn__list().RAW_decode(OML__FOM__IE__Body_arfcn__list_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 40: {
      RAW_Force_Omit field_force_omit(40, force_omit, OML__FOM__IE__Body_ip_descr_.raw->forceomit);
      decoded_length = ip().RAW_decode(OML__FOM__IE__Body_ip_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 41: {
      RAW_Force_Omit field_force_omit(41, force_omit, OML__FOM__IE__Body_portnr_descr_.raw->forceomit);
      decoded_length = portnr().RAW_decode(OML__FOM__IE__Body_portnr_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 42: {
      RAW_Force_Omit field_force_omit(42, force_omit, OML__FOM__IE__Body_stream__id_descr_.raw->forceomit);
      decoded_length = stream__id().RAW_decode(OML__FOM__IE__Body_stream__id_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 43: {
      RAW_Force_Omit field_force_omit(43, force_omit, OML__FOM__IE__Body_sec__oml__cfg_descr_.raw->forceomit);
      decoded_length = sec__oml__cfg().RAW_decode(OML__FOM__IE__Body_sec__oml__cfg_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 44: {
      RAW_Force_Omit field_force_omit(44, force_omit, OML__FOM__IE__Body_ip__if__cfg_descr_.raw->forceomit);
      decoded_length = ip__if__cfg().RAW_decode(OML__FOM__IE__Body_ip__if__cfg_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 45: {
      RAW_Force_Omit field_force_omit(45, force_omit, OML__FOM__IE__Body_ip__gw__cfg_descr_.raw->forceomit);
      decoded_length = ip__gw__cfg().RAW_decode(OML__FOM__IE__Body_ip__gw__cfg_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 46: {
      RAW_Force_Omit field_force_omit(46, force_omit, OML__FOM__IE__Body_in__serv__time_descr_.raw->forceomit);
      decoded_length = in__serv__time().RAW_decode(OML__FOM__IE__Body_in__serv__time_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 47: {
      RAW_Force_Omit field_force_omit(47, force_omit, OML__FOM__IE__Body_paging__cfg_descr_.raw->forceomit);
      decoded_length = paging__cfg().RAW_decode(OML__FOM__IE__Body_paging__cfg_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 48: {
      RAW_Force_Omit field_force_omit(48, force_omit, OML__FOM__IE__Body_freq__ctrl_descr_.raw->forceomit);
      decoded_length = freq__ctrl().RAW_decode(OML__FOM__IE__Body_freq__ctrl_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 49: {
      RAW_Force_Omit field_force_omit(49, force_omit, OML__FOM__IE__Body_ari_descr_.raw->forceomit);
      decoded_length = ari().RAW_decode(OML__FOM__IE__Body_ari_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 50: {
      RAW_Force_Omit field_force_omit(50, force_omit, OML__FOM__IE__Body_other_descr_.raw->forceomit);
      decoded_length = other().RAW_decode(OML__FOM__IE__Body_other_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    default: break;
    }
    return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
  } else {
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_0_force_omit(0, force_omit, OML__FOM__IE__Body_abis__channel_descr_.raw->forceomit);
      decoded_length = abis__channel().RAW_decode(OML__FOM__IE__Body_abis__channel_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_0_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_1_force_omit(1, force_omit, OML__FOM__IE__Body_adm__state_descr_.raw->forceomit);
      decoded_length = adm__state().RAW_decode(OML__FOM__IE__Body_adm__state_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_1_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_2_force_omit(2, force_omit, OML__FOM__IE__Body_auton__report_descr_.raw->forceomit);
      decoded_length = auton__report().RAW_decode(OML__FOM__IE__Body_auton__report_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_2_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_3_force_omit(3, force_omit, OML__FOM__IE__Body_bcch__arfcn_descr_.raw->forceomit);
      decoded_length = bcch__arfcn().RAW_decode(OML__FOM__IE__Body_bcch__arfcn_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_3_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_4_force_omit(4, force_omit, OML__FOM__IE__Body_bsic_descr_.raw->forceomit);
      decoded_length = bsic().RAW_decode(OML__FOM__IE__Body_bsic_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_4_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_5_force_omit(5, force_omit, OML__FOM__IE__Body_air__timer_descr_.raw->forceomit);
      decoded_length = air__timer().RAW_decode(OML__FOM__IE__Body_air__timer_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_5_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_6_force_omit(6, force_omit, OML__FOM__IE__Body_load__ind__period_descr_.raw->forceomit);
      decoded_length = load__ind__period().RAW_decode(OML__FOM__IE__Body_load__ind__period_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_6_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_7_force_omit(7, force_omit, OML__FOM__IE__Body_load__threshold_descr_.raw->forceomit);
      decoded_length = load__threshold().RAW_decode(OML__FOM__IE__Body_load__threshold_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_7_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_8_force_omit(8, force_omit, OML__FOM__IE__Body_chan__comb_descr_.raw->forceomit);
      decoded_length = chan__comb().RAW_decode(OML__FOM__IE__Body_chan__comb_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_8_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_9_force_omit(9, force_omit, OML__FOM__IE__Body_event__type_descr_.raw->forceomit);
      decoded_length = event__type().RAW_decode(OML__FOM__IE__Body_event__type_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_9_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_10_force_omit(10, force_omit, OML__FOM__IE__Body_gsm__time_descr_.raw->forceomit);
      decoded_length = gsm__time().RAW_decode(OML__FOM__IE__Body_gsm__time_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_10_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_11_force_omit(11, force_omit, OML__FOM__IE__Body_hsn_descr_.raw->forceomit);
      decoded_length = hsn().RAW_decode(OML__FOM__IE__Body_hsn_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_11_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_12_force_omit(12, force_omit, OML__FOM__IE__Body_intave__param_descr_.raw->forceomit);
      decoded_length = intave__param().RAW_decode(OML__FOM__IE__Body_intave__param_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_12_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_13_force_omit(13, force_omit, OML__FOM__IE__Body_interf__bound_descr_.raw->forceomit);
      decoded_length = interf__bound().RAW_decode(OML__FOM__IE__Body_interf__bound_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_13_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_14_force_omit(14, force_omit, OML__FOM__IE__Body_maio_descr_.raw->forceomit);
      decoded_length = maio().RAW_decode(OML__FOM__IE__Body_maio_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_14_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_15_force_omit(15, force_omit, OML__FOM__IE__Body_manuf__state_descr_.raw->forceomit);
      decoded_length = manuf__state().RAW_decode(OML__FOM__IE__Body_manuf__state_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_15_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_16_force_omit(16, force_omit, OML__FOM__IE__Body_max__ta_descr_.raw->forceomit);
      decoded_length = max__ta().RAW_decode(OML__FOM__IE__Body_max__ta_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_16_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_17_force_omit(17, force_omit, OML__FOM__IE__Body_nack__causes_descr_.raw->forceomit);
      decoded_length = nack__causes().RAW_decode(OML__FOM__IE__Body_nack__causes_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_17_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_18_force_omit(18, force_omit, OML__FOM__IE__Body_ny1_descr_.raw->forceomit);
      decoded_length = ny1().RAW_decode(OML__FOM__IE__Body_ny1_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_18_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_19_force_omit(19, force_omit, OML__FOM__IE__Body_opstate_descr_.raw->forceomit);
      decoded_length = opstate().RAW_decode(OML__FOM__IE__Body_opstate_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_19_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_20_force_omit(20, force_omit, OML__FOM__IE__Body_power__class_descr_.raw->forceomit);
      decoded_length = power__class().RAW_decode(OML__FOM__IE__Body_power__class_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_20_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_21_force_omit(21, force_omit, OML__FOM__IE__Body_power__thresh_descr_.raw->forceomit);
      decoded_length = power__thresh().RAW_decode(OML__FOM__IE__Body_power__thresh_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_21_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_22_force_omit(22, force_omit, OML__FOM__IE__Body_prob__cause_descr_.raw->forceomit);
      decoded_length = prob__cause().RAW_decode(OML__FOM__IE__Body_prob__cause_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_22_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_23_force_omit(23, force_omit, OML__FOM__IE__Body_rach__b__thresh_descr_.raw->forceomit);
      decoded_length = rach__b__thresh().RAW_decode(OML__FOM__IE__Body_rach__b__thresh_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_23_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_24_force_omit(24, force_omit, OML__FOM__IE__Body_loadavg__slots_descr_.raw->forceomit);
      decoded_length = loadavg__slots().RAW_decode(OML__FOM__IE__Body_loadavg__slots_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_24_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_25_force_omit(25, force_omit, OML__FOM__IE__Body_radio__subch_descr_.raw->forceomit);
      decoded_length = radio__subch().RAW_decode(OML__FOM__IE__Body_radio__subch_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_25_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_26_force_omit(26, force_omit, OML__FOM__IE__Body_rf__maxpwr__r_descr_.raw->forceomit);
      decoded_length = rf__maxpwr__r().RAW_decode(OML__FOM__IE__Body_rf__maxpwr__r_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_26_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_27_force_omit(27, force_omit, OML__FOM__IE__Body_spec__prob_descr_.raw->forceomit);
      decoded_length = spec__prob().RAW_decode(OML__FOM__IE__Body_spec__prob_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_27_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_28_force_omit(28, force_omit, OML__FOM__IE__Body_start__time_descr_.raw->forceomit);
      decoded_length = start__time().RAW_decode(OML__FOM__IE__Body_start__time_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_28_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_29_force_omit(29, force_omit, OML__FOM__IE__Body_t200_descr_.raw->forceomit);
      decoded_length = t200().RAW_decode(OML__FOM__IE__Body_t200_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_29_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_30_force_omit(30, force_omit, OML__FOM__IE__Body_tei_descr_.raw->forceomit);
      decoded_length = tei().RAW_decode(OML__FOM__IE__Body_tei_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_30_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_31_force_omit(31, force_omit, OML__FOM__IE__Body_test__no_descr_.raw->forceomit);
      decoded_length = test__no().RAW_decode(OML__FOM__IE__Body_test__no_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_31_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_32_force_omit(32, force_omit, OML__FOM__IE__Body_vswr__thresh_descr_.raw->forceomit);
      decoded_length = vswr__thresh().RAW_decode(OML__FOM__IE__Body_vswr__thresh_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_32_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_33_force_omit(33, force_omit, OML__FOM__IE__Body_window__size_descr_.raw->forceomit);
      decoded_length = window__size().RAW_decode(OML__FOM__IE__Body_window__size_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_33_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_34_force_omit(34, force_omit, OML__FOM__IE__Body_tsc_descr_.raw->forceomit);
      decoded_length = tsc().RAW_decode(OML__FOM__IE__Body_tsc_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_34_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_35_force_omit(35, force_omit, OML__FOM__IE__Body_severity_descr_.raw->forceomit);
      decoded_length = severity().RAW_decode(OML__FOM__IE__Body_severity_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_35_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_36_force_omit(36, force_omit, OML__FOM__IE__Body_outst__alarm_descr_.raw->forceomit);
      decoded_length = outst__alarm().RAW_decode(OML__FOM__IE__Body_outst__alarm_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_36_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_37_force_omit(37, force_omit, OML__FOM__IE__Body_meas__type_descr_.raw->forceomit);
      decoded_length = meas__type().RAW_decode(OML__FOM__IE__Body_meas__type_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_37_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_38_force_omit(38, force_omit, OML__FOM__IE__Body_avail__status_descr_.raw->forceomit);
      decoded_length = avail__status().RAW_decode(OML__FOM__IE__Body_avail__status_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_38_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_39_force_omit(39, force_omit, OML__FOM__IE__Body_arfcn__list_descr_.raw->forceomit);
      decoded_length = arfcn__list().RAW_decode(OML__FOM__IE__Body_arfcn__list_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_39_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_40_force_omit(40, force_omit, OML__FOM__IE__Body_ip_descr_.raw->forceomit);
      decoded_length = ip().RAW_decode(OML__FOM__IE__Body_ip_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_40_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_41_force_omit(41, force_omit, OML__FOM__IE__Body_portnr_descr_.raw->forceomit);
      decoded_length = portnr().RAW_decode(OML__FOM__IE__Body_portnr_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_41_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_42_force_omit(42, force_omit, OML__FOM__IE__Body_stream__id_descr_.raw->forceomit);
      decoded_length = stream__id().RAW_decode(OML__FOM__IE__Body_stream__id_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_42_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_43_force_omit(43, force_omit, OML__FOM__IE__Body_sec__oml__cfg_descr_.raw->forceomit);
      decoded_length = sec__oml__cfg().RAW_decode(OML__FOM__IE__Body_sec__oml__cfg_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_43_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_44_force_omit(44, force_omit, OML__FOM__IE__Body_ip__if__cfg_descr_.raw->forceomit);
      decoded_length = ip__if__cfg().RAW_decode(OML__FOM__IE__Body_ip__if__cfg_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_44_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_45_force_omit(45, force_omit, OML__FOM__IE__Body_ip__gw__cfg_descr_.raw->forceomit);
      decoded_length = ip__gw__cfg().RAW_decode(OML__FOM__IE__Body_ip__gw__cfg_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_45_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_46_force_omit(46, force_omit, OML__FOM__IE__Body_in__serv__time_descr_.raw->forceomit);
      decoded_length = in__serv__time().RAW_decode(OML__FOM__IE__Body_in__serv__time_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_46_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_47_force_omit(47, force_omit, OML__FOM__IE__Body_paging__cfg_descr_.raw->forceomit);
      decoded_length = paging__cfg().RAW_decode(OML__FOM__IE__Body_paging__cfg_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_47_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_48_force_omit(48, force_omit, OML__FOM__IE__Body_freq__ctrl_descr_.raw->forceomit);
      decoded_length = freq__ctrl().RAW_decode(OML__FOM__IE__Body_freq__ctrl_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_48_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_49_force_omit(49, force_omit, OML__FOM__IE__Body_ari_descr_.raw->forceomit);
      decoded_length = ari().RAW_decode(OML__FOM__IE__Body_ari_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_49_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_50_force_omit(50, force_omit, OML__FOM__IE__Body_other_descr_.raw->forceomit);
      decoded_length = other().RAW_decode(OML__FOM__IE__Body_other_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_50_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
 }
 clean_up();
 return -1;
}

int OML__FOM__IE__Body::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
{
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 51;  myleaf.body.node.nodes = init_nodes_of_enc_tree(51);
  memset(myleaf.body.node.nodes, 0, 51 * sizeof(RAW_enc_tree *));
  switch (union_selection) {
  case ALT_abis__channel:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, OML__FOM__IE__Body_abis__channel_descr_.raw);
    encoded_length = field_abis__channel->RAW_encode(OML__FOM__IE__Body_abis__channel_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &OML__FOM__IE__Body_abis__channel_descr_;
    break;
  case ALT_adm__state:
    myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, OML__FOM__IE__Body_adm__state_descr_.raw);
    encoded_length = field_adm__state->RAW_encode(OML__FOM__IE__Body_adm__state_descr_, *myleaf.body.node.nodes[1]);
    myleaf.body.node.nodes[1]->coding_descr = &OML__FOM__IE__Body_adm__state_descr_;
    break;
  case ALT_auton__report:
    myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, OML__FOM__IE__Body_auton__report_descr_.raw);
    encoded_length = field_auton__report->RAW_encode(OML__FOM__IE__Body_auton__report_descr_, *myleaf.body.node.nodes[2]);
    myleaf.body.node.nodes[2]->coding_descr = &OML__FOM__IE__Body_auton__report_descr_;
    break;
  case ALT_bcch__arfcn:
    myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 3, OML__FOM__IE__Body_bcch__arfcn_descr_.raw);
    encoded_length = field_bcch__arfcn->RAW_encode(OML__FOM__IE__Body_bcch__arfcn_descr_, *myleaf.body.node.nodes[3]);
    myleaf.body.node.nodes[3]->coding_descr = &OML__FOM__IE__Body_bcch__arfcn_descr_;
    break;
  case ALT_bsic:
    myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 4, OML__FOM__IE__Body_bsic_descr_.raw);
    encoded_length = field_bsic->RAW_encode(OML__FOM__IE__Body_bsic_descr_, *myleaf.body.node.nodes[4]);
    myleaf.body.node.nodes[4]->coding_descr = &OML__FOM__IE__Body_bsic_descr_;
    break;
  case ALT_air__timer:
    myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 5, OML__FOM__IE__Body_air__timer_descr_.raw);
    encoded_length = field_air__timer->RAW_encode(OML__FOM__IE__Body_air__timer_descr_, *myleaf.body.node.nodes[5]);
    myleaf.body.node.nodes[5]->coding_descr = &OML__FOM__IE__Body_air__timer_descr_;
    break;
  case ALT_load__ind__period:
    myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 6, OML__FOM__IE__Body_load__ind__period_descr_.raw);
    encoded_length = field_load__ind__period->RAW_encode(OML__FOM__IE__Body_load__ind__period_descr_, *myleaf.body.node.nodes[6]);
    myleaf.body.node.nodes[6]->coding_descr = &OML__FOM__IE__Body_load__ind__period_descr_;
    break;
  case ALT_load__threshold:
    myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 7, OML__FOM__IE__Body_load__threshold_descr_.raw);
    encoded_length = field_load__threshold->RAW_encode(OML__FOM__IE__Body_load__threshold_descr_, *myleaf.body.node.nodes[7]);
    myleaf.body.node.nodes[7]->coding_descr = &OML__FOM__IE__Body_load__threshold_descr_;
    break;
  case ALT_chan__comb:
    myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 8, OML__FOM__IE__Body_chan__comb_descr_.raw);
    encoded_length = field_chan__comb->RAW_encode(OML__FOM__IE__Body_chan__comb_descr_, *myleaf.body.node.nodes[8]);
    myleaf.body.node.nodes[8]->coding_descr = &OML__FOM__IE__Body_chan__comb_descr_;
    break;
  case ALT_event__type:
    myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 9, OML__FOM__IE__Body_event__type_descr_.raw);
    encoded_length = field_event__type->RAW_encode(OML__FOM__IE__Body_event__type_descr_, *myleaf.body.node.nodes[9]);
    myleaf.body.node.nodes[9]->coding_descr = &OML__FOM__IE__Body_event__type_descr_;
    break;
  case ALT_gsm__time:
    myleaf.body.node.nodes[10] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 10, OML__FOM__IE__Body_gsm__time_descr_.raw);
    encoded_length = field_gsm__time->RAW_encode(OML__FOM__IE__Body_gsm__time_descr_, *myleaf.body.node.nodes[10]);
    myleaf.body.node.nodes[10]->coding_descr = &OML__FOM__IE__Body_gsm__time_descr_;
    break;
  case ALT_hsn:
    myleaf.body.node.nodes[11] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 11, OML__FOM__IE__Body_hsn_descr_.raw);
    encoded_length = field_hsn->RAW_encode(OML__FOM__IE__Body_hsn_descr_, *myleaf.body.node.nodes[11]);
    myleaf.body.node.nodes[11]->coding_descr = &OML__FOM__IE__Body_hsn_descr_;
    break;
  case ALT_intave__param:
    myleaf.body.node.nodes[12] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 12, OML__FOM__IE__Body_intave__param_descr_.raw);
    encoded_length = field_intave__param->RAW_encode(OML__FOM__IE__Body_intave__param_descr_, *myleaf.body.node.nodes[12]);
    myleaf.body.node.nodes[12]->coding_descr = &OML__FOM__IE__Body_intave__param_descr_;
    break;
  case ALT_interf__bound:
    myleaf.body.node.nodes[13] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 13, OML__FOM__IE__Body_interf__bound_descr_.raw);
    encoded_length = field_interf__bound->RAW_encode(OML__FOM__IE__Body_interf__bound_descr_, *myleaf.body.node.nodes[13]);
    myleaf.body.node.nodes[13]->coding_descr = &OML__FOM__IE__Body_interf__bound_descr_;
    break;
  case ALT_maio:
    myleaf.body.node.nodes[14] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 14, OML__FOM__IE__Body_maio_descr_.raw);
    encoded_length = field_maio->RAW_encode(OML__FOM__IE__Body_maio_descr_, *myleaf.body.node.nodes[14]);
    myleaf.body.node.nodes[14]->coding_descr = &OML__FOM__IE__Body_maio_descr_;
    break;
  case ALT_manuf__state:
    myleaf.body.node.nodes[15] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 15, OML__FOM__IE__Body_manuf__state_descr_.raw);
    encoded_length = field_manuf__state->RAW_encode(OML__FOM__IE__Body_manuf__state_descr_, *myleaf.body.node.nodes[15]);
    myleaf.body.node.nodes[15]->coding_descr = &OML__FOM__IE__Body_manuf__state_descr_;
    break;
  case ALT_max__ta:
    myleaf.body.node.nodes[16] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 16, OML__FOM__IE__Body_max__ta_descr_.raw);
    encoded_length = field_max__ta->RAW_encode(OML__FOM__IE__Body_max__ta_descr_, *myleaf.body.node.nodes[16]);
    myleaf.body.node.nodes[16]->coding_descr = &OML__FOM__IE__Body_max__ta_descr_;
    break;
  case ALT_nack__causes:
    myleaf.body.node.nodes[17] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 17, OML__FOM__IE__Body_nack__causes_descr_.raw);
    encoded_length = field_nack__causes->RAW_encode(OML__FOM__IE__Body_nack__causes_descr_, *myleaf.body.node.nodes[17]);
    myleaf.body.node.nodes[17]->coding_descr = &OML__FOM__IE__Body_nack__causes_descr_;
    break;
  case ALT_ny1:
    myleaf.body.node.nodes[18] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 18, OML__FOM__IE__Body_ny1_descr_.raw);
    encoded_length = field_ny1->RAW_encode(OML__FOM__IE__Body_ny1_descr_, *myleaf.body.node.nodes[18]);
    myleaf.body.node.nodes[18]->coding_descr = &OML__FOM__IE__Body_ny1_descr_;
    break;
  case ALT_opstate:
    myleaf.body.node.nodes[19] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 19, OML__FOM__IE__Body_opstate_descr_.raw);
    encoded_length = field_opstate->RAW_encode(OML__FOM__IE__Body_opstate_descr_, *myleaf.body.node.nodes[19]);
    myleaf.body.node.nodes[19]->coding_descr = &OML__FOM__IE__Body_opstate_descr_;
    break;
  case ALT_power__class:
    myleaf.body.node.nodes[20] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 20, OML__FOM__IE__Body_power__class_descr_.raw);
    encoded_length = field_power__class->RAW_encode(OML__FOM__IE__Body_power__class_descr_, *myleaf.body.node.nodes[20]);
    myleaf.body.node.nodes[20]->coding_descr = &OML__FOM__IE__Body_power__class_descr_;
    break;
  case ALT_power__thresh:
    myleaf.body.node.nodes[21] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 21, OML__FOM__IE__Body_power__thresh_descr_.raw);
    encoded_length = field_power__thresh->RAW_encode(OML__FOM__IE__Body_power__thresh_descr_, *myleaf.body.node.nodes[21]);
    myleaf.body.node.nodes[21]->coding_descr = &OML__FOM__IE__Body_power__thresh_descr_;
    break;
  case ALT_prob__cause:
    myleaf.body.node.nodes[22] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 22, OML__FOM__IE__Body_prob__cause_descr_.raw);
    encoded_length = field_prob__cause->RAW_encode(OML__FOM__IE__Body_prob__cause_descr_, *myleaf.body.node.nodes[22]);
    myleaf.body.node.nodes[22]->coding_descr = &OML__FOM__IE__Body_prob__cause_descr_;
    break;
  case ALT_rach__b__thresh:
    myleaf.body.node.nodes[23] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 23, OML__FOM__IE__Body_rach__b__thresh_descr_.raw);
    encoded_length = field_rach__b__thresh->RAW_encode(OML__FOM__IE__Body_rach__b__thresh_descr_, *myleaf.body.node.nodes[23]);
    myleaf.body.node.nodes[23]->coding_descr = &OML__FOM__IE__Body_rach__b__thresh_descr_;
    break;
  case ALT_loadavg__slots:
    myleaf.body.node.nodes[24] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 24, OML__FOM__IE__Body_loadavg__slots_descr_.raw);
    encoded_length = field_loadavg__slots->RAW_encode(OML__FOM__IE__Body_loadavg__slots_descr_, *myleaf.body.node.nodes[24]);
    myleaf.body.node.nodes[24]->coding_descr = &OML__FOM__IE__Body_loadavg__slots_descr_;
    break;
  case ALT_radio__subch:
    myleaf.body.node.nodes[25] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 25, OML__FOM__IE__Body_radio__subch_descr_.raw);
    encoded_length = field_radio__subch->RAW_encode(OML__FOM__IE__Body_radio__subch_descr_, *myleaf.body.node.nodes[25]);
    myleaf.body.node.nodes[25]->coding_descr = &OML__FOM__IE__Body_radio__subch_descr_;
    break;
  case ALT_rf__maxpwr__r:
    myleaf.body.node.nodes[26] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 26, OML__FOM__IE__Body_rf__maxpwr__r_descr_.raw);
    encoded_length = field_rf__maxpwr__r->RAW_encode(OML__FOM__IE__Body_rf__maxpwr__r_descr_, *myleaf.body.node.nodes[26]);
    myleaf.body.node.nodes[26]->coding_descr = &OML__FOM__IE__Body_rf__maxpwr__r_descr_;
    break;
  case ALT_spec__prob:
    myleaf.body.node.nodes[27] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 27, OML__FOM__IE__Body_spec__prob_descr_.raw);
    encoded_length = field_spec__prob->RAW_encode(OML__FOM__IE__Body_spec__prob_descr_, *myleaf.body.node.nodes[27]);
    myleaf.body.node.nodes[27]->coding_descr = &OML__FOM__IE__Body_spec__prob_descr_;
    break;
  case ALT_start__time:
    myleaf.body.node.nodes[28] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 28, OML__FOM__IE__Body_start__time_descr_.raw);
    encoded_length = field_start__time->RAW_encode(OML__FOM__IE__Body_start__time_descr_, *myleaf.body.node.nodes[28]);
    myleaf.body.node.nodes[28]->coding_descr = &OML__FOM__IE__Body_start__time_descr_;
    break;
  case ALT_t200:
    myleaf.body.node.nodes[29] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 29, OML__FOM__IE__Body_t200_descr_.raw);
    encoded_length = field_t200->RAW_encode(OML__FOM__IE__Body_t200_descr_, *myleaf.body.node.nodes[29]);
    myleaf.body.node.nodes[29]->coding_descr = &OML__FOM__IE__Body_t200_descr_;
    break;
  case ALT_tei:
    myleaf.body.node.nodes[30] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 30, OML__FOM__IE__Body_tei_descr_.raw);
    encoded_length = field_tei->RAW_encode(OML__FOM__IE__Body_tei_descr_, *myleaf.body.node.nodes[30]);
    myleaf.body.node.nodes[30]->coding_descr = &OML__FOM__IE__Body_tei_descr_;
    break;
  case ALT_test__no:
    myleaf.body.node.nodes[31] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 31, OML__FOM__IE__Body_test__no_descr_.raw);
    encoded_length = field_test__no->RAW_encode(OML__FOM__IE__Body_test__no_descr_, *myleaf.body.node.nodes[31]);
    myleaf.body.node.nodes[31]->coding_descr = &OML__FOM__IE__Body_test__no_descr_;
    break;
  case ALT_vswr__thresh:
    myleaf.body.node.nodes[32] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 32, OML__FOM__IE__Body_vswr__thresh_descr_.raw);
    encoded_length = field_vswr__thresh->RAW_encode(OML__FOM__IE__Body_vswr__thresh_descr_, *myleaf.body.node.nodes[32]);
    myleaf.body.node.nodes[32]->coding_descr = &OML__FOM__IE__Body_vswr__thresh_descr_;
    break;
  case ALT_window__size:
    myleaf.body.node.nodes[33] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 33, OML__FOM__IE__Body_window__size_descr_.raw);
    encoded_length = field_window__size->RAW_encode(OML__FOM__IE__Body_window__size_descr_, *myleaf.body.node.nodes[33]);
    myleaf.body.node.nodes[33]->coding_descr = &OML__FOM__IE__Body_window__size_descr_;
    break;
  case ALT_tsc:
    myleaf.body.node.nodes[34] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 34, OML__FOM__IE__Body_tsc_descr_.raw);
    encoded_length = field_tsc->RAW_encode(OML__FOM__IE__Body_tsc_descr_, *myleaf.body.node.nodes[34]);
    myleaf.body.node.nodes[34]->coding_descr = &OML__FOM__IE__Body_tsc_descr_;
    break;
  case ALT_severity:
    myleaf.body.node.nodes[35] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 35, OML__FOM__IE__Body_severity_descr_.raw);
    encoded_length = field_severity->RAW_encode(OML__FOM__IE__Body_severity_descr_, *myleaf.body.node.nodes[35]);
    myleaf.body.node.nodes[35]->coding_descr = &OML__FOM__IE__Body_severity_descr_;
    break;
  case ALT_outst__alarm:
    myleaf.body.node.nodes[36] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 36, OML__FOM__IE__Body_outst__alarm_descr_.raw);
    encoded_length = field_outst__alarm->RAW_encode(OML__FOM__IE__Body_outst__alarm_descr_, *myleaf.body.node.nodes[36]);
    myleaf.body.node.nodes[36]->coding_descr = &OML__FOM__IE__Body_outst__alarm_descr_;
    break;
  case ALT_meas__type:
    myleaf.body.node.nodes[37] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 37, OML__FOM__IE__Body_meas__type_descr_.raw);
    encoded_length = field_meas__type->RAW_encode(OML__FOM__IE__Body_meas__type_descr_, *myleaf.body.node.nodes[37]);
    myleaf.body.node.nodes[37]->coding_descr = &OML__FOM__IE__Body_meas__type_descr_;
    break;
  case ALT_avail__status:
    myleaf.body.node.nodes[38] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 38, OML__FOM__IE__Body_avail__status_descr_.raw);
    encoded_length = field_avail__status->RAW_encode(OML__FOM__IE__Body_avail__status_descr_, *myleaf.body.node.nodes[38]);
    myleaf.body.node.nodes[38]->coding_descr = &OML__FOM__IE__Body_avail__status_descr_;
    break;
  case ALT_arfcn__list:
    myleaf.body.node.nodes[39] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 39, OML__FOM__IE__Body_arfcn__list_descr_.raw);
    encoded_length = field_arfcn__list->RAW_encode(OML__FOM__IE__Body_arfcn__list_descr_, *myleaf.body.node.nodes[39]);
    myleaf.body.node.nodes[39]->coding_descr = &OML__FOM__IE__Body_arfcn__list_descr_;
    break;
  case ALT_ip:
    myleaf.body.node.nodes[40] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 40, OML__FOM__IE__Body_ip_descr_.raw);
    encoded_length = field_ip->RAW_encode(OML__FOM__IE__Body_ip_descr_, *myleaf.body.node.nodes[40]);
    myleaf.body.node.nodes[40]->coding_descr = &OML__FOM__IE__Body_ip_descr_;
    break;
  case ALT_portnr:
    myleaf.body.node.nodes[41] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 41, OML__FOM__IE__Body_portnr_descr_.raw);
    encoded_length = field_portnr->RAW_encode(OML__FOM__IE__Body_portnr_descr_, *myleaf.body.node.nodes[41]);
    myleaf.body.node.nodes[41]->coding_descr = &OML__FOM__IE__Body_portnr_descr_;
    break;
  case ALT_stream__id:
    myleaf.body.node.nodes[42] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 42, OML__FOM__IE__Body_stream__id_descr_.raw);
    encoded_length = field_stream__id->RAW_encode(OML__FOM__IE__Body_stream__id_descr_, *myleaf.body.node.nodes[42]);
    myleaf.body.node.nodes[42]->coding_descr = &OML__FOM__IE__Body_stream__id_descr_;
    break;
  case ALT_sec__oml__cfg:
    myleaf.body.node.nodes[43] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 43, OML__FOM__IE__Body_sec__oml__cfg_descr_.raw);
    encoded_length = field_sec__oml__cfg->RAW_encode(OML__FOM__IE__Body_sec__oml__cfg_descr_, *myleaf.body.node.nodes[43]);
    myleaf.body.node.nodes[43]->coding_descr = &OML__FOM__IE__Body_sec__oml__cfg_descr_;
    break;
  case ALT_ip__if__cfg:
    myleaf.body.node.nodes[44] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 44, OML__FOM__IE__Body_ip__if__cfg_descr_.raw);
    encoded_length = field_ip__if__cfg->RAW_encode(OML__FOM__IE__Body_ip__if__cfg_descr_, *myleaf.body.node.nodes[44]);
    myleaf.body.node.nodes[44]->coding_descr = &OML__FOM__IE__Body_ip__if__cfg_descr_;
    break;
  case ALT_ip__gw__cfg:
    myleaf.body.node.nodes[45] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 45, OML__FOM__IE__Body_ip__gw__cfg_descr_.raw);
    encoded_length = field_ip__gw__cfg->RAW_encode(OML__FOM__IE__Body_ip__gw__cfg_descr_, *myleaf.body.node.nodes[45]);
    myleaf.body.node.nodes[45]->coding_descr = &OML__FOM__IE__Body_ip__gw__cfg_descr_;
    break;
  case ALT_in__serv__time:
    myleaf.body.node.nodes[46] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 46, OML__FOM__IE__Body_in__serv__time_descr_.raw);
    encoded_length = field_in__serv__time->RAW_encode(OML__FOM__IE__Body_in__serv__time_descr_, *myleaf.body.node.nodes[46]);
    myleaf.body.node.nodes[46]->coding_descr = &OML__FOM__IE__Body_in__serv__time_descr_;
    break;
  case ALT_paging__cfg:
    myleaf.body.node.nodes[47] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 47, OML__FOM__IE__Body_paging__cfg_descr_.raw);
    encoded_length = field_paging__cfg->RAW_encode(OML__FOM__IE__Body_paging__cfg_descr_, *myleaf.body.node.nodes[47]);
    myleaf.body.node.nodes[47]->coding_descr = &OML__FOM__IE__Body_paging__cfg_descr_;
    break;
  case ALT_freq__ctrl:
    myleaf.body.node.nodes[48] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 48, OML__FOM__IE__Body_freq__ctrl_descr_.raw);
    encoded_length = field_freq__ctrl->RAW_encode(OML__FOM__IE__Body_freq__ctrl_descr_, *myleaf.body.node.nodes[48]);
    myleaf.body.node.nodes[48]->coding_descr = &OML__FOM__IE__Body_freq__ctrl_descr_;
    break;
  case ALT_ari:
    myleaf.body.node.nodes[49] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 49, OML__FOM__IE__Body_ari_descr_.raw);
    encoded_length = field_ari->RAW_encode(OML__FOM__IE__Body_ari_descr_, *myleaf.body.node.nodes[49]);
    myleaf.body.node.nodes[49]->coding_descr = &OML__FOM__IE__Body_ari_descr_;
    break;
  case ALT_other:
    myleaf.body.node.nodes[50] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 50, OML__FOM__IE__Body_other_descr_.raw);
    encoded_length = field_other->RAW_encode(OML__FOM__IE__Body_other_descr_, *myleaf.body.node.nodes[50]);
    myleaf.body.node.nodes[50]->coding_descr = &OML__FOM__IE__Body_other_descr_;
    break;
  default:
    TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  }
  return encoded_length;
}

void OML__FOM__IE__Body_template::copy_value(const OML__FOM__IE__Body& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case OML__FOM__IE__Body::ALT_abis__channel:
single_value.field_abis__channel = new OML__FOM__AbisChannel_template(other_value.abis__channel());
break;
case OML__FOM__IE__Body::ALT_adm__state:
single_value.field_adm__state = new OML__FOM__AdministrativeState_template(other_value.adm__state());
break;
case OML__FOM__IE__Body::ALT_auton__report:
single_value.field_auton__report = new OCTETSTRING_template(other_value.auton__report());
break;
case OML__FOM__IE__Body::ALT_bcch__arfcn:
single_value.field_bcch__arfcn = new INTEGER_template(other_value.bcch__arfcn());
break;
case OML__FOM__IE__Body::ALT_bsic:
single_value.field_bsic = new INTEGER_template(other_value.bsic());
break;
case OML__FOM__IE__Body::ALT_air__timer:
single_value.field_air__timer = new INTEGER_template(other_value.air__timer());
break;
case OML__FOM__IE__Body::ALT_load__ind__period:
single_value.field_load__ind__period = new INTEGER_template(other_value.load__ind__period());
break;
case OML__FOM__IE__Body::ALT_load__threshold:
single_value.field_load__threshold = new INTEGER_template(other_value.load__threshold());
break;
case OML__FOM__IE__Body::ALT_chan__comb:
single_value.field_chan__comb = new OML__ChannelCombination_template(other_value.chan__comb());
break;
case OML__FOM__IE__Body::ALT_event__type:
single_value.field_event__type = new OML__FOM__EventType_template(other_value.event__type());
break;
case OML__FOM__IE__Body::ALT_gsm__time:
single_value.field_gsm__time = new INTEGER_template(other_value.gsm__time());
break;
case OML__FOM__IE__Body::ALT_hsn:
single_value.field_hsn = new INTEGER_template(other_value.hsn());
break;
case OML__FOM__IE__Body::ALT_intave__param:
single_value.field_intave__param = new INTEGER_template(other_value.intave__param());
break;
case OML__FOM__IE__Body::ALT_interf__bound:
single_value.field_interf__bound = new OML__FOM__InterfLevBoundaries_template(other_value.interf__bound());
break;
case OML__FOM__IE__Body::ALT_maio:
single_value.field_maio = new INTEGER_template(other_value.maio());
break;
case OML__FOM__IE__Body::ALT_manuf__state:
single_value.field_manuf__state = new INTEGER_template(other_value.manuf__state());
break;
case OML__FOM__IE__Body::ALT_max__ta:
single_value.field_max__ta = new INTEGER_template(other_value.max__ta());
break;
case OML__FOM__IE__Body::ALT_nack__causes:
single_value.field_nack__causes = new OML__FOM__NackCause_template(other_value.nack__causes());
break;
case OML__FOM__IE__Body::ALT_ny1:
single_value.field_ny1 = new INTEGER_template(other_value.ny1());
break;
case OML__FOM__IE__Body::ALT_opstate:
single_value.field_opstate = new OML__FOM__OperationalState_template(other_value.opstate());
break;
case OML__FOM__IE__Body::ALT_power__class:
single_value.field_power__class = new INTEGER_template(other_value.power__class());
break;
case OML__FOM__IE__Body::ALT_power__thresh:
single_value.field_power__thresh = new OML__FOM__PowerOuthputThresholds_template(other_value.power__thresh());
break;
case OML__FOM__IE__Body::ALT_prob__cause:
single_value.field_prob__cause = new OML__FOM__ProbableCause_template(other_value.prob__cause());
break;
case OML__FOM__IE__Body::ALT_rach__b__thresh:
single_value.field_rach__b__thresh = new INTEGER_template(other_value.rach__b__thresh());
break;
case OML__FOM__IE__Body::ALT_loadavg__slots:
single_value.field_loadavg__slots = new INTEGER_template(other_value.loadavg__slots());
break;
case OML__FOM__IE__Body::ALT_radio__subch:
single_value.field_radio__subch = new INTEGER_template(other_value.radio__subch());
break;
case OML__FOM__IE__Body::ALT_rf__maxpwr__r:
single_value.field_rf__maxpwr__r = new INTEGER_template(other_value.rf__maxpwr__r());
break;
case OML__FOM__IE__Body::ALT_spec__prob:
single_value.field_spec__prob = new INTEGER_template(other_value.spec__prob());
break;
case OML__FOM__IE__Body::ALT_start__time:
single_value.field_start__time = new INTEGER_template(other_value.start__time());
break;
case OML__FOM__IE__Body::ALT_t200:
single_value.field_t200 = new OML__FOM__T200_template(other_value.t200());
break;
case OML__FOM__IE__Body::ALT_tei:
single_value.field_tei = new INTEGER_template(other_value.tei());
break;
case OML__FOM__IE__Body::ALT_test__no:
single_value.field_test__no = new INTEGER_template(other_value.test__no());
break;
case OML__FOM__IE__Body::ALT_vswr__thresh:
single_value.field_vswr__thresh = new OCTETSTRING_template(other_value.vswr__thresh());
break;
case OML__FOM__IE__Body::ALT_window__size:
single_value.field_window__size = new INTEGER_template(other_value.window__size());
break;
case OML__FOM__IE__Body::ALT_tsc:
single_value.field_tsc = new INTEGER_template(other_value.tsc());
break;
case OML__FOM__IE__Body::ALT_severity:
single_value.field_severity = new OML__FOM__Severity_template(other_value.severity());
break;
case OML__FOM__IE__Body::ALT_outst__alarm:
single_value.field_outst__alarm = new INTEGER_template(other_value.outst__alarm());
break;
case OML__FOM__IE__Body::ALT_meas__type:
single_value.field_meas__type = new INTEGER_template(other_value.meas__type());
break;
case OML__FOM__IE__Body::ALT_avail__status:
single_value.field_avail__status = new OML__IE__AvailStatus_template(other_value.avail__status());
break;
case OML__FOM__IE__Body::ALT_arfcn__list:
single_value.field_arfcn__list = new OML__IE__ArfcnList_template(other_value.arfcn__list());
break;
case OML__FOM__IE__Body::ALT_ip:
single_value.field_ip = new INTEGER_template(other_value.ip());
break;
case OML__FOM__IE__Body::ALT_portnr:
single_value.field_portnr = new INTEGER_template(other_value.portnr());
break;
case OML__FOM__IE__Body::ALT_stream__id:
single_value.field_stream__id = new INTEGER_template(other_value.stream__id());
break;
case OML__FOM__IE__Body::ALT_sec__oml__cfg:
single_value.field_sec__oml__cfg = new OCTETSTRING_template(other_value.sec__oml__cfg());
break;
case OML__FOM__IE__Body::ALT_ip__if__cfg:
single_value.field_ip__if__cfg = new OCTETSTRING_template(other_value.ip__if__cfg());
break;
case OML__FOM__IE__Body::ALT_ip__gw__cfg:
single_value.field_ip__gw__cfg = new OCTETSTRING_template(other_value.ip__gw__cfg());
break;
case OML__FOM__IE__Body::ALT_in__serv__time:
single_value.field_in__serv__time = new INTEGER_template(other_value.in__serv__time());
break;
case OML__FOM__IE__Body::ALT_paging__cfg:
single_value.field_paging__cfg = new INTEGER_template(other_value.paging__cfg());
break;
case OML__FOM__IE__Body::ALT_freq__ctrl:
single_value.field_freq__ctrl = new OCTETSTRING_template(other_value.freq__ctrl());
break;
case OML__FOM__IE__Body::ALT_ari:
single_value.field_ari = new OML__FOM__ARI_template(other_value.ari());
break;
case OML__FOM__IE__Body::ALT_other:
single_value.field_other = new OML__IE__L16V_template(other_value.other());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @AbisOML_Types.OML_FOM_IE_Body.");
}
set_selection(SPECIFIC_VALUE);
}

void OML__FOM__IE__Body_template::copy_template(const OML__FOM__IE__Body_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value.union_selection = other_value.single_value.union_selection;
switch (single_value.union_selection) {
case OML__FOM__IE__Body::ALT_abis__channel:
single_value.field_abis__channel = new OML__FOM__AbisChannel_template(*other_value.single_value.field_abis__channel);
break;
case OML__FOM__IE__Body::ALT_adm__state:
single_value.field_adm__state = new OML__FOM__AdministrativeState_template(*other_value.single_value.field_adm__state);
break;
case OML__FOM__IE__Body::ALT_auton__report:
single_value.field_auton__report = new OCTETSTRING_template(*other_value.single_value.field_auton__report);
break;
case OML__FOM__IE__Body::ALT_bcch__arfcn:
single_value.field_bcch__arfcn = new INTEGER_template(*other_value.single_value.field_bcch__arfcn);
break;
case OML__FOM__IE__Body::ALT_bsic:
single_value.field_bsic = new INTEGER_template(*other_value.single_value.field_bsic);
break;
case OML__FOM__IE__Body::ALT_air__timer:
single_value.field_air__timer = new INTEGER_template(*other_value.single_value.field_air__timer);
break;
case OML__FOM__IE__Body::ALT_load__ind__period:
single_value.field_load__ind__period = new INTEGER_template(*other_value.single_value.field_load__ind__period);
break;
case OML__FOM__IE__Body::ALT_load__threshold:
single_value.field_load__threshold = new INTEGER_template(*other_value.single_value.field_load__threshold);
break;
case OML__FOM__IE__Body::ALT_chan__comb:
single_value.field_chan__comb = new OML__ChannelCombination_template(*other_value.single_value.field_chan__comb);
break;
case OML__FOM__IE__Body::ALT_event__type:
single_value.field_event__type = new OML__FOM__EventType_template(*other_value.single_value.field_event__type);
break;
case OML__FOM__IE__Body::ALT_gsm__time:
single_value.field_gsm__time = new INTEGER_template(*other_value.single_value.field_gsm__time);
break;
case OML__FOM__IE__Body::ALT_hsn:
single_value.field_hsn = new INTEGER_template(*other_value.single_value.field_hsn);
break;
case OML__FOM__IE__Body::ALT_intave__param:
single_value.field_intave__param = new INTEGER_template(*other_value.single_value.field_intave__param);
break;
case OML__FOM__IE__Body::ALT_interf__bound:
single_value.field_interf__bound = new OML__FOM__InterfLevBoundaries_template(*other_value.single_value.field_interf__bound);
break;
case OML__FOM__IE__Body::ALT_maio:
single_value.field_maio = new INTEGER_template(*other_value.single_value.field_maio);
break;
case OML__FOM__IE__Body::ALT_manuf__state:
single_value.field_manuf__state = new INTEGER_template(*other_value.single_value.field_manuf__state);
break;
case OML__FOM__IE__Body::ALT_max__ta:
single_value.field_max__ta = new INTEGER_template(*other_value.single_value.field_max__ta);
break;
case OML__FOM__IE__Body::ALT_nack__causes:
single_value.field_nack__causes = new OML__FOM__NackCause_template(*other_value.single_value.field_nack__causes);
break;
case OML__FOM__IE__Body::ALT_ny1:
single_value.field_ny1 = new INTEGER_template(*other_value.single_value.field_ny1);
break;
case OML__FOM__IE__Body::ALT_opstate:
single_value.field_opstate = new OML__FOM__OperationalState_template(*other_value.single_value.field_opstate);
break;
case OML__FOM__IE__Body::ALT_power__class:
single_value.field_power__class = new INTEGER_template(*other_value.single_value.field_power__class);
break;
case OML__FOM__IE__Body::ALT_power__thresh:
single_value.field_power__thresh = new OML__FOM__PowerOuthputThresholds_template(*other_value.single_value.field_power__thresh);
break;
case OML__FOM__IE__Body::ALT_prob__cause:
single_value.field_prob__cause = new OML__FOM__ProbableCause_template(*other_value.single_value.field_prob__cause);
break;
case OML__FOM__IE__Body::ALT_rach__b__thresh:
single_value.field_rach__b__thresh = new INTEGER_template(*other_value.single_value.field_rach__b__thresh);
break;
case OML__FOM__IE__Body::ALT_loadavg__slots:
single_value.field_loadavg__slots = new INTEGER_template(*other_value.single_value.field_loadavg__slots);
break;
case OML__FOM__IE__Body::ALT_radio__subch:
single_value.field_radio__subch = new INTEGER_template(*other_value.single_value.field_radio__subch);
break;
case OML__FOM__IE__Body::ALT_rf__maxpwr__r:
single_value.field_rf__maxpwr__r = new INTEGER_template(*other_value.single_value.field_rf__maxpwr__r);
break;
case OML__FOM__IE__Body::ALT_spec__prob:
single_value.field_spec__prob = new INTEGER_template(*other_value.single_value.field_spec__prob);
break;
case OML__FOM__IE__Body::ALT_start__time:
single_value.field_start__time = new INTEGER_template(*other_value.single_value.field_start__time);
break;
case OML__FOM__IE__Body::ALT_t200:
single_value.field_t200 = new OML__FOM__T200_template(*other_value.single_value.field_t200);
break;
case OML__FOM__IE__Body::ALT_tei:
single_value.field_tei = new INTEGER_template(*other_value.single_value.field_tei);
break;
case OML__FOM__IE__Body::ALT_test__no:
single_value.field_test__no = new INTEGER_template(*other_value.single_value.field_test__no);
break;
case OML__FOM__IE__Body::ALT_vswr__thresh:
single_value.field_vswr__thresh = new OCTETSTRING_template(*other_value.single_value.field_vswr__thresh);
break;
case OML__FOM__IE__Body::ALT_window__size:
single_value.field_window__size = new INTEGER_template(*other_value.single_value.field_window__size);
break;
case OML__FOM__IE__Body::ALT_tsc:
single_value.field_tsc = new INTEGER_template(*other_value.single_value.field_tsc);
break;
case OML__FOM__IE__Body::ALT_severity:
single_value.field_severity = new OML__FOM__Severity_template(*other_value.single_value.field_severity);
break;
case OML__FOM__IE__Body::ALT_outst__alarm:
single_value.field_outst__alarm = new INTEGER_template(*other_value.single_value.field_outst__alarm);
break;
case OML__FOM__IE__Body::ALT_meas__type:
single_value.field_meas__type = new INTEGER_template(*other_value.single_value.field_meas__type);
break;
case OML__FOM__IE__Body::ALT_avail__status:
single_value.field_avail__status = new OML__IE__AvailStatus_template(*other_value.single_value.field_avail__status);
break;
case OML__FOM__IE__Body::ALT_arfcn__list:
single_value.field_arfcn__list = new OML__IE__ArfcnList_template(*other_value.single_value.field_arfcn__list);
break;
case OML__FOM__IE__Body::ALT_ip:
single_value.field_ip = new INTEGER_template(*other_value.single_value.field_ip);
break;
case OML__FOM__IE__Body::ALT_portnr:
single_value.field_portnr = new INTEGER_template(*other_value.single_value.field_portnr);
break;
case OML__FOM__IE__Body::ALT_stream__id:
single_value.field_stream__id = new INTEGER_template(*other_value.single_value.field_stream__id);
break;
case OML__FOM__IE__Body::ALT_sec__oml__cfg:
single_value.field_sec__oml__cfg = new OCTETSTRING_template(*other_value.single_value.field_sec__oml__cfg);
break;
case OML__FOM__IE__Body::ALT_ip__if__cfg:
single_value.field_ip__if__cfg = new OCTETSTRING_template(*other_value.single_value.field_ip__if__cfg);
break;
case OML__FOM__IE__Body::ALT_ip__gw__cfg:
single_value.field_ip__gw__cfg = new OCTETSTRING_template(*other_value.single_value.field_ip__gw__cfg);
break;
case OML__FOM__IE__Body::ALT_in__serv__time:
single_value.field_in__serv__time = new INTEGER_template(*other_value.single_value.field_in__serv__time);
break;
case OML__FOM__IE__Body::ALT_paging__cfg:
single_value.field_paging__cfg = new INTEGER_template(*other_value.single_value.field_paging__cfg);
break;
case OML__FOM__IE__Body::ALT_freq__ctrl:
single_value.field_freq__ctrl = new OCTETSTRING_template(*other_value.single_value.field_freq__ctrl);
break;
case OML__FOM__IE__Body::ALT_ari:
single_value.field_ari = new OML__FOM__ARI_template(*other_value.single_value.field_ari);
break;
case OML__FOM__IE__Body::ALT_other:
single_value.field_other = new OML__IE__L16V_template(*other_value.single_value.field_other);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @AbisOML_Types.OML_FOM_IE_Body.");
}
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 OML__FOM__IE__Body_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 OML__FOM__IE__Body_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__IE__Body_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized template of union type @AbisOML_Types.OML_FOM_IE_Body.");
}
set_selection(other_value);
}

OML__FOM__IE__Body_template::OML__FOM__IE__Body_template()
{
}

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

OML__FOM__IE__Body_template::OML__FOM__IE__Body_template(const OML__FOM__IE__Body& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void OML__FOM__IE__Body_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case OML__FOM__IE__Body::ALT_abis__channel:
delete single_value.field_abis__channel;
break;
case OML__FOM__IE__Body::ALT_adm__state:
delete single_value.field_adm__state;
break;
case OML__FOM__IE__Body::ALT_auton__report:
delete single_value.field_auton__report;
break;
case OML__FOM__IE__Body::ALT_bcch__arfcn:
delete single_value.field_bcch__arfcn;
break;
case OML__FOM__IE__Body::ALT_bsic:
delete single_value.field_bsic;
break;
case OML__FOM__IE__Body::ALT_air__timer:
delete single_value.field_air__timer;
break;
case OML__FOM__IE__Body::ALT_load__ind__period:
delete single_value.field_load__ind__period;
break;
case OML__FOM__IE__Body::ALT_load__threshold:
delete single_value.field_load__threshold;
break;
case OML__FOM__IE__Body::ALT_chan__comb:
delete single_value.field_chan__comb;
break;
case OML__FOM__IE__Body::ALT_event__type:
delete single_value.field_event__type;
break;
case OML__FOM__IE__Body::ALT_gsm__time:
delete single_value.field_gsm__time;
break;
case OML__FOM__IE__Body::ALT_hsn:
delete single_value.field_hsn;
break;
case OML__FOM__IE__Body::ALT_intave__param:
delete single_value.field_intave__param;
break;
case OML__FOM__IE__Body::ALT_interf__bound:
delete single_value.field_interf__bound;
break;
case OML__FOM__IE__Body::ALT_maio:
delete single_value.field_maio;
break;
case OML__FOM__IE__Body::ALT_manuf__state:
delete single_value.field_manuf__state;
break;
case OML__FOM__IE__Body::ALT_max__ta:
delete single_value.field_max__ta;
break;
case OML__FOM__IE__Body::ALT_nack__causes:
delete single_value.field_nack__causes;
break;
case OML__FOM__IE__Body::ALT_ny1:
delete single_value.field_ny1;
break;
case OML__FOM__IE__Body::ALT_opstate:
delete single_value.field_opstate;
break;
case OML__FOM__IE__Body::ALT_power__class:
delete single_value.field_power__class;
break;
case OML__FOM__IE__Body::ALT_power__thresh:
delete single_value.field_power__thresh;
break;
case OML__FOM__IE__Body::ALT_prob__cause:
delete single_value.field_prob__cause;
break;
case OML__FOM__IE__Body::ALT_rach__b__thresh:
delete single_value.field_rach__b__thresh;
break;
case OML__FOM__IE__Body::ALT_loadavg__slots:
delete single_value.field_loadavg__slots;
break;
case OML__FOM__IE__Body::ALT_radio__subch:
delete single_value.field_radio__subch;
break;
case OML__FOM__IE__Body::ALT_rf__maxpwr__r:
delete single_value.field_rf__maxpwr__r;
break;
case OML__FOM__IE__Body::ALT_spec__prob:
delete single_value.field_spec__prob;
break;
case OML__FOM__IE__Body::ALT_start__time:
delete single_value.field_start__time;
break;
case OML__FOM__IE__Body::ALT_t200:
delete single_value.field_t200;
break;
case OML__FOM__IE__Body::ALT_tei:
delete single_value.field_tei;
break;
case OML__FOM__IE__Body::ALT_test__no:
delete single_value.field_test__no;
break;
case OML__FOM__IE__Body::ALT_vswr__thresh:
delete single_value.field_vswr__thresh;
break;
case OML__FOM__IE__Body::ALT_window__size:
delete single_value.field_window__size;
break;
case OML__FOM__IE__Body::ALT_tsc:
delete single_value.field_tsc;
break;
case OML__FOM__IE__Body::ALT_severity:
delete single_value.field_severity;
break;
case OML__FOM__IE__Body::ALT_outst__alarm:
delete single_value.field_outst__alarm;
break;
case OML__FOM__IE__Body::ALT_meas__type:
delete single_value.field_meas__type;
break;
case OML__FOM__IE__Body::ALT_avail__status:
delete single_value.field_avail__status;
break;
case OML__FOM__IE__Body::ALT_arfcn__list:
delete single_value.field_arfcn__list;
break;
case OML__FOM__IE__Body::ALT_ip:
delete single_value.field_ip;
break;
case OML__FOM__IE__Body::ALT_portnr:
delete single_value.field_portnr;
break;
case OML__FOM__IE__Body::ALT_stream__id:
delete single_value.field_stream__id;
break;
case OML__FOM__IE__Body::ALT_sec__oml__cfg:
delete single_value.field_sec__oml__cfg;
break;
case OML__FOM__IE__Body::ALT_ip__if__cfg:
delete single_value.field_ip__if__cfg;
break;
case OML__FOM__IE__Body::ALT_ip__gw__cfg:
delete single_value.field_ip__gw__cfg;
break;
case OML__FOM__IE__Body::ALT_in__serv__time:
delete single_value.field_in__serv__time;
break;
case OML__FOM__IE__Body::ALT_paging__cfg:
delete single_value.field_paging__cfg;
break;
case OML__FOM__IE__Body::ALT_freq__ctrl:
delete single_value.field_freq__ctrl;
break;
case OML__FOM__IE__Body::ALT_ari:
delete single_value.field_ari;
break;
case OML__FOM__IE__Body::ALT_other:
delete single_value.field_other;
default:
break;
}
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

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

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

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

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

boolean OML__FOM__IE__Body_template::match(const OML__FOM__IE__Body& 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:
{
OML__FOM__IE__Body::union_selection_type value_selection = other_value.get_selection();
if (value_selection == OML__FOM__IE__Body::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case OML__FOM__IE__Body::ALT_abis__channel:
return single_value.field_abis__channel->match(other_value.abis__channel(), legacy);
case OML__FOM__IE__Body::ALT_adm__state:
return single_value.field_adm__state->match(other_value.adm__state(), legacy);
case OML__FOM__IE__Body::ALT_auton__report:
return single_value.field_auton__report->match(other_value.auton__report(), legacy);
case OML__FOM__IE__Body::ALT_bcch__arfcn:
return single_value.field_bcch__arfcn->match(other_value.bcch__arfcn(), legacy);
case OML__FOM__IE__Body::ALT_bsic:
return single_value.field_bsic->match(other_value.bsic(), legacy);
case OML__FOM__IE__Body::ALT_air__timer:
return single_value.field_air__timer->match(other_value.air__timer(), legacy);
case OML__FOM__IE__Body::ALT_load__ind__period:
return single_value.field_load__ind__period->match(other_value.load__ind__period(), legacy);
case OML__FOM__IE__Body::ALT_load__threshold:
return single_value.field_load__threshold->match(other_value.load__threshold(), legacy);
case OML__FOM__IE__Body::ALT_chan__comb:
return single_value.field_chan__comb->match(other_value.chan__comb(), legacy);
case OML__FOM__IE__Body::ALT_event__type:
return single_value.field_event__type->match(other_value.event__type(), legacy);
case OML__FOM__IE__Body::ALT_gsm__time:
return single_value.field_gsm__time->match(other_value.gsm__time(), legacy);
case OML__FOM__IE__Body::ALT_hsn:
return single_value.field_hsn->match(other_value.hsn(), legacy);
case OML__FOM__IE__Body::ALT_intave__param:
return single_value.field_intave__param->match(other_value.intave__param(), legacy);
case OML__FOM__IE__Body::ALT_interf__bound:
return single_value.field_interf__bound->match(other_value.interf__bound(), legacy);
case OML__FOM__IE__Body::ALT_maio:
return single_value.field_maio->match(other_value.maio(), legacy);
case OML__FOM__IE__Body::ALT_manuf__state:
return single_value.field_manuf__state->match(other_value.manuf__state(), legacy);
case OML__FOM__IE__Body::ALT_max__ta:
return single_value.field_max__ta->match(other_value.max__ta(), legacy);
case OML__FOM__IE__Body::ALT_nack__causes:
return single_value.field_nack__causes->match(other_value.nack__causes(), legacy);
case OML__FOM__IE__Body::ALT_ny1:
return single_value.field_ny1->match(other_value.ny1(), legacy);
case OML__FOM__IE__Body::ALT_opstate:
return single_value.field_opstate->match(other_value.opstate(), legacy);
case OML__FOM__IE__Body::ALT_power__class:
return single_value.field_power__class->match(other_value.power__class(), legacy);
case OML__FOM__IE__Body::ALT_power__thresh:
return single_value.field_power__thresh->match(other_value.power__thresh(), legacy);
case OML__FOM__IE__Body::ALT_prob__cause:
return single_value.field_prob__cause->match(other_value.prob__cause(), legacy);
case OML__FOM__IE__Body::ALT_rach__b__thresh:
return single_value.field_rach__b__thresh->match(other_value.rach__b__thresh(), legacy);
case OML__FOM__IE__Body::ALT_loadavg__slots:
return single_value.field_loadavg__slots->match(other_value.loadavg__slots(), legacy);
case OML__FOM__IE__Body::ALT_radio__subch:
return single_value.field_radio__subch->match(other_value.radio__subch(), legacy);
case OML__FOM__IE__Body::ALT_rf__maxpwr__r:
return single_value.field_rf__maxpwr__r->match(other_value.rf__maxpwr__r(), legacy);
case OML__FOM__IE__Body::ALT_spec__prob:
return single_value.field_spec__prob->match(other_value.spec__prob(), legacy);
case OML__FOM__IE__Body::ALT_start__time:
return single_value.field_start__time->match(other_value.start__time(), legacy);
case OML__FOM__IE__Body::ALT_t200:
return single_value.field_t200->match(other_value.t200(), legacy);
case OML__FOM__IE__Body::ALT_tei:
return single_value.field_tei->match(other_value.tei(), legacy);
case OML__FOM__IE__Body::ALT_test__no:
return single_value.field_test__no->match(other_value.test__no(), legacy);
case OML__FOM__IE__Body::ALT_vswr__thresh:
return single_value.field_vswr__thresh->match(other_value.vswr__thresh(), legacy);
case OML__FOM__IE__Body::ALT_window__size:
return single_value.field_window__size->match(other_value.window__size(), legacy);
case OML__FOM__IE__Body::ALT_tsc:
return single_value.field_tsc->match(other_value.tsc(), legacy);
case OML__FOM__IE__Body::ALT_severity:
return single_value.field_severity->match(other_value.severity(), legacy);
case OML__FOM__IE__Body::ALT_outst__alarm:
return single_value.field_outst__alarm->match(other_value.outst__alarm(), legacy);
case OML__FOM__IE__Body::ALT_meas__type:
return single_value.field_meas__type->match(other_value.meas__type(), legacy);
case OML__FOM__IE__Body::ALT_avail__status:
return single_value.field_avail__status->match(other_value.avail__status(), legacy);
case OML__FOM__IE__Body::ALT_arfcn__list:
return single_value.field_arfcn__list->match(other_value.arfcn__list(), legacy);
case OML__FOM__IE__Body::ALT_ip:
return single_value.field_ip->match(other_value.ip(), legacy);
case OML__FOM__IE__Body::ALT_portnr:
return single_value.field_portnr->match(other_value.portnr(), legacy);
case OML__FOM__IE__Body::ALT_stream__id:
return single_value.field_stream__id->match(other_value.stream__id(), legacy);
case OML__FOM__IE__Body::ALT_sec__oml__cfg:
return single_value.field_sec__oml__cfg->match(other_value.sec__oml__cfg(), legacy);
case OML__FOM__IE__Body::ALT_ip__if__cfg:
return single_value.field_ip__if__cfg->match(other_value.ip__if__cfg(), legacy);
case OML__FOM__IE__Body::ALT_ip__gw__cfg:
return single_value.field_ip__gw__cfg->match(other_value.ip__gw__cfg(), legacy);
case OML__FOM__IE__Body::ALT_in__serv__time:
return single_value.field_in__serv__time->match(other_value.in__serv__time(), legacy);
case OML__FOM__IE__Body::ALT_paging__cfg:
return single_value.field_paging__cfg->match(other_value.paging__cfg(), legacy);
case OML__FOM__IE__Body::ALT_freq__ctrl:
return single_value.field_freq__ctrl->match(other_value.freq__ctrl(), legacy);
case OML__FOM__IE__Body::ALT_ari:
return single_value.field_ari->match(other_value.ari(), legacy);
case OML__FOM__IE__Body::ALT_other:
return single_value.field_other->match(other_value.other(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
}
}
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error ("Matching an uninitialized template of union type @AbisOML_Types.OML_FOM_IE_Body.");
}
return FALSE;
}

boolean OML__FOM__IE__Body_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case OML__FOM__IE__Body::ALT_abis__channel:
return single_value.field_abis__channel->is_value();
case OML__FOM__IE__Body::ALT_adm__state:
return single_value.field_adm__state->is_value();
case OML__FOM__IE__Body::ALT_auton__report:
return single_value.field_auton__report->is_value();
case OML__FOM__IE__Body::ALT_bcch__arfcn:
return single_value.field_bcch__arfcn->is_value();
case OML__FOM__IE__Body::ALT_bsic:
return single_value.field_bsic->is_value();
case OML__FOM__IE__Body::ALT_air__timer:
return single_value.field_air__timer->is_value();
case OML__FOM__IE__Body::ALT_load__ind__period:
return single_value.field_load__ind__period->is_value();
case OML__FOM__IE__Body::ALT_load__threshold:
return single_value.field_load__threshold->is_value();
case OML__FOM__IE__Body::ALT_chan__comb:
return single_value.field_chan__comb->is_value();
case OML__FOM__IE__Body::ALT_event__type:
return single_value.field_event__type->is_value();
case OML__FOM__IE__Body::ALT_gsm__time:
return single_value.field_gsm__time->is_value();
case OML__FOM__IE__Body::ALT_hsn:
return single_value.field_hsn->is_value();
case OML__FOM__IE__Body::ALT_intave__param:
return single_value.field_intave__param->is_value();
case OML__FOM__IE__Body::ALT_interf__bound:
return single_value.field_interf__bound->is_value();
case OML__FOM__IE__Body::ALT_maio:
return single_value.field_maio->is_value();
case OML__FOM__IE__Body::ALT_manuf__state:
return single_value.field_manuf__state->is_value();
case OML__FOM__IE__Body::ALT_max__ta:
return single_value.field_max__ta->is_value();
case OML__FOM__IE__Body::ALT_nack__causes:
return single_value.field_nack__causes->is_value();
case OML__FOM__IE__Body::ALT_ny1:
return single_value.field_ny1->is_value();
case OML__FOM__IE__Body::ALT_opstate:
return single_value.field_opstate->is_value();
case OML__FOM__IE__Body::ALT_power__class:
return single_value.field_power__class->is_value();
case OML__FOM__IE__Body::ALT_power__thresh:
return single_value.field_power__thresh->is_value();
case OML__FOM__IE__Body::ALT_prob__cause:
return single_value.field_prob__cause->is_value();
case OML__FOM__IE__Body::ALT_rach__b__thresh:
return single_value.field_rach__b__thresh->is_value();
case OML__FOM__IE__Body::ALT_loadavg__slots:
return single_value.field_loadavg__slots->is_value();
case OML__FOM__IE__Body::ALT_radio__subch:
return single_value.field_radio__subch->is_value();
case OML__FOM__IE__Body::ALT_rf__maxpwr__r:
return single_value.field_rf__maxpwr__r->is_value();
case OML__FOM__IE__Body::ALT_spec__prob:
return single_value.field_spec__prob->is_value();
case OML__FOM__IE__Body::ALT_start__time:
return single_value.field_start__time->is_value();
case OML__FOM__IE__Body::ALT_t200:
return single_value.field_t200->is_value();
case OML__FOM__IE__Body::ALT_tei:
return single_value.field_tei->is_value();
case OML__FOM__IE__Body::ALT_test__no:
return single_value.field_test__no->is_value();
case OML__FOM__IE__Body::ALT_vswr__thresh:
return single_value.field_vswr__thresh->is_value();
case OML__FOM__IE__Body::ALT_window__size:
return single_value.field_window__size->is_value();
case OML__FOM__IE__Body::ALT_tsc:
return single_value.field_tsc->is_value();
case OML__FOM__IE__Body::ALT_severity:
return single_value.field_severity->is_value();
case OML__FOM__IE__Body::ALT_outst__alarm:
return single_value.field_outst__alarm->is_value();
case OML__FOM__IE__Body::ALT_meas__type:
return single_value.field_meas__type->is_value();
case OML__FOM__IE__Body::ALT_avail__status:
return single_value.field_avail__status->is_value();
case OML__FOM__IE__Body::ALT_arfcn__list:
return single_value.field_arfcn__list->is_value();
case OML__FOM__IE__Body::ALT_ip:
return single_value.field_ip->is_value();
case OML__FOM__IE__Body::ALT_portnr:
return single_value.field_portnr->is_value();
case OML__FOM__IE__Body::ALT_stream__id:
return single_value.field_stream__id->is_value();
case OML__FOM__IE__Body::ALT_sec__oml__cfg:
return single_value.field_sec__oml__cfg->is_value();
case OML__FOM__IE__Body::ALT_ip__if__cfg:
return single_value.field_ip__if__cfg->is_value();
case OML__FOM__IE__Body::ALT_ip__gw__cfg:
return single_value.field_ip__gw__cfg->is_value();
case OML__FOM__IE__Body::ALT_in__serv__time:
return single_value.field_in__serv__time->is_value();
case OML__FOM__IE__Body::ALT_paging__cfg:
return single_value.field_paging__cfg->is_value();
case OML__FOM__IE__Body::ALT_freq__ctrl:
return single_value.field_freq__ctrl->is_value();
case OML__FOM__IE__Body::ALT_ari:
return single_value.field_ari->is_value();
case OML__FOM__IE__Body::ALT_other:
return single_value.field_other->is_value();
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
}
}

OML__FOM__IE__Body OML__FOM__IE__Body_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
OML__FOM__IE__Body ret_val;
switch (single_value.union_selection) {
case OML__FOM__IE__Body::ALT_abis__channel:
ret_val.abis__channel() = single_value.field_abis__channel->valueof();
break;
case OML__FOM__IE__Body::ALT_adm__state:
ret_val.adm__state() = single_value.field_adm__state->valueof();
break;
case OML__FOM__IE__Body::ALT_auton__report:
ret_val.auton__report() = single_value.field_auton__report->valueof();
break;
case OML__FOM__IE__Body::ALT_bcch__arfcn:
ret_val.bcch__arfcn() = single_value.field_bcch__arfcn->valueof();
break;
case OML__FOM__IE__Body::ALT_bsic:
ret_val.bsic() = single_value.field_bsic->valueof();
break;
case OML__FOM__IE__Body::ALT_air__timer:
ret_val.air__timer() = single_value.field_air__timer->valueof();
break;
case OML__FOM__IE__Body::ALT_load__ind__period:
ret_val.load__ind__period() = single_value.field_load__ind__period->valueof();
break;
case OML__FOM__IE__Body::ALT_load__threshold:
ret_val.load__threshold() = single_value.field_load__threshold->valueof();
break;
case OML__FOM__IE__Body::ALT_chan__comb:
ret_val.chan__comb() = single_value.field_chan__comb->valueof();
break;
case OML__FOM__IE__Body::ALT_event__type:
ret_val.event__type() = single_value.field_event__type->valueof();
break;
case OML__FOM__IE__Body::ALT_gsm__time:
ret_val.gsm__time() = single_value.field_gsm__time->valueof();
break;
case OML__FOM__IE__Body::ALT_hsn:
ret_val.hsn() = single_value.field_hsn->valueof();
break;
case OML__FOM__IE__Body::ALT_intave__param:
ret_val.intave__param() = single_value.field_intave__param->valueof();
break;
case OML__FOM__IE__Body::ALT_interf__bound:
ret_val.interf__bound() = single_value.field_interf__bound->valueof();
break;
case OML__FOM__IE__Body::ALT_maio:
ret_val.maio() = single_value.field_maio->valueof();
break;
case OML__FOM__IE__Body::ALT_manuf__state:
ret_val.manuf__state() = single_value.field_manuf__state->valueof();
break;
case OML__FOM__IE__Body::ALT_max__ta:
ret_val.max__ta() = single_value.field_max__ta->valueof();
break;
case OML__FOM__IE__Body::ALT_nack__causes:
ret_val.nack__causes() = single_value.field_nack__causes->valueof();
break;
case OML__FOM__IE__Body::ALT_ny1:
ret_val.ny1() = single_value.field_ny1->valueof();
break;
case OML__FOM__IE__Body::ALT_opstate:
ret_val.opstate() = single_value.field_opstate->valueof();
break;
case OML__FOM__IE__Body::ALT_power__class:
ret_val.power__class() = single_value.field_power__class->valueof();
break;
case OML__FOM__IE__Body::ALT_power__thresh:
ret_val.power__thresh() = single_value.field_power__thresh->valueof();
break;
case OML__FOM__IE__Body::ALT_prob__cause:
ret_val.prob__cause() = single_value.field_prob__cause->valueof();
break;
case OML__FOM__IE__Body::ALT_rach__b__thresh:
ret_val.rach__b__thresh() = single_value.field_rach__b__thresh->valueof();
break;
case OML__FOM__IE__Body::ALT_loadavg__slots:
ret_val.loadavg__slots() = single_value.field_loadavg__slots->valueof();
break;
case OML__FOM__IE__Body::ALT_radio__subch:
ret_val.radio__subch() = single_value.field_radio__subch->valueof();
break;
case OML__FOM__IE__Body::ALT_rf__maxpwr__r:
ret_val.rf__maxpwr__r() = single_value.field_rf__maxpwr__r->valueof();
break;
case OML__FOM__IE__Body::ALT_spec__prob:
ret_val.spec__prob() = single_value.field_spec__prob->valueof();
break;
case OML__FOM__IE__Body::ALT_start__time:
ret_val.start__time() = single_value.field_start__time->valueof();
break;
case OML__FOM__IE__Body::ALT_t200:
ret_val.t200() = single_value.field_t200->valueof();
break;
case OML__FOM__IE__Body::ALT_tei:
ret_val.tei() = single_value.field_tei->valueof();
break;
case OML__FOM__IE__Body::ALT_test__no:
ret_val.test__no() = single_value.field_test__no->valueof();
break;
case OML__FOM__IE__Body::ALT_vswr__thresh:
ret_val.vswr__thresh() = single_value.field_vswr__thresh->valueof();
break;
case OML__FOM__IE__Body::ALT_window__size:
ret_val.window__size() = single_value.field_window__size->valueof();
break;
case OML__FOM__IE__Body::ALT_tsc:
ret_val.tsc() = single_value.field_tsc->valueof();
break;
case OML__FOM__IE__Body::ALT_severity:
ret_val.severity() = single_value.field_severity->valueof();
break;
case OML__FOM__IE__Body::ALT_outst__alarm:
ret_val.outst__alarm() = single_value.field_outst__alarm->valueof();
break;
case OML__FOM__IE__Body::ALT_meas__type:
ret_val.meas__type() = single_value.field_meas__type->valueof();
break;
case OML__FOM__IE__Body::ALT_avail__status:
ret_val.avail__status() = single_value.field_avail__status->valueof();
break;
case OML__FOM__IE__Body::ALT_arfcn__list:
ret_val.arfcn__list() = single_value.field_arfcn__list->valueof();
break;
case OML__FOM__IE__Body::ALT_ip:
ret_val.ip() = single_value.field_ip->valueof();
break;
case OML__FOM__IE__Body::ALT_portnr:
ret_val.portnr() = single_value.field_portnr->valueof();
break;
case OML__FOM__IE__Body::ALT_stream__id:
ret_val.stream__id() = single_value.field_stream__id->valueof();
break;
case OML__FOM__IE__Body::ALT_sec__oml__cfg:
ret_val.sec__oml__cfg() = single_value.field_sec__oml__cfg->valueof();
break;
case OML__FOM__IE__Body::ALT_ip__if__cfg:
ret_val.ip__if__cfg() = single_value.field_ip__if__cfg->valueof();
break;
case OML__FOM__IE__Body::ALT_ip__gw__cfg:
ret_val.ip__gw__cfg() = single_value.field_ip__gw__cfg->valueof();
break;
case OML__FOM__IE__Body::ALT_in__serv__time:
ret_val.in__serv__time() = single_value.field_in__serv__time->valueof();
break;
case OML__FOM__IE__Body::ALT_paging__cfg:
ret_val.paging__cfg() = single_value.field_paging__cfg->valueof();
break;
case OML__FOM__IE__Body::ALT_freq__ctrl:
ret_val.freq__ctrl() = single_value.field_freq__ctrl->valueof();
break;
case OML__FOM__IE__Body::ALT_ari:
ret_val.ari() = single_value.field_ari->valueof();
break;
case OML__FOM__IE__Body::ALT_other:
ret_val.other() = single_value.field_other->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
}
return ret_val;
}

OML__FOM__IE__Body_template& OML__FOM__IE__Body_template::list_item(unsigned int list_index) const
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Internal error: Accessing a list element of a non-list template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return value_list.list_value[list_index];
}
void OML__FOM__IE__Body_template::set_type(template_sel template_type, unsigned int list_length)
{
if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST && template_type != CONJUNCTION_MATCH) TTCN_error ("Internal error: Setting an invalid list for a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__FOM__IE__Body_template[list_length];
}

OML__FOM__AbisChannel_template& OML__FOM__IE__Body_template::abis__channel()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_abis__channel) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_abis__channel = new OML__FOM__AbisChannel_template(ANY_VALUE);
else single_value.field_abis__channel = new OML__FOM__AbisChannel_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_abis__channel;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_abis__channel;
}

const OML__FOM__AbisChannel_template& OML__FOM__IE__Body_template::abis__channel() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field abis_channel in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_abis__channel) TTCN_error("Accessing non-selected field abis_channel in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_abis__channel;
}

OML__FOM__AdministrativeState_template& OML__FOM__IE__Body_template::adm__state()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_adm__state) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_adm__state = new OML__FOM__AdministrativeState_template(ANY_VALUE);
else single_value.field_adm__state = new OML__FOM__AdministrativeState_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_adm__state;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_adm__state;
}

const OML__FOM__AdministrativeState_template& OML__FOM__IE__Body_template::adm__state() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field adm_state in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_adm__state) TTCN_error("Accessing non-selected field adm_state in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_adm__state;
}

OCTETSTRING_template& OML__FOM__IE__Body_template::auton__report()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_auton__report) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_auton__report = new OCTETSTRING_template(ANY_VALUE);
else single_value.field_auton__report = new OCTETSTRING_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_auton__report;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_auton__report;
}

const OCTETSTRING_template& OML__FOM__IE__Body_template::auton__report() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field auton_report in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_auton__report) TTCN_error("Accessing non-selected field auton_report in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_auton__report;
}

INTEGER_template& OML__FOM__IE__Body_template::bcch__arfcn()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_bcch__arfcn) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_bcch__arfcn = new INTEGER_template(ANY_VALUE);
else single_value.field_bcch__arfcn = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_bcch__arfcn;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_bcch__arfcn;
}

const INTEGER_template& OML__FOM__IE__Body_template::bcch__arfcn() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field bcch_arfcn in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_bcch__arfcn) TTCN_error("Accessing non-selected field bcch_arfcn in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_bcch__arfcn;
}

INTEGER_template& OML__FOM__IE__Body_template::bsic()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_bsic) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_bsic = new INTEGER_template(ANY_VALUE);
else single_value.field_bsic = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_bsic;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_bsic;
}

const INTEGER_template& OML__FOM__IE__Body_template::bsic() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field bsic in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_bsic) TTCN_error("Accessing non-selected field bsic in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_bsic;
}

INTEGER_template& OML__FOM__IE__Body_template::air__timer()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_air__timer) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_air__timer = new INTEGER_template(ANY_VALUE);
else single_value.field_air__timer = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_air__timer;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_air__timer;
}

const INTEGER_template& OML__FOM__IE__Body_template::air__timer() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field air_timer in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_air__timer) TTCN_error("Accessing non-selected field air_timer in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_air__timer;
}

INTEGER_template& OML__FOM__IE__Body_template::load__ind__period()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_load__ind__period) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_load__ind__period = new INTEGER_template(ANY_VALUE);
else single_value.field_load__ind__period = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_load__ind__period;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_load__ind__period;
}

const INTEGER_template& OML__FOM__IE__Body_template::load__ind__period() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field load_ind_period in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_load__ind__period) TTCN_error("Accessing non-selected field load_ind_period in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_load__ind__period;
}

INTEGER_template& OML__FOM__IE__Body_template::load__threshold()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_load__threshold) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_load__threshold = new INTEGER_template(ANY_VALUE);
else single_value.field_load__threshold = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_load__threshold;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_load__threshold;
}

const INTEGER_template& OML__FOM__IE__Body_template::load__threshold() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field load_threshold in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_load__threshold) TTCN_error("Accessing non-selected field load_threshold in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_load__threshold;
}

OML__ChannelCombination_template& OML__FOM__IE__Body_template::chan__comb()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_chan__comb) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_chan__comb = new OML__ChannelCombination_template(ANY_VALUE);
else single_value.field_chan__comb = new OML__ChannelCombination_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_chan__comb;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_chan__comb;
}

const OML__ChannelCombination_template& OML__FOM__IE__Body_template::chan__comb() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field chan_comb in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_chan__comb) TTCN_error("Accessing non-selected field chan_comb in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_chan__comb;
}

OML__FOM__EventType_template& OML__FOM__IE__Body_template::event__type()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_event__type) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_event__type = new OML__FOM__EventType_template(ANY_VALUE);
else single_value.field_event__type = new OML__FOM__EventType_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_event__type;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_event__type;
}

const OML__FOM__EventType_template& OML__FOM__IE__Body_template::event__type() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field event_type in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_event__type) TTCN_error("Accessing non-selected field event_type in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_event__type;
}

INTEGER_template& OML__FOM__IE__Body_template::gsm__time()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_gsm__time) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_gsm__time = new INTEGER_template(ANY_VALUE);
else single_value.field_gsm__time = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_gsm__time;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_gsm__time;
}

const INTEGER_template& OML__FOM__IE__Body_template::gsm__time() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field gsm_time in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_gsm__time) TTCN_error("Accessing non-selected field gsm_time in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_gsm__time;
}

INTEGER_template& OML__FOM__IE__Body_template::hsn()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_hsn) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_hsn = new INTEGER_template(ANY_VALUE);
else single_value.field_hsn = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_hsn;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_hsn;
}

const INTEGER_template& OML__FOM__IE__Body_template::hsn() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field hsn in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_hsn) TTCN_error("Accessing non-selected field hsn in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_hsn;
}

INTEGER_template& OML__FOM__IE__Body_template::intave__param()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_intave__param) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_intave__param = new INTEGER_template(ANY_VALUE);
else single_value.field_intave__param = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_intave__param;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_intave__param;
}

const INTEGER_template& OML__FOM__IE__Body_template::intave__param() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field intave_param in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_intave__param) TTCN_error("Accessing non-selected field intave_param in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_intave__param;
}

OML__FOM__InterfLevBoundaries_template& OML__FOM__IE__Body_template::interf__bound()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_interf__bound) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_interf__bound = new OML__FOM__InterfLevBoundaries_template(ANY_VALUE);
else single_value.field_interf__bound = new OML__FOM__InterfLevBoundaries_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_interf__bound;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_interf__bound;
}

const OML__FOM__InterfLevBoundaries_template& OML__FOM__IE__Body_template::interf__bound() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field interf_bound in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_interf__bound) TTCN_error("Accessing non-selected field interf_bound in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_interf__bound;
}

INTEGER_template& OML__FOM__IE__Body_template::maio()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_maio) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_maio = new INTEGER_template(ANY_VALUE);
else single_value.field_maio = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_maio;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_maio;
}

const INTEGER_template& OML__FOM__IE__Body_template::maio() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field maio in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_maio) TTCN_error("Accessing non-selected field maio in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_maio;
}

INTEGER_template& OML__FOM__IE__Body_template::manuf__state()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_manuf__state) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_manuf__state = new INTEGER_template(ANY_VALUE);
else single_value.field_manuf__state = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_manuf__state;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_manuf__state;
}

const INTEGER_template& OML__FOM__IE__Body_template::manuf__state() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field manuf_state in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_manuf__state) TTCN_error("Accessing non-selected field manuf_state in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_manuf__state;
}

INTEGER_template& OML__FOM__IE__Body_template::max__ta()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_max__ta) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_max__ta = new INTEGER_template(ANY_VALUE);
else single_value.field_max__ta = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_max__ta;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_max__ta;
}

const INTEGER_template& OML__FOM__IE__Body_template::max__ta() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field max_ta in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_max__ta) TTCN_error("Accessing non-selected field max_ta in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_max__ta;
}

OML__FOM__NackCause_template& OML__FOM__IE__Body_template::nack__causes()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_nack__causes) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_nack__causes = new OML__FOM__NackCause_template(ANY_VALUE);
else single_value.field_nack__causes = new OML__FOM__NackCause_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_nack__causes;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_nack__causes;
}

const OML__FOM__NackCause_template& OML__FOM__IE__Body_template::nack__causes() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field nack_causes in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_nack__causes) TTCN_error("Accessing non-selected field nack_causes in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_nack__causes;
}

INTEGER_template& OML__FOM__IE__Body_template::ny1()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_ny1) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_ny1 = new INTEGER_template(ANY_VALUE);
else single_value.field_ny1 = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_ny1;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_ny1;
}

const INTEGER_template& OML__FOM__IE__Body_template::ny1() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ny1 in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_ny1) TTCN_error("Accessing non-selected field ny1 in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_ny1;
}

OML__FOM__OperationalState_template& OML__FOM__IE__Body_template::opstate()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_opstate) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_opstate = new OML__FOM__OperationalState_template(ANY_VALUE);
else single_value.field_opstate = new OML__FOM__OperationalState_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_opstate;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_opstate;
}

const OML__FOM__OperationalState_template& OML__FOM__IE__Body_template::opstate() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field opstate in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_opstate) TTCN_error("Accessing non-selected field opstate in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_opstate;
}

INTEGER_template& OML__FOM__IE__Body_template::power__class()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_power__class) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_power__class = new INTEGER_template(ANY_VALUE);
else single_value.field_power__class = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_power__class;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_power__class;
}

const INTEGER_template& OML__FOM__IE__Body_template::power__class() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field power_class in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_power__class) TTCN_error("Accessing non-selected field power_class in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_power__class;
}

OML__FOM__PowerOuthputThresholds_template& OML__FOM__IE__Body_template::power__thresh()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_power__thresh) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_power__thresh = new OML__FOM__PowerOuthputThresholds_template(ANY_VALUE);
else single_value.field_power__thresh = new OML__FOM__PowerOuthputThresholds_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_power__thresh;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_power__thresh;
}

const OML__FOM__PowerOuthputThresholds_template& OML__FOM__IE__Body_template::power__thresh() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field power_thresh in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_power__thresh) TTCN_error("Accessing non-selected field power_thresh in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_power__thresh;
}

OML__FOM__ProbableCause_template& OML__FOM__IE__Body_template::prob__cause()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_prob__cause) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_prob__cause = new OML__FOM__ProbableCause_template(ANY_VALUE);
else single_value.field_prob__cause = new OML__FOM__ProbableCause_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_prob__cause;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_prob__cause;
}

const OML__FOM__ProbableCause_template& OML__FOM__IE__Body_template::prob__cause() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field prob_cause in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_prob__cause) TTCN_error("Accessing non-selected field prob_cause in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_prob__cause;
}

INTEGER_template& OML__FOM__IE__Body_template::rach__b__thresh()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_rach__b__thresh) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_rach__b__thresh = new INTEGER_template(ANY_VALUE);
else single_value.field_rach__b__thresh = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_rach__b__thresh;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_rach__b__thresh;
}

const INTEGER_template& OML__FOM__IE__Body_template::rach__b__thresh() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field rach_b_thresh in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_rach__b__thresh) TTCN_error("Accessing non-selected field rach_b_thresh in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_rach__b__thresh;
}

INTEGER_template& OML__FOM__IE__Body_template::loadavg__slots()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_loadavg__slots) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_loadavg__slots = new INTEGER_template(ANY_VALUE);
else single_value.field_loadavg__slots = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_loadavg__slots;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_loadavg__slots;
}

const INTEGER_template& OML__FOM__IE__Body_template::loadavg__slots() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field loadavg_slots in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_loadavg__slots) TTCN_error("Accessing non-selected field loadavg_slots in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_loadavg__slots;
}

INTEGER_template& OML__FOM__IE__Body_template::radio__subch()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_radio__subch) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_radio__subch = new INTEGER_template(ANY_VALUE);
else single_value.field_radio__subch = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_radio__subch;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_radio__subch;
}

const INTEGER_template& OML__FOM__IE__Body_template::radio__subch() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field radio_subch in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_radio__subch) TTCN_error("Accessing non-selected field radio_subch in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_radio__subch;
}

INTEGER_template& OML__FOM__IE__Body_template::rf__maxpwr__r()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_rf__maxpwr__r) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_rf__maxpwr__r = new INTEGER_template(ANY_VALUE);
else single_value.field_rf__maxpwr__r = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_rf__maxpwr__r;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_rf__maxpwr__r;
}

const INTEGER_template& OML__FOM__IE__Body_template::rf__maxpwr__r() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field rf_maxpwr_r in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_rf__maxpwr__r) TTCN_error("Accessing non-selected field rf_maxpwr_r in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_rf__maxpwr__r;
}

INTEGER_template& OML__FOM__IE__Body_template::spec__prob()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_spec__prob) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_spec__prob = new INTEGER_template(ANY_VALUE);
else single_value.field_spec__prob = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_spec__prob;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_spec__prob;
}

const INTEGER_template& OML__FOM__IE__Body_template::spec__prob() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field spec_prob in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_spec__prob) TTCN_error("Accessing non-selected field spec_prob in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_spec__prob;
}

INTEGER_template& OML__FOM__IE__Body_template::start__time()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_start__time) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_start__time = new INTEGER_template(ANY_VALUE);
else single_value.field_start__time = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_start__time;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_start__time;
}

const INTEGER_template& OML__FOM__IE__Body_template::start__time() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field start_time in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_start__time) TTCN_error("Accessing non-selected field start_time in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_start__time;
}

OML__FOM__T200_template& OML__FOM__IE__Body_template::t200()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_t200) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_t200 = new OML__FOM__T200_template(ANY_VALUE);
else single_value.field_t200 = new OML__FOM__T200_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_t200;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_t200;
}

const OML__FOM__T200_template& OML__FOM__IE__Body_template::t200() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field t200 in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_t200) TTCN_error("Accessing non-selected field t200 in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_t200;
}

INTEGER_template& OML__FOM__IE__Body_template::tei()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_tei) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_tei = new INTEGER_template(ANY_VALUE);
else single_value.field_tei = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_tei;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_tei;
}

const INTEGER_template& OML__FOM__IE__Body_template::tei() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field tei in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_tei) TTCN_error("Accessing non-selected field tei in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_tei;
}

INTEGER_template& OML__FOM__IE__Body_template::test__no()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_test__no) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_test__no = new INTEGER_template(ANY_VALUE);
else single_value.field_test__no = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_test__no;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_test__no;
}

const INTEGER_template& OML__FOM__IE__Body_template::test__no() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field test_no in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_test__no) TTCN_error("Accessing non-selected field test_no in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_test__no;
}

OCTETSTRING_template& OML__FOM__IE__Body_template::vswr__thresh()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_vswr__thresh) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_vswr__thresh = new OCTETSTRING_template(ANY_VALUE);
else single_value.field_vswr__thresh = new OCTETSTRING_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_vswr__thresh;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_vswr__thresh;
}

const OCTETSTRING_template& OML__FOM__IE__Body_template::vswr__thresh() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field vswr_thresh in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_vswr__thresh) TTCN_error("Accessing non-selected field vswr_thresh in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_vswr__thresh;
}

INTEGER_template& OML__FOM__IE__Body_template::window__size()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_window__size) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_window__size = new INTEGER_template(ANY_VALUE);
else single_value.field_window__size = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_window__size;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_window__size;
}

const INTEGER_template& OML__FOM__IE__Body_template::window__size() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field window_size in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_window__size) TTCN_error("Accessing non-selected field window_size in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_window__size;
}

INTEGER_template& OML__FOM__IE__Body_template::tsc()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_tsc) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_tsc = new INTEGER_template(ANY_VALUE);
else single_value.field_tsc = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_tsc;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_tsc;
}

const INTEGER_template& OML__FOM__IE__Body_template::tsc() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field tsc in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_tsc) TTCN_error("Accessing non-selected field tsc in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_tsc;
}

OML__FOM__Severity_template& OML__FOM__IE__Body_template::severity()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_severity) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_severity = new OML__FOM__Severity_template(ANY_VALUE);
else single_value.field_severity = new OML__FOM__Severity_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_severity;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_severity;
}

const OML__FOM__Severity_template& OML__FOM__IE__Body_template::severity() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field severity in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_severity) TTCN_error("Accessing non-selected field severity in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_severity;
}

INTEGER_template& OML__FOM__IE__Body_template::outst__alarm()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_outst__alarm) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_outst__alarm = new INTEGER_template(ANY_VALUE);
else single_value.field_outst__alarm = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_outst__alarm;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_outst__alarm;
}

const INTEGER_template& OML__FOM__IE__Body_template::outst__alarm() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field outst_alarm in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_outst__alarm) TTCN_error("Accessing non-selected field outst_alarm in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_outst__alarm;
}

INTEGER_template& OML__FOM__IE__Body_template::meas__type()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_meas__type) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_meas__type = new INTEGER_template(ANY_VALUE);
else single_value.field_meas__type = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_meas__type;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_meas__type;
}

const INTEGER_template& OML__FOM__IE__Body_template::meas__type() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field meas_type in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_meas__type) TTCN_error("Accessing non-selected field meas_type in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_meas__type;
}

OML__IE__AvailStatus_template& OML__FOM__IE__Body_template::avail__status()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_avail__status) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_avail__status = new OML__IE__AvailStatus_template(ANY_VALUE);
else single_value.field_avail__status = new OML__IE__AvailStatus_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_avail__status;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_avail__status;
}

const OML__IE__AvailStatus_template& OML__FOM__IE__Body_template::avail__status() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field avail_status in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_avail__status) TTCN_error("Accessing non-selected field avail_status in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_avail__status;
}

OML__IE__ArfcnList_template& OML__FOM__IE__Body_template::arfcn__list()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_arfcn__list) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_arfcn__list = new OML__IE__ArfcnList_template(ANY_VALUE);
else single_value.field_arfcn__list = new OML__IE__ArfcnList_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_arfcn__list;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_arfcn__list;
}

const OML__IE__ArfcnList_template& OML__FOM__IE__Body_template::arfcn__list() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field arfcn_list in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_arfcn__list) TTCN_error("Accessing non-selected field arfcn_list in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_arfcn__list;
}

INTEGER_template& OML__FOM__IE__Body_template::ip()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_ip) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_ip = new INTEGER_template(ANY_VALUE);
else single_value.field_ip = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_ip;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_ip;
}

const INTEGER_template& OML__FOM__IE__Body_template::ip() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ip in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_ip) TTCN_error("Accessing non-selected field ip in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_ip;
}

INTEGER_template& OML__FOM__IE__Body_template::portnr()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_portnr) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_portnr = new INTEGER_template(ANY_VALUE);
else single_value.field_portnr = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_portnr;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_portnr;
}

const INTEGER_template& OML__FOM__IE__Body_template::portnr() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field portnr in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_portnr) TTCN_error("Accessing non-selected field portnr in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_portnr;
}

INTEGER_template& OML__FOM__IE__Body_template::stream__id()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_stream__id) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_stream__id = new INTEGER_template(ANY_VALUE);
else single_value.field_stream__id = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_stream__id;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_stream__id;
}

const INTEGER_template& OML__FOM__IE__Body_template::stream__id() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field stream_id in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_stream__id) TTCN_error("Accessing non-selected field stream_id in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_stream__id;
}

OCTETSTRING_template& OML__FOM__IE__Body_template::sec__oml__cfg()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_sec__oml__cfg) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_sec__oml__cfg = new OCTETSTRING_template(ANY_VALUE);
else single_value.field_sec__oml__cfg = new OCTETSTRING_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_sec__oml__cfg;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_sec__oml__cfg;
}

const OCTETSTRING_template& OML__FOM__IE__Body_template::sec__oml__cfg() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sec_oml_cfg in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_sec__oml__cfg) TTCN_error("Accessing non-selected field sec_oml_cfg in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_sec__oml__cfg;
}

OCTETSTRING_template& OML__FOM__IE__Body_template::ip__if__cfg()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_ip__if__cfg) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_ip__if__cfg = new OCTETSTRING_template(ANY_VALUE);
else single_value.field_ip__if__cfg = new OCTETSTRING_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_ip__if__cfg;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_ip__if__cfg;
}

const OCTETSTRING_template& OML__FOM__IE__Body_template::ip__if__cfg() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ip_if_cfg in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_ip__if__cfg) TTCN_error("Accessing non-selected field ip_if_cfg in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_ip__if__cfg;
}

OCTETSTRING_template& OML__FOM__IE__Body_template::ip__gw__cfg()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_ip__gw__cfg) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_ip__gw__cfg = new OCTETSTRING_template(ANY_VALUE);
else single_value.field_ip__gw__cfg = new OCTETSTRING_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_ip__gw__cfg;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_ip__gw__cfg;
}

const OCTETSTRING_template& OML__FOM__IE__Body_template::ip__gw__cfg() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ip_gw_cfg in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_ip__gw__cfg) TTCN_error("Accessing non-selected field ip_gw_cfg in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_ip__gw__cfg;
}

INTEGER_template& OML__FOM__IE__Body_template::in__serv__time()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_in__serv__time) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_in__serv__time = new INTEGER_template(ANY_VALUE);
else single_value.field_in__serv__time = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_in__serv__time;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_in__serv__time;
}

const INTEGER_template& OML__FOM__IE__Body_template::in__serv__time() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field in_serv_time in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_in__serv__time) TTCN_error("Accessing non-selected field in_serv_time in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_in__serv__time;
}

INTEGER_template& OML__FOM__IE__Body_template::paging__cfg()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_paging__cfg) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_paging__cfg = new INTEGER_template(ANY_VALUE);
else single_value.field_paging__cfg = new INTEGER_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_paging__cfg;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_paging__cfg;
}

const INTEGER_template& OML__FOM__IE__Body_template::paging__cfg() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field paging_cfg in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_paging__cfg) TTCN_error("Accessing non-selected field paging_cfg in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_paging__cfg;
}

OCTETSTRING_template& OML__FOM__IE__Body_template::freq__ctrl()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_freq__ctrl) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_freq__ctrl = new OCTETSTRING_template(ANY_VALUE);
else single_value.field_freq__ctrl = new OCTETSTRING_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_freq__ctrl;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_freq__ctrl;
}

const OCTETSTRING_template& OML__FOM__IE__Body_template::freq__ctrl() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field freq_ctrl in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_freq__ctrl) TTCN_error("Accessing non-selected field freq_ctrl in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_freq__ctrl;
}

OML__FOM__ARI_template& OML__FOM__IE__Body_template::ari()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_ari) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_ari = new OML__FOM__ARI_template(ANY_VALUE);
else single_value.field_ari = new OML__FOM__ARI_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_ari;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_ari;
}

const OML__FOM__ARI_template& OML__FOM__IE__Body_template::ari() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ari in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_ari) TTCN_error("Accessing non-selected field ari in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_ari;
}

OML__IE__L16V_template& OML__FOM__IE__Body_template::other()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__FOM__IE__Body::ALT_other) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_other = new OML__IE__L16V_template(ANY_VALUE);
else single_value.field_other = new OML__IE__L16V_template;
single_value.union_selection = OML__FOM__IE__Body::ALT_other;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_other;
}

const OML__IE__L16V_template& OML__FOM__IE__Body_template::other() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field other in a non-specific template of union type @AbisOML_Types.OML_FOM_IE_Body.");
if (single_value.union_selection != OML__FOM__IE__Body::ALT_other) TTCN_error("Accessing non-selected field other in a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return *single_value.field_other;
}

boolean OML__FOM__IE__Body_template::ischosen(OML__FOM__IE__Body::union_selection_type checked_selection) const
{
if (checked_selection == OML__FOM__IE__Body::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @AbisOML_Types.OML_FOM_IE_Body.");
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.union_selection == OML__FOM__IE__Body::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
return single_value.union_selection == checked_selection;
case VALUE_LIST:
{
if (value_list.n_values < 1)
TTCN_error("Internal error: Performing ischosen() operation on a template of union type @AbisOML_Types.OML_FOM_IE_Body containing an empty list.");
boolean ret_val = value_list.list_value[0].ischosen(checked_selection);
for (unsigned int list_count = 1; ret_val == TRUE && list_count < value_list.n_values; list_count++) {
ret_val = value_list.list_value[list_count].ischosen(checked_selection);
}
return ret_val;
}
default:
return FALSE;
}
return FALSE;
}

void OML__FOM__IE__Body_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case OML__FOM__IE__Body::ALT_abis__channel:
TTCN_Logger::log_event_str("{ abis_channel := ");
single_value.field_abis__channel->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_adm__state:
TTCN_Logger::log_event_str("{ adm_state := ");
single_value.field_adm__state->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_auton__report:
TTCN_Logger::log_event_str("{ auton_report := ");
single_value.field_auton__report->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_bcch__arfcn:
TTCN_Logger::log_event_str("{ bcch_arfcn := ");
single_value.field_bcch__arfcn->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_bsic:
TTCN_Logger::log_event_str("{ bsic := ");
single_value.field_bsic->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_air__timer:
TTCN_Logger::log_event_str("{ air_timer := ");
single_value.field_air__timer->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_load__ind__period:
TTCN_Logger::log_event_str("{ load_ind_period := ");
single_value.field_load__ind__period->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_load__threshold:
TTCN_Logger::log_event_str("{ load_threshold := ");
single_value.field_load__threshold->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_chan__comb:
TTCN_Logger::log_event_str("{ chan_comb := ");
single_value.field_chan__comb->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_event__type:
TTCN_Logger::log_event_str("{ event_type := ");
single_value.field_event__type->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_gsm__time:
TTCN_Logger::log_event_str("{ gsm_time := ");
single_value.field_gsm__time->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_hsn:
TTCN_Logger::log_event_str("{ hsn := ");
single_value.field_hsn->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_intave__param:
TTCN_Logger::log_event_str("{ intave_param := ");
single_value.field_intave__param->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_interf__bound:
TTCN_Logger::log_event_str("{ interf_bound := ");
single_value.field_interf__bound->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_maio:
TTCN_Logger::log_event_str("{ maio := ");
single_value.field_maio->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_manuf__state:
TTCN_Logger::log_event_str("{ manuf_state := ");
single_value.field_manuf__state->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_max__ta:
TTCN_Logger::log_event_str("{ max_ta := ");
single_value.field_max__ta->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_nack__causes:
TTCN_Logger::log_event_str("{ nack_causes := ");
single_value.field_nack__causes->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_ny1:
TTCN_Logger::log_event_str("{ ny1 := ");
single_value.field_ny1->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_opstate:
TTCN_Logger::log_event_str("{ opstate := ");
single_value.field_opstate->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_power__class:
TTCN_Logger::log_event_str("{ power_class := ");
single_value.field_power__class->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_power__thresh:
TTCN_Logger::log_event_str("{ power_thresh := ");
single_value.field_power__thresh->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_prob__cause:
TTCN_Logger::log_event_str("{ prob_cause := ");
single_value.field_prob__cause->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_rach__b__thresh:
TTCN_Logger::log_event_str("{ rach_b_thresh := ");
single_value.field_rach__b__thresh->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_loadavg__slots:
TTCN_Logger::log_event_str("{ loadavg_slots := ");
single_value.field_loadavg__slots->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_radio__subch:
TTCN_Logger::log_event_str("{ radio_subch := ");
single_value.field_radio__subch->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_rf__maxpwr__r:
TTCN_Logger::log_event_str("{ rf_maxpwr_r := ");
single_value.field_rf__maxpwr__r->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_spec__prob:
TTCN_Logger::log_event_str("{ spec_prob := ");
single_value.field_spec__prob->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_start__time:
TTCN_Logger::log_event_str("{ start_time := ");
single_value.field_start__time->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_t200:
TTCN_Logger::log_event_str("{ t200 := ");
single_value.field_t200->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_tei:
TTCN_Logger::log_event_str("{ tei := ");
single_value.field_tei->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_test__no:
TTCN_Logger::log_event_str("{ test_no := ");
single_value.field_test__no->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_vswr__thresh:
TTCN_Logger::log_event_str("{ vswr_thresh := ");
single_value.field_vswr__thresh->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_window__size:
TTCN_Logger::log_event_str("{ window_size := ");
single_value.field_window__size->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_tsc:
TTCN_Logger::log_event_str("{ tsc := ");
single_value.field_tsc->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_severity:
TTCN_Logger::log_event_str("{ severity := ");
single_value.field_severity->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_outst__alarm:
TTCN_Logger::log_event_str("{ outst_alarm := ");
single_value.field_outst__alarm->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_meas__type:
TTCN_Logger::log_event_str("{ meas_type := ");
single_value.field_meas__type->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_avail__status:
TTCN_Logger::log_event_str("{ avail_status := ");
single_value.field_avail__status->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_arfcn__list:
TTCN_Logger::log_event_str("{ arfcn_list := ");
single_value.field_arfcn__list->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_ip:
TTCN_Logger::log_event_str("{ ip := ");
single_value.field_ip->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_portnr:
TTCN_Logger::log_event_str("{ portnr := ");
single_value.field_portnr->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_stream__id:
TTCN_Logger::log_event_str("{ stream_id := ");
single_value.field_stream__id->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_sec__oml__cfg:
TTCN_Logger::log_event_str("{ sec_oml_cfg := ");
single_value.field_sec__oml__cfg->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_ip__if__cfg:
TTCN_Logger::log_event_str("{ ip_if_cfg := ");
single_value.field_ip__if__cfg->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_ip__gw__cfg:
TTCN_Logger::log_event_str("{ ip_gw_cfg := ");
single_value.field_ip__gw__cfg->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_in__serv__time:
TTCN_Logger::log_event_str("{ in_serv_time := ");
single_value.field_in__serv__time->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_paging__cfg:
TTCN_Logger::log_event_str("{ paging_cfg := ");
single_value.field_paging__cfg->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_freq__ctrl:
TTCN_Logger::log_event_str("{ freq_ctrl := ");
single_value.field_freq__ctrl->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_ari:
TTCN_Logger::log_event_str("{ ari := ");
single_value.field_ari->log();
TTCN_Logger::log_event_str(" }");
break;
case OML__FOM__IE__Body::ALT_other:
TTCN_Logger::log_event_str("{ other := ");
single_value.field_other->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_str("<invalid selector>");
}
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void OML__FOM__IE__Body_template::log_match(const OML__FOM__IE__Body& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity() && match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
return;
}
if (template_selection == SPECIFIC_VALUE && single_value.union_selection == match_value.get_selection()) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
switch (single_value.union_selection) {
case OML__FOM__IE__Body::ALT_abis__channel:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".abis_channel");
single_value.field_abis__channel->log_match(match_value.abis__channel(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ abis_channel := ");
single_value.field_abis__channel->log_match(match_value.abis__channel(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_adm__state:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".adm_state");
single_value.field_adm__state->log_match(match_value.adm__state(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ adm_state := ");
single_value.field_adm__state->log_match(match_value.adm__state(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_auton__report:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".auton_report");
single_value.field_auton__report->log_match(match_value.auton__report(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ auton_report := ");
single_value.field_auton__report->log_match(match_value.auton__report(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_bcch__arfcn:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".bcch_arfcn");
single_value.field_bcch__arfcn->log_match(match_value.bcch__arfcn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ bcch_arfcn := ");
single_value.field_bcch__arfcn->log_match(match_value.bcch__arfcn(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_bsic:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".bsic");
single_value.field_bsic->log_match(match_value.bsic(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ bsic := ");
single_value.field_bsic->log_match(match_value.bsic(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_air__timer:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".air_timer");
single_value.field_air__timer->log_match(match_value.air__timer(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ air_timer := ");
single_value.field_air__timer->log_match(match_value.air__timer(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_load__ind__period:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".load_ind_period");
single_value.field_load__ind__period->log_match(match_value.load__ind__period(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ load_ind_period := ");
single_value.field_load__ind__period->log_match(match_value.load__ind__period(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_load__threshold:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".load_threshold");
single_value.field_load__threshold->log_match(match_value.load__threshold(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ load_threshold := ");
single_value.field_load__threshold->log_match(match_value.load__threshold(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_chan__comb:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".chan_comb");
single_value.field_chan__comb->log_match(match_value.chan__comb(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ chan_comb := ");
single_value.field_chan__comb->log_match(match_value.chan__comb(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_event__type:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".event_type");
single_value.field_event__type->log_match(match_value.event__type(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ event_type := ");
single_value.field_event__type->log_match(match_value.event__type(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_gsm__time:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".gsm_time");
single_value.field_gsm__time->log_match(match_value.gsm__time(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ gsm_time := ");
single_value.field_gsm__time->log_match(match_value.gsm__time(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_hsn:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".hsn");
single_value.field_hsn->log_match(match_value.hsn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ hsn := ");
single_value.field_hsn->log_match(match_value.hsn(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_intave__param:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".intave_param");
single_value.field_intave__param->log_match(match_value.intave__param(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ intave_param := ");
single_value.field_intave__param->log_match(match_value.intave__param(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_interf__bound:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".interf_bound");
single_value.field_interf__bound->log_match(match_value.interf__bound(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ interf_bound := ");
single_value.field_interf__bound->log_match(match_value.interf__bound(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_maio:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".maio");
single_value.field_maio->log_match(match_value.maio(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ maio := ");
single_value.field_maio->log_match(match_value.maio(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_manuf__state:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".manuf_state");
single_value.field_manuf__state->log_match(match_value.manuf__state(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ manuf_state := ");
single_value.field_manuf__state->log_match(match_value.manuf__state(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_max__ta:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".max_ta");
single_value.field_max__ta->log_match(match_value.max__ta(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ max_ta := ");
single_value.field_max__ta->log_match(match_value.max__ta(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_nack__causes:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".nack_causes");
single_value.field_nack__causes->log_match(match_value.nack__causes(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ nack_causes := ");
single_value.field_nack__causes->log_match(match_value.nack__causes(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_ny1:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".ny1");
single_value.field_ny1->log_match(match_value.ny1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ ny1 := ");
single_value.field_ny1->log_match(match_value.ny1(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_opstate:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".opstate");
single_value.field_opstate->log_match(match_value.opstate(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ opstate := ");
single_value.field_opstate->log_match(match_value.opstate(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_power__class:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".power_class");
single_value.field_power__class->log_match(match_value.power__class(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ power_class := ");
single_value.field_power__class->log_match(match_value.power__class(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_power__thresh:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".power_thresh");
single_value.field_power__thresh->log_match(match_value.power__thresh(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ power_thresh := ");
single_value.field_power__thresh->log_match(match_value.power__thresh(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_prob__cause:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".prob_cause");
single_value.field_prob__cause->log_match(match_value.prob__cause(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ prob_cause := ");
single_value.field_prob__cause->log_match(match_value.prob__cause(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_rach__b__thresh:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".rach_b_thresh");
single_value.field_rach__b__thresh->log_match(match_value.rach__b__thresh(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ rach_b_thresh := ");
single_value.field_rach__b__thresh->log_match(match_value.rach__b__thresh(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_loadavg__slots:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".loadavg_slots");
single_value.field_loadavg__slots->log_match(match_value.loadavg__slots(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ loadavg_slots := ");
single_value.field_loadavg__slots->log_match(match_value.loadavg__slots(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_radio__subch:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".radio_subch");
single_value.field_radio__subch->log_match(match_value.radio__subch(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ radio_subch := ");
single_value.field_radio__subch->log_match(match_value.radio__subch(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_rf__maxpwr__r:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".rf_maxpwr_r");
single_value.field_rf__maxpwr__r->log_match(match_value.rf__maxpwr__r(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ rf_maxpwr_r := ");
single_value.field_rf__maxpwr__r->log_match(match_value.rf__maxpwr__r(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_spec__prob:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".spec_prob");
single_value.field_spec__prob->log_match(match_value.spec__prob(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ spec_prob := ");
single_value.field_spec__prob->log_match(match_value.spec__prob(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_start__time:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".start_time");
single_value.field_start__time->log_match(match_value.start__time(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ start_time := ");
single_value.field_start__time->log_match(match_value.start__time(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_t200:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".t200");
single_value.field_t200->log_match(match_value.t200(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ t200 := ");
single_value.field_t200->log_match(match_value.t200(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_tei:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".tei");
single_value.field_tei->log_match(match_value.tei(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ tei := ");
single_value.field_tei->log_match(match_value.tei(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_test__no:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".test_no");
single_value.field_test__no->log_match(match_value.test__no(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ test_no := ");
single_value.field_test__no->log_match(match_value.test__no(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_vswr__thresh:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".vswr_thresh");
single_value.field_vswr__thresh->log_match(match_value.vswr__thresh(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ vswr_thresh := ");
single_value.field_vswr__thresh->log_match(match_value.vswr__thresh(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_window__size:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".window_size");
single_value.field_window__size->log_match(match_value.window__size(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ window_size := ");
single_value.field_window__size->log_match(match_value.window__size(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_tsc:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".tsc");
single_value.field_tsc->log_match(match_value.tsc(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ tsc := ");
single_value.field_tsc->log_match(match_value.tsc(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_severity:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".severity");
single_value.field_severity->log_match(match_value.severity(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ severity := ");
single_value.field_severity->log_match(match_value.severity(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_outst__alarm:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".outst_alarm");
single_value.field_outst__alarm->log_match(match_value.outst__alarm(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ outst_alarm := ");
single_value.field_outst__alarm->log_match(match_value.outst__alarm(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_meas__type:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".meas_type");
single_value.field_meas__type->log_match(match_value.meas__type(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ meas_type := ");
single_value.field_meas__type->log_match(match_value.meas__type(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_avail__status:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".avail_status");
single_value.field_avail__status->log_match(match_value.avail__status(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ avail_status := ");
single_value.field_avail__status->log_match(match_value.avail__status(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_arfcn__list:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".arfcn_list");
single_value.field_arfcn__list->log_match(match_value.arfcn__list(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ arfcn_list := ");
single_value.field_arfcn__list->log_match(match_value.arfcn__list(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_ip:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".ip");
single_value.field_ip->log_match(match_value.ip(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ ip := ");
single_value.field_ip->log_match(match_value.ip(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_portnr:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".portnr");
single_value.field_portnr->log_match(match_value.portnr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ portnr := ");
single_value.field_portnr->log_match(match_value.portnr(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_stream__id:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".stream_id");
single_value.field_stream__id->log_match(match_value.stream__id(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ stream_id := ");
single_value.field_stream__id->log_match(match_value.stream__id(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_sec__oml__cfg:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".sec_oml_cfg");
single_value.field_sec__oml__cfg->log_match(match_value.sec__oml__cfg(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ sec_oml_cfg := ");
single_value.field_sec__oml__cfg->log_match(match_value.sec__oml__cfg(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_ip__if__cfg:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".ip_if_cfg");
single_value.field_ip__if__cfg->log_match(match_value.ip__if__cfg(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ ip_if_cfg := ");
single_value.field_ip__if__cfg->log_match(match_value.ip__if__cfg(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_ip__gw__cfg:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".ip_gw_cfg");
single_value.field_ip__gw__cfg->log_match(match_value.ip__gw__cfg(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ ip_gw_cfg := ");
single_value.field_ip__gw__cfg->log_match(match_value.ip__gw__cfg(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_in__serv__time:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".in_serv_time");
single_value.field_in__serv__time->log_match(match_value.in__serv__time(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ in_serv_time := ");
single_value.field_in__serv__time->log_match(match_value.in__serv__time(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_paging__cfg:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".paging_cfg");
single_value.field_paging__cfg->log_match(match_value.paging__cfg(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ paging_cfg := ");
single_value.field_paging__cfg->log_match(match_value.paging__cfg(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_freq__ctrl:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".freq_ctrl");
single_value.field_freq__ctrl->log_match(match_value.freq__ctrl(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ freq_ctrl := ");
single_value.field_freq__ctrl->log_match(match_value.freq__ctrl(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_ari:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".ari");
single_value.field_ari->log_match(match_value.ari(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ ari := ");
single_value.field_ari->log_match(match_value.ari(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case OML__FOM__IE__Body::ALT_other:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".other");
single_value.field_other->log_match(match_value.other(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ other := ");
single_value.field_other->log_match(match_value.other(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
default:
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str("<invalid selector>");
}
} else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void OML__FOM__IE__Body_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
switch (single_value.union_selection) {
case OML__FOM__IE__Body::ALT_abis__channel:
single_value.field_abis__channel->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_adm__state:
single_value.field_adm__state->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_auton__report:
single_value.field_auton__report->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_bcch__arfcn:
single_value.field_bcch__arfcn->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_bsic:
single_value.field_bsic->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_air__timer:
single_value.field_air__timer->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_load__ind__period:
single_value.field_load__ind__period->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_load__threshold:
single_value.field_load__threshold->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_chan__comb:
single_value.field_chan__comb->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_event__type:
single_value.field_event__type->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_gsm__time:
single_value.field_gsm__time->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_hsn:
single_value.field_hsn->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_intave__param:
single_value.field_intave__param->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_interf__bound:
single_value.field_interf__bound->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_maio:
single_value.field_maio->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_manuf__state:
single_value.field_manuf__state->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_max__ta:
single_value.field_max__ta->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_nack__causes:
single_value.field_nack__causes->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_ny1:
single_value.field_ny1->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_opstate:
single_value.field_opstate->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_power__class:
single_value.field_power__class->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_power__thresh:
single_value.field_power__thresh->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_prob__cause:
single_value.field_prob__cause->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_rach__b__thresh:
single_value.field_rach__b__thresh->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_loadavg__slots:
single_value.field_loadavg__slots->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_radio__subch:
single_value.field_radio__subch->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_rf__maxpwr__r:
single_value.field_rf__maxpwr__r->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_spec__prob:
single_value.field_spec__prob->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_start__time:
single_value.field_start__time->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_t200:
single_value.field_t200->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_tei:
single_value.field_tei->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_test__no:
single_value.field_test__no->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_vswr__thresh:
single_value.field_vswr__thresh->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_window__size:
single_value.field_window__size->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_tsc:
single_value.field_tsc->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_severity:
single_value.field_severity->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_outst__alarm:
single_value.field_outst__alarm->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_meas__type:
single_value.field_meas__type->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_avail__status:
single_value.field_avail__status->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_arfcn__list:
single_value.field_arfcn__list->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_ip:
single_value.field_ip->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_portnr:
single_value.field_portnr->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_stream__id:
single_value.field_stream__id->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_sec__oml__cfg:
single_value.field_sec__oml__cfg->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_ip__if__cfg:
single_value.field_ip__if__cfg->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_ip__gw__cfg:
single_value.field_ip__gw__cfg->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_in__serv__time:
single_value.field_in__serv__time->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_paging__cfg:
single_value.field_paging__cfg->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_freq__ctrl:
single_value.field_freq__ctrl->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_ari:
single_value.field_ari->set_implicit_omit(); break;
case OML__FOM__IE__Body::ALT_other:
single_value.field_other->set_implicit_omit(); break;
default: break;
}
}

void OML__FOM__IE__Body_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value.union_selection);
switch (single_value.union_selection) {
case OML__FOM__IE__Body::ALT_abis__channel:
single_value.field_abis__channel->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_adm__state:
single_value.field_adm__state->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_auton__report:
single_value.field_auton__report->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_bcch__arfcn:
single_value.field_bcch__arfcn->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_bsic:
single_value.field_bsic->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_air__timer:
single_value.field_air__timer->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_load__ind__period:
single_value.field_load__ind__period->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_load__threshold:
single_value.field_load__threshold->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_chan__comb:
single_value.field_chan__comb->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_event__type:
single_value.field_event__type->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_gsm__time:
single_value.field_gsm__time->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_hsn:
single_value.field_hsn->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_intave__param:
single_value.field_intave__param->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_interf__bound:
single_value.field_interf__bound->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_maio:
single_value.field_maio->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_manuf__state:
single_value.field_manuf__state->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_max__ta:
single_value.field_max__ta->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_nack__causes:
single_value.field_nack__causes->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_ny1:
single_value.field_ny1->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_opstate:
single_value.field_opstate->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_power__class:
single_value.field_power__class->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_power__thresh:
single_value.field_power__thresh->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_prob__cause:
single_value.field_prob__cause->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_rach__b__thresh:
single_value.field_rach__b__thresh->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_loadavg__slots:
single_value.field_loadavg__slots->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_radio__subch:
single_value.field_radio__subch->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_rf__maxpwr__r:
single_value.field_rf__maxpwr__r->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_spec__prob:
single_value.field_spec__prob->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_start__time:
single_value.field_start__time->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_t200:
single_value.field_t200->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_tei:
single_value.field_tei->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_test__no:
single_value.field_test__no->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_vswr__thresh:
single_value.field_vswr__thresh->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_window__size:
single_value.field_window__size->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_tsc:
single_value.field_tsc->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_severity:
single_value.field_severity->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_outst__alarm:
single_value.field_outst__alarm->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_meas__type:
single_value.field_meas__type->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_avail__status:
single_value.field_avail__status->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_arfcn__list:
single_value.field_arfcn__list->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_ip:
single_value.field_ip->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_portnr:
single_value.field_portnr->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_stream__id:
single_value.field_stream__id->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_sec__oml__cfg:
single_value.field_sec__oml__cfg->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_ip__if__cfg:
single_value.field_ip__if__cfg->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_ip__gw__cfg:
single_value.field_ip__gw__cfg->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_in__serv__time:
single_value.field_in__serv__time->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_paging__cfg:
single_value.field_paging__cfg->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_freq__ctrl:
single_value.field_freq__ctrl->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_ari:
single_value.field_ari->encode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_other:
single_value.field_other->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized template of type @AbisOML_Types.OML_FOM_IE_Body.");
}
}

void OML__FOM__IE__Body_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
{
single_value.union_selection = OML__FOM__IE__Body::UNBOUND_VALUE;
OML__FOM__IE__Body::union_selection_type new_selection = (OML__FOM__IE__Body::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case OML__FOM__IE__Body::ALT_abis__channel:
single_value.field_abis__channel = new OML__FOM__AbisChannel_template;
single_value.field_abis__channel->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_adm__state:
single_value.field_adm__state = new OML__FOM__AdministrativeState_template;
single_value.field_adm__state->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_auton__report:
single_value.field_auton__report = new OCTETSTRING_template;
single_value.field_auton__report->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_bcch__arfcn:
single_value.field_bcch__arfcn = new INTEGER_template;
single_value.field_bcch__arfcn->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_bsic:
single_value.field_bsic = new INTEGER_template;
single_value.field_bsic->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_air__timer:
single_value.field_air__timer = new INTEGER_template;
single_value.field_air__timer->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_load__ind__period:
single_value.field_load__ind__period = new INTEGER_template;
single_value.field_load__ind__period->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_load__threshold:
single_value.field_load__threshold = new INTEGER_template;
single_value.field_load__threshold->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_chan__comb:
single_value.field_chan__comb = new OML__ChannelCombination_template;
single_value.field_chan__comb->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_event__type:
single_value.field_event__type = new OML__FOM__EventType_template;
single_value.field_event__type->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_gsm__time:
single_value.field_gsm__time = new INTEGER_template;
single_value.field_gsm__time->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_hsn:
single_value.field_hsn = new INTEGER_template;
single_value.field_hsn->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_intave__param:
single_value.field_intave__param = new INTEGER_template;
single_value.field_intave__param->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_interf__bound:
single_value.field_interf__bound = new OML__FOM__InterfLevBoundaries_template;
single_value.field_interf__bound->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_maio:
single_value.field_maio = new INTEGER_template;
single_value.field_maio->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_manuf__state:
single_value.field_manuf__state = new INTEGER_template;
single_value.field_manuf__state->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_max__ta:
single_value.field_max__ta = new INTEGER_template;
single_value.field_max__ta->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_nack__causes:
single_value.field_nack__causes = new OML__FOM__NackCause_template;
single_value.field_nack__causes->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_ny1:
single_value.field_ny1 = new INTEGER_template;
single_value.field_ny1->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_opstate:
single_value.field_opstate = new OML__FOM__OperationalState_template;
single_value.field_opstate->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_power__class:
single_value.field_power__class = new INTEGER_template;
single_value.field_power__class->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_power__thresh:
single_value.field_power__thresh = new OML__FOM__PowerOuthputThresholds_template;
single_value.field_power__thresh->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_prob__cause:
single_value.field_prob__cause = new OML__FOM__ProbableCause_template;
single_value.field_prob__cause->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_rach__b__thresh:
single_value.field_rach__b__thresh = new INTEGER_template;
single_value.field_rach__b__thresh->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_loadavg__slots:
single_value.field_loadavg__slots = new INTEGER_template;
single_value.field_loadavg__slots->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_radio__subch:
single_value.field_radio__subch = new INTEGER_template;
single_value.field_radio__subch->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_rf__maxpwr__r:
single_value.field_rf__maxpwr__r = new INTEGER_template;
single_value.field_rf__maxpwr__r->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_spec__prob:
single_value.field_spec__prob = new INTEGER_template;
single_value.field_spec__prob->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_start__time:
single_value.field_start__time = new INTEGER_template;
single_value.field_start__time->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_t200:
single_value.field_t200 = new OML__FOM__T200_template;
single_value.field_t200->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_tei:
single_value.field_tei = new INTEGER_template;
single_value.field_tei->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_test__no:
single_value.field_test__no = new INTEGER_template;
single_value.field_test__no->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_vswr__thresh:
single_value.field_vswr__thresh = new OCTETSTRING_template;
single_value.field_vswr__thresh->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_window__size:
single_value.field_window__size = new INTEGER_template;
single_value.field_window__size->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_tsc:
single_value.field_tsc = new INTEGER_template;
single_value.field_tsc->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_severity:
single_value.field_severity = new OML__FOM__Severity_template;
single_value.field_severity->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_outst__alarm:
single_value.field_outst__alarm = new INTEGER_template;
single_value.field_outst__alarm->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_meas__type:
single_value.field_meas__type = new INTEGER_template;
single_value.field_meas__type->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_avail__status:
single_value.field_avail__status = new OML__IE__AvailStatus_template;
single_value.field_avail__status->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_arfcn__list:
single_value.field_arfcn__list = new OML__IE__ArfcnList_template;
single_value.field_arfcn__list->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_ip:
single_value.field_ip = new INTEGER_template;
single_value.field_ip->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_portnr:
single_value.field_portnr = new INTEGER_template;
single_value.field_portnr->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_stream__id:
single_value.field_stream__id = new INTEGER_template;
single_value.field_stream__id->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_sec__oml__cfg:
single_value.field_sec__oml__cfg = new OCTETSTRING_template;
single_value.field_sec__oml__cfg->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_ip__if__cfg:
single_value.field_ip__if__cfg = new OCTETSTRING_template;
single_value.field_ip__if__cfg->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_ip__gw__cfg:
single_value.field_ip__gw__cfg = new OCTETSTRING_template;
single_value.field_ip__gw__cfg->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_in__serv__time:
single_value.field_in__serv__time = new INTEGER_template;
single_value.field_in__serv__time->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_paging__cfg:
single_value.field_paging__cfg = new INTEGER_template;
single_value.field_paging__cfg->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_freq__ctrl:
single_value.field_freq__ctrl = new OCTETSTRING_template;
single_value.field_freq__ctrl->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_ari:
single_value.field_ari = new OML__FOM__ARI_template;
single_value.field_ari->decode_text(text_buf);
break;
case OML__FOM__IE__Body::ALT_other:
single_value.field_other = new OML__IE__L16V_template;
single_value.field_other->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @AbisOML_Types.OML_FOM_IE_Body.");
}
single_value.union_selection = new_selection;
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__FOM__IE__Body_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized selector was received in a template of type @AbisOML_Types.OML_FOM_IE_Body.");
}
}

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

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

void OML__FOM__IE__Body_template::set_param(Module_Param& param)
{
  if (dynamic_cast<Module_Param_Name*>(param.get_id()) != NULL &&
      param.get_id()->next_name()) {
    char* param_field = param.get_id()->get_current_name();
    if (param_field[0] >= '0' && param_field[0] <= '9') {
      param.error("Unexpected array index in module parameter, expected a valid field"
        " name for union template type `@AbisOML_Types.OML_FOM_IE_Body'");
    }
    if (strcmp("abis_channel", param_field) == 0) {
      abis__channel().set_param(param);
      return;
    } else if (strcmp("adm_state", param_field) == 0) {
      adm__state().set_param(param);
      return;
    } else if (strcmp("auton_report", param_field) == 0) {
      auton__report().set_param(param);
      return;
    } else if (strcmp("bcch_arfcn", param_field) == 0) {
      bcch__arfcn().set_param(param);
      return;
    } else if (strcmp("bsic", param_field) == 0) {
      bsic().set_param(param);
      return;
    } else if (strcmp("air_timer", param_field) == 0) {
      air__timer().set_param(param);
      return;
    } else if (strcmp("load_ind_period", param_field) == 0) {
      load__ind__period().set_param(param);
      return;
    } else if (strcmp("load_threshold", param_field) == 0) {
      load__threshold().set_param(param);
      return;
    } else if (strcmp("chan_comb", param_field) == 0) {
      chan__comb().set_param(param);
      return;
    } else if (strcmp("event_type", param_field) == 0) {
      event__type().set_param(param);
      return;
    } else if (strcmp("gsm_time", param_field) == 0) {
      gsm__time().set_param(param);
      return;
    } else if (strcmp("hsn", param_field) == 0) {
      hsn().set_param(param);
      return;
    } else if (strcmp("intave_param", param_field) == 0) {
      intave__param().set_param(param);
      return;
    } else if (strcmp("interf_bound", param_field) == 0) {
      interf__bound().set_param(param);
      return;
    } else if (strcmp("maio", param_field) == 0) {
      maio().set_param(param);
      return;
    } else if (strcmp("manuf_state", param_field) == 0) {
      manuf__state().set_param(param);
      return;
    } else if (strcmp("max_ta", param_field) == 0) {
      max__ta().set_param(param);
      return;
    } else if (strcmp("nack_causes", param_field) == 0) {
      nack__causes().set_param(param);
      return;
    } else if (strcmp("ny1", param_field) == 0) {
      ny1().set_param(param);
      return;
    } else if (strcmp("opstate", param_field) == 0) {
      opstate().set_param(param);
      return;
    } else if (strcmp("power_class", param_field) == 0) {
      power__class().set_param(param);
      return;
    } else if (strcmp("power_thresh", param_field) == 0) {
      power__thresh().set_param(param);
      return;
    } else if (strcmp("prob_cause", param_field) == 0) {
      prob__cause().set_param(param);
      return;
    } else if (strcmp("rach_b_thresh", param_field) == 0) {
      rach__b__thresh().set_param(param);
      return;
    } else if (strcmp("loadavg_slots", param_field) == 0) {
      loadavg__slots().set_param(param);
      return;
    } else if (strcmp("radio_subch", param_field) == 0) {
      radio__subch().set_param(param);
      return;
    } else if (strcmp("rf_maxpwr_r", param_field) == 0) {
      rf__maxpwr__r().set_param(param);
      return;
    } else if (strcmp("spec_prob", param_field) == 0) {
      spec__prob().set_param(param);
      return;
    } else if (strcmp("start_time", param_field) == 0) {
      start__time().set_param(param);
      return;
    } else if (strcmp("t200", param_field) == 0) {
      t200().set_param(param);
      return;
    } else if (strcmp("tei", param_field) == 0) {
      tei().set_param(param);
      return;
    } else if (strcmp("test_no", param_field) == 0) {
      test__no().set_param(param);
      return;
    } else if (strcmp("vswr_thresh", param_field) == 0) {
      vswr__thresh().set_param(param);
      return;
    } else if (strcmp("window_size", param_field) == 0) {
      window__size().set_param(param);
      return;
    } else if (strcmp("tsc", param_field) == 0) {
      tsc().set_param(param);
      return;
    } else if (strcmp("severity", param_field) == 0) {
      severity().set_param(param);
      return;
    } else if (strcmp("outst_alarm", param_field) == 0) {
      outst__alarm().set_param(param);
      return;
    } else if (strcmp("meas_type", param_field) == 0) {
      meas__type().set_param(param);
      return;
    } else if (strcmp("avail_status", param_field) == 0) {
      avail__status().set_param(param);
      return;
    } else if (strcmp("arfcn_list", param_field) == 0) {
      arfcn__list().set_param(param);
      return;
    } else if (strcmp("ip", param_field) == 0) {
      ip().set_param(param);
      return;
    } else if (strcmp("portnr", param_field) == 0) {
      portnr().set_param(param);
      return;
    } else if (strcmp("stream_id", param_field) == 0) {
      stream__id().set_param(param);
      return;
    } else if (strcmp("sec_oml_cfg", param_field) == 0) {
      sec__oml__cfg().set_param(param);
      return;
    } else if (strcmp("ip_if_cfg", param_field) == 0) {
      ip__if__cfg().set_param(param);
      return;
    } else if (strcmp("ip_gw_cfg", param_field) == 0) {
      ip__gw__cfg().set_param(param);
      return;
    } else if (strcmp("in_serv_time", param_field) == 0) {
      in__serv__time().set_param(param);
      return;
    } else if (strcmp("paging_cfg", param_field) == 0) {
      paging__cfg().set_param(param);
      return;
    } else if (strcmp("freq_ctrl", param_field) == 0) {
      freq__ctrl().set_param(param);
      return;
    } else if (strcmp("ari", param_field) == 0) {
      ari().set_param(param);
      return;
    } else if (strcmp("other", param_field) == 0) {
      other().set_param(param);
      return;
    } else param.error("Field `%s' not found in union template type `@AbisOML_Types.OML_FOM_IE_Body'", param_field);
  }
  param.basic_check(Module_Param::BC_TEMPLATE, "union template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__FOM__IE__Body_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (m_p->get_size()==0) break;
    param.type_error("union template", "@AbisOML_Types.OML_FOM_IE_Body");
    break;
  case Module_Param::MP_Assignment_List: {
    Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1);
    char* last_name = mp_last->get_id()->get_name();
    if (!strcmp(last_name, "abis_channel")) {
      abis__channel().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "adm_state")) {
      adm__state().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "auton_report")) {
      auton__report().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "bcch_arfcn")) {
      bcch__arfcn().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "bsic")) {
      bsic().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "air_timer")) {
      air__timer().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "load_ind_period")) {
      load__ind__period().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "load_threshold")) {
      load__threshold().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "chan_comb")) {
      chan__comb().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "event_type")) {
      event__type().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "gsm_time")) {
      gsm__time().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "hsn")) {
      hsn().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "intave_param")) {
      intave__param().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "interf_bound")) {
      interf__bound().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "maio")) {
      maio().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "manuf_state")) {
      manuf__state().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "max_ta")) {
      max__ta().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "nack_causes")) {
      nack__causes().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "ny1")) {
      ny1().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "opstate")) {
      opstate().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "power_class")) {
      power__class().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "power_thresh")) {
      power__thresh().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "prob_cause")) {
      prob__cause().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "rach_b_thresh")) {
      rach__b__thresh().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "loadavg_slots")) {
      loadavg__slots().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "radio_subch")) {
      radio__subch().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "rf_maxpwr_r")) {
      rf__maxpwr__r().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "spec_prob")) {
      spec__prob().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "start_time")) {
      start__time().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "t200")) {
      t200().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "tei")) {
      tei().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "test_no")) {
      test__no().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "vswr_thresh")) {
      vswr__thresh().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "window_size")) {
      window__size().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "tsc")) {
      tsc().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "severity")) {
      severity().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "outst_alarm")) {
      outst__alarm().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "meas_type")) {
      meas__type().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "avail_status")) {
      avail__status().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "arfcn_list")) {
      arfcn__list().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "ip")) {
      ip().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "portnr")) {
      portnr().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "stream_id")) {
      stream__id().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "sec_oml_cfg")) {
      sec__oml__cfg().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "ip_if_cfg")) {
      ip__if__cfg().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "ip_gw_cfg")) {
      ip__gw__cfg().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "in_serv_time")) {
      in__serv__time().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "paging_cfg")) {
      paging__cfg().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "freq_ctrl")) {
      freq__ctrl().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "ari")) {
      ari().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "other")) {
      other().set_param(*mp_last);
      break;
    }
    mp_last->error("Field %s does not exist in type @AbisOML_Types.OML_FOM_IE_Body.", last_name);
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__IE__Body_template* precondition = new OML__FOM__IE__Body_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__FOM__IE__Body_template* implied_template = new OML__FOM__IE__Body_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__FOM__IE__Body_template(precondition, implied_template);
  } break;
  default:
    param.type_error("union template", "@AbisOML_Types.OML_FOM_IE_Body");
  }
  is_ifpresent = param.get_ifpresent();
}

void OML__FOM__IE__Body_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
switch (single_value.union_selection) {
case OML__FOM__IE__Body::ALT_abis__channel:
single_value.field_abis__channel->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_adm__state:
single_value.field_adm__state->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_auton__report:
single_value.field_auton__report->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_bcch__arfcn:
single_value.field_bcch__arfcn->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_bsic:
single_value.field_bsic->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_air__timer:
single_value.field_air__timer->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_load__ind__period:
single_value.field_load__ind__period->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_load__threshold:
single_value.field_load__threshold->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_chan__comb:
single_value.field_chan__comb->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_event__type:
single_value.field_event__type->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_gsm__time:
single_value.field_gsm__time->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_hsn:
single_value.field_hsn->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_intave__param:
single_value.field_intave__param->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_interf__bound:
single_value.field_interf__bound->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_maio:
single_value.field_maio->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_manuf__state:
single_value.field_manuf__state->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_max__ta:
single_value.field_max__ta->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_nack__causes:
single_value.field_nack__causes->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_ny1:
single_value.field_ny1->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_opstate:
single_value.field_opstate->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_power__class:
single_value.field_power__class->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_power__thresh:
single_value.field_power__thresh->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_prob__cause:
single_value.field_prob__cause->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_rach__b__thresh:
single_value.field_rach__b__thresh->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_loadavg__slots:
single_value.field_loadavg__slots->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_radio__subch:
single_value.field_radio__subch->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_rf__maxpwr__r:
single_value.field_rf__maxpwr__r->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_spec__prob:
single_value.field_spec__prob->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_start__time:
single_value.field_start__time->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_t200:
single_value.field_t200->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_tei:
single_value.field_tei->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_test__no:
single_value.field_test__no->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_vswr__thresh:
single_value.field_vswr__thresh->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_window__size:
single_value.field_window__size->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_tsc:
single_value.field_tsc->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_severity:
single_value.field_severity->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_outst__alarm:
single_value.field_outst__alarm->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_meas__type:
single_value.field_meas__type->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_avail__status:
single_value.field_avail__status->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_arfcn__list:
single_value.field_arfcn__list->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_ip:
single_value.field_ip->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_portnr:
single_value.field_portnr->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_stream__id:
single_value.field_stream__id->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_sec__oml__cfg:
single_value.field_sec__oml__cfg->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_ip__if__cfg:
single_value.field_ip__if__cfg->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_ip__gw__cfg:
single_value.field_ip__gw__cfg->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_in__serv__time:
single_value.field_in__serv__time->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_paging__cfg:
single_value.field_paging__cfg->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_freq__ctrl:
single_value.field_freq__ctrl->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_ari:
single_value.field_ari->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
case OML__FOM__IE__Body::ALT_other:
single_value.field_other->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE_Body");
return;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @AbisOML_Types.OML_FOM_IE_Body.");
}
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 : "@AbisOML_Types.OML_FOM_IE_Body");
}

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

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

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

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

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

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

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

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

boolean OML__FOM__Subslot::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_Subslot.");
return enum_value == other_value;
}

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

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

boolean OML__FOM__Subslot::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_Subslot.");
return enum_value < other_value;
}

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

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

boolean OML__FOM__Subslot::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_Subslot.");
return enum_value > other_value;
}

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

const char *OML__FOM__Subslot::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case NM__SUBSLOT__A: return "NM_SUBSLOT_A";
case NM__SUBSLOT__B: return "NM_SUBSLOT_B";
case NM__SUBSLOT__C: return "NM_SUBSLOT_C";
case NM__SUBSLOT__D: return "NM_SUBSLOT_D";
case NM__SUBSLOT__64k: return "NM_SUBSLOT_64k";
default:
return "<unknown>";
}
}

OML__FOM__Subslot::enum_type OML__FOM__Subslot::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "NM_SUBSLOT_A")) return NM__SUBSLOT__A;
if (!strcmp(str_par, "NM_SUBSLOT_B")) return NM__SUBSLOT__B;
if (!strcmp(str_par, "NM_SUBSLOT_C")) return NM__SUBSLOT__C;
if (!strcmp(str_par, "NM_SUBSLOT_D")) return NM__SUBSLOT__D;
if (!strcmp(str_par, "NM_SUBSLOT_64k")) return NM__SUBSLOT__64k;
}
return UNKNOWN_VALUE;
}

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

int OML__FOM__Subslot::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_Subslot.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int OML__FOM__Subslot::enum2int(const OML__FOM__Subslot& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_Subslot.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

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

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

void OML__FOM__Subslot::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void OML__FOM__Subslot::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@AbisOML_Types.OML_FOM_Subslot");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_Subslot.");
  }
}

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

void OML__FOM__Subslot::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @AbisOML_Types.OML_FOM_Subslot.", enum_value);
}

void OML__FOM__Subslot::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__FOM__Subslot::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 OML__FOM__Subslot::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
{
  int decoded_value = 0;
  int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 8, no_err);
  if (decoded_length < 0) return decoded_length;
  if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
  else {
    if(no_err){
     return -1;
    } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
    enum_value = UNKNOWN_VALUE;
    }
  }
  return decoded_length;
}

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

void OML__FOM__Subslot_template::copy_template(const OML__FOM__Subslot_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__FOM__Subslot_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 OML__FOM__Subslot_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__Subslot_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_Subslot.");
}
}

OML__FOM__Subslot_template::OML__FOM__Subslot_template()
{
}

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

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

OML__FOM__Subslot_template::OML__FOM__Subslot_template(OML__FOM__Subslot::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

OML__FOM__Subslot_template& OML__FOM__Subslot_template::operator=(const OPTIONAL<OML__FOM__Subslot>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (OML__FOM__Subslot::enum_type)(const OML__FOM__Subslot&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @AbisOML_Types.OML_FOM_Subslot.");
}
return *this;
}

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

boolean OML__FOM__Subslot_template::match(OML__FOM__Subslot::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_Subslot.");
}
return FALSE;
}

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

OML__FOM__Subslot::enum_type OML__FOM__Subslot_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @AbisOML_Types.OML_FOM_Subslot.");
return single_value;
}

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

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

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

void OML__FOM__Subslot_template::log_match(const OML__FOM__Subslot& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

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

void OML__FOM__Subslot_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (OML__FOM__Subslot::enum_type)text_buf.pull_int().get_val();
if (!OML__FOM__Subslot::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @AbisOML_Types.OML_FOM_Subslot.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__FOM__Subslot_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @AbisOML_Types.OML_FOM_Subslot.");
}
}

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

boolean OML__FOM__Subslot_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 OML__FOM__Subslot_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__FOM__Subslot_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    OML__FOM__Subslot::enum_type enum_val = OML__FOM__Subslot::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!OML__FOM__Subslot::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_Subslot.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__Subslot_template* precondition = new OML__FOM__Subslot_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__FOM__Subslot_template* implied_template = new OML__FOM__Subslot_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__FOM__Subslot_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@AbisOML_Types.OML_FOM_Subslot");
  }
  is_ifpresent = param.get_ifpresent();
}

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

OML__FOM__AbisChannel::OML__FOM__AbisChannel()
{
}

OML__FOM__AbisChannel::OML__FOM__AbisChannel(const INTEGER& par_bts__port__nr,
    const INTEGER& par_timeslot__nr,
    const OML__FOM__Subslot& par_subslot__nr)
  :   field_bts__port__nr(par_bts__port__nr),
  field_timeslot__nr(par_timeslot__nr),
  field_subslot__nr(par_subslot__nr)
{
}

OML__FOM__AbisChannel::OML__FOM__AbisChannel(const OML__FOM__AbisChannel& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @AbisOML_Types.OML_FOM_AbisChannel.");
if (other_value.bts__port__nr().is_bound()) field_bts__port__nr = other_value.bts__port__nr();
else field_bts__port__nr.clean_up();
if (other_value.timeslot__nr().is_bound()) field_timeslot__nr = other_value.timeslot__nr();
else field_timeslot__nr.clean_up();
if (other_value.subslot__nr().is_bound()) field_subslot__nr = other_value.subslot__nr();
else field_subslot__nr.clean_up();
}

void OML__FOM__AbisChannel::clean_up()
{
field_bts__port__nr.clean_up();
field_timeslot__nr.clean_up();
field_subslot__nr.clean_up();
}

const TTCN_Typedescriptor_t* OML__FOM__AbisChannel::get_descriptor() const { return &OML__FOM__AbisChannel_descr_; }
OML__FOM__AbisChannel& OML__FOM__AbisChannel::operator=(const OML__FOM__AbisChannel& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @AbisOML_Types.OML_FOM_AbisChannel.");
  if (other_value.bts__port__nr().is_bound()) field_bts__port__nr = other_value.bts__port__nr();
  else field_bts__port__nr.clean_up();
  if (other_value.timeslot__nr().is_bound()) field_timeslot__nr = other_value.timeslot__nr();
  else field_timeslot__nr.clean_up();
  if (other_value.subslot__nr().is_bound()) field_subslot__nr = other_value.subslot__nr();
  else field_subslot__nr.clean_up();
}
return *this;
}

boolean OML__FOM__AbisChannel::operator==(const OML__FOM__AbisChannel& other_value) const
{
return field_bts__port__nr==other_value.field_bts__port__nr
  && field_timeslot__nr==other_value.field_timeslot__nr
  && field_subslot__nr==other_value.field_subslot__nr;
}

boolean OML__FOM__AbisChannel::is_bound() const
{
return (field_bts__port__nr.is_bound())
  || (field_timeslot__nr.is_bound())
  || (field_subslot__nr.is_bound());
}
boolean OML__FOM__AbisChannel::is_value() const
{
return field_bts__port__nr.is_value()
  && field_timeslot__nr.is_value()
  && field_subslot__nr.is_value();
}
void OML__FOM__AbisChannel::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ bts_port_nr := ");
field_bts__port__nr.log();
TTCN_Logger::log_event_str(", timeslot_nr := ");
field_timeslot__nr.log();
TTCN_Logger::log_event_str(", subslot_nr := ");
field_subslot__nr.log();
TTCN_Logger::log_event_str(" }");
}

void OML__FOM__AbisChannel::set_implicit_omit()
{
if (bts__port__nr().is_bound()) bts__port__nr().set_implicit_omit();
if (timeslot__nr().is_bound()) timeslot__nr().set_implicit_omit();
if (subslot__nr().is_bound()) subslot__nr().set_implicit_omit();
}

void OML__FOM__AbisChannel::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 @AbisOML_Types.OML_FOM_AbisChannel 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) bts__port__nr().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) timeslot__nr().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) subslot__nr().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(), "bts_port_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bts__port__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "timeslot_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          timeslot__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "subslot_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          subslot__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @AbisOML_Types.OML_FOM_AbisChannel: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@AbisOML_Types.OML_FOM_AbisChannel");
  }
}

void OML__FOM__AbisChannel::encode_text(Text_Buf& text_buf) const
{
field_bts__port__nr.encode_text(text_buf);
field_timeslot__nr.encode_text(text_buf);
field_subslot__nr.encode_text(text_buf);
}

void OML__FOM__AbisChannel::decode_text(Text_Buf& text_buf)
{
field_bts__port__nr.decode_text(text_buf);
field_timeslot__nr.decode_text(text_buf);
field_subslot__nr.decode_text(text_buf);
}

void OML__FOM__AbisChannel::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 OML__FOM__AbisChannel::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 OML__FOM__AbisChannel::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, OML__FOM__AbisChannel_bts__port__nr_descr_.raw->forceomit);
  decoded_field_length = field_bts__port__nr.RAW_decode(OML__FOM__AbisChannel_bts__port__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, OML__FOM__AbisChannel_timeslot__nr_descr_.raw->forceomit);
  decoded_field_length = field_timeslot__nr.RAW_decode(OML__FOM__AbisChannel_timeslot__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, OML__FOM__AbisChannel_subslot__nr_descr_.raw->forceomit);
  decoded_field_length = field_subslot__nr.RAW_decode(OML__FOM__AbisChannel_subslot__nr_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int OML__FOM__AbisChannel::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, OML__FOM__AbisChannel_bts__port__nr_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, OML__FOM__AbisChannel_timeslot__nr_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, OML__FOM__AbisChannel_subslot__nr_descr_.raw);
  encoded_length += field_bts__port__nr.RAW_encode(OML__FOM__AbisChannel_bts__port__nr_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_timeslot__nr.RAW_encode(OML__FOM__AbisChannel_timeslot__nr_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_subslot__nr.RAW_encode(OML__FOM__AbisChannel_subslot__nr_descr_, *myleaf.body.node.nodes[2]);
  return myleaf.length = encoded_length;
}

struct OML__FOM__AbisChannel_template::single_value_struct {
INTEGER_template field_bts__port__nr;
INTEGER_template field_timeslot__nr;
OML__FOM__Subslot_template field_subslot__nr;
};

void OML__FOM__AbisChannel_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_bts__port__nr = ANY_VALUE;
single_value->field_timeslot__nr = ANY_VALUE;
single_value->field_subslot__nr = ANY_VALUE;
}
}
}

void OML__FOM__AbisChannel_template::copy_value(const OML__FOM__AbisChannel& other_value)
{
single_value = new single_value_struct;
if (other_value.bts__port__nr().is_bound()) {
  single_value->field_bts__port__nr = other_value.bts__port__nr();
} else {
  single_value->field_bts__port__nr.clean_up();
}
if (other_value.timeslot__nr().is_bound()) {
  single_value->field_timeslot__nr = other_value.timeslot__nr();
} else {
  single_value->field_timeslot__nr.clean_up();
}
if (other_value.subslot__nr().is_bound()) {
  single_value->field_subslot__nr = other_value.subslot__nr();
} else {
  single_value->field_subslot__nr.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void OML__FOM__AbisChannel_template::copy_template(const OML__FOM__AbisChannel_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.bts__port__nr().get_selection()) {
single_value->field_bts__port__nr = other_value.bts__port__nr();
} else {
single_value->field_bts__port__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.timeslot__nr().get_selection()) {
single_value->field_timeslot__nr = other_value.timeslot__nr();
} else {
single_value->field_timeslot__nr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.subslot__nr().get_selection()) {
single_value->field_subslot__nr = other_value.subslot__nr();
} else {
single_value->field_subslot__nr.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__FOM__AbisChannel_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 OML__FOM__AbisChannel_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__AbisChannel_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 @AbisOML_Types.OML_FOM_AbisChannel.");
break;
}
set_selection(other_value);
}

OML__FOM__AbisChannel_template::OML__FOM__AbisChannel_template()
{
}

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

OML__FOM__AbisChannel_template::OML__FOM__AbisChannel_template(const OML__FOM__AbisChannel& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean OML__FOM__AbisChannel_template::match(const OML__FOM__AbisChannel& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.bts__port__nr().is_bound()) return FALSE;
if(!single_value->field_bts__port__nr.match(other_value.bts__port__nr(), legacy))return FALSE;
if(!other_value.timeslot__nr().is_bound()) return FALSE;
if(!single_value->field_timeslot__nr.match(other_value.timeslot__nr(), legacy))return FALSE;
if(!other_value.subslot__nr().is_bound()) return FALSE;
if(!single_value->field_subslot__nr.match(other_value.subslot__nr(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @AbisOML_Types.OML_FOM_AbisChannel.");
}
return FALSE;
}

boolean OML__FOM__AbisChannel_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_bts__port__nr.is_bound()
 || single_value->field_timeslot__nr.is_bound()
 || single_value->field_subslot__nr.is_bound();
}

boolean OML__FOM__AbisChannel_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_bts__port__nr.is_value()
 && single_value->field_timeslot__nr.is_value()
 && single_value->field_subslot__nr.is_value();
}

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

OML__FOM__AbisChannel OML__FOM__AbisChannel_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 @AbisOML_Types.OML_FOM_AbisChannel.");
OML__FOM__AbisChannel ret_val;
if (single_value->field_bts__port__nr.is_bound()) {
ret_val.bts__port__nr() = single_value->field_bts__port__nr.valueof();
}
if (single_value->field_timeslot__nr.is_bound()) {
ret_val.timeslot__nr() = single_value->field_timeslot__nr.valueof();
}
if (single_value->field_subslot__nr.is_bound()) {
ret_val.subslot__nr() = single_value->field_subslot__nr.valueof();
}
return ret_val;
}

void OML__FOM__AbisChannel_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 @AbisOML_Types.OML_FOM_AbisChannel.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__FOM__AbisChannel_template[list_length];
}

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

INTEGER_template& OML__FOM__AbisChannel_template::bts__port__nr()
{
set_specific();
return single_value->field_bts__port__nr;
}

const INTEGER_template& OML__FOM__AbisChannel_template::bts__port__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field bts_port_nr of a non-specific template of type @AbisOML_Types.OML_FOM_AbisChannel.");
return single_value->field_bts__port__nr;
}

INTEGER_template& OML__FOM__AbisChannel_template::timeslot__nr()
{
set_specific();
return single_value->field_timeslot__nr;
}

const INTEGER_template& OML__FOM__AbisChannel_template::timeslot__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field timeslot_nr of a non-specific template of type @AbisOML_Types.OML_FOM_AbisChannel.");
return single_value->field_timeslot__nr;
}

OML__FOM__Subslot_template& OML__FOM__AbisChannel_template::subslot__nr()
{
set_specific();
return single_value->field_subslot__nr;
}

const OML__FOM__Subslot_template& OML__FOM__AbisChannel_template::subslot__nr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field subslot_nr of a non-specific template of type @AbisOML_Types.OML_FOM_AbisChannel.");
return single_value->field_subslot__nr;
}

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

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

void OML__FOM__AbisChannel_template::log_match(const OML__FOM__AbisChannel& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_bts__port__nr.match(match_value.bts__port__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".bts_port_nr");
single_value->field_bts__port__nr.log_match(match_value.bts__port__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_timeslot__nr.match(match_value.timeslot__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".timeslot_nr");
single_value->field_timeslot__nr.log_match(match_value.timeslot__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_subslot__nr.match(match_value.subslot__nr(), legacy)){
TTCN_Logger::log_logmatch_info(".subslot_nr");
single_value->field_subslot__nr.log_match(match_value.subslot__nr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ bts_port_nr := ");
single_value->field_bts__port__nr.log_match(match_value.bts__port__nr(), legacy);
TTCN_Logger::log_event_str(", timeslot_nr := ");
single_value->field_timeslot__nr.log_match(match_value.timeslot__nr(), legacy);
TTCN_Logger::log_event_str(", subslot_nr := ");
single_value->field_subslot__nr.log_match(match_value.subslot__nr(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void OML__FOM__AbisChannel_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (bts__port__nr().is_bound()) bts__port__nr().set_implicit_omit();
if (timeslot__nr().is_bound()) timeslot__nr().set_implicit_omit();
if (subslot__nr().is_bound()) subslot__nr().set_implicit_omit();
}

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

void OML__FOM__AbisChannel_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_bts__port__nr.decode_text(text_buf);
single_value->field_timeslot__nr.decode_text(text_buf);
single_value->field_subslot__nr.decode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__FOM__AbisChannel_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 @AbisOML_Types.OML_FOM_AbisChannel.");
}
}

void OML__FOM__AbisChannel_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: {
    OML__FOM__AbisChannel_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 @AbisOML_Types.OML_FOM_AbisChannel 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) bts__port__nr().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) timeslot__nr().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) subslot__nr().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(), "bts_port_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bts__port__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "timeslot_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          timeslot__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "subslot_nr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          subslot__nr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @AbisOML_Types.OML_FOM_AbisChannel: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__AbisChannel_template* precondition = new OML__FOM__AbisChannel_template;
    precondition->set_param(*param.get_elem(0));
    OML__FOM__AbisChannel_template* implied_template = new OML__FOM__AbisChannel_template;
    implied_template->set_param(*param.get_elem(1));
    *this = OML__FOM__AbisChannel_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@AbisOML_Types.OML_FOM_AbisChannel");
  }
  is_ifpresent = param.get_ifpresent();
}

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

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

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

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

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

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

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

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

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

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

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

boolean OML__FOM__AdministrativeState::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_AdministrativeState.");
return enum_value == other_value;
}

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

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

boolean OML__FOM__AdministrativeState::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_AdministrativeState.");
return enum_value < other_value;
}

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

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

boolean OML__FOM__AdministrativeState::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_AdministrativeState.");
return enum_value > other_value;
}

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

const char *OML__FOM__AdministrativeState::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case NM__STATE__LOCKED: return "NM_STATE_LOCKED";
case NM__STATE__UNLOCKED: return "NM_STATE_UNLOCKED";
case NM__STATE__SHUTDOWN: return "NM_STATE_SHUTDOWN";
case NM__STATE__NULL: return "NM_STATE_NULL";
default:
return "<unknown>";
}
}

OML__FOM__AdministrativeState::enum_type OML__FOM__AdministrativeState::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "NM_STATE_LOCKED")) return NM__STATE__LOCKED;
if (!strcmp(str_par, "NM_STATE_UNLOCKED")) return NM__STATE__UNLOCKED;
if (!strcmp(str_par, "NM_STATE_SHUTDOWN")) return NM__STATE__SHUTDOWN;
if (!strcmp(str_par, "NM_STATE_NULL")) return NM__STATE__NULL;
}
return UNKNOWN_VALUE;
}

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

int OML__FOM__AdministrativeState::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_AdministrativeState.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int OML__FOM__AdministrativeState::enum2int(const OML__FOM__AdministrativeState& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_AdministrativeState.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

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

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

void OML__FOM__AdministrativeState::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void OML__FOM__AdministrativeState::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@AbisOML_Types.OML_FOM_AdministrativeState");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_AdministrativeState.");
  }
}

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

void OML__FOM__AdministrativeState::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @AbisOML_Types.OML_FOM_AdministrativeState.", enum_value);
}

void OML__FOM__AdministrativeState::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__FOM__AdministrativeState::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 OML__FOM__AdministrativeState::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
{
  int decoded_value = 0;
  int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 8, no_err);
  if (decoded_length < 0) return decoded_length;
  if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
  else {
    if(no_err){
     return -1;
    } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
    enum_value = UNKNOWN_VALUE;
    }
  }
  return decoded_length;
}

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

void OML__FOM__AdministrativeState_template::copy_template(const OML__FOM__AdministrativeState_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__FOM__AdministrativeState_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 OML__FOM__AdministrativeState_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__AdministrativeState_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_AdministrativeState.");
}
}

OML__FOM__AdministrativeState_template::OML__FOM__AdministrativeState_template()
{
}

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

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

OML__FOM__AdministrativeState_template::OML__FOM__AdministrativeState_template(OML__FOM__AdministrativeState::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

OML__FOM__AdministrativeState_template& OML__FOM__AdministrativeState_template::operator=(const OPTIONAL<OML__FOM__AdministrativeState>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (OML__FOM__AdministrativeState::enum_type)(const OML__FOM__AdministrativeState&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @AbisOML_Types.OML_FOM_AdministrativeState.");
}
return *this;
}

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

boolean OML__FOM__AdministrativeState_template::match(OML__FOM__AdministrativeState::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_AdministrativeState.");
}
return FALSE;
}

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

OML__FOM__AdministrativeState::enum_type OML__FOM__AdministrativeState_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @AbisOML_Types.OML_FOM_AdministrativeState.");
return single_value;
}

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

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

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

void OML__FOM__AdministrativeState_template::log_match(const OML__FOM__AdministrativeState& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

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

void OML__FOM__AdministrativeState_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (OML__FOM__AdministrativeState::enum_type)text_buf.pull_int().get_val();
if (!OML__FOM__AdministrativeState::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @AbisOML_Types.OML_FOM_AdministrativeState.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__FOM__AdministrativeState_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @AbisOML_Types.OML_FOM_AdministrativeState.");
}
}

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

boolean OML__FOM__AdministrativeState_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 OML__FOM__AdministrativeState_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__FOM__AdministrativeState_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    OML__FOM__AdministrativeState::enum_type enum_val = OML__FOM__AdministrativeState::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!OML__FOM__AdministrativeState::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_AdministrativeState.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__AdministrativeState_template* precondition = new OML__FOM__AdministrativeState_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__FOM__AdministrativeState_template* implied_template = new OML__FOM__AdministrativeState_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__FOM__AdministrativeState_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@AbisOML_Types.OML_FOM_AdministrativeState");
  }
  is_ifpresent = param.get_ifpresent();
}

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

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

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

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

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

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

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

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

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

boolean OML__ChannelCombination::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_ChannelCombination.");
return enum_value == other_value;
}

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

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

boolean OML__ChannelCombination::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_ChannelCombination.");
return enum_value < other_value;
}

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

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

boolean OML__ChannelCombination::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_ChannelCombination.");
return enum_value > other_value;
}

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

const char *OML__ChannelCombination::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case NM__CHANC__TCHFull: return "NM_CHANC_TCHFull";
case NM__CHANC__TCHHalf: return "NM_CHANC_TCHHalf";
case NM__CHANC__TCHHalf2: return "NM_CHANC_TCHHalf2";
case NM__CHANC__SDCCH: return "NM_CHANC_SDCCH";
case NM__CHANC__mainBCCH: return "NM_CHANC_mainBCCH";
case NM__CHANC__BCCHComb: return "NM_CHANC_BCCHComb";
case NM__CHANC__BCCH: return "NM_CHANC_BCCH";
case NM__CHANC__BCCH__CBCH: return "NM_CHANC_BCCH_CBCH";
case NM__CHANC__SDCCH__CBCH: return "NM_CHANC_SDCCH_CBCH";
case NM__CHANC__IPAC__bPDCH: return "NM_CHANC_IPAC_bPDCH";
case NM__CHANC__IPAC__cPDCH: return "NM_CHANC_IPAC_cPDCH";
case NM__CHANC__IPAC__PDCH: return "NM_CHANC_IPAC_PDCH";
case NM__CHANC__IPAC__TCHFull__PDCH: return "NM_CHANC_IPAC_TCHFull_PDCH";
case NM__CHANC__IPAC__TCHFull__TCHHalf: return "NM_CHANC_IPAC_TCHFull_TCHHalf";
case NM__CHANC__OSMO__TCHFull__TCHHalf__PDCH: return "NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH";
default:
return "<unknown>";
}
}

OML__ChannelCombination::enum_type OML__ChannelCombination::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "NM_CHANC_TCHFull")) return NM__CHANC__TCHFull;
if (!strcmp(str_par, "NM_CHANC_TCHHalf")) return NM__CHANC__TCHHalf;
if (!strcmp(str_par, "NM_CHANC_TCHHalf2")) return NM__CHANC__TCHHalf2;
if (!strcmp(str_par, "NM_CHANC_SDCCH")) return NM__CHANC__SDCCH;
if (!strcmp(str_par, "NM_CHANC_mainBCCH")) return NM__CHANC__mainBCCH;
if (!strcmp(str_par, "NM_CHANC_BCCHComb")) return NM__CHANC__BCCHComb;
if (!strcmp(str_par, "NM_CHANC_BCCH")) return NM__CHANC__BCCH;
if (!strcmp(str_par, "NM_CHANC_BCCH_CBCH")) return NM__CHANC__BCCH__CBCH;
if (!strcmp(str_par, "NM_CHANC_SDCCH_CBCH")) return NM__CHANC__SDCCH__CBCH;
if (!strcmp(str_par, "NM_CHANC_IPAC_bPDCH")) return NM__CHANC__IPAC__bPDCH;
if (!strcmp(str_par, "NM_CHANC_IPAC_cPDCH")) return NM__CHANC__IPAC__cPDCH;
if (!strcmp(str_par, "NM_CHANC_IPAC_PDCH")) return NM__CHANC__IPAC__PDCH;
if (!strcmp(str_par, "NM_CHANC_IPAC_TCHFull_PDCH")) return NM__CHANC__IPAC__TCHFull__PDCH;
if (!strcmp(str_par, "NM_CHANC_IPAC_TCHFull_TCHHalf")) return NM__CHANC__IPAC__TCHFull__TCHHalf;
if (!strcmp(str_par, "NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH")) return NM__CHANC__OSMO__TCHFull__TCHHalf__PDCH;
}
return UNKNOWN_VALUE;
}

boolean OML__ChannelCombination::is_valid_enum(int int_par)
{
switch (int_par) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 11:
case 12:
case 13:
case 128:
case 129:
case 144:
return TRUE;
default:
return FALSE;
}
}

int OML__ChannelCombination::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_ChannelCombination.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int OML__ChannelCombination::enum2int(const OML__ChannelCombination& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_ChannelCombination.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

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

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

void OML__ChannelCombination::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void OML__ChannelCombination::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@AbisOML_Types.OML_ChannelCombination");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @AbisOML_Types.OML_ChannelCombination.");
  }
}

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

void OML__ChannelCombination::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @AbisOML_Types.OML_ChannelCombination.", enum_value);
}

void OML__ChannelCombination::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__ChannelCombination::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 OML__ChannelCombination::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
{
  int decoded_value = 0;
  int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 8, no_err);
  if (decoded_length < 0) return decoded_length;
  if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
  else {
    if(no_err){
     return -1;
    } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
    enum_value = UNKNOWN_VALUE;
    }
  }
  return decoded_length;
}

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

void OML__ChannelCombination_template::copy_template(const OML__ChannelCombination_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__ChannelCombination_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 OML__ChannelCombination_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__ChannelCombination_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_ChannelCombination.");
}
}

OML__ChannelCombination_template::OML__ChannelCombination_template()
{
}

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

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

OML__ChannelCombination_template::OML__ChannelCombination_template(OML__ChannelCombination::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

OML__ChannelCombination_template& OML__ChannelCombination_template::operator=(const OPTIONAL<OML__ChannelCombination>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (OML__ChannelCombination::enum_type)(const OML__ChannelCombination&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @AbisOML_Types.OML_ChannelCombination.");
}
return *this;
}

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

boolean OML__ChannelCombination_template::match(OML__ChannelCombination::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_ChannelCombination.");
}
return FALSE;
}

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

OML__ChannelCombination::enum_type OML__ChannelCombination_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @AbisOML_Types.OML_ChannelCombination.");
return single_value;
}

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

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

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

void OML__ChannelCombination_template::log_match(const OML__ChannelCombination& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

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

void OML__ChannelCombination_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (OML__ChannelCombination::enum_type)text_buf.pull_int().get_val();
if (!OML__ChannelCombination::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @AbisOML_Types.OML_ChannelCombination.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__ChannelCombination_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @AbisOML_Types.OML_ChannelCombination.");
}
}

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

boolean OML__ChannelCombination_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 OML__ChannelCombination_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__ChannelCombination_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    OML__ChannelCombination::enum_type enum_val = OML__ChannelCombination::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!OML__ChannelCombination::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @AbisOML_Types.OML_ChannelCombination.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__ChannelCombination_template* precondition = new OML__ChannelCombination_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__ChannelCombination_template* implied_template = new OML__ChannelCombination_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__ChannelCombination_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@AbisOML_Types.OML_ChannelCombination");
  }
  is_ifpresent = param.get_ifpresent();
}

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

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

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

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

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

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

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

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

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

boolean OML__FOM__EventType::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_EventType.");
return enum_value == other_value;
}

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

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

boolean OML__FOM__EventType::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_EventType.");
return enum_value < other_value;
}

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

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

boolean OML__FOM__EventType::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_EventType.");
return enum_value > other_value;
}

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

const char *OML__FOM__EventType::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case NM__EVT__COMM__FAIL: return "NM_EVT_COMM_FAIL";
case NM__EVT__QOS__FAIL: return "NM_EVT_QOS_FAIL";
case NM__EVT__PROC__FAIL: return "NM_EVT_PROC_FAIL";
case NM__EVT__EQUIP__FAIL: return "NM_EVT_EQUIP_FAIL";
case NM__EVT__ENV__FAIL: return "NM_EVT_ENV_FAIL";
default:
return "<unknown>";
}
}

OML__FOM__EventType::enum_type OML__FOM__EventType::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "NM_EVT_COMM_FAIL")) return NM__EVT__COMM__FAIL;
if (!strcmp(str_par, "NM_EVT_QOS_FAIL")) return NM__EVT__QOS__FAIL;
if (!strcmp(str_par, "NM_EVT_PROC_FAIL")) return NM__EVT__PROC__FAIL;
if (!strcmp(str_par, "NM_EVT_EQUIP_FAIL")) return NM__EVT__EQUIP__FAIL;
if (!strcmp(str_par, "NM_EVT_ENV_FAIL")) return NM__EVT__ENV__FAIL;
}
return UNKNOWN_VALUE;
}

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

int OML__FOM__EventType::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_EventType.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int OML__FOM__EventType::enum2int(const OML__FOM__EventType& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_EventType.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

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

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

void OML__FOM__EventType::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void OML__FOM__EventType::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@AbisOML_Types.OML_FOM_EventType");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_EventType.");
  }
}

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

void OML__FOM__EventType::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @AbisOML_Types.OML_FOM_EventType.", enum_value);
}

void OML__FOM__EventType::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__FOM__EventType::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 OML__FOM__EventType::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
{
  int decoded_value = 0;
  int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 3, no_err);
  if (decoded_length < 0) return decoded_length;
  if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
  else {
    if(no_err){
     return -1;
    } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
    enum_value = UNKNOWN_VALUE;
    }
  }
  return decoded_length;
}

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

void OML__FOM__EventType_template::copy_template(const OML__FOM__EventType_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__FOM__EventType_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 OML__FOM__EventType_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__EventType_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_EventType.");
}
}

OML__FOM__EventType_template::OML__FOM__EventType_template()
{
}

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

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

OML__FOM__EventType_template::OML__FOM__EventType_template(OML__FOM__EventType::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

OML__FOM__EventType_template& OML__FOM__EventType_template::operator=(const OPTIONAL<OML__FOM__EventType>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (OML__FOM__EventType::enum_type)(const OML__FOM__EventType&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @AbisOML_Types.OML_FOM_EventType.");
}
return *this;
}

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

boolean OML__FOM__EventType_template::match(OML__FOM__EventType::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_EventType.");
}
return FALSE;
}

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

OML__FOM__EventType::enum_type OML__FOM__EventType_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @AbisOML_Types.OML_FOM_EventType.");
return single_value;
}

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

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

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

void OML__FOM__EventType_template::log_match(const OML__FOM__EventType& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

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

void OML__FOM__EventType_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (OML__FOM__EventType::enum_type)text_buf.pull_int().get_val();
if (!OML__FOM__EventType::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @AbisOML_Types.OML_FOM_EventType.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__FOM__EventType_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @AbisOML_Types.OML_FOM_EventType.");
}
}

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

boolean OML__FOM__EventType_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 OML__FOM__EventType_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__FOM__EventType_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    OML__FOM__EventType::enum_type enum_val = OML__FOM__EventType::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!OML__FOM__EventType::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_EventType.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__EventType_template* precondition = new OML__FOM__EventType_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__FOM__EventType_template* implied_template = new OML__FOM__EventType_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__FOM__EventType_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@AbisOML_Types.OML_FOM_EventType");
  }
  is_ifpresent = param.get_ifpresent();
}

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

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

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

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

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

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

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

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

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

boolean OML__FOM__NackCause::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_NackCause.");
return enum_value == other_value;
}

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

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

boolean OML__FOM__NackCause::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_NackCause.");
return enum_value < other_value;
}

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

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

boolean OML__FOM__NackCause::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_NackCause.");
return enum_value > other_value;
}

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

const char *OML__FOM__NackCause::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case NM__NACK__INCORR__STRUCT: return "NM_NACK_INCORR_STRUCT";
case NM__NACK__MSGTYPE__INVAL: return "NM_NACK_MSGTYPE_INVAL";
case NM__NACK__OBJCLASS__INVAL: return "NM_NACK_OBJCLASS_INVAL";
case NM__NACK__OBJCLASS__NOTSUPP: return "NM_NACK_OBJCLASS_NOTSUPP";
case NM__NACK__BTSNR__UNKN: return "NM_NACK_BTSNR_UNKN";
case NM__NACK__TRXNR__UNKN: return "NM_NACK_TRXNR_UNKN";
case NM__NACK__OBJINST__UNKN: return "NM_NACK_OBJINST_UNKN";
case NM__NACK__ATTRID__INVAL: return "NM_NACK_ATTRID_INVAL";
case NM__NACK__ATTRID__NOTSUPP: return "NM_NACK_ATTRID_NOTSUPP";
case NM__NACK__PARAM__RANGE: return "NM_NACK_PARAM_RANGE";
case NM__NACK__ATTRLIST__INCONSISTENT: return "NM_NACK_ATTRLIST_INCONSISTENT";
case NM__NACK__SPEC__IMPL__NOTSUPP: return "NM_NACK_SPEC_IMPL_NOTSUPP";
case NM__NACK__CANT__PERFORM: return "NM_NACK_CANT_PERFORM";
case NM__NACK__RES__NOTIMPL: return "NM_NACK_RES_NOTIMPL";
case NM__NACK__RES__NOTAVAIL: return "NM_NACK_RES_NOTAVAIL";
case NM__NACK__FREQ__NOTAVAIL: return "NM_NACK_FREQ_NOTAVAIL";
case NM__NACK__TEST__NOTSUPP: return "NM_NACK_TEST_NOTSUPP";
case NM__NACK__CAPACITY__RESTR: return "NM_NACK_CAPACITY_RESTR";
case NM__NACK__PHYSCFG__NOTPERFORM: return "NM_NACK_PHYSCFG_NOTPERFORM";
case NM__NACK__TEST__NOTINIT: return "NM_NACK_TEST_NOTINIT";
case NM__NACK__PHYSCFG__NOTRESTORE: return "NM_NACK_PHYSCFG_NOTRESTORE";
case NM__NACK__TEST__NOSUCH: return "NM_NACK_TEST_NOSUCH";
case NM__NACK__TEST__NOSTOP: return "NM_NACK_TEST_NOSTOP";
case NM__NACK__MSGINCONSIST__PHYSCFG: return "NM_NACK_MSGINCONSIST_PHYSCFG";
case NM__NACK__FILE__INCOMPLETE: return "NM_NACK_FILE_INCOMPLETE";
case NM__NACK__FILE__NOTAVAIL: return "NM_NACK_FILE_NOTAVAIL";
case NM__NACK__FILE__NOTACTIVATE: return "NM_NACK_FILE_NOTACTIVATE";
case NM__NACK__REQ__NOT__GRANT: return "NM_NACK_REQ_NOT_GRANT";
case NM__NACK__WAIT: return "NM_NACK_WAIT";
case NM__NACK__NOTH__REPORT__EXIST: return "NM_NACK_NOTH_REPORT_EXIST";
case NM__NACK__MEAS__NOTSUPP: return "NM_NACK_MEAS_NOTSUPP";
case NM__NACK__MEAS__NOTSTART: return "NM_NACK_MEAS_NOTSTART";
default:
return "<unknown>";
}
}

OML__FOM__NackCause::enum_type OML__FOM__NackCause::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "NM_NACK_INCORR_STRUCT")) return NM__NACK__INCORR__STRUCT;
if (!strcmp(str_par, "NM_NACK_MSGTYPE_INVAL")) return NM__NACK__MSGTYPE__INVAL;
if (!strcmp(str_par, "NM_NACK_OBJCLASS_INVAL")) return NM__NACK__OBJCLASS__INVAL;
if (!strcmp(str_par, "NM_NACK_OBJCLASS_NOTSUPP")) return NM__NACK__OBJCLASS__NOTSUPP;
if (!strcmp(str_par, "NM_NACK_BTSNR_UNKN")) return NM__NACK__BTSNR__UNKN;
if (!strcmp(str_par, "NM_NACK_TRXNR_UNKN")) return NM__NACK__TRXNR__UNKN;
if (!strcmp(str_par, "NM_NACK_OBJINST_UNKN")) return NM__NACK__OBJINST__UNKN;
if (!strcmp(str_par, "NM_NACK_ATTRID_INVAL")) return NM__NACK__ATTRID__INVAL;
if (!strcmp(str_par, "NM_NACK_ATTRID_NOTSUPP")) return NM__NACK__ATTRID__NOTSUPP;
if (!strcmp(str_par, "NM_NACK_PARAM_RANGE")) return NM__NACK__PARAM__RANGE;
if (!strcmp(str_par, "NM_NACK_ATTRLIST_INCONSISTENT")) return NM__NACK__ATTRLIST__INCONSISTENT;
if (!strcmp(str_par, "NM_NACK_SPEC_IMPL_NOTSUPP")) return NM__NACK__SPEC__IMPL__NOTSUPP;
if (!strcmp(str_par, "NM_NACK_CANT_PERFORM")) return NM__NACK__CANT__PERFORM;
if (!strcmp(str_par, "NM_NACK_RES_NOTIMPL")) return NM__NACK__RES__NOTIMPL;
if (!strcmp(str_par, "NM_NACK_RES_NOTAVAIL")) return NM__NACK__RES__NOTAVAIL;
if (!strcmp(str_par, "NM_NACK_FREQ_NOTAVAIL")) return NM__NACK__FREQ__NOTAVAIL;
if (!strcmp(str_par, "NM_NACK_TEST_NOTSUPP")) return NM__NACK__TEST__NOTSUPP;
if (!strcmp(str_par, "NM_NACK_CAPACITY_RESTR")) return NM__NACK__CAPACITY__RESTR;
if (!strcmp(str_par, "NM_NACK_PHYSCFG_NOTPERFORM")) return NM__NACK__PHYSCFG__NOTPERFORM;
if (!strcmp(str_par, "NM_NACK_TEST_NOTINIT")) return NM__NACK__TEST__NOTINIT;
if (!strcmp(str_par, "NM_NACK_PHYSCFG_NOTRESTORE")) return NM__NACK__PHYSCFG__NOTRESTORE;
if (!strcmp(str_par, "NM_NACK_TEST_NOSUCH")) return NM__NACK__TEST__NOSUCH;
if (!strcmp(str_par, "NM_NACK_TEST_NOSTOP")) return NM__NACK__TEST__NOSTOP;
if (!strcmp(str_par, "NM_NACK_MSGINCONSIST_PHYSCFG")) return NM__NACK__MSGINCONSIST__PHYSCFG;
if (!strcmp(str_par, "NM_NACK_FILE_INCOMPLETE")) return NM__NACK__FILE__INCOMPLETE;
if (!strcmp(str_par, "NM_NACK_FILE_NOTAVAIL")) return NM__NACK__FILE__NOTAVAIL;
if (!strcmp(str_par, "NM_NACK_FILE_NOTACTIVATE")) return NM__NACK__FILE__NOTACTIVATE;
if (!strcmp(str_par, "NM_NACK_REQ_NOT_GRANT")) return NM__NACK__REQ__NOT__GRANT;
if (!strcmp(str_par, "NM_NACK_WAIT")) return NM__NACK__WAIT;
if (!strcmp(str_par, "NM_NACK_NOTH_REPORT_EXIST")) return NM__NACK__NOTH__REPORT__EXIST;
if (!strcmp(str_par, "NM_NACK_MEAS_NOTSUPP")) return NM__NACK__MEAS__NOTSUPP;
if (!strcmp(str_par, "NM_NACK_MEAS_NOTSTART")) return NM__NACK__MEAS__NOTSTART;
}
return UNKNOWN_VALUE;
}

boolean OML__FOM__NackCause::is_valid_enum(int int_par)
{
switch (int_par) {
case 1:
case 2:
case 5:
case 6:
case 7:
case 8:
case 9:
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 25:
case 26:
case 27:
case 28:
case 29:
case 30:
case 31:
case 32:
case 33:
case 34:
case 35:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:
case 43:
case 44:
return TRUE;
default:
return FALSE;
}
}

int OML__FOM__NackCause::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_NackCause.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int OML__FOM__NackCause::enum2int(const OML__FOM__NackCause& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_NackCause.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

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

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

void OML__FOM__NackCause::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void OML__FOM__NackCause::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@AbisOML_Types.OML_FOM_NackCause");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_NackCause.");
  }
}

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

void OML__FOM__NackCause::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @AbisOML_Types.OML_FOM_NackCause.", enum_value);
}

void OML__FOM__NackCause::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__FOM__NackCause::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 OML__FOM__NackCause::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
{
  int decoded_value = 0;
  int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 6, no_err);
  if (decoded_length < 0) return decoded_length;
  if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
  else {
    if(no_err){
     return -1;
    } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
    enum_value = UNKNOWN_VALUE;
    }
  }
  return decoded_length;
}

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

void OML__FOM__NackCause_template::copy_template(const OML__FOM__NackCause_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__FOM__NackCause_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 OML__FOM__NackCause_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__NackCause_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_NackCause.");
}
}

OML__FOM__NackCause_template::OML__FOM__NackCause_template()
{
}

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

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

OML__FOM__NackCause_template::OML__FOM__NackCause_template(OML__FOM__NackCause::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

OML__FOM__NackCause_template& OML__FOM__NackCause_template::operator=(const OPTIONAL<OML__FOM__NackCause>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (OML__FOM__NackCause::enum_type)(const OML__FOM__NackCause&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @AbisOML_Types.OML_FOM_NackCause.");
}
return *this;
}

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

boolean OML__FOM__NackCause_template::match(OML__FOM__NackCause::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_NackCause.");
}
return FALSE;
}

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

OML__FOM__NackCause::enum_type OML__FOM__NackCause_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @AbisOML_Types.OML_FOM_NackCause.");
return single_value;
}

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

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

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

void OML__FOM__NackCause_template::log_match(const OML__FOM__NackCause& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

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

void OML__FOM__NackCause_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (OML__FOM__NackCause::enum_type)text_buf.pull_int().get_val();
if (!OML__FOM__NackCause::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @AbisOML_Types.OML_FOM_NackCause.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__FOM__NackCause_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @AbisOML_Types.OML_FOM_NackCause.");
}
}

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

boolean OML__FOM__NackCause_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 OML__FOM__NackCause_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__FOM__NackCause_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    OML__FOM__NackCause::enum_type enum_val = OML__FOM__NackCause::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!OML__FOM__NackCause::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_NackCause.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__NackCause_template* precondition = new OML__FOM__NackCause_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__FOM__NackCause_template* implied_template = new OML__FOM__NackCause_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__FOM__NackCause_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@AbisOML_Types.OML_FOM_NackCause");
  }
  is_ifpresent = param.get_ifpresent();
}

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

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

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

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

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

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

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

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

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

boolean OML__FOM__OperationalState::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_OperationalState.");
return enum_value == other_value;
}

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

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

boolean OML__FOM__OperationalState::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_OperationalState.");
return enum_value < other_value;
}

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

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

boolean OML__FOM__OperationalState::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_OperationalState.");
return enum_value > other_value;
}

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

const char *OML__FOM__OperationalState::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case NM__OPSTATE__DISABLED: return "NM_OPSTATE_DISABLED";
case NM__OPSTATE__ENABLED: return "NM_OPSTATE_ENABLED";
case NM__OPSTATE__NULL: return "NM_OPSTATE_NULL";
default:
return "<unknown>";
}
}

OML__FOM__OperationalState::enum_type OML__FOM__OperationalState::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "NM_OPSTATE_DISABLED")) return NM__OPSTATE__DISABLED;
if (!strcmp(str_par, "NM_OPSTATE_ENABLED")) return NM__OPSTATE__ENABLED;
if (!strcmp(str_par, "NM_OPSTATE_NULL")) return NM__OPSTATE__NULL;
}
return UNKNOWN_VALUE;
}

boolean OML__FOM__OperationalState::is_valid_enum(int int_par)
{
switch (int_par) {
case 1:
case 2:
case 255:
return TRUE;
default:
return FALSE;
}
}

int OML__FOM__OperationalState::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_OperationalState.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int OML__FOM__OperationalState::enum2int(const OML__FOM__OperationalState& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_OperationalState.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

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

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

void OML__FOM__OperationalState::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void OML__FOM__OperationalState::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@AbisOML_Types.OML_FOM_OperationalState");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_OperationalState.");
  }
}

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

void OML__FOM__OperationalState::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @AbisOML_Types.OML_FOM_OperationalState.", enum_value);
}

void OML__FOM__OperationalState::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__FOM__OperationalState::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 OML__FOM__OperationalState::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
{
  int decoded_value = 0;
  int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 8, no_err);
  if (decoded_length < 0) return decoded_length;
  if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
  else {
    if(no_err){
     return -1;
    } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
    enum_value = UNKNOWN_VALUE;
    }
  }
  return decoded_length;
}

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

void OML__FOM__OperationalState_template::copy_template(const OML__FOM__OperationalState_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__FOM__OperationalState_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 OML__FOM__OperationalState_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__OperationalState_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_OperationalState.");
}
}

OML__FOM__OperationalState_template::OML__FOM__OperationalState_template()
{
}

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

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

OML__FOM__OperationalState_template::OML__FOM__OperationalState_template(OML__FOM__OperationalState::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

OML__FOM__OperationalState_template& OML__FOM__OperationalState_template::operator=(const OPTIONAL<OML__FOM__OperationalState>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (OML__FOM__OperationalState::enum_type)(const OML__FOM__OperationalState&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @AbisOML_Types.OML_FOM_OperationalState.");
}
return *this;
}

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

boolean OML__FOM__OperationalState_template::match(OML__FOM__OperationalState::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_OperationalState.");
}
return FALSE;
}

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

OML__FOM__OperationalState::enum_type OML__FOM__OperationalState_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @AbisOML_Types.OML_FOM_OperationalState.");
return single_value;
}

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

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

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

void OML__FOM__OperationalState_template::log_match(const OML__FOM__OperationalState& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

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

void OML__FOM__OperationalState_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (OML__FOM__OperationalState::enum_type)text_buf.pull_int().get_val();
if (!OML__FOM__OperationalState::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @AbisOML_Types.OML_FOM_OperationalState.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__FOM__OperationalState_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @AbisOML_Types.OML_FOM_OperationalState.");
}
}

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

boolean OML__FOM__OperationalState_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 OML__FOM__OperationalState_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__FOM__OperationalState_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    OML__FOM__OperationalState::enum_type enum_val = OML__FOM__OperationalState::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!OML__FOM__OperationalState::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_OperationalState.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__OperationalState_template* precondition = new OML__FOM__OperationalState_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__FOM__OperationalState_template* implied_template = new OML__FOM__OperationalState_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__FOM__OperationalState_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@AbisOML_Types.OML_FOM_OperationalState");
  }
  is_ifpresent = param.get_ifpresent();
}

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

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

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

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

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

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

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

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

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

boolean OML__FOM__ProbableCauseType::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_ProbableCauseType.");
return enum_value == other_value;
}

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

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

boolean OML__FOM__ProbableCauseType::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_ProbableCauseType.");
return enum_value < other_value;
}

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

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

boolean OML__FOM__ProbableCauseType::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_ProbableCauseType.");
return enum_value > other_value;
}

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

const char *OML__FOM__ProbableCauseType::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case NM__PCAUSE__T__X721: return "NM_PCAUSE_T_X721";
case NM__PCAUSE__T__GSM: return "NM_PCAUSE_T_GSM";
case NM__PCAUSE__T__MANUF: return "NM_PCAUSE_T_MANUF";
default:
return "<unknown>";
}
}

OML__FOM__ProbableCauseType::enum_type OML__FOM__ProbableCauseType::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "NM_PCAUSE_T_X721")) return NM__PCAUSE__T__X721;
if (!strcmp(str_par, "NM_PCAUSE_T_GSM")) return NM__PCAUSE__T__GSM;
if (!strcmp(str_par, "NM_PCAUSE_T_MANUF")) return NM__PCAUSE__T__MANUF;
}
return UNKNOWN_VALUE;
}

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

int OML__FOM__ProbableCauseType::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_ProbableCauseType.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int OML__FOM__ProbableCauseType::enum2int(const OML__FOM__ProbableCauseType& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_ProbableCauseType.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

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

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

void OML__FOM__ProbableCauseType::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void OML__FOM__ProbableCauseType::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@AbisOML_Types.OML_FOM_ProbableCauseType");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_ProbableCauseType.");
  }
}

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

void OML__FOM__ProbableCauseType::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @AbisOML_Types.OML_FOM_ProbableCauseType.", enum_value);
}

void OML__FOM__ProbableCauseType::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__FOM__ProbableCauseType::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 OML__FOM__ProbableCauseType::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
{
  int decoded_value = 0;
  int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 2, no_err);
  if (decoded_length < 0) return decoded_length;
  if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
  else {
    if(no_err){
     return -1;
    } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
    enum_value = UNKNOWN_VALUE;
    }
  }
  return decoded_length;
}

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

void OML__FOM__ProbableCauseType_template::copy_template(const OML__FOM__ProbableCauseType_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__FOM__ProbableCauseType_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 OML__FOM__ProbableCauseType_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__ProbableCauseType_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_ProbableCauseType.");
}
}

OML__FOM__ProbableCauseType_template::OML__FOM__ProbableCauseType_template()
{
}

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

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

OML__FOM__ProbableCauseType_template::OML__FOM__ProbableCauseType_template(OML__FOM__ProbableCauseType::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

OML__FOM__ProbableCauseType_template& OML__FOM__ProbableCauseType_template::operator=(const OPTIONAL<OML__FOM__ProbableCauseType>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (OML__FOM__ProbableCauseType::enum_type)(const OML__FOM__ProbableCauseType&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @AbisOML_Types.OML_FOM_ProbableCauseType.");
}
return *this;
}

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

boolean OML__FOM__ProbableCauseType_template::match(OML__FOM__ProbableCauseType::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_ProbableCauseType.");
}
return FALSE;
}

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

OML__FOM__ProbableCauseType::enum_type OML__FOM__ProbableCauseType_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @AbisOML_Types.OML_FOM_ProbableCauseType.");
return single_value;
}

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

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

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

void OML__FOM__ProbableCauseType_template::log_match(const OML__FOM__ProbableCauseType& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

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

void OML__FOM__ProbableCauseType_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (OML__FOM__ProbableCauseType::enum_type)text_buf.pull_int().get_val();
if (!OML__FOM__ProbableCauseType::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @AbisOML_Types.OML_FOM_ProbableCauseType.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__FOM__ProbableCauseType_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @AbisOML_Types.OML_FOM_ProbableCauseType.");
}
}

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

boolean OML__FOM__ProbableCauseType_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 OML__FOM__ProbableCauseType_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__FOM__ProbableCauseType_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    OML__FOM__ProbableCauseType::enum_type enum_val = OML__FOM__ProbableCauseType::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!OML__FOM__ProbableCauseType::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_ProbableCauseType.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__ProbableCauseType_template* precondition = new OML__FOM__ProbableCauseType_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__FOM__ProbableCauseType_template* implied_template = new OML__FOM__ProbableCauseType_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__FOM__ProbableCauseType_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@AbisOML_Types.OML_FOM_ProbableCauseType");
  }
  is_ifpresent = param.get_ifpresent();
}

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

OML__FOM__ProbableCause::OML__FOM__ProbableCause()
{
}

OML__FOM__ProbableCause::OML__FOM__ProbableCause(const OML__FOM__ProbableCauseType& par_cause__type,
    const OCTETSTRING& par_cause__value)
  :   field_cause__type(par_cause__type),
  field_cause__value(par_cause__value)
{
}

OML__FOM__ProbableCause::OML__FOM__ProbableCause(const OML__FOM__ProbableCause& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @AbisOML_Types.OML_FOM_ProbableCause.");
if (other_value.cause__type().is_bound()) field_cause__type = other_value.cause__type();
else field_cause__type.clean_up();
if (other_value.cause__value().is_bound()) field_cause__value = other_value.cause__value();
else field_cause__value.clean_up();
}

void OML__FOM__ProbableCause::clean_up()
{
field_cause__type.clean_up();
field_cause__value.clean_up();
}

const TTCN_Typedescriptor_t* OML__FOM__ProbableCause::get_descriptor() const { return &OML__FOM__ProbableCause_descr_; }
OML__FOM__ProbableCause& OML__FOM__ProbableCause::operator=(const OML__FOM__ProbableCause& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @AbisOML_Types.OML_FOM_ProbableCause.");
  if (other_value.cause__type().is_bound()) field_cause__type = other_value.cause__type();
  else field_cause__type.clean_up();
  if (other_value.cause__value().is_bound()) field_cause__value = other_value.cause__value();
  else field_cause__value.clean_up();
}
return *this;
}

boolean OML__FOM__ProbableCause::operator==(const OML__FOM__ProbableCause& other_value) const
{
return field_cause__type==other_value.field_cause__type
  && field_cause__value==other_value.field_cause__value;
}

boolean OML__FOM__ProbableCause::is_bound() const
{
return (field_cause__type.is_bound())
  || (field_cause__value.is_bound());
}
boolean OML__FOM__ProbableCause::is_value() const
{
return field_cause__type.is_value()
  && field_cause__value.is_value();
}
void OML__FOM__ProbableCause::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ cause_type := ");
field_cause__type.log();
TTCN_Logger::log_event_str(", cause_value := ");
field_cause__value.log();
TTCN_Logger::log_event_str(" }");
}

void OML__FOM__ProbableCause::set_implicit_omit()
{
if (cause__type().is_bound()) cause__type().set_implicit_omit();
if (cause__value().is_bound()) cause__value().set_implicit_omit();
}

void OML__FOM__ProbableCause::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 @AbisOML_Types.OML_FOM_ProbableCause 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) cause__type().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) cause__value().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(), "cause_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cause__type().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cause_value")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cause__value().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 @AbisOML_Types.OML_FOM_ProbableCause: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@AbisOML_Types.OML_FOM_ProbableCause");
  }
}

void OML__FOM__ProbableCause::encode_text(Text_Buf& text_buf) const
{
field_cause__type.encode_text(text_buf);
field_cause__value.encode_text(text_buf);
}

void OML__FOM__ProbableCause::decode_text(Text_Buf& text_buf)
{
field_cause__type.decode_text(text_buf);
field_cause__value.decode_text(text_buf);
}

void OML__FOM__ProbableCause::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 OML__FOM__ProbableCause::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 OML__FOM__ProbableCause::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, OML__FOM__ProbableCause_cause__type_descr_.raw->forceomit);
  decoded_field_length = field_cause__type.RAW_decode(OML__FOM__ProbableCause_cause__type_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, OML__FOM__ProbableCause_cause__value_descr_.raw->forceomit);
  decoded_field_length = field_cause__value.RAW_decode(OML__FOM__ProbableCause_cause__value_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 OML__FOM__ProbableCause::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, OML__FOM__ProbableCause_cause__type_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, OML__FOM__ProbableCause_cause__value_descr_.raw);
  encoded_length += field_cause__type.RAW_encode(OML__FOM__ProbableCause_cause__type_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_cause__value.RAW_encode(OML__FOM__ProbableCause_cause__value_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct OML__FOM__ProbableCause_template::single_value_struct {
OML__FOM__ProbableCauseType_template field_cause__type;
OCTETSTRING_template field_cause__value;
};

void OML__FOM__ProbableCause_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_cause__type = ANY_VALUE;
single_value->field_cause__value = ANY_VALUE;
}
}
}

void OML__FOM__ProbableCause_template::copy_value(const OML__FOM__ProbableCause& other_value)
{
single_value = new single_value_struct;
if (other_value.cause__type().is_bound()) {
  single_value->field_cause__type = other_value.cause__type();
} else {
  single_value->field_cause__type.clean_up();
}
if (other_value.cause__value().is_bound()) {
  single_value->field_cause__value = other_value.cause__value();
} else {
  single_value->field_cause__value.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void OML__FOM__ProbableCause_template::copy_template(const OML__FOM__ProbableCause_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.cause__type().get_selection()) {
single_value->field_cause__type = other_value.cause__type();
} else {
single_value->field_cause__type.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.cause__value().get_selection()) {
single_value->field_cause__value = other_value.cause__value();
} else {
single_value->field_cause__value.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 OML__FOM__ProbableCause_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 OML__FOM__ProbableCause_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__ProbableCause_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 @AbisOML_Types.OML_FOM_ProbableCause.");
break;
}
set_selection(other_value);
}

OML__FOM__ProbableCause_template::OML__FOM__ProbableCause_template()
{
}

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

OML__FOM__ProbableCause_template::OML__FOM__ProbableCause_template(const OML__FOM__ProbableCause& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean OML__FOM__ProbableCause_template::match(const OML__FOM__ProbableCause& 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.cause__type().is_bound()) return FALSE;
if(!single_value->field_cause__type.match(other_value.cause__type(), legacy))return FALSE;
if(!other_value.cause__value().is_bound()) return FALSE;
if(!single_value->field_cause__value.match(other_value.cause__value(), 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 @AbisOML_Types.OML_FOM_ProbableCause.");
}
return FALSE;
}

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

boolean OML__FOM__ProbableCause_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_cause__type.is_value()
 && single_value->field_cause__value.is_value();
}

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

OML__FOM__ProbableCause OML__FOM__ProbableCause_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 @AbisOML_Types.OML_FOM_ProbableCause.");
OML__FOM__ProbableCause ret_val;
if (single_value->field_cause__type.is_bound()) {
ret_val.cause__type() = single_value->field_cause__type.valueof();
}
if (single_value->field_cause__value.is_bound()) {
ret_val.cause__value() = single_value->field_cause__value.valueof();
}
return ret_val;
}

void OML__FOM__ProbableCause_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 @AbisOML_Types.OML_FOM_ProbableCause.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__FOM__ProbableCause_template[list_length];
}

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

OML__FOM__ProbableCauseType_template& OML__FOM__ProbableCause_template::cause__type()
{
set_specific();
return single_value->field_cause__type;
}

const OML__FOM__ProbableCauseType_template& OML__FOM__ProbableCause_template::cause__type() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cause_type of a non-specific template of type @AbisOML_Types.OML_FOM_ProbableCause.");
return single_value->field_cause__type;
}

OCTETSTRING_template& OML__FOM__ProbableCause_template::cause__value()
{
set_specific();
return single_value->field_cause__value;
}

const OCTETSTRING_template& OML__FOM__ProbableCause_template::cause__value() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cause_value of a non-specific template of type @AbisOML_Types.OML_FOM_ProbableCause.");
return single_value->field_cause__value;
}

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

void OML__FOM__ProbableCause_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ cause_type := ");
single_value->field_cause__type.log();
TTCN_Logger::log_event_str(", cause_value := ");
single_value->field_cause__value.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 OML__FOM__ProbableCause_template::log_match(const OML__FOM__ProbableCause& 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_cause__type.match(match_value.cause__type(), legacy)){
TTCN_Logger::log_logmatch_info(".cause_type");
single_value->field_cause__type.log_match(match_value.cause__type(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_cause__value.match(match_value.cause__value(), legacy)){
TTCN_Logger::log_logmatch_info(".cause_value");
single_value->field_cause__value.log_match(match_value.cause__value(), 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("{ cause_type := ");
single_value->field_cause__type.log_match(match_value.cause__type(), legacy);
TTCN_Logger::log_event_str(", cause_value := ");
single_value->field_cause__value.log_match(match_value.cause__value(), 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 OML__FOM__ProbableCause_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (cause__type().is_bound()) cause__type().set_implicit_omit();
if (cause__value().is_bound()) cause__value().set_implicit_omit();
}

void OML__FOM__ProbableCause_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_cause__type.encode_text(text_buf);
single_value->field_cause__value.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 @AbisOML_Types.OML_FOM_ProbableCause.");
}
}

void OML__FOM__ProbableCause_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_cause__type.decode_text(text_buf);
single_value->field_cause__value.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 OML__FOM__ProbableCause_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 @AbisOML_Types.OML_FOM_ProbableCause.");
}
}

void OML__FOM__ProbableCause_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: {
    OML__FOM__ProbableCause_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 @AbisOML_Types.OML_FOM_ProbableCause 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) cause__type().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) cause__value().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(), "cause_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cause__type().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cause_value")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cause__value().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 @AbisOML_Types.OML_FOM_ProbableCause: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__ProbableCause_template* precondition = new OML__FOM__ProbableCause_template;
    precondition->set_param(*param.get_elem(0));
    OML__FOM__ProbableCause_template* implied_template = new OML__FOM__ProbableCause_template;
    implied_template->set_param(*param.get_elem(1));
    *this = OML__FOM__ProbableCause_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@AbisOML_Types.OML_FOM_ProbableCause");
  }
  is_ifpresent = param.get_ifpresent();
}

void OML__FOM__ProbableCause_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_cause__type.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_ProbableCause");
single_value->field_cause__value.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_ProbableCause");
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 : "@AbisOML_Types.OML_FOM_ProbableCause");
}

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

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

OML__FOM__T200::OML__FOM__T200()
{
}

OML__FOM__T200::OML__FOM__T200(const INTEGER& par_sdcch__5ms,
    const INTEGER& par_facch__f__5ms,
    const INTEGER& par_facch__h__5ms,
    const INTEGER& par_sacch__tch__sapi0__10ms,
    const INTEGER& par_sacch__sdcch__10ms,
    const INTEGER& par_sdcch__sapi3__5ms,
    const INTEGER& par_sacch__rch__sapi3__10ms)
  :   field_sdcch__5ms(par_sdcch__5ms),
  field_facch__f__5ms(par_facch__f__5ms),
  field_facch__h__5ms(par_facch__h__5ms),
  field_sacch__tch__sapi0__10ms(par_sacch__tch__sapi0__10ms),
  field_sacch__sdcch__10ms(par_sacch__sdcch__10ms),
  field_sdcch__sapi3__5ms(par_sdcch__sapi3__5ms),
  field_sacch__rch__sapi3__10ms(par_sacch__rch__sapi3__10ms)
{
}

OML__FOM__T200::OML__FOM__T200(const OML__FOM__T200& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @AbisOML_Types.OML_FOM_T200.");
if (other_value.sdcch__5ms().is_bound()) field_sdcch__5ms = other_value.sdcch__5ms();
else field_sdcch__5ms.clean_up();
if (other_value.facch__f__5ms().is_bound()) field_facch__f__5ms = other_value.facch__f__5ms();
else field_facch__f__5ms.clean_up();
if (other_value.facch__h__5ms().is_bound()) field_facch__h__5ms = other_value.facch__h__5ms();
else field_facch__h__5ms.clean_up();
if (other_value.sacch__tch__sapi0__10ms().is_bound()) field_sacch__tch__sapi0__10ms = other_value.sacch__tch__sapi0__10ms();
else field_sacch__tch__sapi0__10ms.clean_up();
if (other_value.sacch__sdcch__10ms().is_bound()) field_sacch__sdcch__10ms = other_value.sacch__sdcch__10ms();
else field_sacch__sdcch__10ms.clean_up();
if (other_value.sdcch__sapi3__5ms().is_bound()) field_sdcch__sapi3__5ms = other_value.sdcch__sapi3__5ms();
else field_sdcch__sapi3__5ms.clean_up();
if (other_value.sacch__rch__sapi3__10ms().is_bound()) field_sacch__rch__sapi3__10ms = other_value.sacch__rch__sapi3__10ms();
else field_sacch__rch__sapi3__10ms.clean_up();
}

void OML__FOM__T200::clean_up()
{
field_sdcch__5ms.clean_up();
field_facch__f__5ms.clean_up();
field_facch__h__5ms.clean_up();
field_sacch__tch__sapi0__10ms.clean_up();
field_sacch__sdcch__10ms.clean_up();
field_sdcch__sapi3__5ms.clean_up();
field_sacch__rch__sapi3__10ms.clean_up();
}

const TTCN_Typedescriptor_t* OML__FOM__T200::get_descriptor() const { return &OML__FOM__T200_descr_; }
OML__FOM__T200& OML__FOM__T200::operator=(const OML__FOM__T200& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @AbisOML_Types.OML_FOM_T200.");
  if (other_value.sdcch__5ms().is_bound()) field_sdcch__5ms = other_value.sdcch__5ms();
  else field_sdcch__5ms.clean_up();
  if (other_value.facch__f__5ms().is_bound()) field_facch__f__5ms = other_value.facch__f__5ms();
  else field_facch__f__5ms.clean_up();
  if (other_value.facch__h__5ms().is_bound()) field_facch__h__5ms = other_value.facch__h__5ms();
  else field_facch__h__5ms.clean_up();
  if (other_value.sacch__tch__sapi0__10ms().is_bound()) field_sacch__tch__sapi0__10ms = other_value.sacch__tch__sapi0__10ms();
  else field_sacch__tch__sapi0__10ms.clean_up();
  if (other_value.sacch__sdcch__10ms().is_bound()) field_sacch__sdcch__10ms = other_value.sacch__sdcch__10ms();
  else field_sacch__sdcch__10ms.clean_up();
  if (other_value.sdcch__sapi3__5ms().is_bound()) field_sdcch__sapi3__5ms = other_value.sdcch__sapi3__5ms();
  else field_sdcch__sapi3__5ms.clean_up();
  if (other_value.sacch__rch__sapi3__10ms().is_bound()) field_sacch__rch__sapi3__10ms = other_value.sacch__rch__sapi3__10ms();
  else field_sacch__rch__sapi3__10ms.clean_up();
}
return *this;
}

boolean OML__FOM__T200::operator==(const OML__FOM__T200& other_value) const
{
return field_sdcch__5ms==other_value.field_sdcch__5ms
  && field_facch__f__5ms==other_value.field_facch__f__5ms
  && field_facch__h__5ms==other_value.field_facch__h__5ms
  && field_sacch__tch__sapi0__10ms==other_value.field_sacch__tch__sapi0__10ms
  && field_sacch__sdcch__10ms==other_value.field_sacch__sdcch__10ms
  && field_sdcch__sapi3__5ms==other_value.field_sdcch__sapi3__5ms
  && field_sacch__rch__sapi3__10ms==other_value.field_sacch__rch__sapi3__10ms;
}

boolean OML__FOM__T200::is_bound() const
{
return (field_sdcch__5ms.is_bound())
  || (field_facch__f__5ms.is_bound())
  || (field_facch__h__5ms.is_bound())
  || (field_sacch__tch__sapi0__10ms.is_bound())
  || (field_sacch__sdcch__10ms.is_bound())
  || (field_sdcch__sapi3__5ms.is_bound())
  || (field_sacch__rch__sapi3__10ms.is_bound());
}
boolean OML__FOM__T200::is_value() const
{
return field_sdcch__5ms.is_value()
  && field_facch__f__5ms.is_value()
  && field_facch__h__5ms.is_value()
  && field_sacch__tch__sapi0__10ms.is_value()
  && field_sacch__sdcch__10ms.is_value()
  && field_sdcch__sapi3__5ms.is_value()
  && field_sacch__rch__sapi3__10ms.is_value();
}
void OML__FOM__T200::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ sdcch_5ms := ");
field_sdcch__5ms.log();
TTCN_Logger::log_event_str(", facch_f_5ms := ");
field_facch__f__5ms.log();
TTCN_Logger::log_event_str(", facch_h_5ms := ");
field_facch__h__5ms.log();
TTCN_Logger::log_event_str(", sacch_tch_sapi0_10ms := ");
field_sacch__tch__sapi0__10ms.log();
TTCN_Logger::log_event_str(", sacch_sdcch_10ms := ");
field_sacch__sdcch__10ms.log();
TTCN_Logger::log_event_str(", sdcch_sapi3_5ms := ");
field_sdcch__sapi3__5ms.log();
TTCN_Logger::log_event_str(", sacch_rch_sapi3_10ms := ");
field_sacch__rch__sapi3__10ms.log();
TTCN_Logger::log_event_str(" }");
}

void OML__FOM__T200::set_implicit_omit()
{
if (sdcch__5ms().is_bound()) sdcch__5ms().set_implicit_omit();
if (facch__f__5ms().is_bound()) facch__f__5ms().set_implicit_omit();
if (facch__h__5ms().is_bound()) facch__h__5ms().set_implicit_omit();
if (sacch__tch__sapi0__10ms().is_bound()) sacch__tch__sapi0__10ms().set_implicit_omit();
if (sacch__sdcch__10ms().is_bound()) sacch__sdcch__10ms().set_implicit_omit();
if (sdcch__sapi3__5ms().is_bound()) sdcch__sapi3__5ms().set_implicit_omit();
if (sacch__rch__sapi3__10ms().is_bound()) sacch__rch__sapi3__10ms().set_implicit_omit();
}

void OML__FOM__T200::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 @AbisOML_Types.OML_FOM_T200 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) sdcch__5ms().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) facch__f__5ms().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) facch__h__5ms().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) sacch__tch__sapi0__10ms().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) sacch__sdcch__10ms().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) sdcch__sapi3__5ms().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) sacch__rch__sapi3__10ms().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(), "sdcch_5ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sdcch__5ms().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "facch_f_5ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          facch__f__5ms().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "facch_h_5ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          facch__h__5ms().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sacch_tch_sapi0_10ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sacch__tch__sapi0__10ms().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sacch_sdcch_10ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sacch__sdcch__10ms().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sdcch_sapi3_5ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sdcch__sapi3__5ms().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sacch_rch_sapi3_10ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sacch__rch__sapi3__10ms().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 @AbisOML_Types.OML_FOM_T200: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@AbisOML_Types.OML_FOM_T200");
  }
}

void OML__FOM__T200::encode_text(Text_Buf& text_buf) const
{
field_sdcch__5ms.encode_text(text_buf);
field_facch__f__5ms.encode_text(text_buf);
field_facch__h__5ms.encode_text(text_buf);
field_sacch__tch__sapi0__10ms.encode_text(text_buf);
field_sacch__sdcch__10ms.encode_text(text_buf);
field_sdcch__sapi3__5ms.encode_text(text_buf);
field_sacch__rch__sapi3__10ms.encode_text(text_buf);
}

void OML__FOM__T200::decode_text(Text_Buf& text_buf)
{
field_sdcch__5ms.decode_text(text_buf);
field_facch__f__5ms.decode_text(text_buf);
field_facch__h__5ms.decode_text(text_buf);
field_sacch__tch__sapi0__10ms.decode_text(text_buf);
field_sacch__sdcch__10ms.decode_text(text_buf);
field_sdcch__sapi3__5ms.decode_text(text_buf);
field_sacch__rch__sapi3__10ms.decode_text(text_buf);
}

void OML__FOM__T200::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 OML__FOM__T200::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 OML__FOM__T200::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, OML__FOM__T200_sdcch__5ms_descr_.raw->forceomit);
  decoded_field_length = field_sdcch__5ms.RAW_decode(OML__FOM__T200_sdcch__5ms_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, OML__FOM__T200_facch__f__5ms_descr_.raw->forceomit);
  decoded_field_length = field_facch__f__5ms.RAW_decode(OML__FOM__T200_facch__f__5ms_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, OML__FOM__T200_facch__h__5ms_descr_.raw->forceomit);
  decoded_field_length = field_facch__h__5ms.RAW_decode(OML__FOM__T200_facch__h__5ms_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, OML__FOM__T200_sacch__tch__sapi0__10ms_descr_.raw->forceomit);
  decoded_field_length = field_sacch__tch__sapi0__10ms.RAW_decode(OML__FOM__T200_sacch__tch__sapi0__10ms_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, OML__FOM__T200_sacch__sdcch__10ms_descr_.raw->forceomit);
  decoded_field_length = field_sacch__sdcch__10ms.RAW_decode(OML__FOM__T200_sacch__sdcch__10ms_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, OML__FOM__T200_sdcch__sapi3__5ms_descr_.raw->forceomit);
  decoded_field_length = field_sdcch__sapi3__5ms.RAW_decode(OML__FOM__T200_sdcch__sapi3__5ms_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, OML__FOM__T200_sacch__rch__sapi3__10ms_descr_.raw->forceomit);
  decoded_field_length = field_sacch__rch__sapi3__10ms.RAW_decode(OML__FOM__T200_sacch__rch__sapi3__10ms_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 OML__FOM__T200::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, OML__FOM__T200_sdcch__5ms_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, OML__FOM__T200_facch__f__5ms_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, OML__FOM__T200_facch__h__5ms_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, OML__FOM__T200_sacch__tch__sapi0__10ms_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, OML__FOM__T200_sacch__sdcch__10ms_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, OML__FOM__T200_sdcch__sapi3__5ms_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, OML__FOM__T200_sacch__rch__sapi3__10ms_descr_.raw);
  encoded_length += field_sdcch__5ms.RAW_encode(OML__FOM__T200_sdcch__5ms_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_facch__f__5ms.RAW_encode(OML__FOM__T200_facch__f__5ms_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_facch__h__5ms.RAW_encode(OML__FOM__T200_facch__h__5ms_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_sacch__tch__sapi0__10ms.RAW_encode(OML__FOM__T200_sacch__tch__sapi0__10ms_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_sacch__sdcch__10ms.RAW_encode(OML__FOM__T200_sacch__sdcch__10ms_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_sdcch__sapi3__5ms.RAW_encode(OML__FOM__T200_sdcch__sapi3__5ms_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_sacch__rch__sapi3__10ms.RAW_encode(OML__FOM__T200_sacch__rch__sapi3__10ms_descr_, *myleaf.body.node.nodes[6]);
  return myleaf.length = encoded_length;
}

struct OML__FOM__T200_template::single_value_struct {
INTEGER_template field_sdcch__5ms;
INTEGER_template field_facch__f__5ms;
INTEGER_template field_facch__h__5ms;
INTEGER_template field_sacch__tch__sapi0__10ms;
INTEGER_template field_sacch__sdcch__10ms;
INTEGER_template field_sdcch__sapi3__5ms;
INTEGER_template field_sacch__rch__sapi3__10ms;
};

void OML__FOM__T200_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_sdcch__5ms = ANY_VALUE;
single_value->field_facch__f__5ms = ANY_VALUE;
single_value->field_facch__h__5ms = ANY_VALUE;
single_value->field_sacch__tch__sapi0__10ms = ANY_VALUE;
single_value->field_sacch__sdcch__10ms = ANY_VALUE;
single_value->field_sdcch__sapi3__5ms = ANY_VALUE;
single_value->field_sacch__rch__sapi3__10ms = ANY_VALUE;
}
}
}

void OML__FOM__T200_template::copy_value(const OML__FOM__T200& other_value)
{
single_value = new single_value_struct;
if (other_value.sdcch__5ms().is_bound()) {
  single_value->field_sdcch__5ms = other_value.sdcch__5ms();
} else {
  single_value->field_sdcch__5ms.clean_up();
}
if (other_value.facch__f__5ms().is_bound()) {
  single_value->field_facch__f__5ms = other_value.facch__f__5ms();
} else {
  single_value->field_facch__f__5ms.clean_up();
}
if (other_value.facch__h__5ms().is_bound()) {
  single_value->field_facch__h__5ms = other_value.facch__h__5ms();
} else {
  single_value->field_facch__h__5ms.clean_up();
}
if (other_value.sacch__tch__sapi0__10ms().is_bound()) {
  single_value->field_sacch__tch__sapi0__10ms = other_value.sacch__tch__sapi0__10ms();
} else {
  single_value->field_sacch__tch__sapi0__10ms.clean_up();
}
if (other_value.sacch__sdcch__10ms().is_bound()) {
  single_value->field_sacch__sdcch__10ms = other_value.sacch__sdcch__10ms();
} else {
  single_value->field_sacch__sdcch__10ms.clean_up();
}
if (other_value.sdcch__sapi3__5ms().is_bound()) {
  single_value->field_sdcch__sapi3__5ms = other_value.sdcch__sapi3__5ms();
} else {
  single_value->field_sdcch__sapi3__5ms.clean_up();
}
if (other_value.sacch__rch__sapi3__10ms().is_bound()) {
  single_value->field_sacch__rch__sapi3__10ms = other_value.sacch__rch__sapi3__10ms();
} else {
  single_value->field_sacch__rch__sapi3__10ms.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void OML__FOM__T200_template::copy_template(const OML__FOM__T200_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.sdcch__5ms().get_selection()) {
single_value->field_sdcch__5ms = other_value.sdcch__5ms();
} else {
single_value->field_sdcch__5ms.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.facch__f__5ms().get_selection()) {
single_value->field_facch__f__5ms = other_value.facch__f__5ms();
} else {
single_value->field_facch__f__5ms.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.facch__h__5ms().get_selection()) {
single_value->field_facch__h__5ms = other_value.facch__h__5ms();
} else {
single_value->field_facch__h__5ms.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.sacch__tch__sapi0__10ms().get_selection()) {
single_value->field_sacch__tch__sapi0__10ms = other_value.sacch__tch__sapi0__10ms();
} else {
single_value->field_sacch__tch__sapi0__10ms.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.sacch__sdcch__10ms().get_selection()) {
single_value->field_sacch__sdcch__10ms = other_value.sacch__sdcch__10ms();
} else {
single_value->field_sacch__sdcch__10ms.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.sdcch__sapi3__5ms().get_selection()) {
single_value->field_sdcch__sapi3__5ms = other_value.sdcch__sapi3__5ms();
} else {
single_value->field_sdcch__sapi3__5ms.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.sacch__rch__sapi3__10ms().get_selection()) {
single_value->field_sacch__rch__sapi3__10ms = other_value.sacch__rch__sapi3__10ms();
} else {
single_value->field_sacch__rch__sapi3__10ms.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 OML__FOM__T200_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 OML__FOM__T200_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__T200_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 @AbisOML_Types.OML_FOM_T200.");
break;
}
set_selection(other_value);
}

OML__FOM__T200_template::OML__FOM__T200_template()
{
}

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

OML__FOM__T200_template::OML__FOM__T200_template(const OML__FOM__T200& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean OML__FOM__T200_template::match(const OML__FOM__T200& 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.sdcch__5ms().is_bound()) return FALSE;
if(!single_value->field_sdcch__5ms.match(other_value.sdcch__5ms(), legacy))return FALSE;
if(!other_value.facch__f__5ms().is_bound()) return FALSE;
if(!single_value->field_facch__f__5ms.match(other_value.facch__f__5ms(), legacy))return FALSE;
if(!other_value.facch__h__5ms().is_bound()) return FALSE;
if(!single_value->field_facch__h__5ms.match(other_value.facch__h__5ms(), legacy))return FALSE;
if(!other_value.sacch__tch__sapi0__10ms().is_bound()) return FALSE;
if(!single_value->field_sacch__tch__sapi0__10ms.match(other_value.sacch__tch__sapi0__10ms(), legacy))return FALSE;
if(!other_value.sacch__sdcch__10ms().is_bound()) return FALSE;
if(!single_value->field_sacch__sdcch__10ms.match(other_value.sacch__sdcch__10ms(), legacy))return FALSE;
if(!other_value.sdcch__sapi3__5ms().is_bound()) return FALSE;
if(!single_value->field_sdcch__sapi3__5ms.match(other_value.sdcch__sapi3__5ms(), legacy))return FALSE;
if(!other_value.sacch__rch__sapi3__10ms().is_bound()) return FALSE;
if(!single_value->field_sacch__rch__sapi3__10ms.match(other_value.sacch__rch__sapi3__10ms(), 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 @AbisOML_Types.OML_FOM_T200.");
}
return FALSE;
}

boolean OML__FOM__T200_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_sdcch__5ms.is_bound()
 || single_value->field_facch__f__5ms.is_bound()
 || single_value->field_facch__h__5ms.is_bound()
 || single_value->field_sacch__tch__sapi0__10ms.is_bound()
 || single_value->field_sacch__sdcch__10ms.is_bound()
 || single_value->field_sdcch__sapi3__5ms.is_bound()
 || single_value->field_sacch__rch__sapi3__10ms.is_bound();
}

boolean OML__FOM__T200_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_sdcch__5ms.is_value()
 && single_value->field_facch__f__5ms.is_value()
 && single_value->field_facch__h__5ms.is_value()
 && single_value->field_sacch__tch__sapi0__10ms.is_value()
 && single_value->field_sacch__sdcch__10ms.is_value()
 && single_value->field_sdcch__sapi3__5ms.is_value()
 && single_value->field_sacch__rch__sapi3__10ms.is_value();
}

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

OML__FOM__T200 OML__FOM__T200_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 @AbisOML_Types.OML_FOM_T200.");
OML__FOM__T200 ret_val;
if (single_value->field_sdcch__5ms.is_bound()) {
ret_val.sdcch__5ms() = single_value->field_sdcch__5ms.valueof();
}
if (single_value->field_facch__f__5ms.is_bound()) {
ret_val.facch__f__5ms() = single_value->field_facch__f__5ms.valueof();
}
if (single_value->field_facch__h__5ms.is_bound()) {
ret_val.facch__h__5ms() = single_value->field_facch__h__5ms.valueof();
}
if (single_value->field_sacch__tch__sapi0__10ms.is_bound()) {
ret_val.sacch__tch__sapi0__10ms() = single_value->field_sacch__tch__sapi0__10ms.valueof();
}
if (single_value->field_sacch__sdcch__10ms.is_bound()) {
ret_val.sacch__sdcch__10ms() = single_value->field_sacch__sdcch__10ms.valueof();
}
if (single_value->field_sdcch__sapi3__5ms.is_bound()) {
ret_val.sdcch__sapi3__5ms() = single_value->field_sdcch__sapi3__5ms.valueof();
}
if (single_value->field_sacch__rch__sapi3__10ms.is_bound()) {
ret_val.sacch__rch__sapi3__10ms() = single_value->field_sacch__rch__sapi3__10ms.valueof();
}
return ret_val;
}

void OML__FOM__T200_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 @AbisOML_Types.OML_FOM_T200.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__FOM__T200_template[list_length];
}

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

INTEGER_template& OML__FOM__T200_template::sdcch__5ms()
{
set_specific();
return single_value->field_sdcch__5ms;
}

const INTEGER_template& OML__FOM__T200_template::sdcch__5ms() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field sdcch_5ms of a non-specific template of type @AbisOML_Types.OML_FOM_T200.");
return single_value->field_sdcch__5ms;
}

INTEGER_template& OML__FOM__T200_template::facch__f__5ms()
{
set_specific();
return single_value->field_facch__f__5ms;
}

const INTEGER_template& OML__FOM__T200_template::facch__f__5ms() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field facch_f_5ms of a non-specific template of type @AbisOML_Types.OML_FOM_T200.");
return single_value->field_facch__f__5ms;
}

INTEGER_template& OML__FOM__T200_template::facch__h__5ms()
{
set_specific();
return single_value->field_facch__h__5ms;
}

const INTEGER_template& OML__FOM__T200_template::facch__h__5ms() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field facch_h_5ms of a non-specific template of type @AbisOML_Types.OML_FOM_T200.");
return single_value->field_facch__h__5ms;
}

INTEGER_template& OML__FOM__T200_template::sacch__tch__sapi0__10ms()
{
set_specific();
return single_value->field_sacch__tch__sapi0__10ms;
}

const INTEGER_template& OML__FOM__T200_template::sacch__tch__sapi0__10ms() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field sacch_tch_sapi0_10ms of a non-specific template of type @AbisOML_Types.OML_FOM_T200.");
return single_value->field_sacch__tch__sapi0__10ms;
}

INTEGER_template& OML__FOM__T200_template::sacch__sdcch__10ms()
{
set_specific();
return single_value->field_sacch__sdcch__10ms;
}

const INTEGER_template& OML__FOM__T200_template::sacch__sdcch__10ms() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field sacch_sdcch_10ms of a non-specific template of type @AbisOML_Types.OML_FOM_T200.");
return single_value->field_sacch__sdcch__10ms;
}

INTEGER_template& OML__FOM__T200_template::sdcch__sapi3__5ms()
{
set_specific();
return single_value->field_sdcch__sapi3__5ms;
}

const INTEGER_template& OML__FOM__T200_template::sdcch__sapi3__5ms() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field sdcch_sapi3_5ms of a non-specific template of type @AbisOML_Types.OML_FOM_T200.");
return single_value->field_sdcch__sapi3__5ms;
}

INTEGER_template& OML__FOM__T200_template::sacch__rch__sapi3__10ms()
{
set_specific();
return single_value->field_sacch__rch__sapi3__10ms;
}

const INTEGER_template& OML__FOM__T200_template::sacch__rch__sapi3__10ms() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field sacch_rch_sapi3_10ms of a non-specific template of type @AbisOML_Types.OML_FOM_T200.");
return single_value->field_sacch__rch__sapi3__10ms;
}

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

void OML__FOM__T200_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ sdcch_5ms := ");
single_value->field_sdcch__5ms.log();
TTCN_Logger::log_event_str(", facch_f_5ms := ");
single_value->field_facch__f__5ms.log();
TTCN_Logger::log_event_str(", facch_h_5ms := ");
single_value->field_facch__h__5ms.log();
TTCN_Logger::log_event_str(", sacch_tch_sapi0_10ms := ");
single_value->field_sacch__tch__sapi0__10ms.log();
TTCN_Logger::log_event_str(", sacch_sdcch_10ms := ");
single_value->field_sacch__sdcch__10ms.log();
TTCN_Logger::log_event_str(", sdcch_sapi3_5ms := ");
single_value->field_sdcch__sapi3__5ms.log();
TTCN_Logger::log_event_str(", sacch_rch_sapi3_10ms := ");
single_value->field_sacch__rch__sapi3__10ms.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 OML__FOM__T200_template::log_match(const OML__FOM__T200& 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_sdcch__5ms.match(match_value.sdcch__5ms(), legacy)){
TTCN_Logger::log_logmatch_info(".sdcch_5ms");
single_value->field_sdcch__5ms.log_match(match_value.sdcch__5ms(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_facch__f__5ms.match(match_value.facch__f__5ms(), legacy)){
TTCN_Logger::log_logmatch_info(".facch_f_5ms");
single_value->field_facch__f__5ms.log_match(match_value.facch__f__5ms(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_facch__h__5ms.match(match_value.facch__h__5ms(), legacy)){
TTCN_Logger::log_logmatch_info(".facch_h_5ms");
single_value->field_facch__h__5ms.log_match(match_value.facch__h__5ms(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_sacch__tch__sapi0__10ms.match(match_value.sacch__tch__sapi0__10ms(), legacy)){
TTCN_Logger::log_logmatch_info(".sacch_tch_sapi0_10ms");
single_value->field_sacch__tch__sapi0__10ms.log_match(match_value.sacch__tch__sapi0__10ms(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_sacch__sdcch__10ms.match(match_value.sacch__sdcch__10ms(), legacy)){
TTCN_Logger::log_logmatch_info(".sacch_sdcch_10ms");
single_value->field_sacch__sdcch__10ms.log_match(match_value.sacch__sdcch__10ms(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_sdcch__sapi3__5ms.match(match_value.sdcch__sapi3__5ms(), legacy)){
TTCN_Logger::log_logmatch_info(".sdcch_sapi3_5ms");
single_value->field_sdcch__sapi3__5ms.log_match(match_value.sdcch__sapi3__5ms(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_sacch__rch__sapi3__10ms.match(match_value.sacch__rch__sapi3__10ms(), legacy)){
TTCN_Logger::log_logmatch_info(".sacch_rch_sapi3_10ms");
single_value->field_sacch__rch__sapi3__10ms.log_match(match_value.sacch__rch__sapi3__10ms(), 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("{ sdcch_5ms := ");
single_value->field_sdcch__5ms.log_match(match_value.sdcch__5ms(), legacy);
TTCN_Logger::log_event_str(", facch_f_5ms := ");
single_value->field_facch__f__5ms.log_match(match_value.facch__f__5ms(), legacy);
TTCN_Logger::log_event_str(", facch_h_5ms := ");
single_value->field_facch__h__5ms.log_match(match_value.facch__h__5ms(), legacy);
TTCN_Logger::log_event_str(", sacch_tch_sapi0_10ms := ");
single_value->field_sacch__tch__sapi0__10ms.log_match(match_value.sacch__tch__sapi0__10ms(), legacy);
TTCN_Logger::log_event_str(", sacch_sdcch_10ms := ");
single_value->field_sacch__sdcch__10ms.log_match(match_value.sacch__sdcch__10ms(), legacy);
TTCN_Logger::log_event_str(", sdcch_sapi3_5ms := ");
single_value->field_sdcch__sapi3__5ms.log_match(match_value.sdcch__sapi3__5ms(), legacy);
TTCN_Logger::log_event_str(", sacch_rch_sapi3_10ms := ");
single_value->field_sacch__rch__sapi3__10ms.log_match(match_value.sacch__rch__sapi3__10ms(), 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 OML__FOM__T200_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (sdcch__5ms().is_bound()) sdcch__5ms().set_implicit_omit();
if (facch__f__5ms().is_bound()) facch__f__5ms().set_implicit_omit();
if (facch__h__5ms().is_bound()) facch__h__5ms().set_implicit_omit();
if (sacch__tch__sapi0__10ms().is_bound()) sacch__tch__sapi0__10ms().set_implicit_omit();
if (sacch__sdcch__10ms().is_bound()) sacch__sdcch__10ms().set_implicit_omit();
if (sdcch__sapi3__5ms().is_bound()) sdcch__sapi3__5ms().set_implicit_omit();
if (sacch__rch__sapi3__10ms().is_bound()) sacch__rch__sapi3__10ms().set_implicit_omit();
}

void OML__FOM__T200_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_sdcch__5ms.encode_text(text_buf);
single_value->field_facch__f__5ms.encode_text(text_buf);
single_value->field_facch__h__5ms.encode_text(text_buf);
single_value->field_sacch__tch__sapi0__10ms.encode_text(text_buf);
single_value->field_sacch__sdcch__10ms.encode_text(text_buf);
single_value->field_sdcch__sapi3__5ms.encode_text(text_buf);
single_value->field_sacch__rch__sapi3__10ms.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 @AbisOML_Types.OML_FOM_T200.");
}
}

void OML__FOM__T200_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_sdcch__5ms.decode_text(text_buf);
single_value->field_facch__f__5ms.decode_text(text_buf);
single_value->field_facch__h__5ms.decode_text(text_buf);
single_value->field_sacch__tch__sapi0__10ms.decode_text(text_buf);
single_value->field_sacch__sdcch__10ms.decode_text(text_buf);
single_value->field_sdcch__sapi3__5ms.decode_text(text_buf);
single_value->field_sacch__rch__sapi3__10ms.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 OML__FOM__T200_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 @AbisOML_Types.OML_FOM_T200.");
}
}

void OML__FOM__T200_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: {
    OML__FOM__T200_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 @AbisOML_Types.OML_FOM_T200 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) sdcch__5ms().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) facch__f__5ms().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) facch__h__5ms().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) sacch__tch__sapi0__10ms().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) sacch__sdcch__10ms().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) sdcch__sapi3__5ms().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) sacch__rch__sapi3__10ms().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(), "sdcch_5ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sdcch__5ms().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "facch_f_5ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          facch__f__5ms().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "facch_h_5ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          facch__h__5ms().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sacch_tch_sapi0_10ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sacch__tch__sapi0__10ms().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sacch_sdcch_10ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sacch__sdcch__10ms().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sdcch_sapi3_5ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sdcch__sapi3__5ms().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sacch_rch_sapi3_10ms")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sacch__rch__sapi3__10ms().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 @AbisOML_Types.OML_FOM_T200: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__T200_template* precondition = new OML__FOM__T200_template;
    precondition->set_param(*param.get_elem(0));
    OML__FOM__T200_template* implied_template = new OML__FOM__T200_template;
    implied_template->set_param(*param.get_elem(1));
    *this = OML__FOM__T200_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@AbisOML_Types.OML_FOM_T200");
  }
  is_ifpresent = param.get_ifpresent();
}

void OML__FOM__T200_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_sdcch__5ms.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_T200");
single_value->field_facch__f__5ms.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_T200");
single_value->field_facch__h__5ms.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_T200");
single_value->field_sacch__tch__sapi0__10ms.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_T200");
single_value->field_sacch__sdcch__10ms.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_T200");
single_value->field_sdcch__sapi3__5ms.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_T200");
single_value->field_sacch__rch__sapi3__10ms.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_T200");
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 : "@AbisOML_Types.OML_FOM_T200");
}

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

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

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

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

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

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

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

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

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

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

boolean OML__FOM__Severity::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_Severity.");
return enum_value == other_value;
}

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

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

boolean OML__FOM__Severity::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_Severity.");
return enum_value < other_value;
}

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

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

boolean OML__FOM__Severity::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_Severity.");
return enum_value > other_value;
}

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

const char *OML__FOM__Severity::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case NM__SEVER__CEASED: return "NM_SEVER_CEASED";
case NM__SEVER__CRITICAL: return "NM_SEVER_CRITICAL";
case NM__SEVER__MAJOR: return "NM_SEVER_MAJOR";
case NM__SEVER__MINOR: return "NM_SEVER_MINOR";
case NM__SEVER__WARNING: return "NM_SEVER_WARNING";
case NM__SEVER__INDETERMINATE: return "NM_SEVER_INDETERMINATE";
default:
return "<unknown>";
}
}

OML__FOM__Severity::enum_type OML__FOM__Severity::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "NM_SEVER_CEASED")) return NM__SEVER__CEASED;
if (!strcmp(str_par, "NM_SEVER_CRITICAL")) return NM__SEVER__CRITICAL;
if (!strcmp(str_par, "NM_SEVER_MAJOR")) return NM__SEVER__MAJOR;
if (!strcmp(str_par, "NM_SEVER_MINOR")) return NM__SEVER__MINOR;
if (!strcmp(str_par, "NM_SEVER_WARNING")) return NM__SEVER__WARNING;
if (!strcmp(str_par, "NM_SEVER_INDETERMINATE")) return NM__SEVER__INDETERMINATE;
}
return UNKNOWN_VALUE;
}

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

int OML__FOM__Severity::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_Severity.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int OML__FOM__Severity::enum2int(const OML__FOM__Severity& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_Severity.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

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

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

void OML__FOM__Severity::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void OML__FOM__Severity::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@AbisOML_Types.OML_FOM_Severity");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_Severity.");
  }
}

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

void OML__FOM__Severity::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @AbisOML_Types.OML_FOM_Severity.", enum_value);
}

void OML__FOM__Severity::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__FOM__Severity::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 OML__FOM__Severity::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
{
  int decoded_value = 0;
  int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 3, no_err);
  if (decoded_length < 0) return decoded_length;
  if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
  else {
    if(no_err){
     return -1;
    } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
    enum_value = UNKNOWN_VALUE;
    }
  }
  return decoded_length;
}

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

void OML__FOM__Severity_template::copy_template(const OML__FOM__Severity_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__FOM__Severity_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 OML__FOM__Severity_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__Severity_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_Severity.");
}
}

OML__FOM__Severity_template::OML__FOM__Severity_template()
{
}

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

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

OML__FOM__Severity_template::OML__FOM__Severity_template(OML__FOM__Severity::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

OML__FOM__Severity_template& OML__FOM__Severity_template::operator=(const OPTIONAL<OML__FOM__Severity>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (OML__FOM__Severity::enum_type)(const OML__FOM__Severity&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @AbisOML_Types.OML_FOM_Severity.");
}
return *this;
}

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

boolean OML__FOM__Severity_template::match(OML__FOM__Severity::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_Severity.");
}
return FALSE;
}

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

OML__FOM__Severity::enum_type OML__FOM__Severity_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @AbisOML_Types.OML_FOM_Severity.");
return single_value;
}

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

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

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

void OML__FOM__Severity_template::log_match(const OML__FOM__Severity& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

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

void OML__FOM__Severity_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (OML__FOM__Severity::enum_type)text_buf.pull_int().get_val();
if (!OML__FOM__Severity::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @AbisOML_Types.OML_FOM_Severity.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__FOM__Severity_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @AbisOML_Types.OML_FOM_Severity.");
}
}

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

boolean OML__FOM__Severity_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 OML__FOM__Severity_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__FOM__Severity_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    OML__FOM__Severity::enum_type enum_val = OML__FOM__Severity::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!OML__FOM__Severity::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_Severity.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__Severity_template* precondition = new OML__FOM__Severity_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__FOM__Severity_template* implied_template = new OML__FOM__Severity_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__FOM__Severity_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@AbisOML_Types.OML_FOM_Severity");
  }
  is_ifpresent = param.get_ifpresent();
}

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

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

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

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

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

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

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

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

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

boolean OML__FOM__AvailabilityStatus::operator==(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_AvailabilityStatus.");
return enum_value == other_value;
}

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

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

boolean OML__FOM__AvailabilityStatus::operator<(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_AvailabilityStatus.");
return enum_value < other_value;
}

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

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

boolean OML__FOM__AvailabilityStatus::operator>(enum_type other_value) const
{
if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @AbisOML_Types.OML_FOM_AvailabilityStatus.");
return enum_value > other_value;
}

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

const char *OML__FOM__AvailabilityStatus::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case NM__AVSTATE__IN__TEST: return "NM_AVSTATE_IN_TEST";
case NM__AVSTATE__POWER__OFF: return "NM_AVSTATE_POWER_OFF";
case NM__AVSTATE__OFF__LINE: return "NM_AVSTATE_OFF_LINE";
case NM__AVSTATE__DEPENDENCY: return "NM_AVSTATE_DEPENDENCY";
case NM__AVSTATE__DEGRADED: return "NM_AVSTATE_DEGRADED";
case NM__AVSTATE__NOT__INSTALLED: return "NM_AVSTATE_NOT_INSTALLED";
case NM__AVSTATE__OK: return "NM_AVSTATE_OK";
default:
return "<unknown>";
}
}

OML__FOM__AvailabilityStatus::enum_type OML__FOM__AvailabilityStatus::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "NM_AVSTATE_IN_TEST")) return NM__AVSTATE__IN__TEST;
if (!strcmp(str_par, "NM_AVSTATE_POWER_OFF")) return NM__AVSTATE__POWER__OFF;
if (!strcmp(str_par, "NM_AVSTATE_OFF_LINE")) return NM__AVSTATE__OFF__LINE;
if (!strcmp(str_par, "NM_AVSTATE_DEPENDENCY")) return NM__AVSTATE__DEPENDENCY;
if (!strcmp(str_par, "NM_AVSTATE_DEGRADED")) return NM__AVSTATE__DEGRADED;
if (!strcmp(str_par, "NM_AVSTATE_NOT_INSTALLED")) return NM__AVSTATE__NOT__INSTALLED;
if (!strcmp(str_par, "NM_AVSTATE_OK")) return NM__AVSTATE__OK;
}
return UNKNOWN_VALUE;
}

boolean OML__FOM__AvailabilityStatus::is_valid_enum(int int_par)
{
switch (int_par) {
case 1:
case 2:
case 3:
case 5:
case 6:
case 7:
case 255:
return TRUE;
default:
return FALSE;
}
}

int OML__FOM__AvailabilityStatus::enum2int(enum_type enum_par)
{
if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_AvailabilityStatus.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

int OML__FOM__AvailabilityStatus::enum2int(const OML__FOM__AvailabilityStatus& enum_par)
{
if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @AbisOML_Types.OML_FOM_AvailabilityStatus.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par.enum_value;
}

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

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

void OML__FOM__AvailabilityStatus::log() const
{
if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value);
else TTCN_Logger::log_event_unbound();
}

void OML__FOM__AvailabilityStatus::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "enumerated value");
  if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@AbisOML_Types.OML_FOM_AvailabilityStatus");
  enum_value = str_to_enum(param.get_enumerated(), param.get_enumerated_value());
  if (!is_valid_enum(enum_value)) {
    param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_AvailabilityStatus.");
  }
}

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

void OML__FOM__AvailabilityStatus::decode_text(Text_Buf& text_buf)
{
enum_value = (enum_type)text_buf.pull_int().get_val();
if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @AbisOML_Types.OML_FOM_AvailabilityStatus.", enum_value);
}

void OML__FOM__AvailabilityStatus::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__FOM__AvailabilityStatus::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 OML__FOM__AvailabilityStatus::RAW_decode(const TTCN_Typedescriptor_t& p_td,TTCN_Buffer& p_buf,int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit*)
{
  int decoded_value = 0;
  int decoded_length = RAW_decode_enum_type(p_td, p_buf, limit, top_bit_ord, decoded_value, 8, no_err);
  if (decoded_length < 0) return decoded_length;
  if (is_valid_enum(decoded_value)) enum_value = (enum_type)decoded_value;
  else {
    if(no_err){
     return -1;
    } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_ENC_ENUM, "Invalid enum value '%d' for '%s': ",decoded_value, p_td.name);
    enum_value = UNKNOWN_VALUE;
    }
  }
  return decoded_length;
}

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

void OML__FOM__AvailabilityStatus_template::copy_template(const OML__FOM__AvailabilityStatus_template& other_value)
{
set_selection(other_value);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__FOM__AvailabilityStatus_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 OML__FOM__AvailabilityStatus_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__AvailabilityStatus_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_AvailabilityStatus.");
}
}

OML__FOM__AvailabilityStatus_template::OML__FOM__AvailabilityStatus_template()
{
}

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

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

OML__FOM__AvailabilityStatus_template::OML__FOM__AvailabilityStatus_template(OML__FOM__AvailabilityStatus::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

OML__FOM__AvailabilityStatus_template& OML__FOM__AvailabilityStatus_template::operator=(const OPTIONAL<OML__FOM__AvailabilityStatus>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
set_selection(SPECIFIC_VALUE);
single_value = (OML__FOM__AvailabilityStatus::enum_type)(const OML__FOM__AvailabilityStatus&)other_value;
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of enumerated type @AbisOML_Types.OML_FOM_AvailabilityStatus.");
}
return *this;
}

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

boolean OML__FOM__AvailabilityStatus_template::match(OML__FOM__AvailabilityStatus::enum_type other_value, boolean) const
{
switch (template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of enumerated type @AbisOML_Types.OML_FOM_AvailabilityStatus.");
}
return FALSE;
}

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

OML__FOM__AvailabilityStatus::enum_type OML__FOM__AvailabilityStatus_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @AbisOML_Types.OML_FOM_AvailabilityStatus.");
return single_value;
}

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

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

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

void OML__FOM__AvailabilityStatus_template::log_match(const OML__FOM__AvailabilityStatus& match_value, boolean) const
{
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}

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

void OML__FOM__AvailabilityStatus_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = (OML__FOM__AvailabilityStatus::enum_type)text_buf.pull_int().get_val();
if (!OML__FOM__AvailabilityStatus::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @AbisOML_Types.OML_FOM_AvailabilityStatus.", single_value);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__FOM__AvailabilityStatus_template[value_list.n_values];
for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++)
value_list.list_value[elem_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @AbisOML_Types.OML_FOM_AvailabilityStatus.");
}
}

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

boolean OML__FOM__AvailabilityStatus_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 OML__FOM__AvailabilityStatus_template::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_TEMPLATE, "enumerated template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__FOM__AvailabilityStatus_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Enumerated: {
    OML__FOM__AvailabilityStatus::enum_type enum_val = OML__FOM__AvailabilityStatus::str_to_enum(m_p->get_enumerated(), m_p->get_enumerated_value());
    if (!OML__FOM__AvailabilityStatus::is_valid_enum(enum_val)) {
      param.error("Invalid enumerated value for type @AbisOML_Types.OML_FOM_AvailabilityStatus.");
    }
    *this = enum_val;
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__AvailabilityStatus_template* precondition = new OML__FOM__AvailabilityStatus_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__FOM__AvailabilityStatus_template* implied_template = new OML__FOM__AvailabilityStatus_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__FOM__AvailabilityStatus_template(precondition, implied_template);
  } break;
  default:
    param.type_error("enumerated template", "@AbisOML_Types.OML_FOM_AvailabilityStatus");
  }
  is_ifpresent = param.get_ifpresent();
}

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

OML__IE__AvailStatus::OML__IE__AvailStatus()
{
}

OML__IE__AvailStatus::OML__IE__AvailStatus(const INTEGER& par_len,
    const OML__FOM__AvailabilityStatus& par_avail__status)
  :   field_len(par_len),
  field_avail__status(par_avail__status)
{
}

OML__IE__AvailStatus::OML__IE__AvailStatus(const OML__IE__AvailStatus& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @AbisOML_Types.OML_IE_AvailStatus.");
if (other_value.len().is_bound()) field_len = other_value.len();
else field_len.clean_up();
if (other_value.avail__status().is_bound()) field_avail__status = other_value.avail__status();
else field_avail__status.clean_up();
}

void OML__IE__AvailStatus::clean_up()
{
field_len.clean_up();
field_avail__status.clean_up();
}

const TTCN_Typedescriptor_t* OML__IE__AvailStatus::get_descriptor() const { return &OML__IE__AvailStatus_descr_; }
OML__IE__AvailStatus& OML__IE__AvailStatus::operator=(const OML__IE__AvailStatus& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @AbisOML_Types.OML_IE_AvailStatus.");
  if (other_value.len().is_bound()) field_len = other_value.len();
  else field_len.clean_up();
  if (other_value.avail__status().is_bound()) field_avail__status = other_value.avail__status();
  else field_avail__status.clean_up();
}
return *this;
}

boolean OML__IE__AvailStatus::operator==(const OML__IE__AvailStatus& other_value) const
{
return field_len==other_value.field_len
  && field_avail__status==other_value.field_avail__status;
}

boolean OML__IE__AvailStatus::is_bound() const
{
return (field_len.is_bound())
  || (field_avail__status.is_bound());
}
boolean OML__IE__AvailStatus::is_value() const
{
return field_len.is_value()
  && field_avail__status.is_value();
}
void OML__IE__AvailStatus::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ len := ");
field_len.log();
TTCN_Logger::log_event_str(", avail_status := ");
field_avail__status.log();
TTCN_Logger::log_event_str(" }");
}

void OML__IE__AvailStatus::set_implicit_omit()
{
if (len().is_bound()) len().set_implicit_omit();
if (avail__status().is_bound()) avail__status().set_implicit_omit();
}

void OML__IE__AvailStatus::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 @AbisOML_Types.OML_IE_AvailStatus 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) len().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) avail__status().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(), "len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "avail_status")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          avail__status().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 @AbisOML_Types.OML_IE_AvailStatus: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@AbisOML_Types.OML_IE_AvailStatus");
  }
}

void OML__IE__AvailStatus::encode_text(Text_Buf& text_buf) const
{
field_len.encode_text(text_buf);
field_avail__status.encode_text(text_buf);
}

void OML__IE__AvailStatus::decode_text(Text_Buf& text_buf)
{
field_len.decode_text(text_buf);
field_avail__status.decode_text(text_buf);
}

void OML__IE__AvailStatus::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 OML__IE__AvailStatus::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 OML__IE__AvailStatus::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, OML__IE__AvailStatus_len_descr_.raw->forceomit);
  decoded_field_length = field_len.RAW_decode(OML__IE__AvailStatus_len_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_len.convert_to_Integer(OML__IE__AvailStatus_len_descr_);
  field_len = tmp0;
  value_of_length_field0 += tmp0.get_long_long_val() * 8;
  RAW_Force_Omit field_1_force_omit(1, force_omit, OML__IE__AvailStatus_avail__status_descr_.raw->forceomit);
  decoded_field_length = field_avail__status.RAW_decode(OML__IE__AvailStatus_avail__status_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;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int OML__IE__AvailStatus::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, OML__IE__AvailStatus_len_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, OML__IE__AvailStatus_avail__status_descr_.raw);
  encoded_length += 16;
  myleaf.body.node.nodes[0]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[0]->coding_descr = &OML__IE__AvailStatus_len_descr_;
  myleaf.body.node.nodes[0]->calcof.lengthto.num_of_fields = 1;
  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(1);
  myleaf.body.node.nodes[0]->length = 16;
  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;
  encoded_length += field_avail__status.RAW_encode(OML__IE__AvailStatus_avail__status_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct OML__IE__AvailStatus_template::single_value_struct {
INTEGER_template field_len;
OML__FOM__AvailabilityStatus_template field_avail__status;
};

void OML__IE__AvailStatus_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_len = ANY_VALUE;
single_value->field_avail__status = ANY_VALUE;
}
}
}

void OML__IE__AvailStatus_template::copy_value(const OML__IE__AvailStatus& other_value)
{
single_value = new single_value_struct;
if (other_value.len().is_bound()) {
  single_value->field_len = other_value.len();
} else {
  single_value->field_len.clean_up();
}
if (other_value.avail__status().is_bound()) {
  single_value->field_avail__status = other_value.avail__status();
} else {
  single_value->field_avail__status.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void OML__IE__AvailStatus_template::copy_template(const OML__IE__AvailStatus_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.len().get_selection()) {
single_value->field_len = other_value.len();
} else {
single_value->field_len.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.avail__status().get_selection()) {
single_value->field_avail__status = other_value.avail__status();
} else {
single_value->field_avail__status.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 OML__IE__AvailStatus_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 OML__IE__AvailStatus_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__IE__AvailStatus_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 @AbisOML_Types.OML_IE_AvailStatus.");
break;
}
set_selection(other_value);
}

OML__IE__AvailStatus_template::OML__IE__AvailStatus_template()
{
}

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

OML__IE__AvailStatus_template::OML__IE__AvailStatus_template(const OML__IE__AvailStatus& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean OML__IE__AvailStatus_template::match(const OML__IE__AvailStatus& 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.len().is_bound()) return FALSE;
if(!single_value->field_len.match(other_value.len(), legacy))return FALSE;
if(!other_value.avail__status().is_bound()) return FALSE;
if(!single_value->field_avail__status.match(other_value.avail__status(), 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 @AbisOML_Types.OML_IE_AvailStatus.");
}
return FALSE;
}

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

boolean OML__IE__AvailStatus_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_len.is_value()
 && single_value->field_avail__status.is_value();
}

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

OML__IE__AvailStatus OML__IE__AvailStatus_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 @AbisOML_Types.OML_IE_AvailStatus.");
OML__IE__AvailStatus ret_val;
if (single_value->field_len.is_bound()) {
ret_val.len() = single_value->field_len.valueof();
}
if (single_value->field_avail__status.is_bound()) {
ret_val.avail__status() = single_value->field_avail__status.valueof();
}
return ret_val;
}

void OML__IE__AvailStatus_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 @AbisOML_Types.OML_IE_AvailStatus.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__IE__AvailStatus_template[list_length];
}

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

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

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

OML__FOM__AvailabilityStatus_template& OML__IE__AvailStatus_template::avail__status()
{
set_specific();
return single_value->field_avail__status;
}

const OML__FOM__AvailabilityStatus_template& OML__IE__AvailStatus_template::avail__status() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field avail_status of a non-specific template of type @AbisOML_Types.OML_IE_AvailStatus.");
return single_value->field_avail__status;
}

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

void OML__IE__AvailStatus_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ len := ");
single_value->field_len.log();
TTCN_Logger::log_event_str(", avail_status := ");
single_value->field_avail__status.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 OML__IE__AvailStatus_template::log_match(const OML__IE__AvailStatus& 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_len.match(match_value.len(), legacy)){
TTCN_Logger::log_logmatch_info(".len");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_avail__status.match(match_value.avail__status(), legacy)){
TTCN_Logger::log_logmatch_info(".avail_status");
single_value->field_avail__status.log_match(match_value.avail__status(), 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("{ len := ");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::log_event_str(", avail_status := ");
single_value->field_avail__status.log_match(match_value.avail__status(), 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 OML__IE__AvailStatus_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (len().is_bound()) len().set_implicit_omit();
if (avail__status().is_bound()) avail__status().set_implicit_omit();
}

void OML__IE__AvailStatus_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_len.encode_text(text_buf);
single_value->field_avail__status.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 @AbisOML_Types.OML_IE_AvailStatus.");
}
}

void OML__IE__AvailStatus_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_len.decode_text(text_buf);
single_value->field_avail__status.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 OML__IE__AvailStatus_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 @AbisOML_Types.OML_IE_AvailStatus.");
}
}

void OML__IE__AvailStatus_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: {
    OML__IE__AvailStatus_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 @AbisOML_Types.OML_IE_AvailStatus 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) len().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) avail__status().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(), "len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "avail_status")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          avail__status().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 @AbisOML_Types.OML_IE_AvailStatus: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__IE__AvailStatus_template* precondition = new OML__IE__AvailStatus_template;
    precondition->set_param(*param.get_elem(0));
    OML__IE__AvailStatus_template* implied_template = new OML__IE__AvailStatus_template;
    implied_template->set_param(*param.get_elem(1));
    *this = OML__IE__AvailStatus_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@AbisOML_Types.OML_IE_AvailStatus");
  }
  is_ifpresent = param.get_ifpresent();
}

void OML__IE__AvailStatus_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_len.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_IE_AvailStatus");
single_value->field_avail__status.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_IE_AvailStatus");
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 : "@AbisOML_Types.OML_IE_AvailStatus");
}

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

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

OML__IE__ArfcnList::OML__IE__ArfcnList()
{
}

OML__IE__ArfcnList::OML__IE__ArfcnList(const INTEGER& par_len,
    const OML__ArfcnList& par_arfcn__list)
  :   field_len(par_len),
  field_arfcn__list(par_arfcn__list)
{
}

OML__IE__ArfcnList::OML__IE__ArfcnList(const OML__IE__ArfcnList& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @AbisOML_Types.OML_IE_ArfcnList.");
if (other_value.len().is_bound()) field_len = other_value.len();
else field_len.clean_up();
if (other_value.arfcn__list().is_bound()) field_arfcn__list = other_value.arfcn__list();
else field_arfcn__list.clean_up();
}

void OML__IE__ArfcnList::clean_up()
{
field_len.clean_up();
field_arfcn__list.clean_up();
}

const TTCN_Typedescriptor_t* OML__IE__ArfcnList::get_descriptor() const { return &OML__IE__ArfcnList_descr_; }
OML__IE__ArfcnList& OML__IE__ArfcnList::operator=(const OML__IE__ArfcnList& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @AbisOML_Types.OML_IE_ArfcnList.");
  if (other_value.len().is_bound()) field_len = other_value.len();
  else field_len.clean_up();
  if (other_value.arfcn__list().is_bound()) field_arfcn__list = other_value.arfcn__list();
  else field_arfcn__list.clean_up();
}
return *this;
}

boolean OML__IE__ArfcnList::operator==(const OML__IE__ArfcnList& other_value) const
{
return field_len==other_value.field_len
  && field_arfcn__list==other_value.field_arfcn__list;
}

boolean OML__IE__ArfcnList::is_bound() const
{
return (field_len.is_bound())
  || (field_arfcn__list.is_bound());
}
boolean OML__IE__ArfcnList::is_value() const
{
return field_len.is_value()
  && field_arfcn__list.is_value();
}
void OML__IE__ArfcnList::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ len := ");
field_len.log();
TTCN_Logger::log_event_str(", arfcn_list := ");
field_arfcn__list.log();
TTCN_Logger::log_event_str(" }");
}

void OML__IE__ArfcnList::set_implicit_omit()
{
if (len().is_bound()) len().set_implicit_omit();
if (arfcn__list().is_bound()) arfcn__list().set_implicit_omit();
}

void OML__IE__ArfcnList::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 @AbisOML_Types.OML_IE_ArfcnList 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) len().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) arfcn__list().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(), "len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "arfcn_list")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          arfcn__list().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 @AbisOML_Types.OML_IE_ArfcnList: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@AbisOML_Types.OML_IE_ArfcnList");
  }
}

void OML__IE__ArfcnList::encode_text(Text_Buf& text_buf) const
{
field_len.encode_text(text_buf);
field_arfcn__list.encode_text(text_buf);
}

void OML__IE__ArfcnList::decode_text(Text_Buf& text_buf)
{
field_len.decode_text(text_buf);
field_arfcn__list.decode_text(text_buf);
}

void OML__IE__ArfcnList::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 OML__IE__ArfcnList::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 OML__IE__ArfcnList::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, OML__IE__ArfcnList_len_descr_.raw->forceomit);
  decoded_field_length = field_len.RAW_decode(OML__IE__ArfcnList_len_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, OML__IE__ArfcnList_arfcn__list_descr_.raw->forceomit);
  decoded_field_length = field_arfcn__list.RAW_decode(OML__IE__ArfcnList_arfcn__list_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 OML__IE__ArfcnList::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, OML__IE__ArfcnList_len_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, OML__IE__ArfcnList_arfcn__list_descr_.raw);
  encoded_length += field_len.RAW_encode(OML__IE__ArfcnList_len_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_arfcn__list.RAW_encode(OML__IE__ArfcnList_arfcn__list_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct OML__IE__ArfcnList_template::single_value_struct {
INTEGER_template field_len;
OML__ArfcnList_template field_arfcn__list;
};

void OML__IE__ArfcnList_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_len = ANY_VALUE;
single_value->field_arfcn__list = ANY_VALUE;
}
}
}

void OML__IE__ArfcnList_template::copy_value(const OML__IE__ArfcnList& other_value)
{
single_value = new single_value_struct;
if (other_value.len().is_bound()) {
  single_value->field_len = other_value.len();
} else {
  single_value->field_len.clean_up();
}
if (other_value.arfcn__list().is_bound()) {
  single_value->field_arfcn__list = other_value.arfcn__list();
} else {
  single_value->field_arfcn__list.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void OML__IE__ArfcnList_template::copy_template(const OML__IE__ArfcnList_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.len().get_selection()) {
single_value->field_len = other_value.len();
} else {
single_value->field_len.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.arfcn__list().get_selection()) {
single_value->field_arfcn__list = other_value.arfcn__list();
} else {
single_value->field_arfcn__list.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 OML__IE__ArfcnList_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 OML__IE__ArfcnList_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__IE__ArfcnList_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 @AbisOML_Types.OML_IE_ArfcnList.");
break;
}
set_selection(other_value);
}

OML__IE__ArfcnList_template::OML__IE__ArfcnList_template()
{
}

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

OML__IE__ArfcnList_template::OML__IE__ArfcnList_template(const OML__IE__ArfcnList& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean OML__IE__ArfcnList_template::match(const OML__IE__ArfcnList& 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.len().is_bound()) return FALSE;
if(!single_value->field_len.match(other_value.len(), legacy))return FALSE;
if(!other_value.arfcn__list().is_bound()) return FALSE;
if(!single_value->field_arfcn__list.match(other_value.arfcn__list(), 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 @AbisOML_Types.OML_IE_ArfcnList.");
}
return FALSE;
}

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

boolean OML__IE__ArfcnList_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_len.is_value()
 && single_value->field_arfcn__list.is_value();
}

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

OML__IE__ArfcnList OML__IE__ArfcnList_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 @AbisOML_Types.OML_IE_ArfcnList.");
OML__IE__ArfcnList ret_val;
if (single_value->field_len.is_bound()) {
ret_val.len() = single_value->field_len.valueof();
}
if (single_value->field_arfcn__list.is_bound()) {
ret_val.arfcn__list() = single_value->field_arfcn__list.valueof();
}
return ret_val;
}

void OML__IE__ArfcnList_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 @AbisOML_Types.OML_IE_ArfcnList.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__IE__ArfcnList_template[list_length];
}

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

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

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

OML__ArfcnList_template& OML__IE__ArfcnList_template::arfcn__list()
{
set_specific();
return single_value->field_arfcn__list;
}

const OML__ArfcnList_template& OML__IE__ArfcnList_template::arfcn__list() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field arfcn_list of a non-specific template of type @AbisOML_Types.OML_IE_ArfcnList.");
return single_value->field_arfcn__list;
}

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

void OML__IE__ArfcnList_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ len := ");
single_value->field_len.log();
TTCN_Logger::log_event_str(", arfcn_list := ");
single_value->field_arfcn__list.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 OML__IE__ArfcnList_template::log_match(const OML__IE__ArfcnList& 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_len.match(match_value.len(), legacy)){
TTCN_Logger::log_logmatch_info(".len");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_arfcn__list.match(match_value.arfcn__list(), legacy)){
TTCN_Logger::log_logmatch_info(".arfcn_list");
single_value->field_arfcn__list.log_match(match_value.arfcn__list(), 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("{ len := ");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::log_event_str(", arfcn_list := ");
single_value->field_arfcn__list.log_match(match_value.arfcn__list(), 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 OML__IE__ArfcnList_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (len().is_bound()) len().set_implicit_omit();
if (arfcn__list().is_bound()) arfcn__list().set_implicit_omit();
}

void OML__IE__ArfcnList_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_len.encode_text(text_buf);
single_value->field_arfcn__list.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 @AbisOML_Types.OML_IE_ArfcnList.");
}
}

void OML__IE__ArfcnList_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_len.decode_text(text_buf);
single_value->field_arfcn__list.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 OML__IE__ArfcnList_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 @AbisOML_Types.OML_IE_ArfcnList.");
}
}

void OML__IE__ArfcnList_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: {
    OML__IE__ArfcnList_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 @AbisOML_Types.OML_IE_ArfcnList 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) len().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) arfcn__list().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(), "len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "arfcn_list")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          arfcn__list().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 @AbisOML_Types.OML_IE_ArfcnList: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__IE__ArfcnList_template* precondition = new OML__IE__ArfcnList_template;
    precondition->set_param(*param.get_elem(0));
    OML__IE__ArfcnList_template* implied_template = new OML__IE__ArfcnList_template;
    implied_template->set_param(*param.get_elem(1));
    *this = OML__IE__ArfcnList_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@AbisOML_Types.OML_IE_ArfcnList");
  }
  is_ifpresent = param.get_ifpresent();
}

void OML__IE__ArfcnList_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_len.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_IE_ArfcnList");
single_value->field_arfcn__list.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_IE_ArfcnList");
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 : "@AbisOML_Types.OML_IE_ArfcnList");
}

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

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

OML__FOM__ARI::OML__FOM__ARI()
{
}

OML__FOM__ARI::OML__FOM__ARI(const INTEGER& par_len,
    const INTEGER& par_non__reported__attr__len,
    const OPTIONAL< OML__FOM__ARI_non__reported__attr >& par_non__reported__attr,
    const OPTIONAL< OML__FOM__IE__List >& par_ies)
  :   field_len(par_len),
  field_non__reported__attr__len(par_non__reported__attr__len),
  field_non__reported__attr(par_non__reported__attr),
  field_ies(par_ies)
{
}

OML__FOM__ARI::OML__FOM__ARI(const OML__FOM__ARI& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @AbisOML_Types.OML_FOM_ARI.");
if (other_value.len().is_bound()) field_len = other_value.len();
else field_len.clean_up();
if (other_value.non__reported__attr__len().is_bound()) field_non__reported__attr__len = other_value.non__reported__attr__len();
else field_non__reported__attr__len.clean_up();
if (other_value.non__reported__attr().is_bound()) field_non__reported__attr = other_value.non__reported__attr();
else field_non__reported__attr.clean_up();
if (other_value.ies().is_bound()) field_ies = other_value.ies();
else field_ies.clean_up();
}

void OML__FOM__ARI::clean_up()
{
field_len.clean_up();
field_non__reported__attr__len.clean_up();
field_non__reported__attr.clean_up();
field_ies.clean_up();
}

const TTCN_Typedescriptor_t* OML__FOM__ARI::get_descriptor() const { return &OML__FOM__ARI_descr_; }
OML__FOM__ARI& OML__FOM__ARI::operator=(const OML__FOM__ARI& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @AbisOML_Types.OML_FOM_ARI.");
  if (other_value.len().is_bound()) field_len = other_value.len();
  else field_len.clean_up();
  if (other_value.non__reported__attr__len().is_bound()) field_non__reported__attr__len = other_value.non__reported__attr__len();
  else field_non__reported__attr__len.clean_up();
  if (other_value.non__reported__attr().is_bound()) field_non__reported__attr = other_value.non__reported__attr();
  else field_non__reported__attr.clean_up();
  if (other_value.ies().is_bound()) field_ies = other_value.ies();
  else field_ies.clean_up();
}
return *this;
}

boolean OML__FOM__ARI::operator==(const OML__FOM__ARI& other_value) const
{
return field_len==other_value.field_len
  && field_non__reported__attr__len==other_value.field_non__reported__attr__len
  && field_non__reported__attr==other_value.field_non__reported__attr
  && field_ies==other_value.field_ies;
}

boolean OML__FOM__ARI::is_bound() const
{
return (field_len.is_bound())
  || (field_non__reported__attr__len.is_bound())
  || (OPTIONAL_OMIT == field_non__reported__attr.get_selection() || field_non__reported__attr.is_bound())
  || (OPTIONAL_OMIT == field_ies.get_selection() || field_ies.is_bound());
}
boolean OML__FOM__ARI::is_value() const
{
return field_len.is_value()
  && field_non__reported__attr__len.is_value()
  && (OPTIONAL_OMIT == field_non__reported__attr.get_selection() || field_non__reported__attr.is_value())
  && (OPTIONAL_OMIT == field_ies.get_selection() || field_ies.is_value());
}
int OML__FOM__ARI::size_of() const
{
  int ret_val = 2;
  if (field_non__reported__attr.ispresent()) ret_val++;
  if (field_ies.ispresent()) ret_val++;
  return ret_val;
}

void OML__FOM__ARI::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ len := ");
field_len.log();
TTCN_Logger::log_event_str(", non_reported_attr_len := ");
field_non__reported__attr__len.log();
TTCN_Logger::log_event_str(", non_reported_attr := ");
field_non__reported__attr.log();
TTCN_Logger::log_event_str(", ies := ");
field_ies.log();
TTCN_Logger::log_event_str(" }");
}

void OML__FOM__ARI::set_implicit_omit()
{
if (len().is_bound()) len().set_implicit_omit();
if (non__reported__attr__len().is_bound()) non__reported__attr__len().set_implicit_omit();
if (!non__reported__attr().is_bound()) non__reported__attr() = OMIT_VALUE;
else non__reported__attr().set_implicit_omit();
if (!ies().is_bound()) ies() = OMIT_VALUE;
else ies().set_implicit_omit();
}

void OML__FOM__ARI::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 @AbisOML_Types.OML_FOM_ARI 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) len().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) non__reported__attr__len().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) non__reported__attr().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) ies().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(), "len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "non_reported_attr_len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          non__reported__attr__len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "non_reported_attr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          non__reported__attr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ies")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ies().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 @AbisOML_Types.OML_FOM_ARI: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@AbisOML_Types.OML_FOM_ARI");
  }
}

void OML__FOM__ARI::encode_text(Text_Buf& text_buf) const
{
field_len.encode_text(text_buf);
field_non__reported__attr__len.encode_text(text_buf);
field_non__reported__attr.encode_text(text_buf);
field_ies.encode_text(text_buf);
}

void OML__FOM__ARI::decode_text(Text_Buf& text_buf)
{
field_len.decode_text(text_buf);
field_non__reported__attr__len.decode_text(text_buf);
field_non__reported__attr.decode_text(text_buf);
field_ies.decode_text(text_buf);
}

void OML__FOM__ARI::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 OML__FOM__ARI::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 OML__FOM__ARI::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;
  int value_of_length_field1 = 0;
  RAW_Force_Omit field_0_force_omit(0, force_omit, OML__FOM__ARI_len_descr_.raw->forceomit);
  decoded_field_length = field_len.RAW_decode(OML__FOM__ARI_len_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_len.convert_to_Integer(OML__FOM__ARI_len_descr_);
  field_len = tmp0;
  value_of_length_field0 += tmp0.get_long_long_val() * 8;
  RAW_Force_Omit field_1_force_omit(1, force_omit, OML__FOM__ARI_non__reported__attr__len_descr_.raw->forceomit);
  decoded_field_length = field_non__reported__attr__len.RAW_decode(OML__FOM__ARI_non__reported__attr__len_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());
  INTEGER tmp1 = field_non__reported__attr__len.convert_to_Integer(OML__FOM__ARI_non__reported__attr__len_descr_);
  field_non__reported__attr__len = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  value_of_length_field0 -= decoded_field_length;
  if (limit > 0 && value_of_length_field0 > 0 && value_of_length_field1 > 0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_non__reported__attr = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, OML__FOM__ARI_non__reported__attr_descr_.raw->forceomit);
  decoded_field_length = field_non__reported__attr().RAW_decode(OML__FOM__ARI_non__reported__attr_descr_, p_buf, min_of_ints(3, limit, value_of_length_field0, value_of_length_field1), local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_non__reported__attr = 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;
  value_of_length_field1 -= decoded_field_length;
  }
  }
  }
  else field_non__reported__attr=OMIT_VALUE;
  if (limit > 0 && value_of_length_field0 > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_ies = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, OML__FOM__ARI_ies_descr_.raw->forceomit);
  decoded_field_length = field_ies().RAW_decode(OML__FOM__ARI_ies_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_ies = 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_ies=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int OML__FOM__ARI::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, OML__FOM__ARI_len_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, OML__FOM__ARI_non__reported__attr__len_descr_.raw);
  if (field_non__reported__attr.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, OML__FOM__ARI_non__reported__attr_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_ies.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, OML__FOM__ARI_ies_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  encoded_length += 16;
  myleaf.body.node.nodes[0]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[0]->coding_descr = &OML__FOM__ARI_len_descr_;
  myleaf.body.node.nodes[0]->calcof.lengthto.num_of_fields = 3;
  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(3);
  myleaf.body.node.nodes[0]->length = 16;
  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_non__reported__attr.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_ies.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;
  }
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &OML__FOM__ARI_non__reported__attr__len_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 1;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(1);
  myleaf.body.node.nodes[1]->length = 8;
  if (field_non__reported__attr.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_non__reported__attr.ispresent()) {
  encoded_length += field_non__reported__attr().RAW_encode(OML__FOM__ARI_non__reported__attr_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_ies.ispresent()) {
  encoded_length += field_ies().RAW_encode(OML__FOM__ARI_ies_descr_, *myleaf.body.node.nodes[3]);
  }
  return myleaf.length = encoded_length;
}

struct OML__FOM__ARI_template::single_value_struct {
INTEGER_template field_len;
INTEGER_template field_non__reported__attr__len;
OML__FOM__ARI_non__reported__attr_template field_non__reported__attr;
OML__FOM__IE__List_template field_ies;
};

void OML__FOM__ARI_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_len = ANY_VALUE;
single_value->field_non__reported__attr__len = ANY_VALUE;
single_value->field_non__reported__attr = ANY_OR_OMIT;
single_value->field_ies = ANY_OR_OMIT;
}
}
}

void OML__FOM__ARI_template::copy_value(const OML__FOM__ARI& other_value)
{
single_value = new single_value_struct;
if (other_value.len().is_bound()) {
  single_value->field_len = other_value.len();
} else {
  single_value->field_len.clean_up();
}
if (other_value.non__reported__attr__len().is_bound()) {
  single_value->field_non__reported__attr__len = other_value.non__reported__attr__len();
} else {
  single_value->field_non__reported__attr__len.clean_up();
}
if (other_value.non__reported__attr().is_bound()) {
  if (other_value.non__reported__attr().ispresent()) single_value->field_non__reported__attr = other_value.non__reported__attr()();
  else single_value->field_non__reported__attr = OMIT_VALUE;
} else {
  single_value->field_non__reported__attr.clean_up();
}
if (other_value.ies().is_bound()) {
  if (other_value.ies().ispresent()) single_value->field_ies = other_value.ies()();
  else single_value->field_ies = OMIT_VALUE;
} else {
  single_value->field_ies.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void OML__FOM__ARI_template::copy_template(const OML__FOM__ARI_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.len().get_selection()) {
single_value->field_len = other_value.len();
} else {
single_value->field_len.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.non__reported__attr__len().get_selection()) {
single_value->field_non__reported__attr__len = other_value.non__reported__attr__len();
} else {
single_value->field_non__reported__attr__len.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.non__reported__attr().get_selection()) {
single_value->field_non__reported__attr = other_value.non__reported__attr();
} else {
single_value->field_non__reported__attr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ies().get_selection()) {
single_value->field_ies = other_value.ies();
} else {
single_value->field_ies.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 OML__FOM__ARI_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 OML__FOM__ARI_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__ARI_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 @AbisOML_Types.OML_FOM_ARI.");
break;
}
set_selection(other_value);
}

OML__FOM__ARI_template::OML__FOM__ARI_template()
{
}

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

OML__FOM__ARI_template::OML__FOM__ARI_template(const OML__FOM__ARI& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean OML__FOM__ARI_template::match(const OML__FOM__ARI& 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.len().is_bound()) return FALSE;
if(!single_value->field_len.match(other_value.len(), legacy))return FALSE;
if(!other_value.non__reported__attr__len().is_bound()) return FALSE;
if(!single_value->field_non__reported__attr__len.match(other_value.non__reported__attr__len(), legacy))return FALSE;
if(!other_value.non__reported__attr().is_bound()) return FALSE;
if((other_value.non__reported__attr().ispresent() ? !single_value->field_non__reported__attr.match((const OML__FOM__ARI_non__reported__attr&)other_value.non__reported__attr(), legacy) : !single_value->field_non__reported__attr.match_omit(legacy)))return FALSE;
if(!other_value.ies().is_bound()) return FALSE;
if((other_value.ies().ispresent() ? !single_value->field_ies.match((const OML__FOM__IE__List&)other_value.ies(), legacy) : !single_value->field_ies.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 @AbisOML_Types.OML_FOM_ARI.");
}
return FALSE;
}

boolean OML__FOM__ARI_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_len.is_bound()
 || single_value->field_non__reported__attr__len.is_bound()
 || (single_value->field_non__reported__attr.is_omit() || single_value->field_non__reported__attr.is_bound())
 || (single_value->field_ies.is_omit() || single_value->field_ies.is_bound());
}

boolean OML__FOM__ARI_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_len.is_value()
 && single_value->field_non__reported__attr__len.is_value()
 && (single_value->field_non__reported__attr.is_omit() || single_value->field_non__reported__attr.is_value())
 && (single_value->field_ies.is_omit() || single_value->field_ies.is_value());
}

void OML__FOM__ARI_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;
}

OML__FOM__ARI OML__FOM__ARI_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 @AbisOML_Types.OML_FOM_ARI.");
OML__FOM__ARI ret_val;
if (single_value->field_len.is_bound()) {
ret_val.len() = single_value->field_len.valueof();
}
if (single_value->field_non__reported__attr__len.is_bound()) {
ret_val.non__reported__attr__len() = single_value->field_non__reported__attr__len.valueof();
}
if (single_value->field_non__reported__attr.is_omit()) ret_val.non__reported__attr() = OMIT_VALUE;
else if (single_value->field_non__reported__attr.is_bound()) {
ret_val.non__reported__attr() = single_value->field_non__reported__attr.valueof();
}
if (single_value->field_ies.is_omit()) ret_val.ies() = OMIT_VALUE;
else if (single_value->field_ies.is_bound()) {
ret_val.ies() = single_value->field_ies.valueof();
}
return ret_val;
}

void OML__FOM__ARI_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 @AbisOML_Types.OML_FOM_ARI.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__FOM__ARI_template[list_length];
}

OML__FOM__ARI_template& OML__FOM__ARI_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 @AbisOML_Types.OML_FOM_ARI.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @AbisOML_Types.OML_FOM_ARI.");
return value_list.list_value[list_index];
}

INTEGER_template& OML__FOM__ARI_template::len()
{
set_specific();
return single_value->field_len;
}

const INTEGER_template& OML__FOM__ARI_template::len() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field len of a non-specific template of type @AbisOML_Types.OML_FOM_ARI.");
return single_value->field_len;
}

INTEGER_template& OML__FOM__ARI_template::non__reported__attr__len()
{
set_specific();
return single_value->field_non__reported__attr__len;
}

const INTEGER_template& OML__FOM__ARI_template::non__reported__attr__len() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field non_reported_attr_len of a non-specific template of type @AbisOML_Types.OML_FOM_ARI.");
return single_value->field_non__reported__attr__len;
}

OML__FOM__ARI_non__reported__attr_template& OML__FOM__ARI_template::non__reported__attr()
{
set_specific();
return single_value->field_non__reported__attr;
}

const OML__FOM__ARI_non__reported__attr_template& OML__FOM__ARI_template::non__reported__attr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field non_reported_attr of a non-specific template of type @AbisOML_Types.OML_FOM_ARI.");
return single_value->field_non__reported__attr;
}

OML__FOM__IE__List_template& OML__FOM__ARI_template::ies()
{
set_specific();
return single_value->field_ies;
}

const OML__FOM__IE__List_template& OML__FOM__ARI_template::ies() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ies of a non-specific template of type @AbisOML_Types.OML_FOM_ARI.");
return single_value->field_ies;
}

int OML__FOM__ARI_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_FOM_ARI which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
  {    int ret_val = 2;
      if (single_value->field_non__reported__attr.is_present()) ret_val++;
      if (single_value->field_ies.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 @AbisOML_Types.OML_FOM_ARI 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 @AbisOML_Types.OML_FOM_ARI containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_FOM_ARI containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_FOM_ARI containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_FOM_ARI containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_FOM_ARI containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_FOM_ARI containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_FOM_ARI containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @AbisOML_Types.OML_FOM_ARI.");
  }
  return 0;
}

void OML__FOM__ARI_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ len := ");
single_value->field_len.log();
TTCN_Logger::log_event_str(", non_reported_attr_len := ");
single_value->field_non__reported__attr__len.log();
TTCN_Logger::log_event_str(", non_reported_attr := ");
single_value->field_non__reported__attr.log();
TTCN_Logger::log_event_str(", ies := ");
single_value->field_ies.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 OML__FOM__ARI_template::log_match(const OML__FOM__ARI& 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_len.match(match_value.len(), legacy)){
TTCN_Logger::log_logmatch_info(".len");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_non__reported__attr__len.match(match_value.non__reported__attr__len(), legacy)){
TTCN_Logger::log_logmatch_info(".non_reported_attr_len");
single_value->field_non__reported__attr__len.log_match(match_value.non__reported__attr__len(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.non__reported__attr().ispresent()){
if(!single_value->field_non__reported__attr.match(match_value.non__reported__attr(), legacy)){
TTCN_Logger::log_logmatch_info(".non_reported_attr");
single_value->field_non__reported__attr.log_match(match_value.non__reported__attr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_non__reported__attr.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".non_reported_attr := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_non__reported__attr.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.ies().ispresent()){
if(!single_value->field_ies.match(match_value.ies(), legacy)){
TTCN_Logger::log_logmatch_info(".ies");
single_value->field_ies.log_match(match_value.ies(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_ies.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".ies := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_ies.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("{ len := ");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::log_event_str(", non_reported_attr_len := ");
single_value->field_non__reported__attr__len.log_match(match_value.non__reported__attr__len(), legacy);
TTCN_Logger::log_event_str(", non_reported_attr := ");
if (match_value.non__reported__attr().ispresent()) {
single_value->field_non__reported__attr.log_match(match_value.non__reported__attr(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_non__reported__attr.log();
if (single_value->field_non__reported__attr.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", ies := ");
if (match_value.ies().ispresent()) {
single_value->field_ies.log_match(match_value.ies(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_ies.log();
if (single_value->field_ies.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 OML__FOM__ARI_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (len().is_bound()) len().set_implicit_omit();
if (non__reported__attr__len().is_bound()) non__reported__attr__len().set_implicit_omit();
if (!non__reported__attr().is_bound()) non__reported__attr() = OMIT_VALUE;
else non__reported__attr().set_implicit_omit();
if (!ies().is_bound()) ies() = OMIT_VALUE;
else ies().set_implicit_omit();
}

void OML__FOM__ARI_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_len.encode_text(text_buf);
single_value->field_non__reported__attr__len.encode_text(text_buf);
single_value->field_non__reported__attr.encode_text(text_buf);
single_value->field_ies.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 @AbisOML_Types.OML_FOM_ARI.");
}
}

void OML__FOM__ARI_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_len.decode_text(text_buf);
single_value->field_non__reported__attr__len.decode_text(text_buf);
single_value->field_non__reported__attr.decode_text(text_buf);
single_value->field_ies.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 OML__FOM__ARI_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 @AbisOML_Types.OML_FOM_ARI.");
}
}

void OML__FOM__ARI_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: {
    OML__FOM__ARI_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 @AbisOML_Types.OML_FOM_ARI 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) len().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) non__reported__attr__len().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) non__reported__attr().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) ies().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(), "len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "non_reported_attr_len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          non__reported__attr__len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "non_reported_attr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          non__reported__attr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ies")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ies().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 @AbisOML_Types.OML_FOM_ARI: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__ARI_template* precondition = new OML__FOM__ARI_template;
    precondition->set_param(*param.get_elem(0));
    OML__FOM__ARI_template* implied_template = new OML__FOM__ARI_template;
    implied_template->set_param(*param.get_elem(1));
    *this = OML__FOM__ARI_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@AbisOML_Types.OML_FOM_ARI");
  }
  is_ifpresent = param.get_ifpresent();
}

void OML__FOM__ARI_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_len.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_ARI");
single_value->field_non__reported__attr__len.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_ARI");
single_value->field_non__reported__attr.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_ARI");
single_value->field_ies.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_ARI");
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 : "@AbisOML_Types.OML_FOM_ARI");
}

boolean OML__FOM__ARI_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean OML__FOM__ARI_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;
}

OML__IE__L16V::OML__IE__L16V()
{
}

OML__IE__L16V::OML__IE__L16V(const INTEGER& par_len,
    const OCTETSTRING& par_payload)
  :   field_len(par_len),
  field_payload(par_payload)
{
}

OML__IE__L16V::OML__IE__L16V(const OML__IE__L16V& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @AbisOML_Types.OML_IE_L16V.");
if (other_value.len().is_bound()) field_len = other_value.len();
else field_len.clean_up();
if (other_value.payload().is_bound()) field_payload = other_value.payload();
else field_payload.clean_up();
}

void OML__IE__L16V::clean_up()
{
field_len.clean_up();
field_payload.clean_up();
}

const TTCN_Typedescriptor_t* OML__IE__L16V::get_descriptor() const { return &OML__IE__L16V_descr_; }
OML__IE__L16V& OML__IE__L16V::operator=(const OML__IE__L16V& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @AbisOML_Types.OML_IE_L16V.");
  if (other_value.len().is_bound()) field_len = other_value.len();
  else field_len.clean_up();
  if (other_value.payload().is_bound()) field_payload = other_value.payload();
  else field_payload.clean_up();
}
return *this;
}

boolean OML__IE__L16V::operator==(const OML__IE__L16V& other_value) const
{
return field_len==other_value.field_len
  && field_payload==other_value.field_payload;
}

boolean OML__IE__L16V::is_bound() const
{
return (field_len.is_bound())
  || (field_payload.is_bound());
}
boolean OML__IE__L16V::is_value() const
{
return field_len.is_value()
  && field_payload.is_value();
}
void OML__IE__L16V::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ len := ");
field_len.log();
TTCN_Logger::log_event_str(", payload := ");
field_payload.log();
TTCN_Logger::log_event_str(" }");
}

void OML__IE__L16V::set_implicit_omit()
{
if (len().is_bound()) len().set_implicit_omit();
if (payload().is_bound()) payload().set_implicit_omit();
}

void OML__IE__L16V::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 @AbisOML_Types.OML_IE_L16V 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) len().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) payload().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(), "len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "payload")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          payload().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @AbisOML_Types.OML_IE_L16V: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@AbisOML_Types.OML_IE_L16V");
  }
}

void OML__IE__L16V::encode_text(Text_Buf& text_buf) const
{
field_len.encode_text(text_buf);
field_payload.encode_text(text_buf);
}

void OML__IE__L16V::decode_text(Text_Buf& text_buf)
{
field_len.decode_text(text_buf);
field_payload.decode_text(text_buf);
}

void OML__IE__L16V::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 OML__IE__L16V::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 OML__IE__L16V::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, OML__IE__L16V_len_descr_.raw->forceomit);
  decoded_field_length = field_len.RAW_decode(OML__IE__L16V_len_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_len.convert_to_Integer(OML__IE__L16V_len_descr_);
  field_len = tmp0;
  value_of_length_field0 += tmp0.get_long_long_val() * 8;
  RAW_Force_Omit field_1_force_omit(1, force_omit, OML__IE__L16V_payload_descr_.raw->forceomit);
  decoded_field_length = field_payload.RAW_decode(OML__IE__L16V_payload_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;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int OML__IE__L16V::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, OML__IE__L16V_len_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, OML__IE__L16V_payload_descr_.raw);
  encoded_length += 16;
  myleaf.body.node.nodes[0]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[0]->coding_descr = &OML__IE__L16V_len_descr_;
  myleaf.body.node.nodes[0]->calcof.lengthto.num_of_fields = 1;
  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(1);
  myleaf.body.node.nodes[0]->length = 16;
  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;
  encoded_length += field_payload.RAW_encode(OML__IE__L16V_payload_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct OML__IE__L16V_template::single_value_struct {
INTEGER_template field_len;
OCTETSTRING_template field_payload;
};

void OML__IE__L16V_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_len = ANY_VALUE;
single_value->field_payload = ANY_VALUE;
}
}
}

void OML__IE__L16V_template::copy_value(const OML__IE__L16V& other_value)
{
single_value = new single_value_struct;
if (other_value.len().is_bound()) {
  single_value->field_len = other_value.len();
} else {
  single_value->field_len.clean_up();
}
if (other_value.payload().is_bound()) {
  single_value->field_payload = other_value.payload();
} else {
  single_value->field_payload.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void OML__IE__L16V_template::copy_template(const OML__IE__L16V_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.len().get_selection()) {
single_value->field_len = other_value.len();
} else {
single_value->field_len.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.payload().get_selection()) {
single_value->field_payload = other_value.payload();
} else {
single_value->field_payload.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__IE__L16V_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 OML__IE__L16V_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__IE__L16V_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 @AbisOML_Types.OML_IE_L16V.");
break;
}
set_selection(other_value);
}

OML__IE__L16V_template::OML__IE__L16V_template()
{
}

OML__IE__L16V_template::OML__IE__L16V_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

OML__IE__L16V_template::OML__IE__L16V_template(const OML__IE__L16V& other_value)
{
copy_value(other_value);
}

OML__IE__L16V_template::OML__IE__L16V_template(const OPTIONAL<OML__IE__L16V>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const OML__IE__L16V&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @AbisOML_Types.OML_IE_L16V from an unbound optional field.");
}
}

OML__IE__L16V_template::OML__IE__L16V_template(OML__IE__L16V_template* p_precondition, OML__IE__L16V_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

OML__IE__L16V_template::OML__IE__L16V_template(Dynamic_Match_Interface<OML__IE__L16V>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<OML__IE__L16V>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

OML__IE__L16V_template::OML__IE__L16V_template(const OML__IE__L16V_template& other_value)
: Base_Template()
{
copy_template(other_value);
}

OML__IE__L16V_template::~OML__IE__L16V_template()
{
clean_up();
}

OML__IE__L16V_template& OML__IE__L16V_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

OML__IE__L16V_template& OML__IE__L16V_template::operator=(const OML__IE__L16V& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

OML__IE__L16V_template& OML__IE__L16V_template::operator=(const OPTIONAL<OML__IE__L16V>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const OML__IE__L16V&)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 @AbisOML_Types.OML_IE_L16V.");
}
return *this;
}

OML__IE__L16V_template& OML__IE__L16V_template::operator=(const OML__IE__L16V_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean OML__IE__L16V_template::match(const OML__IE__L16V& 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.len().is_bound()) return FALSE;
if(!single_value->field_len.match(other_value.len(), legacy))return FALSE;
if(!other_value.payload().is_bound()) return FALSE;
if(!single_value->field_payload.match(other_value.payload(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @AbisOML_Types.OML_IE_L16V.");
}
return FALSE;
}

boolean OML__IE__L16V_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_len.is_bound()
 || single_value->field_payload.is_bound();
}

boolean OML__IE__L16V_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_len.is_value()
 && single_value->field_payload.is_value();
}

void OML__IE__L16V_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;
}

OML__IE__L16V OML__IE__L16V_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 @AbisOML_Types.OML_IE_L16V.");
OML__IE__L16V ret_val;
if (single_value->field_len.is_bound()) {
ret_val.len() = single_value->field_len.valueof();
}
if (single_value->field_payload.is_bound()) {
ret_val.payload() = single_value->field_payload.valueof();
}
return ret_val;
}

void OML__IE__L16V_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 @AbisOML_Types.OML_IE_L16V.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__IE__L16V_template[list_length];
}

OML__IE__L16V_template& OML__IE__L16V_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 @AbisOML_Types.OML_IE_L16V.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @AbisOML_Types.OML_IE_L16V.");
return value_list.list_value[list_index];
}

INTEGER_template& OML__IE__L16V_template::len()
{
set_specific();
return single_value->field_len;
}

const INTEGER_template& OML__IE__L16V_template::len() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field len of a non-specific template of type @AbisOML_Types.OML_IE_L16V.");
return single_value->field_len;
}

OCTETSTRING_template& OML__IE__L16V_template::payload()
{
set_specific();
return single_value->field_payload;
}

const OCTETSTRING_template& OML__IE__L16V_template::payload() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field payload of a non-specific template of type @AbisOML_Types.OML_IE_L16V.");
return single_value->field_payload;
}

int OML__IE__L16V_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_IE_L16V 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 @AbisOML_Types.OML_IE_L16V 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 @AbisOML_Types.OML_IE_L16V containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_IE_L16V containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_IE_L16V containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_IE_L16V containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_IE_L16V containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_IE_L16V containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_IE_L16V containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @AbisOML_Types.OML_IE_L16V.");
  }
  return 0;
}

void OML__IE__L16V_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ len := ");
single_value->field_len.log();
TTCN_Logger::log_event_str(", payload := ");
single_value->field_payload.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void OML__IE__L16V_template::log_match(const OML__IE__L16V& 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_len.match(match_value.len(), legacy)){
TTCN_Logger::log_logmatch_info(".len");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_payload.match(match_value.payload(), legacy)){
TTCN_Logger::log_logmatch_info(".payload");
single_value->field_payload.log_match(match_value.payload(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ len := ");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::log_event_str(", payload := ");
single_value->field_payload.log_match(match_value.payload(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void OML__IE__L16V_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (len().is_bound()) len().set_implicit_omit();
if (payload().is_bound()) payload().set_implicit_omit();
}

void OML__IE__L16V_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_len.encode_text(text_buf);
single_value->field_payload.encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @AbisOML_Types.OML_IE_L16V.");
}
}

void OML__IE__L16V_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_len.decode_text(text_buf);
single_value->field_payload.decode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__IE__L16V_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 @AbisOML_Types.OML_IE_L16V.");
}
}

void OML__IE__L16V_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: {
    OML__IE__L16V_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 @AbisOML_Types.OML_IE_L16V 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) len().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) payload().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(), "len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "payload")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          payload().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @AbisOML_Types.OML_IE_L16V: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__IE__L16V_template* precondition = new OML__IE__L16V_template;
    precondition->set_param(*param.get_elem(0));
    OML__IE__L16V_template* implied_template = new OML__IE__L16V_template;
    implied_template->set_param(*param.get_elem(1));
    *this = OML__IE__L16V_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@AbisOML_Types.OML_IE_L16V");
  }
  is_ifpresent = param.get_ifpresent();
}

void OML__IE__L16V_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_len.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_IE_L16V");
single_value->field_payload.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_IE_L16V");
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 : "@AbisOML_Types.OML_IE_L16V");
}

boolean OML__IE__L16V_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean OML__IE__L16V_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;
}

OML__FOM__IE::OML__FOM__IE()
{
}

OML__FOM__IE::OML__FOM__IE(const OML__FOM__IE__Type& par_iei,
    const OML__FOM__IE__Body& par_body)
  :   field_iei(par_iei),
  field_body(par_body)
{
}

OML__FOM__IE::OML__FOM__IE(const OML__FOM__IE& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @AbisOML_Types.OML_FOM_IE.");
if (other_value.iei().is_bound()) field_iei = other_value.iei();
else field_iei.clean_up();
if (other_value.body().is_bound()) field_body = other_value.body();
else field_body.clean_up();
}

void OML__FOM__IE::clean_up()
{
field_iei.clean_up();
field_body.clean_up();
}

const TTCN_Typedescriptor_t* OML__FOM__IE::get_descriptor() const { return &OML__FOM__IE_descr_; }
OML__FOM__IE& OML__FOM__IE::operator=(const OML__FOM__IE& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @AbisOML_Types.OML_FOM_IE.");
  if (other_value.iei().is_bound()) field_iei = other_value.iei();
  else field_iei.clean_up();
  if (other_value.body().is_bound()) field_body = other_value.body();
  else field_body.clean_up();
}
return *this;
}

boolean OML__FOM__IE::operator==(const OML__FOM__IE& other_value) const
{
return field_iei==other_value.field_iei
  && field_body==other_value.field_body;
}

boolean OML__FOM__IE::is_bound() const
{
return (field_iei.is_bound())
  || (field_body.is_bound());
}
boolean OML__FOM__IE::is_value() const
{
return field_iei.is_value()
  && field_body.is_value();
}
void OML__FOM__IE::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ iei := ");
field_iei.log();
TTCN_Logger::log_event_str(", body := ");
field_body.log();
TTCN_Logger::log_event_str(" }");
}

void OML__FOM__IE::set_implicit_omit()
{
if (iei().is_bound()) iei().set_implicit_omit();
if (body().is_bound()) body().set_implicit_omit();
}

void OML__FOM__IE::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 @AbisOML_Types.OML_FOM_IE 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) iei().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) body().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(), "iei")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          iei().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "body")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          body().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 @AbisOML_Types.OML_FOM_IE: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@AbisOML_Types.OML_FOM_IE");
  }
}

void OML__FOM__IE::encode_text(Text_Buf& text_buf) const
{
field_iei.encode_text(text_buf);
field_body.encode_text(text_buf);
}

void OML__FOM__IE::decode_text(Text_Buf& text_buf)
{
field_iei.decode_text(text_buf);
field_body.decode_text(text_buf);
}

void OML__FOM__IE::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 OML__FOM__IE::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 OML__FOM__IE::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  int selected_field = -1;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, OML__FOM__IE_iei_descr_.raw->forceomit);
  decoded_field_length = field_iei.RAW_decode(OML__FOM__IE_iei_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (field_iei == OML__FOM__IE__Type::NM__ATT__ABIS__CHANNEL) selected_field = 0;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__ADM__STATE) selected_field = 1;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__AUTON__REPORT) selected_field = 2;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__BCCH__ARFCN) selected_field = 3;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__BSIC) selected_field = 4;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__BTS__AIR__TIMER) selected_field = 5;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__CCCH__L__I__P) selected_field = 6;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__CCCH__L__T) selected_field = 7;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__CHAN__COMB) selected_field = 8;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__EVENT__TYPE) selected_field = 9;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__GSM__TIME) selected_field = 10;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__HSN) selected_field = 11;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__INTAVE__PARAM) selected_field = 12;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__INTERF__BOUND) selected_field = 13;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__MAIO) selected_field = 14;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__MANUF__STATE) selected_field = 15;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__MAX__TA) selected_field = 16;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__NACK__CAUSES) selected_field = 17;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__NY1) selected_field = 18;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__OPER__STATE) selected_field = 19;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__POWER__CLASS) selected_field = 20;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__POWER__THRESH) selected_field = 21;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__PROB__CAUSE) selected_field = 22;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__RACH__B__THRESH) selected_field = 23;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__LDAVG__SLOTS) selected_field = 24;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__RAD__SUBC) selected_field = 25;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__RF__MAXPOWR__R) selected_field = 26;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__SPEC__PROB) selected_field = 27;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__START__TIME) selected_field = 28;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__T200) selected_field = 29;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__TEI) selected_field = 30;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__TEST__NO) selected_field = 31;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__VSWR__THRESH) selected_field = 32;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__WINDOW__SIZE) selected_field = 33;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__TSC) selected_field = 34;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__SEVERITY) selected_field = 35;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__OUTST__ALARM) selected_field = 36;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__MEAS__TYPE) selected_field = 37;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__AVAIL__STATUS) selected_field = 38;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__ARFCN__LIST) selected_field = 39;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__IPACC__DST__IP) selected_field = 40;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__IPACC__DST__IP__PORT) selected_field = 41;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__IPACC__STREAM__ID) selected_field = 42;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__IPACC__SEC__OML__CFG) selected_field = 43;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__IPACC__IP__IF__CFG) selected_field = 44;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__IPACC__IP__GW__CFG) selected_field = 45;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__IPACC__IN__SERV__TIME) selected_field = 46;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__IPACC__PAGING__CFG) selected_field = 47;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__IPACC__FREQ__CTRL) selected_field = 48;
  else if (field_iei == OML__FOM__IE__Type::NM__ATT__GET__ARI) selected_field = 49;
  else selected_field = 50;
  RAW_Force_Omit field_1_force_omit(1, force_omit, OML__FOM__IE_body_descr_.raw->forceomit);
  decoded_field_length = field_body.RAW_decode(OML__FOM__IE_body_descr_, p_buf, limit, local_top_order, no_err, selected_field, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int OML__FOM__IE::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, OML__FOM__IE_iei_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, OML__FOM__IE_body_descr_.raw);
  encoded_length += field_iei.RAW_encode(OML__FOM__IE_iei_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_body.RAW_encode(OML__FOM__IE_body_descr_, *myleaf.body.node.nodes[1]);
  switch (field_body.get_selection()) {
  case OML__FOM__IE__Body::ALT_abis__channel:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__ABIS__CHANNEL) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__ABIS__CHANNEL);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_adm__state:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__ADM__STATE) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__ADM__STATE);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_auton__report:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__AUTON__REPORT) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__AUTON__REPORT);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_bcch__arfcn:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__BCCH__ARFCN) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__BCCH__ARFCN);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_bsic:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__BSIC) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__BSIC);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_air__timer:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__BTS__AIR__TIMER) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__BTS__AIR__TIMER);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_load__ind__period:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__CCCH__L__I__P) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__CCCH__L__I__P);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_load__threshold:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__CCCH__L__T) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__CCCH__L__T);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_chan__comb:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__CHAN__COMB) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__CHAN__COMB);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_event__type:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__EVENT__TYPE) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__EVENT__TYPE);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_gsm__time:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__GSM__TIME) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__GSM__TIME);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_hsn:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__HSN) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__HSN);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_intave__param:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__INTAVE__PARAM) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__INTAVE__PARAM);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_interf__bound:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__INTERF__BOUND) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__INTERF__BOUND);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_maio:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__MAIO) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__MAIO);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_manuf__state:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__MANUF__STATE) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__MANUF__STATE);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_max__ta:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__MAX__TA) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__MAX__TA);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_nack__causes:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__NACK__CAUSES) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__NACK__CAUSES);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_ny1:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__NY1) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__NY1);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_opstate:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__OPER__STATE) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__OPER__STATE);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_power__class:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__POWER__CLASS) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__POWER__CLASS);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_power__thresh:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__POWER__THRESH) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__POWER__THRESH);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_prob__cause:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__PROB__CAUSE) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__PROB__CAUSE);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_rach__b__thresh:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__RACH__B__THRESH) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__RACH__B__THRESH);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_loadavg__slots:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__LDAVG__SLOTS) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__LDAVG__SLOTS);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_radio__subch:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__RAD__SUBC) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__RAD__SUBC);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_rf__maxpwr__r:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__RF__MAXPOWR__R) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__RF__MAXPOWR__R);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_spec__prob:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__SPEC__PROB) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__SPEC__PROB);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_start__time:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__START__TIME) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__START__TIME);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_t200:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__T200) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__T200);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_tei:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__TEI) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__TEI);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_test__no:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__TEST__NO) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__TEST__NO);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_vswr__thresh:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__VSWR__THRESH) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__VSWR__THRESH);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_window__size:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__WINDOW__SIZE) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__WINDOW__SIZE);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_tsc:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__TSC) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__TSC);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_severity:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__SEVERITY) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__SEVERITY);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_outst__alarm:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__OUTST__ALARM) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__OUTST__ALARM);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_meas__type:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__MEAS__TYPE) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__MEAS__TYPE);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_avail__status:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__AVAIL__STATUS) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__AVAIL__STATUS);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_arfcn__list:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__ARFCN__LIST) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__ARFCN__LIST);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_ip:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__IPACC__DST__IP) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__IPACC__DST__IP);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_portnr:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__IPACC__DST__IP__PORT) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__IPACC__DST__IP__PORT);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_stream__id:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__IPACC__STREAM__ID) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__IPACC__STREAM__ID);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_sec__oml__cfg:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__IPACC__SEC__OML__CFG) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__IPACC__SEC__OML__CFG);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_ip__if__cfg:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__IPACC__IP__IF__CFG) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__IPACC__IP__IF__CFG);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_ip__gw__cfg:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__IPACC__IP__GW__CFG) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__IPACC__IP__GW__CFG);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_in__serv__time:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__IPACC__IN__SERV__TIME) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__IPACC__IN__SERV__TIME);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_paging__cfg:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__IPACC__PAGING__CFG) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__IPACC__PAGING__CFG);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_freq__ctrl:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__IPACC__FREQ__CTRL) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__IPACC__FREQ__CTRL);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__FOM__IE__Body::ALT_ari:
  if (field_iei != OML__FOM__IE__Type::NM__ATT__GET__ARI) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__FOM__IE__Type new_val(OML__FOM__IE__Type::NM__ATT__GET__ARI);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__FOM__IE_iei_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  default:;
  }
  return myleaf.length = encoded_length;
}

struct OML__FOM__IE_template::single_value_struct {
OML__FOM__IE__Type_template field_iei;
OML__FOM__IE__Body_template field_body;
};

void OML__FOM__IE_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_iei = ANY_VALUE;
single_value->field_body = ANY_VALUE;
}
}
}

void OML__FOM__IE_template::copy_value(const OML__FOM__IE& other_value)
{
single_value = new single_value_struct;
if (other_value.iei().is_bound()) {
  single_value->field_iei = other_value.iei();
} else {
  single_value->field_iei.clean_up();
}
if (other_value.body().is_bound()) {
  single_value->field_body = other_value.body();
} else {
  single_value->field_body.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void OML__FOM__IE_template::copy_template(const OML__FOM__IE_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.iei().get_selection()) {
single_value->field_iei = other_value.iei();
} else {
single_value->field_iei.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.body().get_selection()) {
single_value->field_body = other_value.body();
} else {
single_value->field_body.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 OML__FOM__IE_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 OML__FOM__IE_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__FOM__IE_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 @AbisOML_Types.OML_FOM_IE.");
break;
}
set_selection(other_value);
}

OML__FOM__IE_template::OML__FOM__IE_template()
{
}

OML__FOM__IE_template::OML__FOM__IE_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

OML__FOM__IE_template::OML__FOM__IE_template(const OML__FOM__IE& other_value)
{
copy_value(other_value);
}

OML__FOM__IE_template::OML__FOM__IE_template(const OPTIONAL<OML__FOM__IE>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const OML__FOM__IE&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @AbisOML_Types.OML_FOM_IE from an unbound optional field.");
}
}

OML__FOM__IE_template::OML__FOM__IE_template(OML__FOM__IE_template* p_precondition, OML__FOM__IE_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

OML__FOM__IE_template::OML__FOM__IE_template(Dynamic_Match_Interface<OML__FOM__IE>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<OML__FOM__IE>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

OML__FOM__IE_template::OML__FOM__IE_template(const OML__FOM__IE_template& other_value)
: Base_Template()
{
copy_template(other_value);
}

OML__FOM__IE_template::~OML__FOM__IE_template()
{
clean_up();
}

OML__FOM__IE_template& OML__FOM__IE_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

OML__FOM__IE_template& OML__FOM__IE_template::operator=(const OML__FOM__IE& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

OML__FOM__IE_template& OML__FOM__IE_template::operator=(const OPTIONAL<OML__FOM__IE>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const OML__FOM__IE&)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 @AbisOML_Types.OML_FOM_IE.");
}
return *this;
}

OML__FOM__IE_template& OML__FOM__IE_template::operator=(const OML__FOM__IE_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean OML__FOM__IE_template::match(const OML__FOM__IE& 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.iei().is_bound()) return FALSE;
if(!single_value->field_iei.match(other_value.iei(), legacy))return FALSE;
if(!other_value.body().is_bound()) return FALSE;
if(!single_value->field_body.match(other_value.body(), 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 @AbisOML_Types.OML_FOM_IE.");
}
return FALSE;
}

boolean OML__FOM__IE_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_iei.is_bound()
 || single_value->field_body.is_bound();
}

boolean OML__FOM__IE_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_iei.is_value()
 && single_value->field_body.is_value();
}

void OML__FOM__IE_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;
}

OML__FOM__IE OML__FOM__IE_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 @AbisOML_Types.OML_FOM_IE.");
OML__FOM__IE ret_val;
if (single_value->field_iei.is_bound()) {
ret_val.iei() = single_value->field_iei.valueof();
}
if (single_value->field_body.is_bound()) {
ret_val.body() = single_value->field_body.valueof();
}
return ret_val;
}

void OML__FOM__IE_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 @AbisOML_Types.OML_FOM_IE.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__FOM__IE_template[list_length];
}

OML__FOM__IE_template& OML__FOM__IE_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 @AbisOML_Types.OML_FOM_IE.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @AbisOML_Types.OML_FOM_IE.");
return value_list.list_value[list_index];
}

OML__FOM__IE__Type_template& OML__FOM__IE_template::iei()
{
set_specific();
return single_value->field_iei;
}

const OML__FOM__IE__Type_template& OML__FOM__IE_template::iei() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field iei of a non-specific template of type @AbisOML_Types.OML_FOM_IE.");
return single_value->field_iei;
}

OML__FOM__IE__Body_template& OML__FOM__IE_template::body()
{
set_specific();
return single_value->field_body;
}

const OML__FOM__IE__Body_template& OML__FOM__IE_template::body() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field body of a non-specific template of type @AbisOML_Types.OML_FOM_IE.");
return single_value->field_body;
}

int OML__FOM__IE_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_FOM_IE 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 @AbisOML_Types.OML_FOM_IE 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 @AbisOML_Types.OML_FOM_IE containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_FOM_IE containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_FOM_IE containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_FOM_IE containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_FOM_IE containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_FOM_IE containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_FOM_IE containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @AbisOML_Types.OML_FOM_IE.");
  }
  return 0;
}

void OML__FOM__IE_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ iei := ");
single_value->field_iei.log();
TTCN_Logger::log_event_str(", body := ");
single_value->field_body.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 OML__FOM__IE_template::log_match(const OML__FOM__IE& 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_iei.match(match_value.iei(), legacy)){
TTCN_Logger::log_logmatch_info(".iei");
single_value->field_iei.log_match(match_value.iei(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_body.match(match_value.body(), legacy)){
TTCN_Logger::log_logmatch_info(".body");
single_value->field_body.log_match(match_value.body(), 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("{ iei := ");
single_value->field_iei.log_match(match_value.iei(), legacy);
TTCN_Logger::log_event_str(", body := ");
single_value->field_body.log_match(match_value.body(), 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 OML__FOM__IE_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (iei().is_bound()) iei().set_implicit_omit();
if (body().is_bound()) body().set_implicit_omit();
}

void OML__FOM__IE_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_iei.encode_text(text_buf);
single_value->field_body.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 @AbisOML_Types.OML_FOM_IE.");
}
}

void OML__FOM__IE_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_iei.decode_text(text_buf);
single_value->field_body.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 OML__FOM__IE_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 @AbisOML_Types.OML_FOM_IE.");
}
}

void OML__FOM__IE_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: {
    OML__FOM__IE_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 @AbisOML_Types.OML_FOM_IE 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) iei().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) body().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(), "iei")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          iei().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "body")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          body().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 @AbisOML_Types.OML_FOM_IE: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__FOM__IE_template* precondition = new OML__FOM__IE_template;
    precondition->set_param(*param.get_elem(0));
    OML__FOM__IE_template* implied_template = new OML__FOM__IE_template;
    implied_template->set_param(*param.get_elem(1));
    *this = OML__FOM__IE_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@AbisOML_Types.OML_FOM_IE");
  }
  is_ifpresent = param.get_ifpresent();
}

void OML__FOM__IE_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_iei.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE");
single_value->field_body.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_FOM_IE");
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 : "@AbisOML_Types.OML_FOM_IE");
}

boolean OML__FOM__IE_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean OML__FOM__IE_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int l_idx=0; l_idx<value_list.n_values; l_idx++)
if (value_list.list_value[l_idx].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void OML__MANUF::copy_value(const OML__MANUF& other_value)
{
switch (other_value.union_selection) {
case ALT_ipa:
field_ipa = new OML__MANUF__IPA(*other_value.field_ipa);
break;
default:
TTCN_error("Assignment of an unbound union value of type @AbisOML_Types.OML_MANUF.");
}
union_selection = other_value.union_selection;
}

OML__MANUF::OML__MANUF()
{
union_selection = UNBOUND_VALUE;
}

OML__MANUF::OML__MANUF(const OML__MANUF& other_value)
: Base_Type(){
copy_value(other_value);
}

OML__MANUF::~OML__MANUF()
{
clean_up();
}

OML__MANUF& OML__MANUF::operator=(const OML__MANUF& other_value)
{
if (this != &other_value) {
clean_up();
copy_value(other_value);
}
return *this;
}

boolean OML__MANUF::operator==(const OML__MANUF& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @AbisOML_Types.OML_MANUF.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @AbisOML_Types.OML_MANUF.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_ipa:
return *field_ipa == *other_value.field_ipa;
default:
return FALSE;
}
}

OML__MANUF__IPA& OML__MANUF::ipa()
{
if (union_selection != ALT_ipa) {
clean_up();
field_ipa = new OML__MANUF__IPA;
union_selection = ALT_ipa;
}
return *field_ipa;
}

const OML__MANUF__IPA& OML__MANUF::ipa() const
{
if (union_selection != ALT_ipa) TTCN_error("Using non-selected field ipa in a value of union type @AbisOML_Types.OML_MANUF.");
return *field_ipa;
}

boolean OML__MANUF::ischosen(union_selection_type checked_selection) const
{
if (checked_selection == UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @AbisOML_Types.OML_MANUF.");
return union_selection == checked_selection;
}

boolean OML__MANUF::is_bound() const
{
  return union_selection != UNBOUND_VALUE;
}

boolean OML__MANUF::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_ipa: return field_ipa->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void OML__MANUF::clean_up()
{
switch (union_selection) {
case ALT_ipa:
  delete field_ipa;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void OML__MANUF::log() const
{
switch (union_selection) {
case ALT_ipa:
TTCN_Logger::log_event_str("{ ipa := ");
field_ipa->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

void OML__MANUF::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "union value");
  Module_Param_Ptr m_p = &param;
  if (m_p->get_type()==Module_Param::MP_Value_List && m_p->get_size()==0) return;
  if (m_p->get_type()!=Module_Param::MP_Assignment_List) {
    param.error("union value with field name was expected");
  }
  Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1);
  char* last_name = mp_last->get_id()->get_name();
  if (!strcmp(last_name, "ipa")) {
    ipa().set_param(*mp_last);
    if (!ipa().is_bound()) clean_up();
    return;
  }
  mp_last->error("Field %s does not exist in type @AbisOML_Types.OML_MANUF.", last_name);
}

void OML__MANUF::set_implicit_omit()
{
switch (union_selection) {
case ALT_ipa:
field_ipa->set_implicit_omit(); break;
default: break;
}
}

void OML__MANUF::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_ipa:
field_ipa->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @AbisOML_Types.OML_MANUF.");
}
}

void OML__MANUF::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_ipa:
ipa().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @AbisOML_Types.OML_MANUF.");
}
}

void OML__MANUF::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(TRUE, NULL, &rp, 1, p_td.raw);
    RAW_encode(p_td, root);
    root.put_to_buf(p_buf);
    break;}
  case TTCN_EncDec::CT_TEXT: {
    TTCN_EncDec_ErrorContext ec("While TEXT-encoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
      ("No TEXT descriptor available for type '%s'.", p_td.name);
    TEXT_encode(p_td,p_buf);
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-encoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XER_encode(*(p_td.xer),p_buf, XER_coding, 0, 0, 0);
    p_buf.put_c('\n');
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-encoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok(va_arg(pvar, int) != 0);
    JSON_encode(p_td, tok, FALSE);
    p_buf.put_s(tok.get_buffer_length(), (const unsigned char*)tok.get_buffer());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-encoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
    OER_encode(p_td, p_buf);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-encoding type '%s': ", p_td.name);
    if (!p_td.per) TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    PER_encode(p_td, p_buf, opt);
    break; }
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void OML__MANUF::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 OML__MANUF::RAW_decode(
const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, 
raw_order_t top_bit_ord, boolean no_err, int sel_field, boolean, const RAW_Force_Omit* force_omit)
{
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  int decoded_length=0;
  int starting_pos=p_buf.get_pos_bit();
  if(sel_field!=-1){
    switch(sel_field){
    case 0: {
      RAW_Force_Omit field_force_omit(0, force_omit, OML__MANUF_ipa_descr_.raw->forceomit);
      decoded_length = ipa().RAW_decode(OML__MANUF_ipa_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    default: break;
    }
    return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
  } else {
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_0_force_omit(0, force_omit, OML__MANUF_ipa_descr_.raw->forceomit);
      decoded_length = ipa().RAW_decode(OML__MANUF_ipa_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_0_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
 }
 clean_up();
 return -1;
}

int OML__MANUF::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
{
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 1;  myleaf.body.node.nodes = init_nodes_of_enc_tree(1);
  memset(myleaf.body.node.nodes, 0, 1 * sizeof(RAW_enc_tree *));
  switch (union_selection) {
  case ALT_ipa:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, OML__MANUF_ipa_descr_.raw);
    encoded_length = field_ipa->RAW_encode(OML__MANUF_ipa_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &OML__MANUF_ipa_descr_;
    break;
  default:
    TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  }
  return encoded_length;
}

void OML__MANUF_template::copy_value(const OML__MANUF& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case OML__MANUF::ALT_ipa:
single_value.field_ipa = new OML__MANUF__IPA_template(other_value.ipa());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @AbisOML_Types.OML_MANUF.");
}
set_selection(SPECIFIC_VALUE);
}

void OML__MANUF_template::copy_template(const OML__MANUF_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value.union_selection = other_value.single_value.union_selection;
switch (single_value.union_selection) {
case OML__MANUF::ALT_ipa:
single_value.field_ipa = new OML__MANUF__IPA_template(*other_value.single_value.field_ipa);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @AbisOML_Types.OML_MANUF.");
}
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 OML__MANUF_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 OML__MANUF_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__MANUF_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized template of union type @AbisOML_Types.OML_MANUF.");
}
set_selection(other_value);
}

OML__MANUF_template::OML__MANUF_template()
{
}

OML__MANUF_template::OML__MANUF_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

OML__MANUF_template::OML__MANUF_template(const OML__MANUF& other_value)
{
copy_value(other_value);
}

OML__MANUF_template::OML__MANUF_template(const OPTIONAL<OML__MANUF>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const OML__MANUF&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of union type @AbisOML_Types.OML_MANUF from an unbound optional field.");
}
}

OML__MANUF_template::OML__MANUF_template(OML__MANUF_template* p_precondition, OML__MANUF_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

OML__MANUF_template::OML__MANUF_template(Dynamic_Match_Interface<OML__MANUF>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<OML__MANUF>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

OML__MANUF_template::OML__MANUF_template(const OML__MANUF_template& other_value)
: Base_Template(){
copy_template(other_value);
}

OML__MANUF_template::~OML__MANUF_template()
{
clean_up();
}

void OML__MANUF_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case OML__MANUF::ALT_ipa:
delete single_value.field_ipa;
default:
break;
}
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

OML__MANUF_template& OML__MANUF_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

OML__MANUF_template& OML__MANUF_template::operator=(const OML__MANUF& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

OML__MANUF_template& OML__MANUF_template::operator=(const OPTIONAL<OML__MANUF>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const OML__MANUF&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of union type @AbisOML_Types.OML_MANUF.");
}
return *this;
}

OML__MANUF_template& OML__MANUF_template::operator=(const OML__MANUF_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean OML__MANUF_template::match(const OML__MANUF& 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:
{
OML__MANUF::union_selection_type value_selection = other_value.get_selection();
if (value_selection == OML__MANUF::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case OML__MANUF::ALT_ipa:
return single_value.field_ipa->match(other_value.ipa(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @AbisOML_Types.OML_MANUF.");
}
}
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error ("Matching an uninitialized template of union type @AbisOML_Types.OML_MANUF.");
}
return FALSE;
}

boolean OML__MANUF_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case OML__MANUF::ALT_ipa:
return single_value.field_ipa->is_value();
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @AbisOML_Types.OML_MANUF.");
}
}

OML__MANUF OML__MANUF_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of union type @AbisOML_Types.OML_MANUF.");
OML__MANUF ret_val;
switch (single_value.union_selection) {
case OML__MANUF::ALT_ipa:
ret_val.ipa() = single_value.field_ipa->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @AbisOML_Types.OML_MANUF.");
}
return ret_val;
}

OML__MANUF_template& OML__MANUF_template::list_item(unsigned int list_index) const
{
if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Internal error: Accessing a list element of a non-list template of union type @AbisOML_Types.OML_MANUF.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @AbisOML_Types.OML_MANUF.");
return value_list.list_value[list_index];
}
void OML__MANUF_template::set_type(template_sel template_type, unsigned int list_length)
{
if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST && template_type != CONJUNCTION_MATCH) TTCN_error ("Internal error: Setting an invalid list for a template of union type @AbisOML_Types.OML_MANUF.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__MANUF_template[list_length];
}

OML__MANUF__IPA_template& OML__MANUF_template::ipa()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != OML__MANUF::ALT_ipa) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_ipa = new OML__MANUF__IPA_template(ANY_VALUE);
else single_value.field_ipa = new OML__MANUF__IPA_template;
single_value.union_selection = OML__MANUF::ALT_ipa;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_ipa;
}

const OML__MANUF__IPA_template& OML__MANUF_template::ipa() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ipa in a non-specific template of union type @AbisOML_Types.OML_MANUF.");
if (single_value.union_selection != OML__MANUF::ALT_ipa) TTCN_error("Accessing non-selected field ipa in a template of union type @AbisOML_Types.OML_MANUF.");
return *single_value.field_ipa;
}

boolean OML__MANUF_template::ischosen(OML__MANUF::union_selection_type checked_selection) const
{
if (checked_selection == OML__MANUF::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @AbisOML_Types.OML_MANUF.");
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.union_selection == OML__MANUF::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @AbisOML_Types.OML_MANUF.");
return single_value.union_selection == checked_selection;
case VALUE_LIST:
{
if (value_list.n_values < 1)
TTCN_error("Internal error: Performing ischosen() operation on a template of union type @AbisOML_Types.OML_MANUF containing an empty list.");
boolean ret_val = value_list.list_value[0].ischosen(checked_selection);
for (unsigned int list_count = 1; ret_val == TRUE && list_count < value_list.n_values; list_count++) {
ret_val = value_list.list_value[list_count].ischosen(checked_selection);
}
return ret_val;
}
default:
return FALSE;
}
return FALSE;
}

void OML__MANUF_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case OML__MANUF::ALT_ipa:
TTCN_Logger::log_event_str("{ ipa := ");
single_value.field_ipa->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_str("<invalid selector>");
}
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void OML__MANUF_template::log_match(const OML__MANUF& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity() && match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
return;
}
if (template_selection == SPECIFIC_VALUE && single_value.union_selection == match_value.get_selection()) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
switch (single_value.union_selection) {
case OML__MANUF::ALT_ipa:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".ipa");
single_value.field_ipa->log_match(match_value.ipa(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ ipa := ");
single_value.field_ipa->log_match(match_value.ipa(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
default:
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str("<invalid selector>");
}
} else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void OML__MANUF_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
switch (single_value.union_selection) {
case OML__MANUF::ALT_ipa:
single_value.field_ipa->set_implicit_omit(); break;
default: break;
}
}

void OML__MANUF_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value.union_selection);
switch (single_value.union_selection) {
case OML__MANUF::ALT_ipa:
single_value.field_ipa->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @AbisOML_Types.OML_MANUF.");
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized template of type @AbisOML_Types.OML_MANUF.");
}
}

void OML__MANUF_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
{
single_value.union_selection = OML__MANUF::UNBOUND_VALUE;
OML__MANUF::union_selection_type new_selection = (OML__MANUF::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case OML__MANUF::ALT_ipa:
single_value.field_ipa = new OML__MANUF__IPA_template;
single_value.field_ipa->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @AbisOML_Types.OML_MANUF.");
}
single_value.union_selection = new_selection;
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__MANUF_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized selector was received in a template of type @AbisOML_Types.OML_MANUF.");
}
}

boolean OML__MANUF_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean OML__MANUF_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int v_idx=0; v_idx<value_list.n_values; v_idx++)
if (value_list.list_value[v_idx].match_omit())
return template_selection==VALUE_LIST;
return template_selection==COMPLEMENTED_LIST;
} // else fall through
default:
return FALSE;
}
return FALSE;
}

void OML__MANUF_template::set_param(Module_Param& param)
{
  if (dynamic_cast<Module_Param_Name*>(param.get_id()) != NULL &&
      param.get_id()->next_name()) {
    char* param_field = param.get_id()->get_current_name();
    if (param_field[0] >= '0' && param_field[0] <= '9') {
      param.error("Unexpected array index in module parameter, expected a valid field"
        " name for union template type `@AbisOML_Types.OML_MANUF'");
    }
    if (strcmp("ipa", param_field) == 0) {
      ipa().set_param(param);
      return;
    } else param.error("Field `%s' not found in union template type `@AbisOML_Types.OML_MANUF'", param_field);
  }
  param.basic_check(Module_Param::BC_TEMPLATE, "union template");
  Module_Param_Ptr m_p = &param;
  switch (m_p->get_type()) {
  case Module_Param::MP_Omit:
    *this = OMIT_VALUE;
    break;
  case Module_Param::MP_Any:
    *this = ANY_VALUE;
    break;
  case Module_Param::MP_AnyOrNone:
    *this = ANY_OR_OMIT;
    break;
  case Module_Param::MP_List_Template:
  case Module_Param::MP_ComplementList_Template:
  case Module_Param::MP_ConjunctList_Template: {
    OML__MANUF_template new_temp;
    new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size());
    for (size_t p_i=0; p_i<m_p->get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (m_p->get_size()==0) break;
    param.type_error("union template", "@AbisOML_Types.OML_MANUF");
    break;
  case Module_Param::MP_Assignment_List: {
    Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1);
    char* last_name = mp_last->get_id()->get_name();
    if (!strcmp(last_name, "ipa")) {
      ipa().set_param(*mp_last);
      break;
    }
    mp_last->error("Field %s does not exist in type @AbisOML_Types.OML_MANUF.", last_name);
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__MANUF_template* precondition = new OML__MANUF_template;
    precondition->set_param(*m_p->get_elem(0));
    OML__MANUF_template* implied_template = new OML__MANUF_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = OML__MANUF_template(precondition, implied_template);
  } break;
  default:
    param.type_error("union template", "@AbisOML_Types.OML_MANUF");
  }
  is_ifpresent = param.get_ifpresent();
}

void OML__MANUF_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
switch (single_value.union_selection) {
case OML__MANUF::ALT_ipa:
single_value.field_ipa->check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_MANUF");
return;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @AbisOML_Types.OML_MANUF.");
}
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 : "@AbisOML_Types.OML_MANUF");
}

OML__MANUF__IPA::OML__MANUF__IPA()
{
}

OML__MANUF__IPA::OML__MANUF__IPA(const INTEGER& par_len,
    const INTEGER& par_str__len,
    const CHARSTRING& par_manuf__str,
    const OML__FOM__Header& par_hdr,
    const OPTIONAL< OML__FOM__IE__List >& par_ies)
  :   field_len(par_len),
  field_str__len(par_str__len),
  field_manuf__str(par_manuf__str),
  field_hdr(par_hdr),
  field_ies(par_ies)
{
}

OML__MANUF__IPA::OML__MANUF__IPA(const OML__MANUF__IPA& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @AbisOML_Types.OML_MANUF_IPA.");
if (other_value.len().is_bound()) field_len = other_value.len();
else field_len.clean_up();
if (other_value.str__len().is_bound()) field_str__len = other_value.str__len();
else field_str__len.clean_up();
if (other_value.manuf__str().is_bound()) field_manuf__str = other_value.manuf__str();
else field_manuf__str.clean_up();
if (other_value.hdr().is_bound()) field_hdr = other_value.hdr();
else field_hdr.clean_up();
if (other_value.ies().is_bound()) field_ies = other_value.ies();
else field_ies.clean_up();
}

void OML__MANUF__IPA::clean_up()
{
field_len.clean_up();
field_str__len.clean_up();
field_manuf__str.clean_up();
field_hdr.clean_up();
field_ies.clean_up();
}

const TTCN_Typedescriptor_t* OML__MANUF__IPA::get_descriptor() const { return &OML__MANUF__IPA_descr_; }
OML__MANUF__IPA& OML__MANUF__IPA::operator=(const OML__MANUF__IPA& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @AbisOML_Types.OML_MANUF_IPA.");
  if (other_value.len().is_bound()) field_len = other_value.len();
  else field_len.clean_up();
  if (other_value.str__len().is_bound()) field_str__len = other_value.str__len();
  else field_str__len.clean_up();
  if (other_value.manuf__str().is_bound()) field_manuf__str = other_value.manuf__str();
  else field_manuf__str.clean_up();
  if (other_value.hdr().is_bound()) field_hdr = other_value.hdr();
  else field_hdr.clean_up();
  if (other_value.ies().is_bound()) field_ies = other_value.ies();
  else field_ies.clean_up();
}
return *this;
}

boolean OML__MANUF__IPA::operator==(const OML__MANUF__IPA& other_value) const
{
return field_len==other_value.field_len
  && field_str__len==other_value.field_str__len
  && field_manuf__str==other_value.field_manuf__str
  && field_hdr==other_value.field_hdr
  && field_ies==other_value.field_ies;
}

boolean OML__MANUF__IPA::is_bound() const
{
return (field_len.is_bound())
  || (field_str__len.is_bound())
  || (field_manuf__str.is_bound())
  || (field_hdr.is_bound())
  || (OPTIONAL_OMIT == field_ies.get_selection() || field_ies.is_bound());
}
boolean OML__MANUF__IPA::is_value() const
{
return field_len.is_value()
  && field_str__len.is_value()
  && field_manuf__str.is_value()
  && field_hdr.is_value()
  && (OPTIONAL_OMIT == field_ies.get_selection() || field_ies.is_value());
}
int OML__MANUF__IPA::size_of() const
{
  int ret_val = 4;
  if (field_ies.ispresent()) ret_val++;
  return ret_val;
}

void OML__MANUF__IPA::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ len := ");
field_len.log();
TTCN_Logger::log_event_str(", str_len := ");
field_str__len.log();
TTCN_Logger::log_event_str(", manuf_str := ");
field_manuf__str.log();
TTCN_Logger::log_event_str(", hdr := ");
field_hdr.log();
TTCN_Logger::log_event_str(", ies := ");
field_ies.log();
TTCN_Logger::log_event_str(" }");
}

void OML__MANUF__IPA::set_implicit_omit()
{
if (len().is_bound()) len().set_implicit_omit();
if (str__len().is_bound()) str__len().set_implicit_omit();
if (manuf__str().is_bound()) manuf__str().set_implicit_omit();
if (hdr().is_bound()) hdr().set_implicit_omit();
if (!ies().is_bound()) ies() = OMIT_VALUE;
else ies().set_implicit_omit();
}

void OML__MANUF__IPA::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 @AbisOML_Types.OML_MANUF_IPA 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) len().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) str__len().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) manuf__str().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) hdr().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ies().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(), "len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "str_len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          str__len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "manuf_str")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          manuf__str().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "hdr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          hdr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ies")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ies().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 @AbisOML_Types.OML_MANUF_IPA: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@AbisOML_Types.OML_MANUF_IPA");
  }
}

void OML__MANUF__IPA::encode_text(Text_Buf& text_buf) const
{
field_len.encode_text(text_buf);
field_str__len.encode_text(text_buf);
field_manuf__str.encode_text(text_buf);
field_hdr.encode_text(text_buf);
field_ies.encode_text(text_buf);
}

void OML__MANUF__IPA::decode_text(Text_Buf& text_buf)
{
field_len.decode_text(text_buf);
field_str__len.decode_text(text_buf);
field_manuf__str.decode_text(text_buf);
field_hdr.decode_text(text_buf);
field_ies.decode_text(text_buf);
}

void OML__MANUF__IPA::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 OML__MANUF__IPA::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 OML__MANUF__IPA::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;
  int value_of_length_field1 = 0;
  RAW_Force_Omit field_0_force_omit(0, force_omit, OML__MANUF__IPA_len_descr_.raw->forceomit);
  decoded_field_length = field_len.RAW_decode(OML__MANUF__IPA_len_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_len.convert_to_Integer(OML__MANUF__IPA_len_descr_);
  field_len = tmp0;
  value_of_length_field0 += tmp0.get_long_long_val() * 8;
  RAW_Force_Omit field_1_force_omit(1, force_omit, OML__MANUF__IPA_str__len_descr_.raw->forceomit);
  decoded_field_length = field_str__len.RAW_decode(OML__MANUF__IPA_str__len_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  INTEGER tmp1 = field_str__len.convert_to_Integer(OML__MANUF__IPA_str__len_descr_);
  field_str__len = tmp1;
  value_of_length_field1 += tmp1.get_long_long_val() * 8;
  RAW_Force_Omit field_2_force_omit(2, force_omit, OML__MANUF__IPA_manuf__str_descr_.raw->forceomit);
  decoded_field_length = field_manuf__str.RAW_decode(OML__MANUF__IPA_manuf__str_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, OML__MANUF__IPA_hdr_descr_.raw->forceomit);
  decoded_field_length = field_hdr.RAW_decode(OML__MANUF__IPA_hdr_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;
  if (limit > 0 && value_of_length_field0 > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_ies = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, OML__MANUF__IPA_ies_descr_.raw->forceomit);
  decoded_field_length = field_ies().RAW_decode(OML__MANUF__IPA_ies_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_ies = 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_ies=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int OML__MANUF__IPA::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, OML__MANUF__IPA_len_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, OML__MANUF__IPA_str__len_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, OML__MANUF__IPA_manuf__str_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, OML__MANUF__IPA_hdr_descr_.raw);
  if (field_ies.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, OML__MANUF__IPA_ies_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  encoded_length += 8;
  myleaf.body.node.nodes[0]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[0]->coding_descr = &OML__MANUF__IPA_len_descr_;
  myleaf.body.node.nodes[0]->calcof.lengthto.num_of_fields = 2;
  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(2);
  myleaf.body.node.nodes[0]->length = 8;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[3]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[3]->curr_pos.pos;
  if (field_ies.ispresent()) {
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[1].level = myleaf.body.node.nodes[4]->curr_pos.level;
  myleaf.body.node.nodes[0]->calcof.lengthto.fields[1].pos = myleaf.body.node.nodes[4]->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;
  }
  encoded_length += 8;
  myleaf.body.node.nodes[1]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[1]->coding_descr = &OML__MANUF__IPA_str__len_descr_;
  myleaf.body.node.nodes[1]->calcof.lengthto.num_of_fields = 1;
  myleaf.body.node.nodes[1]->calcof.lengthto.unit = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.offset = 0;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields = init_lengthto_fields_list(1);
  myleaf.body.node.nodes[1]->length = 8;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].level = myleaf.body.node.nodes[2]->curr_pos.level;
  myleaf.body.node.nodes[1]->calcof.lengthto.fields[0].pos = myleaf.body.node.nodes[2]->curr_pos.pos;
  encoded_length += field_manuf__str.RAW_encode(OML__MANUF__IPA_manuf__str_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_hdr.RAW_encode(OML__MANUF__IPA_hdr_descr_, *myleaf.body.node.nodes[3]);
  if (field_ies.ispresent()) {
  encoded_length += field_ies().RAW_encode(OML__MANUF__IPA_ies_descr_, *myleaf.body.node.nodes[4]);
  }
  return myleaf.length = encoded_length;
}

struct OML__MANUF__IPA_template::single_value_struct {
INTEGER_template field_len;
INTEGER_template field_str__len;
CHARSTRING_template field_manuf__str;
OML__FOM__Header_template field_hdr;
OML__FOM__IE__List_template field_ies;
};

void OML__MANUF__IPA_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_len = ANY_VALUE;
single_value->field_str__len = ANY_VALUE;
single_value->field_manuf__str = ANY_VALUE;
single_value->field_hdr = ANY_VALUE;
single_value->field_ies = ANY_OR_OMIT;
}
}
}

void OML__MANUF__IPA_template::copy_value(const OML__MANUF__IPA& other_value)
{
single_value = new single_value_struct;
if (other_value.len().is_bound()) {
  single_value->field_len = other_value.len();
} else {
  single_value->field_len.clean_up();
}
if (other_value.str__len().is_bound()) {
  single_value->field_str__len = other_value.str__len();
} else {
  single_value->field_str__len.clean_up();
}
if (other_value.manuf__str().is_bound()) {
  single_value->field_manuf__str = other_value.manuf__str();
} else {
  single_value->field_manuf__str.clean_up();
}
if (other_value.hdr().is_bound()) {
  single_value->field_hdr = other_value.hdr();
} else {
  single_value->field_hdr.clean_up();
}
if (other_value.ies().is_bound()) {
  if (other_value.ies().ispresent()) single_value->field_ies = other_value.ies()();
  else single_value->field_ies = OMIT_VALUE;
} else {
  single_value->field_ies.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void OML__MANUF__IPA_template::copy_template(const OML__MANUF__IPA_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.len().get_selection()) {
single_value->field_len = other_value.len();
} else {
single_value->field_len.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.str__len().get_selection()) {
single_value->field_str__len = other_value.str__len();
} else {
single_value->field_str__len.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.manuf__str().get_selection()) {
single_value->field_manuf__str = other_value.manuf__str();
} else {
single_value->field_manuf__str.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.hdr().get_selection()) {
single_value->field_hdr = other_value.hdr();
} else {
single_value->field_hdr.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ies().get_selection()) {
single_value->field_ies = other_value.ies();
} else {
single_value->field_ies.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 OML__MANUF__IPA_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 OML__MANUF__IPA_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__MANUF__IPA_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 @AbisOML_Types.OML_MANUF_IPA.");
break;
}
set_selection(other_value);
}

OML__MANUF__IPA_template::OML__MANUF__IPA_template()
{
}

OML__MANUF__IPA_template::OML__MANUF__IPA_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

OML__MANUF__IPA_template::OML__MANUF__IPA_template(const OML__MANUF__IPA& other_value)
{
copy_value(other_value);
}

OML__MANUF__IPA_template::OML__MANUF__IPA_template(const OPTIONAL<OML__MANUF__IPA>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const OML__MANUF__IPA&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @AbisOML_Types.OML_MANUF_IPA from an unbound optional field.");
}
}

OML__MANUF__IPA_template::OML__MANUF__IPA_template(OML__MANUF__IPA_template* p_precondition, OML__MANUF__IPA_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

OML__MANUF__IPA_template::OML__MANUF__IPA_template(Dynamic_Match_Interface<OML__MANUF__IPA>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<OML__MANUF__IPA>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

OML__MANUF__IPA_template::OML__MANUF__IPA_template(const OML__MANUF__IPA_template& other_value)
: Base_Template()
{
copy_template(other_value);
}

OML__MANUF__IPA_template::~OML__MANUF__IPA_template()
{
clean_up();
}

OML__MANUF__IPA_template& OML__MANUF__IPA_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

OML__MANUF__IPA_template& OML__MANUF__IPA_template::operator=(const OML__MANUF__IPA& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

OML__MANUF__IPA_template& OML__MANUF__IPA_template::operator=(const OPTIONAL<OML__MANUF__IPA>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const OML__MANUF__IPA&)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 @AbisOML_Types.OML_MANUF_IPA.");
}
return *this;
}

OML__MANUF__IPA_template& OML__MANUF__IPA_template::operator=(const OML__MANUF__IPA_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean OML__MANUF__IPA_template::match(const OML__MANUF__IPA& 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.len().is_bound()) return FALSE;
if(!single_value->field_len.match(other_value.len(), legacy))return FALSE;
if(!other_value.str__len().is_bound()) return FALSE;
if(!single_value->field_str__len.match(other_value.str__len(), legacy))return FALSE;
if(!other_value.manuf__str().is_bound()) return FALSE;
if(!single_value->field_manuf__str.match(other_value.manuf__str(), legacy))return FALSE;
if(!other_value.hdr().is_bound()) return FALSE;
if(!single_value->field_hdr.match(other_value.hdr(), legacy))return FALSE;
if(!other_value.ies().is_bound()) return FALSE;
if((other_value.ies().ispresent() ? !single_value->field_ies.match((const OML__FOM__IE__List&)other_value.ies(), legacy) : !single_value->field_ies.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 @AbisOML_Types.OML_MANUF_IPA.");
}
return FALSE;
}

boolean OML__MANUF__IPA_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_len.is_bound()
 || single_value->field_str__len.is_bound()
 || single_value->field_manuf__str.is_bound()
 || single_value->field_hdr.is_bound()
 || (single_value->field_ies.is_omit() || single_value->field_ies.is_bound());
}

boolean OML__MANUF__IPA_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_len.is_value()
 && single_value->field_str__len.is_value()
 && single_value->field_manuf__str.is_value()
 && single_value->field_hdr.is_value()
 && (single_value->field_ies.is_omit() || single_value->field_ies.is_value());
}

void OML__MANUF__IPA_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;
}

OML__MANUF__IPA OML__MANUF__IPA_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 @AbisOML_Types.OML_MANUF_IPA.");
OML__MANUF__IPA ret_val;
if (single_value->field_len.is_bound()) {
ret_val.len() = single_value->field_len.valueof();
}
if (single_value->field_str__len.is_bound()) {
ret_val.str__len() = single_value->field_str__len.valueof();
}
if (single_value->field_manuf__str.is_bound()) {
ret_val.manuf__str() = single_value->field_manuf__str.valueof();
}
if (single_value->field_hdr.is_bound()) {
ret_val.hdr() = single_value->field_hdr.valueof();
}
if (single_value->field_ies.is_omit()) ret_val.ies() = OMIT_VALUE;
else if (single_value->field_ies.is_bound()) {
ret_val.ies() = single_value->field_ies.valueof();
}
return ret_val;
}

void OML__MANUF__IPA_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 @AbisOML_Types.OML_MANUF_IPA.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__MANUF__IPA_template[list_length];
}

OML__MANUF__IPA_template& OML__MANUF__IPA_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 @AbisOML_Types.OML_MANUF_IPA.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @AbisOML_Types.OML_MANUF_IPA.");
return value_list.list_value[list_index];
}

INTEGER_template& OML__MANUF__IPA_template::len()
{
set_specific();
return single_value->field_len;
}

const INTEGER_template& OML__MANUF__IPA_template::len() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field len of a non-specific template of type @AbisOML_Types.OML_MANUF_IPA.");
return single_value->field_len;
}

INTEGER_template& OML__MANUF__IPA_template::str__len()
{
set_specific();
return single_value->field_str__len;
}

const INTEGER_template& OML__MANUF__IPA_template::str__len() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field str_len of a non-specific template of type @AbisOML_Types.OML_MANUF_IPA.");
return single_value->field_str__len;
}

CHARSTRING_template& OML__MANUF__IPA_template::manuf__str()
{
set_specific();
return single_value->field_manuf__str;
}

const CHARSTRING_template& OML__MANUF__IPA_template::manuf__str() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field manuf_str of a non-specific template of type @AbisOML_Types.OML_MANUF_IPA.");
return single_value->field_manuf__str;
}

OML__FOM__Header_template& OML__MANUF__IPA_template::hdr()
{
set_specific();
return single_value->field_hdr;
}

const OML__FOM__Header_template& OML__MANUF__IPA_template::hdr() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field hdr of a non-specific template of type @AbisOML_Types.OML_MANUF_IPA.");
return single_value->field_hdr;
}

OML__FOM__IE__List_template& OML__MANUF__IPA_template::ies()
{
set_specific();
return single_value->field_ies;
}

const OML__FOM__IE__List_template& OML__MANUF__IPA_template::ies() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ies of a non-specific template of type @AbisOML_Types.OML_MANUF_IPA.");
return single_value->field_ies;
}

int OML__MANUF__IPA_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_MANUF_IPA which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
  {    int ret_val = 4;
      if (single_value->field_ies.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 @AbisOML_Types.OML_MANUF_IPA 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 @AbisOML_Types.OML_MANUF_IPA containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_MANUF_IPA containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_MANUF_IPA containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_MANUF_IPA containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_MANUF_IPA containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_MANUF_IPA containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_MANUF_IPA containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @AbisOML_Types.OML_MANUF_IPA.");
  }
  return 0;
}

void OML__MANUF__IPA_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ len := ");
single_value->field_len.log();
TTCN_Logger::log_event_str(", str_len := ");
single_value->field_str__len.log();
TTCN_Logger::log_event_str(", manuf_str := ");
single_value->field_manuf__str.log();
TTCN_Logger::log_event_str(", hdr := ");
single_value->field_hdr.log();
TTCN_Logger::log_event_str(", ies := ");
single_value->field_ies.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 OML__MANUF__IPA_template::log_match(const OML__MANUF__IPA& 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_len.match(match_value.len(), legacy)){
TTCN_Logger::log_logmatch_info(".len");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_str__len.match(match_value.str__len(), legacy)){
TTCN_Logger::log_logmatch_info(".str_len");
single_value->field_str__len.log_match(match_value.str__len(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_manuf__str.match(match_value.manuf__str(), legacy)){
TTCN_Logger::log_logmatch_info(".manuf_str");
single_value->field_manuf__str.log_match(match_value.manuf__str(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_hdr.match(match_value.hdr(), legacy)){
TTCN_Logger::log_logmatch_info(".hdr");
single_value->field_hdr.log_match(match_value.hdr(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.ies().ispresent()){
if(!single_value->field_ies.match(match_value.ies(), legacy)){
TTCN_Logger::log_logmatch_info(".ies");
single_value->field_ies.log_match(match_value.ies(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_ies.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".ies := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_ies.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("{ len := ");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::log_event_str(", str_len := ");
single_value->field_str__len.log_match(match_value.str__len(), legacy);
TTCN_Logger::log_event_str(", manuf_str := ");
single_value->field_manuf__str.log_match(match_value.manuf__str(), legacy);
TTCN_Logger::log_event_str(", hdr := ");
single_value->field_hdr.log_match(match_value.hdr(), legacy);
TTCN_Logger::log_event_str(", ies := ");
if (match_value.ies().ispresent()) {
single_value->field_ies.log_match(match_value.ies(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_ies.log();
if (single_value->field_ies.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 OML__MANUF__IPA_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (len().is_bound()) len().set_implicit_omit();
if (str__len().is_bound()) str__len().set_implicit_omit();
if (manuf__str().is_bound()) manuf__str().set_implicit_omit();
if (hdr().is_bound()) hdr().set_implicit_omit();
if (!ies().is_bound()) ies() = OMIT_VALUE;
else ies().set_implicit_omit();
}

void OML__MANUF__IPA_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_len.encode_text(text_buf);
single_value->field_str__len.encode_text(text_buf);
single_value->field_manuf__str.encode_text(text_buf);
single_value->field_hdr.encode_text(text_buf);
single_value->field_ies.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 @AbisOML_Types.OML_MANUF_IPA.");
}
}

void OML__MANUF__IPA_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_len.decode_text(text_buf);
single_value->field_str__len.decode_text(text_buf);
single_value->field_manuf__str.decode_text(text_buf);
single_value->field_hdr.decode_text(text_buf);
single_value->field_ies.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 OML__MANUF__IPA_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 @AbisOML_Types.OML_MANUF_IPA.");
}
}

void OML__MANUF__IPA_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: {
    OML__MANUF__IPA_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 @AbisOML_Types.OML_MANUF_IPA 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) len().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) str__len().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) manuf__str().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) hdr().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ies().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(), "len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "str_len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          str__len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "manuf_str")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          manuf__str().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "hdr")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          hdr().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ies")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ies().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 @AbisOML_Types.OML_MANUF_IPA: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__MANUF__IPA_template* precondition = new OML__MANUF__IPA_template;
    precondition->set_param(*param.get_elem(0));
    OML__MANUF__IPA_template* implied_template = new OML__MANUF__IPA_template;
    implied_template->set_param(*param.get_elem(1));
    *this = OML__MANUF__IPA_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@AbisOML_Types.OML_MANUF_IPA");
  }
  is_ifpresent = param.get_ifpresent();
}

void OML__MANUF__IPA_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_len.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_MANUF_IPA");
single_value->field_str__len.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_MANUF_IPA");
single_value->field_manuf__str.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_MANUF_IPA");
single_value->field_hdr.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_MANUF_IPA");
single_value->field_ies.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_MANUF_IPA");
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 : "@AbisOML_Types.OML_MANUF_IPA");
}

boolean OML__MANUF__IPA_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean OML__MANUF__IPA_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;
}

OML__PDU::OML__PDU()
{
}

OML__PDU::OML__PDU(const OML__MessageDiscriminator& par_mdisc,
    const OML__Placement& par_placement,
    const INTEGER& par_sequence,
    const OML__Union& par_u)
  :   field_mdisc(par_mdisc),
  field_placement(par_placement),
  field_sequence(par_sequence),
  field_u(par_u)
{
}

OML__PDU::OML__PDU(const OML__PDU& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @AbisOML_Types.OML_PDU.");
if (other_value.mdisc().is_bound()) field_mdisc = other_value.mdisc();
else field_mdisc.clean_up();
if (other_value.placement().is_bound()) field_placement = other_value.placement();
else field_placement.clean_up();
if (other_value.sequence().is_bound()) field_sequence = other_value.sequence();
else field_sequence.clean_up();
if (other_value.u().is_bound()) field_u = other_value.u();
else field_u.clean_up();
}

void OML__PDU::clean_up()
{
field_mdisc.clean_up();
field_placement.clean_up();
field_sequence.clean_up();
field_u.clean_up();
}

const TTCN_Typedescriptor_t* OML__PDU::get_descriptor() const { return &OML__PDU_descr_; }
OML__PDU& OML__PDU::operator=(const OML__PDU& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @AbisOML_Types.OML_PDU.");
  if (other_value.mdisc().is_bound()) field_mdisc = other_value.mdisc();
  else field_mdisc.clean_up();
  if (other_value.placement().is_bound()) field_placement = other_value.placement();
  else field_placement.clean_up();
  if (other_value.sequence().is_bound()) field_sequence = other_value.sequence();
  else field_sequence.clean_up();
  if (other_value.u().is_bound()) field_u = other_value.u();
  else field_u.clean_up();
}
return *this;
}

boolean OML__PDU::operator==(const OML__PDU& other_value) const
{
return field_mdisc==other_value.field_mdisc
  && field_placement==other_value.field_placement
  && field_sequence==other_value.field_sequence
  && field_u==other_value.field_u;
}

boolean OML__PDU::is_bound() const
{
return (field_mdisc.is_bound())
  || (field_placement.is_bound())
  || (field_sequence.is_bound())
  || (field_u.is_bound());
}
boolean OML__PDU::is_value() const
{
return field_mdisc.is_value()
  && field_placement.is_value()
  && field_sequence.is_value()
  && field_u.is_value();
}
void OML__PDU::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ mdisc := ");
field_mdisc.log();
TTCN_Logger::log_event_str(", placement := ");
field_placement.log();
TTCN_Logger::log_event_str(", sequence := ");
field_sequence.log();
TTCN_Logger::log_event_str(", u := ");
field_u.log();
TTCN_Logger::log_event_str(" }");
}

void OML__PDU::set_implicit_omit()
{
if (mdisc().is_bound()) mdisc().set_implicit_omit();
if (placement().is_bound()) placement().set_implicit_omit();
if (sequence().is_bound()) sequence().set_implicit_omit();
if (u().is_bound()) u().set_implicit_omit();
}

void OML__PDU::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 @AbisOML_Types.OML_PDU 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) mdisc().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) placement().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) sequence().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) u().set_param(*param.get_elem(3));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mdisc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mdisc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "placement")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          placement().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sequence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sequence().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "u")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          u().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @AbisOML_Types.OML_PDU: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@AbisOML_Types.OML_PDU");
  }
}

void OML__PDU::encode_text(Text_Buf& text_buf) const
{
field_mdisc.encode_text(text_buf);
field_placement.encode_text(text_buf);
field_sequence.encode_text(text_buf);
field_u.encode_text(text_buf);
}

void OML__PDU::decode_text(Text_Buf& text_buf)
{
field_mdisc.decode_text(text_buf);
field_placement.decode_text(text_buf);
field_sequence.decode_text(text_buf);
field_u.decode_text(text_buf);
}

void OML__PDU::encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...) const
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-encoding type '%s': ", p_td.name);
    unsigned BER_coding=va_arg(pvar, unsigned);
    BER_encode_chk_coding(BER_coding);
    ASN_BER_TLV_t *tlv=BER_encode_TLV(p_td, BER_coding);
    tlv->put_in_buffer(p_buf);
    ASN_BER_TLV_t::destruct(tlv);
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-encoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    RAW_enc_tr_pos rp;
    rp.level=0;
    rp.pos=NULL;
    RAW_enc_tree root(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 OML__PDU::decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int p_coding, ...)
{
  va_list pvar;
  va_start(pvar, p_coding);
  switch(p_coding) {
  case TTCN_EncDec::CT_BER: {
    TTCN_EncDec_ErrorContext ec("While BER-decoding type '%s': ", p_td.name);
    unsigned L_form=va_arg(pvar, unsigned);
    ASN_BER_TLV_t tlv;
    BER_decode_str2TLV(p_buf, tlv, L_form);
    BER_decode_TLV(p_td, tlv, L_form);
    if(tlv.isComplete) p_buf.increase_pos(tlv.get_len());
    break;}
  case TTCN_EncDec::CT_RAW: {
    TTCN_EncDec_ErrorContext ec("While RAW-decoding type '%s': ", p_td.name);
    if(!p_td.raw)
      TTCN_EncDec_ErrorContext::error_internal
        ("No RAW descriptor available for type '%s'.", p_td.name);
    raw_order_t r_order;
    switch(p_td.raw->top_bit_order) {
    case TOP_BIT_LEFT:
      r_order=ORDER_LSB;
      break;
    case TOP_BIT_RIGHT:
    default:
      r_order=ORDER_MSB;
    }
    int rawr = RAW_decode(p_td, p_buf, p_buf.get_len()*8, r_order);
    if(rawr<0) switch (-rawr) {
    case TTCN_EncDec::ET_INCOMPL_MSG:
    case TTCN_EncDec::ET_LEN_ERR:
      ec.error((TTCN_EncDec::error_type_t)-rawr, "Can not decode type '%s', because incomplete message was received", p_td.name);
      break;
    case 1:
    default:
      ec.error(TTCN_EncDec::ET_INVAL_MSG, "Can not decode type '%s', because invalid message was received", p_td.name);
      break;
    }
    break;}
  case TTCN_EncDec::CT_TEXT: {
    Limit_Token_List limit;
    TTCN_EncDec_ErrorContext ec("While TEXT-decoding type '%s': ", p_td.name);
    if(!p_td.text)
      TTCN_EncDec_ErrorContext::error_internal
        ("No TEXT descriptor available for type '%s'.", p_td.name);
    const unsigned char *b_data=p_buf.get_data();
    int null_added=0;
    if(b_data[p_buf.get_len()-1]!='\0'){
      null_added=1;
      p_buf.set_pos(p_buf.get_len());
      p_buf.put_zero(8,ORDER_LSB);
      p_buf.rewind();
    }
    if(TEXT_decode(p_td,p_buf,limit)<0)
      ec.error(TTCN_EncDec::ET_INCOMPL_MSG,"Can not decode type '%s', because invalid or incomplete message was received", p_td.name);
    if(null_added){
      size_t actpos=p_buf.get_pos();
      p_buf.set_pos(p_buf.get_len()-1);
      p_buf.cut_end();
      p_buf.set_pos(actpos);
    }
    break;}
  case TTCN_EncDec::CT_XER: {
    TTCN_EncDec_ErrorContext ec("While XER-decoding type '%s': ", p_td.name);
    unsigned XER_coding=va_arg(pvar, unsigned);
    XER_encode_chk_coding(XER_coding, p_td);
    XmlReaderWrap reader(p_buf);
    for (int rd_ok=reader.Read(); rd_ok==1; rd_ok=reader.Read()) {
      if (reader.NodeType() == XML_READER_TYPE_ELEMENT) break;
    }
    XER_decode(*(p_td.xer), reader, XER_coding | XER_TOPLEVEL, XER_NONE, 0);
    size_t bytes = reader.ByteConsumed();
    p_buf.set_pos(bytes);
    break;}
  case TTCN_EncDec::CT_JSON: {
    TTCN_EncDec_ErrorContext ec("While JSON-decoding type '%s': ", p_td.name);
    if(!p_td.json)
      TTCN_EncDec_ErrorContext::error_internal
        ("No JSON descriptor available for type '%s'.", p_td.name);
    JSON_Tokenizer tok((const char*)p_buf.get_data(), p_buf.get_len());
    if(JSON_decode(p_td, tok, FALSE, FALSE)<0)
      ec.error(TTCN_EncDec::ET_INCOMPL_MSG,"Can not decode type '%s', because invalid or incomplete message was received", p_td.name);
    p_buf.set_pos(tok.get_buf_pos());
    break;}
  case TTCN_EncDec::CT_OER: {
    TTCN_EncDec_ErrorContext ec("While OER-decoding type '%s': ", p_td.name);
    if(!p_td.oer)
      TTCN_EncDec_ErrorContext::error_internal
        ("No OER descriptor available for type '%s'.", p_td.name);
     OER_struct p_oer;
    OER_decode(p_td, p_buf, p_oer);
    break;}
  case TTCN_EncDec::CT_PER: {
    TTCN_EncDec_ErrorContext ec("While PER-decoding type '%s': ", p_td.name);
    if(!p_td.per)  TTCN_EncDec_ErrorContext::error_internal(
      "No PER descriptor available for type '%s'.", p_td.name);
    int opt = va_arg(pvar, int);
    try {
      PER_decode(p_td, p_buf, opt);
      p_buf.PER_octet_align(FALSE);
    }
    catch (PER_Buffer_Exception) { }
    break; }
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int OML__PDU::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  int selected_field = -1;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, OML__PDU_mdisc_descr_.raw->forceomit);
  decoded_field_length = field_mdisc.RAW_decode(OML__PDU_mdisc_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, OML__PDU_placement_descr_.raw->forceomit);
  decoded_field_length = field_placement.RAW_decode(OML__PDU_placement_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, OML__PDU_sequence_descr_.raw->forceomit);
  decoded_field_length = field_sequence.RAW_decode(OML__PDU_sequence_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (field_mdisc == OML__MessageDiscriminator::ABIS__OM__MDISC__FOM) selected_field = 0;
  else if (field_mdisc == OML__MessageDiscriminator::ABIS__OM__MDISC__MANUF) selected_field = 1;
  else selected_field = 2;
  RAW_Force_Omit field_3_force_omit(3, force_omit, OML__PDU_u_descr_.raw->forceomit);
  decoded_field_length = field_u.RAW_decode(OML__PDU_u_descr_, p_buf, limit, local_top_order, no_err, selected_field, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int OML__PDU::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, OML__PDU_mdisc_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, OML__PDU_placement_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, OML__PDU_sequence_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, OML__PDU_u_descr_.raw);
  encoded_length += field_mdisc.RAW_encode(OML__PDU_mdisc_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_placement.RAW_encode(OML__PDU_placement_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_sequence.RAW_encode(OML__PDU_sequence_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_u.RAW_encode(OML__PDU_u_descr_, *myleaf.body.node.nodes[3]);
  switch (field_u.get_selection()) {
  case OML__Union::ALT_fom:
  if (field_mdisc != OML__MessageDiscriminator::ABIS__OM__MDISC__FOM) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__MessageDiscriminator new_val(OML__MessageDiscriminator::ABIS__OM__MDISC__FOM);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__PDU_mdisc_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case OML__Union::ALT_manuf:
  if (field_mdisc != OML__MessageDiscriminator::ABIS__OM__MDISC__MANUF) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  OML__MessageDiscriminator new_val(OML__MessageDiscriminator::ABIS__OM__MDISC__MANUF);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(OML__PDU_mdisc_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  default:;
  }
  return myleaf.length = encoded_length;
}

struct OML__PDU_template::single_value_struct {
OML__MessageDiscriminator_template field_mdisc;
OML__Placement_template field_placement;
INTEGER_template field_sequence;
OML__Union_template field_u;
};

void OML__PDU_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_mdisc = ANY_VALUE;
single_value->field_placement = ANY_VALUE;
single_value->field_sequence = ANY_VALUE;
single_value->field_u = ANY_VALUE;
}
}
}

void OML__PDU_template::copy_value(const OML__PDU& other_value)
{
single_value = new single_value_struct;
if (other_value.mdisc().is_bound()) {
  single_value->field_mdisc = other_value.mdisc();
} else {
  single_value->field_mdisc.clean_up();
}
if (other_value.placement().is_bound()) {
  single_value->field_placement = other_value.placement();
} else {
  single_value->field_placement.clean_up();
}
if (other_value.sequence().is_bound()) {
  single_value->field_sequence = other_value.sequence();
} else {
  single_value->field_sequence.clean_up();
}
if (other_value.u().is_bound()) {
  single_value->field_u = other_value.u();
} else {
  single_value->field_u.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void OML__PDU_template::copy_template(const OML__PDU_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.mdisc().get_selection()) {
single_value->field_mdisc = other_value.mdisc();
} else {
single_value->field_mdisc.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.placement().get_selection()) {
single_value->field_placement = other_value.placement();
} else {
single_value->field_placement.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.sequence().get_selection()) {
single_value->field_sequence = other_value.sequence();
} else {
single_value->field_sequence.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.u().get_selection()) {
single_value->field_u = other_value.u();
} else {
single_value->field_u.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__PDU_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new OML__PDU_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__PDU_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @AbisOML_Types.OML_PDU.");
break;
}
set_selection(other_value);
}

OML__PDU_template::OML__PDU_template()
{
}

OML__PDU_template::OML__PDU_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

OML__PDU_template::OML__PDU_template(const OML__PDU& other_value)
{
copy_value(other_value);
}

OML__PDU_template::OML__PDU_template(const OPTIONAL<OML__PDU>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const OML__PDU&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @AbisOML_Types.OML_PDU from an unbound optional field.");
}
}

OML__PDU_template::OML__PDU_template(OML__PDU_template* p_precondition, OML__PDU_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

OML__PDU_template::OML__PDU_template(Dynamic_Match_Interface<OML__PDU>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<OML__PDU>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

OML__PDU_template::OML__PDU_template(const OML__PDU_template& other_value)
: Base_Template()
{
copy_template(other_value);
}

OML__PDU_template::~OML__PDU_template()
{
clean_up();
}

OML__PDU_template& OML__PDU_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

OML__PDU_template& OML__PDU_template::operator=(const OML__PDU& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

OML__PDU_template& OML__PDU_template::operator=(const OPTIONAL<OML__PDU>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const OML__PDU&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Assignment of an unbound optional field to a template of type @AbisOML_Types.OML_PDU.");
}
return *this;
}

OML__PDU_template& OML__PDU_template::operator=(const OML__PDU_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean OML__PDU_template::match(const OML__PDU& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.mdisc().is_bound()) return FALSE;
if(!single_value->field_mdisc.match(other_value.mdisc(), legacy))return FALSE;
if(!other_value.placement().is_bound()) return FALSE;
if(!single_value->field_placement.match(other_value.placement(), legacy))return FALSE;
if(!other_value.sequence().is_bound()) return FALSE;
if(!single_value->field_sequence.match(other_value.sequence(), legacy))return FALSE;
if(!other_value.u().is_bound()) return FALSE;
if(!single_value->field_u.match(other_value.u(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @AbisOML_Types.OML_PDU.");
}
return FALSE;
}

boolean OML__PDU_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_mdisc.is_bound()
 || single_value->field_placement.is_bound()
 || single_value->field_sequence.is_bound()
 || single_value->field_u.is_bound();
}

boolean OML__PDU_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_mdisc.is_value()
 && single_value->field_placement.is_value()
 && single_value->field_sequence.is_value()
 && single_value->field_u.is_value();
}

void OML__PDU_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;
}

OML__PDU OML__PDU_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @AbisOML_Types.OML_PDU.");
OML__PDU ret_val;
if (single_value->field_mdisc.is_bound()) {
ret_val.mdisc() = single_value->field_mdisc.valueof();
}
if (single_value->field_placement.is_bound()) {
ret_val.placement() = single_value->field_placement.valueof();
}
if (single_value->field_sequence.is_bound()) {
ret_val.sequence() = single_value->field_sequence.valueof();
}
if (single_value->field_u.is_bound()) {
ret_val.u() = single_value->field_u.valueof();
}
return ret_val;
}

void OML__PDU_template::set_type(template_sel template_type, unsigned int list_length)
{
if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST&& template_type != CONJUNCTION_MATCH)
TTCN_error("Setting an invalid list for a template of type @AbisOML_Types.OML_PDU.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__PDU_template[list_length];
}

OML__PDU_template& OML__PDU_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 @AbisOML_Types.OML_PDU.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @AbisOML_Types.OML_PDU.");
return value_list.list_value[list_index];
}

OML__MessageDiscriminator_template& OML__PDU_template::mdisc()
{
set_specific();
return single_value->field_mdisc;
}

const OML__MessageDiscriminator_template& OML__PDU_template::mdisc() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mdisc of a non-specific template of type @AbisOML_Types.OML_PDU.");
return single_value->field_mdisc;
}

OML__Placement_template& OML__PDU_template::placement()
{
set_specific();
return single_value->field_placement;
}

const OML__Placement_template& OML__PDU_template::placement() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field placement of a non-specific template of type @AbisOML_Types.OML_PDU.");
return single_value->field_placement;
}

INTEGER_template& OML__PDU_template::sequence()
{
set_specific();
return single_value->field_sequence;
}

const INTEGER_template& OML__PDU_template::sequence() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field sequence of a non-specific template of type @AbisOML_Types.OML_PDU.");
return single_value->field_sequence;
}

OML__Union_template& OML__PDU_template::u()
{
set_specific();
return single_value->field_u;
}

const OML__Union_template& OML__PDU_template::u() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field u of a non-specific template of type @AbisOML_Types.OML_PDU.");
return single_value->field_u;
}

int OML__PDU_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_PDU 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 @AbisOML_Types.OML_PDU 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 @AbisOML_Types.OML_PDU containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_PDU containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_PDU containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_PDU containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_PDU containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_PDU containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_PDU containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @AbisOML_Types.OML_PDU.");
  }
  return 0;
}

void OML__PDU_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ mdisc := ");
single_value->field_mdisc.log();
TTCN_Logger::log_event_str(", placement := ");
single_value->field_placement.log();
TTCN_Logger::log_event_str(", sequence := ");
single_value->field_sequence.log();
TTCN_Logger::log_event_str(", u := ");
single_value->field_u.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void OML__PDU_template::log_match(const OML__PDU& 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_mdisc.match(match_value.mdisc(), legacy)){
TTCN_Logger::log_logmatch_info(".mdisc");
single_value->field_mdisc.log_match(match_value.mdisc(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_placement.match(match_value.placement(), legacy)){
TTCN_Logger::log_logmatch_info(".placement");
single_value->field_placement.log_match(match_value.placement(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_sequence.match(match_value.sequence(), legacy)){
TTCN_Logger::log_logmatch_info(".sequence");
single_value->field_sequence.log_match(match_value.sequence(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_u.match(match_value.u(), legacy)){
TTCN_Logger::log_logmatch_info(".u");
single_value->field_u.log_match(match_value.u(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ mdisc := ");
single_value->field_mdisc.log_match(match_value.mdisc(), legacy);
TTCN_Logger::log_event_str(", placement := ");
single_value->field_placement.log_match(match_value.placement(), legacy);
TTCN_Logger::log_event_str(", sequence := ");
single_value->field_sequence.log_match(match_value.sequence(), legacy);
TTCN_Logger::log_event_str(", u := ");
single_value->field_u.log_match(match_value.u(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void OML__PDU_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (mdisc().is_bound()) mdisc().set_implicit_omit();
if (placement().is_bound()) placement().set_implicit_omit();
if (sequence().is_bound()) sequence().set_implicit_omit();
if (u().is_bound()) u().set_implicit_omit();
}

void OML__PDU_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_mdisc.encode_text(text_buf);
single_value->field_placement.encode_text(text_buf);
single_value->field_sequence.encode_text(text_buf);
single_value->field_u.encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @AbisOML_Types.OML_PDU.");
}
}

void OML__PDU_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_mdisc.decode_text(text_buf);
single_value->field_placement.decode_text(text_buf);
single_value->field_sequence.decode_text(text_buf);
single_value->field_u.decode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__PDU_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @AbisOML_Types.OML_PDU.");
}
}

void OML__PDU_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: {
    OML__PDU_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 @AbisOML_Types.OML_PDU 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) mdisc().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) placement().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) sequence().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) u().set_param(*param.get_elem(3));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mdisc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mdisc().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "placement")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          placement().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "sequence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          sequence().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "u")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          u().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @AbisOML_Types.OML_PDU: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__PDU_template* precondition = new OML__PDU_template;
    precondition->set_param(*param.get_elem(0));
    OML__PDU_template* implied_template = new OML__PDU_template;
    implied_template->set_param(*param.get_elem(1));
    *this = OML__PDU_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@AbisOML_Types.OML_PDU");
  }
  is_ifpresent = param.get_ifpresent();
}

void OML__PDU_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_mdisc.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_PDU");
single_value->field_placement.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_PDU");
single_value->field_sequence.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_PDU");
single_value->field_u.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_PDU");
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 : "@AbisOML_Types.OML_PDU");
}

boolean OML__PDU_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean OML__PDU_template::match_omit(boolean legacy) const
{
if (is_ifpresent) return TRUE;
switch (template_selection) {
case OMIT_VALUE:
case ANY_OR_OMIT:
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match_omit() || implication_.implied_template->match_omit();
case VALUE_LIST:
case COMPLEMENTED_LIST:
if (legacy) {
for (unsigned int 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;
}

OML__IE__LV::OML__IE__LV()
{
}

OML__IE__LV::OML__IE__LV(const INTEGER& par_len,
    const OCTETSTRING& par_payload)
  :   field_len(par_len),
  field_payload(par_payload)
{
}

OML__IE__LV::OML__IE__LV(const OML__IE__LV& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @AbisOML_Types.OML_IE_LV.");
if (other_value.len().is_bound()) field_len = other_value.len();
else field_len.clean_up();
if (other_value.payload().is_bound()) field_payload = other_value.payload();
else field_payload.clean_up();
}

void OML__IE__LV::clean_up()
{
field_len.clean_up();
field_payload.clean_up();
}

const TTCN_Typedescriptor_t* OML__IE__LV::get_descriptor() const { return &OML__IE__LV_descr_; }
OML__IE__LV& OML__IE__LV::operator=(const OML__IE__LV& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @AbisOML_Types.OML_IE_LV.");
  if (other_value.len().is_bound()) field_len = other_value.len();
  else field_len.clean_up();
  if (other_value.payload().is_bound()) field_payload = other_value.payload();
  else field_payload.clean_up();
}
return *this;
}

boolean OML__IE__LV::operator==(const OML__IE__LV& other_value) const
{
return field_len==other_value.field_len
  && field_payload==other_value.field_payload;
}

boolean OML__IE__LV::is_bound() const
{
return (field_len.is_bound())
  || (field_payload.is_bound());
}
boolean OML__IE__LV::is_value() const
{
return field_len.is_value()
  && field_payload.is_value();
}
void OML__IE__LV::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ len := ");
field_len.log();
TTCN_Logger::log_event_str(", payload := ");
field_payload.log();
TTCN_Logger::log_event_str(" }");
}

void OML__IE__LV::set_implicit_omit()
{
if (len().is_bound()) len().set_implicit_omit();
if (payload().is_bound()) payload().set_implicit_omit();
}

void OML__IE__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 (2<param.get_size()) {
      param.error("record value of type @AbisOML_Types.OML_IE_LV 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) len().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) payload().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(), "len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "payload")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          payload().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @AbisOML_Types.OML_IE_LV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@AbisOML_Types.OML_IE_LV");
  }
}

void OML__IE__LV::encode_text(Text_Buf& text_buf) const
{
field_len.encode_text(text_buf);
field_payload.encode_text(text_buf);
}

void OML__IE__LV::decode_text(Text_Buf& text_buf)
{
field_len.decode_text(text_buf);
field_payload.decode_text(text_buf);
}

void OML__IE__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 OML__IE__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 OML__IE__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, OML__IE__LV_len_descr_.raw->forceomit);
  decoded_field_length = field_len.RAW_decode(OML__IE__LV_len_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_len.convert_to_Integer(OML__IE__LV_len_descr_);
  field_len = tmp0;
  value_of_length_field0 += tmp0.get_long_long_val() * 8;
  RAW_Force_Omit field_1_force_omit(1, force_omit, OML__IE__LV_payload_descr_.raw->forceomit);
  decoded_field_length = field_payload.RAW_decode(OML__IE__LV_payload_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;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int OML__IE__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 = 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, OML__IE__LV_len_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, OML__IE__LV_payload_descr_.raw);
  encoded_length += 8;
  myleaf.body.node.nodes[0]->calc = CALC_LENGTH;
  myleaf.body.node.nodes[0]->coding_descr = &OML__IE__LV_len_descr_;
  myleaf.body.node.nodes[0]->calcof.lengthto.num_of_fields = 1;
  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(1);
  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;
  encoded_length += field_payload.RAW_encode(OML__IE__LV_payload_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct OML__IE__LV_template::single_value_struct {
INTEGER_template field_len;
OCTETSTRING_template field_payload;
};

void OML__IE__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_len = ANY_VALUE;
single_value->field_payload = ANY_VALUE;
}
}
}

void OML__IE__LV_template::copy_value(const OML__IE__LV& other_value)
{
single_value = new single_value_struct;
if (other_value.len().is_bound()) {
  single_value->field_len = other_value.len();
} else {
  single_value->field_len.clean_up();
}
if (other_value.payload().is_bound()) {
  single_value->field_payload = other_value.payload();
} else {
  single_value->field_payload.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void OML__IE__LV_template::copy_template(const OML__IE__LV_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.len().get_selection()) {
single_value->field_len = other_value.len();
} else {
single_value->field_len.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.payload().get_selection()) {
single_value->field_payload = other_value.payload();
} else {
single_value->field_payload.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new OML__IE__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 OML__IE__LV_template(*other_value.implication_.precondition);
implication_.implied_template = new OML__IE__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 @AbisOML_Types.OML_IE_LV.");
break;
}
set_selection(other_value);
}

OML__IE__LV_template::OML__IE__LV_template()
{
}

OML__IE__LV_template::OML__IE__LV_template(template_sel other_value)
 : Base_Template(other_value)
{
check_single_selection(other_value);
}

OML__IE__LV_template::OML__IE__LV_template(const OML__IE__LV& other_value)
{
copy_value(other_value);
}

OML__IE__LV_template::OML__IE__LV_template(const OPTIONAL<OML__IE__LV>& other_value)
{
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const OML__IE__LV&)other_value);
break;
case OPTIONAL_OMIT:
set_selection(OMIT_VALUE);
break;
default:
TTCN_error("Creating a template of type @AbisOML_Types.OML_IE_LV from an unbound optional field.");
}
}

OML__IE__LV_template::OML__IE__LV_template(OML__IE__LV_template* p_precondition, OML__IE__LV_template* p_implied_template)
 : Base_Template(IMPLICATION_MATCH)
{
implication_.precondition = p_precondition;
implication_.implied_template = p_implied_template;
}

OML__IE__LV_template::OML__IE__LV_template(Dynamic_Match_Interface<OML__IE__LV>* p_dyn_match)
 : Base_Template(DYNAMIC_MATCH)
{
dyn_match = new dynmatch_struct<OML__IE__LV>;
dyn_match->ptr = p_dyn_match;
dyn_match->ref_count = 1;
}

OML__IE__LV_template::OML__IE__LV_template(const OML__IE__LV_template& other_value)
: Base_Template()
{
copy_template(other_value);
}

OML__IE__LV_template::~OML__IE__LV_template()
{
clean_up();
}

OML__IE__LV_template& OML__IE__LV_template::operator=(template_sel other_value)
{
check_single_selection(other_value);
clean_up();
set_selection(other_value);
return *this;
}

OML__IE__LV_template& OML__IE__LV_template::operator=(const OML__IE__LV& other_value)
{
clean_up();
copy_value(other_value);
return *this;
}

OML__IE__LV_template& OML__IE__LV_template::operator=(const OPTIONAL<OML__IE__LV>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const OML__IE__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 @AbisOML_Types.OML_IE_LV.");
}
return *this;
}

OML__IE__LV_template& OML__IE__LV_template::operator=(const OML__IE__LV_template& other_value)
{
if (&other_value != this) {
clean_up();
copy_template(other_value);
}
return *this;
}

boolean OML__IE__LV_template::match(const OML__IE__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.len().is_bound()) return FALSE;
if(!single_value->field_len.match(other_value.len(), legacy))return FALSE;
if(!other_value.payload().is_bound()) return FALSE;
if(!single_value->field_payload.match(other_value.payload(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @AbisOML_Types.OML_IE_LV.");
}
return FALSE;
}

boolean OML__IE__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_len.is_bound()
 || single_value->field_payload.is_bound();
}

boolean OML__IE__LV_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_len.is_value()
 && single_value->field_payload.is_value();
}

void OML__IE__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;
}

OML__IE__LV OML__IE__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 @AbisOML_Types.OML_IE_LV.");
OML__IE__LV ret_val;
if (single_value->field_len.is_bound()) {
ret_val.len() = single_value->field_len.valueof();
}
if (single_value->field_payload.is_bound()) {
ret_val.payload() = single_value->field_payload.valueof();
}
return ret_val;
}

void OML__IE__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 @AbisOML_Types.OML_IE_LV.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new OML__IE__LV_template[list_length];
}

OML__IE__LV_template& OML__IE__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 @AbisOML_Types.OML_IE_LV.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @AbisOML_Types.OML_IE_LV.");
return value_list.list_value[list_index];
}

INTEGER_template& OML__IE__LV_template::len()
{
set_specific();
return single_value->field_len;
}

const INTEGER_template& OML__IE__LV_template::len() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field len of a non-specific template of type @AbisOML_Types.OML_IE_LV.");
return single_value->field_len;
}

OCTETSTRING_template& OML__IE__LV_template::payload()
{
set_specific();
return single_value->field_payload;
}

const OCTETSTRING_template& OML__IE__LV_template::payload() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field payload of a non-specific template of type @AbisOML_Types.OML_IE_LV.");
return single_value->field_payload;
}

int OML__IE__LV_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_IE_LV 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 @AbisOML_Types.OML_IE_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 @AbisOML_Types.OML_IE_LV containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_IE_LV containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_IE_LV containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_IE_LV containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_IE_LV containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_IE_LV containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @AbisOML_Types.OML_IE_LV containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @AbisOML_Types.OML_IE_LV.");
  }
  return 0;
}

void OML__IE__LV_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ len := ");
single_value->field_len.log();
TTCN_Logger::log_event_str(", payload := ");
single_value->field_payload.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void OML__IE__LV_template::log_match(const OML__IE__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_len.match(match_value.len(), legacy)){
TTCN_Logger::log_logmatch_info(".len");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_payload.match(match_value.payload(), legacy)){
TTCN_Logger::log_logmatch_info(".payload");
single_value->field_payload.log_match(match_value.payload(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ len := ");
single_value->field_len.log_match(match_value.len(), legacy);
TTCN_Logger::log_event_str(", payload := ");
single_value->field_payload.log_match(match_value.payload(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void OML__IE__LV_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (len().is_bound()) len().set_implicit_omit();
if (payload().is_bound()) payload().set_implicit_omit();
}

void OML__IE__LV_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_len.encode_text(text_buf);
single_value->field_payload.encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @AbisOML_Types.OML_IE_LV.");
}
}

void OML__IE__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_len.decode_text(text_buf);
single_value->field_payload.decode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new OML__IE__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 @AbisOML_Types.OML_IE_LV.");
}
}

void OML__IE__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: {
    OML__IE__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 (2<param.get_size()) {
      param.error("record template of type @AbisOML_Types.OML_IE_LV 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) len().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) payload().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(), "len")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          len().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "payload")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          payload().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @AbisOML_Types.OML_IE_LV: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    OML__IE__LV_template* precondition = new OML__IE__LV_template;
    precondition->set_param(*param.get_elem(0));
    OML__IE__LV_template* implied_template = new OML__IE__LV_template;
    implied_template->set_param(*param.get_elem(1));
    *this = OML__IE__LV_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@AbisOML_Types.OML_IE_LV");
  }
  is_ifpresent = param.get_ifpresent();
}

void OML__IE__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_len.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_IE_LV");
single_value->field_payload.check_restriction(t_res, t_name ? t_name : "@AbisOML_Types.OML_IE_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 : "@AbisOML_Types.OML_IE_LV");
}

boolean OML__IE__LV_template::is_present(boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE;
return !match_omit(legacy);
}

boolean OML__IE__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;
}


/* Bodies of functions, altsteps and testcases */

void OML__MessageDiscriminator_encoder(const OML__MessageDiscriminator& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_MessageDiscriminator' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__MessageDiscriminator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__MessageDiscriminator_decoder(OCTETSTRING& input_stream, OML__MessageDiscriminator& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_MessageDiscriminator' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__MessageDiscriminator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__Placement_encoder(const OML__Placement& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_Placement' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__Placement_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__Placement_decoder(OCTETSTRING& input_stream, OML__Placement& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_Placement' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__Placement_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__FOM_len_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM_len_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM_len_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM_len_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__FOM__MessageType_encoder(const OML__FOM__MessageType& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_MessageType' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM__MessageType_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM__MessageType_decoder(OCTETSTRING& input_stream, OML__FOM__MessageType& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_MessageType' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM__MessageType_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__FOM__Header_msg__type_encoder(const OML__FOM__MessageType& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_MessageType' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM__Header_msg__type_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM__Header_msg__type_decoder(OCTETSTRING& input_stream, OML__FOM__MessageType& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_MessageType' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM__Header_msg__type_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__FOM__ObjectClass_encoder(const OML__FOM__ObjectClass& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_ObjectClass' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM__ObjectClass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM__ObjectClass_decoder(OCTETSTRING& input_stream, OML__FOM__ObjectClass& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_ObjectClass' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM__ObjectClass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__FOM__Header_obj__class_encoder(const OML__FOM__ObjectClass& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_ObjectClass' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM__Header_obj__class_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM__Header_obj__class_decoder(OCTETSTRING& input_stream, OML__FOM__ObjectClass& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_ObjectClass' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM__Header_obj__class_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__FOM__ObjectInstance_bts__nr_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM__ObjectInstance_bts__nr_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM__ObjectInstance_bts__nr_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM__ObjectInstance_bts__nr_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__FOM__ObjectInstance_trx__nr_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM__ObjectInstance_trx__nr_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM__ObjectInstance_trx__nr_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM__ObjectInstance_trx__nr_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__FOM__ObjectInstance_ts__nr_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM__ObjectInstance_ts__nr_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM__ObjectInstance_ts__nr_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM__ObjectInstance_ts__nr_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__FOM__ObjectInstance_encoder(const OML__FOM__ObjectInstance& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_ObjectInstance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM__ObjectInstance_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM__ObjectInstance_decoder(OCTETSTRING& input_stream, OML__FOM__ObjectInstance& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_ObjectInstance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM__ObjectInstance_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__FOM__Header_obj__inst_encoder(const OML__FOM__ObjectInstance& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_ObjectInstance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM__Header_obj__inst_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM__Header_obj__inst_decoder(OCTETSTRING& input_stream, OML__FOM__ObjectInstance& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_ObjectInstance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM__Header_obj__inst_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__FOM__Header_encoder(const OML__FOM__Header& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_Header' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM__Header_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM__Header_decoder(OCTETSTRING& input_stream, OML__FOM__Header& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_Header' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM__Header_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__FOM_hdr_encoder(const OML__FOM__Header& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_Header' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM_hdr_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM_hdr_decoder(OCTETSTRING& input_stream, OML__FOM__Header& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_Header' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM_hdr_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

boolean operator==(null_type, const OML__FOM__IE__List& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @AbisOML_Types.OML_FOM_IE_List.");
return other_value.val_ptr->n_elements == 0;
}

void OML__FOM__IE__Type_encoder(const OML__FOM__IE__Type& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_IE_Type' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM__IE__Type_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM__IE__Type_decoder(OCTETSTRING& input_stream, OML__FOM__IE__Type& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_IE_Type' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM__IE__Type_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__FOM__IE_iei_encoder(const OML__FOM__IE__Type& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_IE_Type' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM__IE_iei_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM__IE_iei_decoder(OCTETSTRING& input_stream, OML__FOM__IE__Type& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@AbisOML_Types.OML_FOM_IE_Type' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM__IE_iei_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__FOM__AbisChannel_bts__port__nr_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM__AbisChannel_bts__port__nr_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM__AbisChannel_bts__port__nr_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM__AbisChannel_bts__port__nr_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void OML__FOM__AbisChannel_timeslot__nr_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(OML__FOM__AbisChannel_timeslot__nr_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER OML__FOM__AbisChannel_timeslot__nr_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(OML__FOM__AbisChannel_timeslot__nr_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}


} /* end of namespace */
