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

namespace L3__Templates {

/* Literal string constants */

const unsigned char bs_0_bits[] = { 0 },
bs_14_bits[] = { 0 },
bs_5_bits[] = { 0 },
bs_15_bits[] = { 0 },
bs_39_bits[] = { 0 },
bs_16_bits[] = { 0 },
bs_25_bits[] = { 0 },
bs_88_bits[] = { 128 },
bs_71_bits[] = { 64 },
bs_52_bits[] = { 32 },
bs_72_bits[] = { 32 },
bs_79_bits[] = { 160 },
bs_78_bits[] = { 96 },
bs_38_bits[] = { 16 },
bs_48_bits[] = { 16 },
bs_74_bits[] = { 144 },
bs_73_bits[] = { 208 },
bs_80_bits[] = { 48 },
bs_45_bits[] = { 176 },
bs_42_bits[] = { 112 },
bs_2_bits[] = { 8 },
bs_49_bits[] = { 8 },
bs_26_bits[] = { 8 },
bs_44_bits[] = { 72 },
bs_41_bits[] = { 200 },
bs_55_bits[] = { 40 },
bs_75_bits[] = { 168 },
bs_40_bits[] = { 104 },
bs_27_bits[] = { 232 },
bs_57_bits[] = { 56 },
bs_76_bits[] = { 56 },
bs_8_bits[] = { 4 },
bs_46_bits[] = { 4 },
bs_22_bits[] = { 132 },
bs_23_bits[] = { 68 },
bs_24_bits[] = { 36 },
bs_33_bits[] = { 20 },
bs_31_bits[] = { 148 },
bs_36_bits[] = { 212 },
bs_34_bits[] = { 52 },
bs_91_bits[] = { 180 },
bs_4_bits[] = { 116 },
bs_30_bits[] = { 116 },
bs_32_bits[] = { 244 },
bs_53_bits[] = { 12 },
bs_69_bits[] = { 12 },
bs_29_bits[] = { 76 },
bs_90_bits[] = { 44 },
bs_28_bits[] = { 172 },
bs_56_bits[] = { 28 },
bs_35_bits[] = { 28 },
bs_58_bits[] = { 60 },
bs_13_bits[] = { 2 },
bs_10_bits[] = { 2 },
bs_54_bits[] = { 2 },
bs_84_bits[] = { 66 },
bs_83_bits[] = { 194 },
bs_9_bits[] = { 98 },
bs_85_bits[] = { 98 },
bs_86_bits[] = { 226 },
bs_63_bits[] = { 18 },
bs_43_bits[] = { 18 },
bs_18_bits[] = { 10 },
bs_64_bits[] = { 10 },
bs_11_bits[] = { 6 },
bs_21_bits[] = { 6 },
bs_50_bits[] = { 6 },
bs_51_bits[] = { 38 },
bs_47_bits[] = { 54 },
bs_1_bits[] = { 1 },
bs_12_bits[] = { 1 },
bs_6_bits[] = { 1 },
bs_70_bits[] = { 1 },
bs_19_bits[] = { 33 },
bs_20_bits[] = { 17 },
bs_81_bits[] = { 9 },
bs_60_bits[] = { 41 },
bs_87_bits[] = { 5 },
bs_82_bits[] = { 5 },
bs_17_bits[] = { 5 },
bs_62_bits[] = { 21 },
bs_65_bits[] = { 13 },
bs_61_bits[] = { 45 },
bs_3_bits[] = { 3 },
bs_37_bits[] = { 3 },
bs_89_bits[] = { 19 },
bs_59_bits[] = { 43 },
bs_68_bits[] = { 7 },
bs_77_bits[] = { 7 },
bs_67_bits[] = { 23 },
bs_66_bits[] = { 55 },
bs_7_bits[] = { 15 };
extern const BITSTRING bs_0(1, bs_0_bits),
bs_14(2, bs_14_bits),
bs_5(3, bs_5_bits),
bs_15(4, bs_15_bits),
bs_39(5, bs_39_bits),
bs_16(6, bs_16_bits),
bs_25(8, bs_25_bits),
bs_88(8, bs_88_bits),
bs_71(8, bs_71_bits),
bs_52(6, bs_52_bits),
bs_72(8, bs_72_bits),
bs_79(8, bs_79_bits),
bs_78(8, bs_78_bits),
bs_38(5, bs_38_bits),
bs_48(6, bs_48_bits),
bs_74(8, bs_74_bits),
bs_73(8, bs_73_bits),
bs_80(8, bs_80_bits),
bs_45(8, bs_45_bits),
bs_42(8, bs_42_bits),
bs_2(4, bs_2_bits),
bs_49(6, bs_49_bits),
bs_26(8, bs_26_bits),
bs_44(8, bs_44_bits),
bs_41(8, bs_41_bits),
bs_55(6, bs_55_bits),
bs_75(8, bs_75_bits),
bs_40(8, bs_40_bits),
bs_27(8, bs_27_bits),
bs_57(6, bs_57_bits),
bs_76(8, bs_76_bits),
bs_8(3, bs_8_bits),
bs_46(6, bs_46_bits),
bs_22(8, bs_22_bits),
bs_23(8, bs_23_bits),
bs_24(8, bs_24_bits),
bs_33(8, bs_33_bits),
bs_31(8, bs_31_bits),
bs_36(8, bs_36_bits),
bs_34(8, bs_34_bits),
bs_91(8, bs_91_bits),
bs_4(7, bs_4_bits),
bs_30(8, bs_30_bits),
bs_32(8, bs_32_bits),
bs_53(4, bs_53_bits),
bs_69(7, bs_69_bits),
bs_29(8, bs_29_bits),
bs_90(8, bs_90_bits),
bs_28(8, bs_28_bits),
bs_56(6, bs_56_bits),
bs_35(8, bs_35_bits),
bs_58(6, bs_58_bits),
bs_13(2, bs_13_bits),
bs_10(3, bs_10_bits),
bs_54(4, bs_54_bits),
bs_84(8, bs_84_bits),
bs_83(8, bs_83_bits),
bs_9(7, bs_9_bits),
bs_85(8, bs_85_bits),
bs_86(8, bs_86_bits),
bs_63(6, bs_63_bits),
bs_43(8, bs_43_bits),
bs_18(4, bs_18_bits),
bs_64(6, bs_64_bits),
bs_11(3, bs_11_bits),
bs_21(4, bs_21_bits),
bs_50(6, bs_50_bits),
bs_51(6, bs_51_bits),
bs_47(6, bs_47_bits),
bs_1(1, bs_1_bits),
bs_12(2, bs_12_bits),
bs_6(3, bs_6_bits),
bs_70(4, bs_70_bits),
bs_19(6, bs_19_bits),
bs_20(6, bs_20_bits),
bs_81(4, bs_81_bits),
bs_60(6, bs_60_bits),
bs_87(3, bs_87_bits),
bs_82(4, bs_82_bits),
bs_17(6, bs_17_bits),
bs_62(6, bs_62_bits),
bs_65(4, bs_65_bits),
bs_61(6, bs_61_bits),
bs_3(2, bs_3_bits),
bs_37(3, bs_37_bits),
bs_89(6, bs_89_bits),
bs_59(6, bs_59_bits),
bs_68(3, bs_68_bits),
bs_77(4, bs_77_bits),
bs_67(6, bs_67_bits),
bs_66(6, bs_66_bits),
bs_7(4, bs_7_bits);
const unsigned char hs_0_nibbles[] = { 15 };
extern const HEXSTRING hs_0(1, hs_0_nibbles);
const unsigned char os_9_octets[] = { 0 },
os_3_octets[] = { 0, 0 },
os_8_octets[] = { 4 },
os_0_octets[] = { 8 },
os_10_octets[] = { 9 },
os_18_octets[] = { 16 },
os_5_octets[] = { 18, 52, 86 },
os_20_octets[] = { 21 },
os_4_octets[] = { 23, 42 },
os_22_octets[] = { 25 },
os_23_octets[] = { 27 },
os_17_octets[] = { 28 },
os_11_octets[] = { 32 },
os_16_octets[] = { 33 },
os_19_octets[] = { 34 },
os_24_octets[] = { 37 },
os_26_octets[] = { 39 },
os_25_octets[] = { 40 },
os_15_octets[] = { 44 },
os_21_octets[] = { 48 },
os_1_octets[] = { 49 },
os_2_octets[] = { 50 },
os_14_octets[] = { 92 },
os_13_octets[] = { 94 },
os_7_octets[] = { 99 },
os_6_octets[] = { 109 },
os_12_octets[] = { 119 };
extern const OCTETSTRING os_9(1, os_9_octets),
os_3(2, os_3_octets),
os_8(1, os_8_octets),
os_0(1, os_0_octets),
os_10(1, os_10_octets),
os_18(1, os_18_octets),
os_5(3, os_5_octets),
os_20(1, os_20_octets),
os_4(2, os_4_octets),
os_22(1, os_22_octets),
os_23(1, os_23_octets),
os_17(1, os_17_octets),
os_11(1, os_11_octets),
os_16(1, os_16_octets),
os_19(1, os_19_octets),
os_24(1, os_24_octets),
os_26(1, os_26_octets),
os_25(1, os_25_octets),
os_15(1, os_15_octets),
os_21(1, os_21_octets),
os_1(1, os_1_octets),
os_2(1, os_2_octets),
os_14(1, os_14_octets),
os_13(1, os_13_octets),
os_7(1, os_7_octets),
os_6(1, os_6_octets),
os_12(1, os_12_octets);
extern const CHARSTRING cs_2('*'),
cs_0('?'),
cs_1(4, "omit");
const unsigned char module_checksum[] = { 0x56, 0xaa, 0x79, 0x0f, 0x1a, 0x75, 0x2f, 0x36, 0x26, 0xe3, 0x27, 0x68, 0x26, 0x1d, 0xa4, 0x6f };

/* Global variable definitions */

BITSTRING const_c__TIF__ORIG;
const BITSTRING& c__TIF__ORIG = const_c__TIF__ORIG;
BITSTRING const_c__TIF__REPL;
const BITSTRING& c__TIF__REPL = const_c__TIF__REPL;
// No XER for CmServiceType
const TTCN_Typedescriptor_t CmServiceType_descr_ = { "@L3_Templates.CmServiceType", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for CmIdentityType
const TTCN_Typedescriptor_t CmIdentityType_descr_ = { "@L3_Templates.CmIdentityType", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ServiceType
const TTCN_Typedescriptor_t ServiceType_descr_ = { "@L3_Templates.ServiceType", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
BITSTRING const_ts__ML3__Cause_loc_defval;
const BITSTRING& ts__ML3__Cause_loc_defval = const_ts__ML3__Cause_loc_defval;
BITSTRING const_ts__ML3__Cause_std_defval;
const BITSTRING& ts__ML3__Cause_std_defval = const_ts__ML3__Cause_std_defval;
BITSTRING const_ts__ML3__Cause__LV_loc_defval;
const BITSTRING& ts__ML3__Cause__LV_loc_defval = const_ts__ML3__Cause__LV_loc_defval;
BITSTRING const_ts__ML3__Cause__LV_std_defval;
const BITSTRING& ts__ML3__Cause__LV_std_defval = const_ts__ML3__Cause__LV_std_defval;
HEXSTRING_template template_t__MI__NoIdentity_filler_defval;
const HEXSTRING_template& t__MI__NoIdentity_filler_defval = template_t__MI__NoIdentity_filler_defval;
INTEGER const_ts__MI__TMSI__NRI__LV_nri__bitlen_defval;
const INTEGER& ts__MI__TMSI__NRI__LV_nri__bitlen_defval = const_ts__MI__TMSI__NRI__LV_nri__bitlen_defval;
MobileL3__CommonIE__Types::MobileStationClassmark2__LV_template template_ts__CM2;
const MobileL3__CommonIE__Types::MobileStationClassmark2__LV_template& ts__CM2 = template_ts__CM2;
MobileL3__MM__Types::LocationUpdatingType_template template_LU__Type__Normal;
const MobileL3__MM__Types::LocationUpdatingType_template& LU__Type__Normal = template_LU__Type__Normal;
MobileL3__MM__Types::LocationUpdatingType_template template_LU__Type__Periodic;
const MobileL3__MM__Types::LocationUpdatingType_template& LU__Type__Periodic = template_LU__Type__Periodic;
MobileL3__MM__Types::LocationUpdatingType_template template_LU__Type__IMSI__Attach;
const MobileL3__MM__Types::LocationUpdatingType_template& LU__Type__IMSI__Attach = template_LU__Type__IMSI__Attach;
OCTETSTRING_template template_ts__PDPContextStatusTLV_status_defval;
const OCTETSTRING_template& ts__PDPContextStatusTLV_status_defval = template_ts__PDPContextStatusTLV_status_defval;
OCTETSTRING_template template_ts__LU__REQ_mcc__mnc_defval;
const OCTETSTRING_template& ts__LU__REQ_mcc__mnc_defval = template_ts__LU__REQ_mcc__mnc_defval;
MobileL3__CommonIE__Types::MobileIdentityTLV_template template_ts__LU__ACCEPT_mi__tlv_defval;
const MobileL3__CommonIE__Types::MobileIdentityTLV_template& ts__LU__ACCEPT_mi__tlv_defval = template_ts__LU__ACCEPT_mi__tlv_defval;
BITSTRING_template template_tr__MT__simple_discr_defval;
const BITSTRING_template& tr__MT__simple_discr_defval = template_tr__MT__simple_discr_defval;
MobileL3__Types::PDU__ML3__NW__MS_template template_tr__CM__SERV__ACC;
const MobileL3__Types::PDU__ML3__NW__MS_template& tr__CM__SERV__ACC = template_tr__CM__SERV__ACC;
OCTETSTRING_template template_tr__CM__SERV__REJ_rej__cause_defval;
const OCTETSTRING_template& tr__CM__SERV__REJ_rej__cause_defval = template_tr__CM__SERV__REJ_rej__cause_defval;
MobileL3__CommonIE__Types::MobileIdentityLV_template template_tr__PAGING__REQ1_mi1_defval;
const MobileL3__CommonIE__Types::MobileIdentityLV_template& tr__PAGING__REQ1_mi1_defval = template_tr__PAGING__REQ1_mi1_defval;
MobileL3__CommonIE__Types::MobileIdentityTLV_template template_tr__PAGING__REQ1_mi2_defval;
const MobileL3__CommonIE__Types::MobileIdentityTLV_template& tr__PAGING__REQ1_mi2_defval = template_tr__PAGING__REQ1_mi2_defval;
OCTETSTRING_template template_tr__PAGING__REQ2_mi1_defval;
const OCTETSTRING_template& tr__PAGING__REQ2_mi1_defval = template_tr__PAGING__REQ2_mi1_defval;
OCTETSTRING_template template_tr__PAGING__REQ2_mi2_defval;
const OCTETSTRING_template& tr__PAGING__REQ2_mi2_defval = template_tr__PAGING__REQ2_mi2_defval;
MobileL3__CommonIE__Types::MobileIdentityTLV_template template_tr__PAGING__REQ2_mi3_defval;
const MobileL3__CommonIE__Types::MobileIdentityTLV_template& tr__PAGING__REQ2_mi3_defval = template_tr__PAGING__REQ2_mi3_defval;
OCTETSTRING_template template_tr__PAGING__REQ3_mi1_defval;
const OCTETSTRING_template& tr__PAGING__REQ3_mi1_defval = template_tr__PAGING__REQ3_mi1_defval;
OCTETSTRING_template template_tr__PAGING__REQ3_mi2_defval;
const OCTETSTRING_template& tr__PAGING__REQ3_mi2_defval = template_tr__PAGING__REQ3_mi2_defval;
OCTETSTRING_template template_tr__PAGING__REQ3_mi3_defval;
const OCTETSTRING_template& tr__PAGING__REQ3_mi3_defval = template_tr__PAGING__REQ3_mi3_defval;
OCTETSTRING_template template_tr__PAGING__REQ3_mi4_defval;
const OCTETSTRING_template& tr__PAGING__REQ3_mi4_defval = template_tr__PAGING__REQ3_mi4_defval;
BITSTRING_template template_tr__ChannelDescription2__V_timeslotNumber_defval;
const BITSTRING_template& tr__ChannelDescription2__V_timeslotNumber_defval = template_tr__ChannelDescription2__V_timeslotNumber_defval;
BITSTRING_template template_tr__ChannelDescription2__V_channelTypeandTDMAOffset_defval;
const BITSTRING_template& tr__ChannelDescription2__V_channelTypeandTDMAOffset_defval = template_tr__ChannelDescription2__V_channelTypeandTDMAOffset_defval;
BITSTRING_template template_tr__ExtendedTSCSet__TV_cSDomainTSCSet_defval;
const BITSTRING_template& tr__ExtendedTSCSet__TV_cSDomainTSCSet_defval = template_tr__ExtendedTSCSet__TV_cSDomainTSCSet_defval;
MobileL3__RRM__Types::ChannelDescription2__V_template template_tr__RRM__ModeModify_desc_defval;
const MobileL3__RRM__Types::ChannelDescription2__V_template& tr__RRM__ModeModify_desc_defval = template_tr__RRM__ModeModify_desc_defval;
MobileL3__RRM__Types::ChannelMode__V_template template_tr__RRM__ModeModify_mode_defval;
const MobileL3__RRM__Types::ChannelMode__V_template& tr__RRM__ModeModify_mode_defval = template_tr__RRM__ModeModify_mode_defval;
MobileL3__RRM__Types::ExtendedTSCSet__TV_template template_ts__RRM__ModeModifyAck_extendedTSCSet_defval;
const MobileL3__RRM__Types::ExtendedTSCSet__TV_template& ts__RRM__ModeModifyAck_extendedTSCSet_defval = template_ts__RRM__ModeModifyAck_extendedTSCSet_defval;
MobileL3__Types::PDU__ML3__MS__NW_template template_ts__RRM__CiphModeCompl;
const MobileL3__Types::PDU__ML3__MS__NW_template& ts__RRM__CiphModeCompl = template_ts__RRM__CiphModeCompl;
MobileL3__RRM__Types::ChannelDescription2__V_template template_tr__RR__AssignmentCommand_desc_defval;
const MobileL3__RRM__Types::ChannelDescription2__V_template& tr__RR__AssignmentCommand_desc_defval = template_tr__RR__AssignmentCommand_desc_defval;
MobileL3__RRM__Types::ChannelMode__TV_template template_tr__RR__AssignmentCommand_mode_defval;
const MobileL3__RRM__Types::ChannelMode__TV_template& tr__RR__AssignmentCommand_mode_defval = template_tr__RR__AssignmentCommand_mode_defval;
MobileL3__RRM__Types::ExtendedTSCSet__TV_template template_tr__RR__AssignmentCommand_extendedTSCSet_defval;
const MobileL3__RRM__Types::ExtendedTSCSet__TV_template& tr__RR__AssignmentCommand_extendedTSCSet_defval = template_tr__RR__AssignmentCommand_extendedTSCSet_defval;
MobileL3__RRM__Types::APDU__Flags__V_template template_tr__RR__APP__INFO_flags_defval;
const MobileL3__RRM__Types::APDU__Flags__V_template& tr__RR__APP__INFO_flags_defval = template_tr__RR__APP__INFO_flags_defval;
MobileL3__Types::PDU__ML3__NW__MS_template template_ts__RR__HandoverCommand;
const MobileL3__Types::PDU__ML3__NW__MS_template& ts__RR__HandoverCommand = template_ts__RR__HandoverCommand;
MobileL3__Types::PDU__ML3__NW__MS_template template_tr__RR__HandoverCommand;
const MobileL3__Types::PDU__ML3__NW__MS_template& tr__RR__HandoverCommand = template_tr__RR__HandoverCommand;
MobileL3__CommonIE__Types::MobileStationClassmark3__TLV_template template_ts__RRM__CM__CHG_cm3_defval;
const MobileL3__CommonIE__Types::MobileStationClassmark3__TLV_template& ts__RRM__CM__CHG_cm3_defval = template_ts__RRM__CM__CHG_cm3_defval;
MobileL3__Types::PDU__ML3__NW__MS_template template_tr__RRM__CM__ENQUIRY;
const MobileL3__Types::PDU__ML3__NW__MS_template& tr__RRM__CM__ENQUIRY = template_tr__RRM__CM__ENQUIRY;
OCTETSTRING_template template_tr__RRM__RR__STATUS_cause_defval;
const OCTETSTRING_template& tr__RRM__RR__STATUS_cause_defval = template_tr__RRM__RR__STATUS_cause_defval;
OCTETSTRING_template template_tr__RRM__RR__RELEASE_cause_defval;
const OCTETSTRING_template& tr__RRM__RR__RELEASE_cause_defval = template_tr__RRM__RR__RELEASE_cause_defval;
OCTETSTRING_template template_tr__RRM__RR__RELEASE__CellSelectInd_cause_defval;
const OCTETSTRING_template& tr__RRM__RR__RELEASE__CellSelectInd_cause_defval = template_tr__RRM__RR__RELEASE__CellSelectInd_cause_defval;
MobileL3__Types::PDU__ML3__MS__NW_template template_ts__ML3__MO;
const MobileL3__Types::PDU__ML3__MS__NW_template& ts__ML3__MO = template_ts__ML3__MO;
MobileL3__MM__Types::LocationUpdatingType_template template_ts__ML3__IE__LuType;
const MobileL3__MM__Types::LocationUpdatingType_template& ts__ML3__IE__LuType = template_ts__ML3__IE__LuType;
MobileL3__MM__Types::LocationUpdatingType_template template_ts__ML3__IE__LuType__Normal;
const MobileL3__MM__Types::LocationUpdatingType_template& ts__ML3__IE__LuType__Normal = template_ts__ML3__IE__LuType__Normal;
MobileL3__MM__Types::LocationUpdatingType_template template_ts__ML3__IE__LuType__Periodic;
const MobileL3__MM__Types::LocationUpdatingType_template& ts__ML3__IE__LuType__Periodic = template_ts__ML3__IE__LuType__Periodic;
MobileL3__MM__Types::LocationUpdatingType_template template_ts__ML3__IE__LuType__Attach;
const MobileL3__MM__Types::LocationUpdatingType_template& ts__ML3__IE__LuType__Attach = template_ts__ML3__IE__LuType__Attach;
MobileL3__Types::PDU__ML3__MS__NW_template template_ts__ML3__MO__TmsiRealloc__Cmpl;
const MobileL3__Types::PDU__ML3__MS__NW_template& ts__ML3__MO__TmsiRealloc__Cmpl = template_ts__ML3__MO__TmsiRealloc__Cmpl;
MobileL3__Types::PDU__ML3__NW__MS_template template_tr__ML3__MT__LU__Acc;
const MobileL3__Types::PDU__ML3__NW__MS_template& tr__ML3__MT__LU__Acc = template_tr__ML3__MT__LU__Acc;
OCTETSTRING_template template_tr__ML3__MT__LU__Rej_cause_defval;
const OCTETSTRING_template& tr__ML3__MT__LU__Rej_cause_defval = template_tr__ML3__MT__LU__Rej_cause_defval;
CmIdentityType_template template_tr__ML3__MT__MM__ID__Req_id__type_defval;
const CmIdentityType_template& tr__ML3__MT__MM__ID__Req_id__type_defval = template_tr__ML3__MT__MM__ID__Req_id__type_defval;
BITSTRING const_ts__CM1_a5__1__unavail_defval;
const BITSTRING& ts__CM1_a5__1__unavail_defval = const_ts__CM1_a5__1__unavail_defval;
BITSTRING const_ts__CM1_rev_defval;
const BITSTRING& ts__CM1_rev_defval = const_ts__CM1_rev_defval;
BITSTRING const_ts__CM1_esind_defval;
const BITSTRING& ts__CM1_esind_defval = const_ts__CM1_esind_defval;
MobileL3__CommonIE__Types::MobileStationClassmark1__V_template template_ts__ML3__MO__MM__IMSI__DET__Ind_cm1_defval;
const MobileL3__CommonIE__Types::MobileStationClassmark1__V_template& ts__ML3__MO__MM__IMSI__DET__Ind_cm1_defval = template_ts__ML3__MO__MM__IMSI__DET__Ind_cm1_defval;
const XERdescriptor_t       SpeechVer_xer_ = { {"SpeechVer>\n", "SpeechVer>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SpeechVer_descr_ = { "@L3_Templates.SpeechVer", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &SpeechVer_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
MobileL3__CC__Types::BearerCapability__TLV_template template_ts__Bcap__voice;
const MobileL3__CC__Types::BearerCapability__TLV_template& ts__Bcap__voice = template_ts__Bcap__voice;
MobileL3__CC__Types::BearerCapability__TLV_template template_ts__Bcap__voice__mt;
const MobileL3__CC__Types::BearerCapability__TLV_template& ts__Bcap__voice__mt = template_ts__Bcap__voice__mt;
MobileL3__CC__Types::BearerCapability__TLV_template template_ts__Bcap__csd;
const MobileL3__CC__Types::BearerCapability__TLV_template& ts__Bcap__csd = template_ts__Bcap__csd;
MobileL3__CC__Types::BearerCapability__TLV_template template_ts__ML3__MO__CC__SETUP_bcap_defval;
const MobileL3__CC__Types::BearerCapability__TLV_template& ts__ML3__MO__CC__SETUP_bcap_defval = template_ts__ML3__MO__CC__SETUP_bcap_defval;
MobileL3__CC__Types::BearerCapability__TLV_template template_ts__ML3__MO__CC__EMERG__SETUP_bcap_defval;
const MobileL3__CC__Types::BearerCapability__TLV_template& ts__ML3__MO__CC__EMERG__SETUP_bcap_defval = template_ts__ML3__MO__CC__EMERG__SETUP_bcap_defval;
BITSTRING const_ts__ML3__MO__CC__REL__COMPL_tid__remote_defval;
const BITSTRING& ts__ML3__MO__CC__REL__COMPL_tid__remote_defval = const_ts__ML3__MO__CC__REL__COMPL_tid__remote_defval;
OCTETSTRING_template template_tr__ML3__MT__MM__AUTH__REQ_rand_defval;
const OCTETSTRING_template& tr__ML3__MT__MM__AUTH__REQ_rand_defval = template_tr__ML3__MT__MM__AUTH__REQ_rand_defval;
OCTETSTRING_template template_tr__ML3__MT__MM__AUTH__REQ__3G_rand_defval;
const OCTETSTRING_template& tr__ML3__MT__MM__AUTH__REQ__3G_rand_defval = template_tr__ML3__MT__MM__AUTH__REQ__3G_rand_defval;
MobileL3__CC__Types::BearerCapability__TLV_template template_ts__ML3__MO__CC__CALL__CONF_bcap_defval;
const MobileL3__CC__Types::BearerCapability__TLV_template& ts__ML3__MO__CC__CALL__CONF_bcap_defval = template_ts__ML3__MO__CC__CALL__CONF_bcap_defval;
HEXSTRING_template template_tr__ML3__MT__CC__SETUP_called_defval;
const HEXSTRING_template& tr__ML3__MT__CC__SETUP_called_defval = template_tr__ML3__MT__CC__SETUP_called_defval;
HEXSTRING_template template_tr__ML3__MT__CC__SETUP_calling_defval;
const HEXSTRING_template& tr__ML3__MT__CC__SETUP_calling_defval = template_tr__ML3__MT__CC__SETUP_calling_defval;
MobileL3__CC__Types::BearerCapability__TLV_template template_tr__ML3__MT__CC__SETUP_bcap_defval;
const MobileL3__CC__Types::BearerCapability__TLV_template& tr__ML3__MT__CC__SETUP_bcap_defval = template_tr__ML3__MT__CC__SETUP_bcap_defval;
MobileL3__CommonIE__Types::SS__VersionIndicator_template template_ts__ML3__MO__SS__REGISTER_ss__ver_defval;
const MobileL3__CommonIE__Types::SS__VersionIndicator_template& ts__ML3__MO__SS__REGISTER_ss__ver_defval = template_ts__ML3__MO__SS__REGISTER_ss__ver_defval;
MobileL3__CommonIE__Types::SS__VersionIndicator_template template_tr__ML3__MO__SS__REGISTER_ss__ver_defval;
const MobileL3__CommonIE__Types::SS__VersionIndicator_template& tr__ML3__MO__SS__REGISTER_ss__ver_defval = template_tr__ML3__MO__SS__REGISTER_ss__ver_defval;
MobileL3__CommonIE__Types::ML3__Cause__TLV_template template_ts__ML3__MO__SS__RELEASE__COMPLETE_cause_defval;
const MobileL3__CommonIE__Types::ML3__Cause__TLV_template& ts__ML3__MO__SS__RELEASE__COMPLETE_cause_defval = template_ts__ML3__MO__SS__RELEASE__COMPLETE_cause_defval;
OCTETSTRING_template template_ts__ML3__MO__SS__RELEASE__COMPLETE_facility_defval;
const OCTETSTRING_template& ts__ML3__MO__SS__RELEASE__COMPLETE_facility_defval = template_ts__ML3__MO__SS__RELEASE__COMPLETE_facility_defval;
MobileL3__CommonIE__Types::ML3__Cause__TLV_template template_tr__ML3__MO__SS__RELEASE__COMPLETE_cause_defval;
const MobileL3__CommonIE__Types::ML3__Cause__TLV_template& tr__ML3__MO__SS__RELEASE__COMPLETE_cause_defval = template_tr__ML3__MO__SS__RELEASE__COMPLETE_cause_defval;
OCTETSTRING_template template_tr__ML3__MO__SS__RELEASE__COMPLETE_facility_defval;
const OCTETSTRING_template& tr__ML3__MO__SS__RELEASE__COMPLETE_facility_defval = template_tr__ML3__MO__SS__RELEASE__COMPLETE_facility_defval;
MobileL3__CommonIE__Types::ML3__Cause__TLV_template template_ts__ML3__MT__SS__RELEASE__COMPLETE_cause_defval;
const MobileL3__CommonIE__Types::ML3__Cause__TLV_template& ts__ML3__MT__SS__RELEASE__COMPLETE_cause_defval = template_ts__ML3__MT__SS__RELEASE__COMPLETE_cause_defval;
OCTETSTRING_template template_ts__ML3__MT__SS__RELEASE__COMPLETE_facility_defval;
const OCTETSTRING_template& ts__ML3__MT__SS__RELEASE__COMPLETE_facility_defval = template_ts__ML3__MT__SS__RELEASE__COMPLETE_facility_defval;
MobileL3__CommonIE__Types::ML3__Cause__TLV_template template_tr__ML3__MT__SS__RELEASE__COMPLETE_cause_defval;
const MobileL3__CommonIE__Types::ML3__Cause__TLV_template& tr__ML3__MT__SS__RELEASE__COMPLETE_cause_defval = template_tr__ML3__MT__SS__RELEASE__COMPLETE_cause_defval;
OCTETSTRING_template template_tr__ML3__MT__SS__RELEASE__COMPLETE_facility_defval;
const OCTETSTRING_template& tr__ML3__MT__SS__RELEASE__COMPLETE_facility_defval = template_tr__ML3__MT__SS__RELEASE__COMPLETE_facility_defval;
MobileL3__GMM__SM__Types::MSNetworkCapabilityV_template template_ts__GMM__MsNetCapV;
const MobileL3__GMM__SM__Types::MSNetworkCapabilityV_template& ts__GMM__MsNetCapV = template_ts__GMM__MsNetCapV;
MobileL3__GMM__SM__Types::MSNetworkCapabilityLV_template template_ts__GMM__MsNetCapLV;
const MobileL3__GMM__SM__Types::MSNetworkCapabilityLV_template& ts__GMM__MsNetCapLV = template_ts__GMM__MsNetCapLV;
// No XER for GprsAttachType
const TTCN_Typedescriptor_t GprsAttachType_descr_ = { "@L3_Templates.GprsAttachType", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
BOOLEAN const_ts__GMM__AttachType_combined_defval;
const BOOLEAN& ts__GMM__AttachType_combined_defval = const_ts__GMM__AttachType_combined_defval;
BOOLEAN const_ts__GMM__AttachType_follow__on__pending_defval;
const BOOLEAN& ts__GMM__AttachType_follow__on__pending_defval = const_ts__GMM__AttachType_follow__on__pending_defval;
// No XER for GprsUpdateType
const TTCN_Typedescriptor_t GprsUpdateType_descr_ = { "@L3_Templates.GprsUpdateType", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
BOOLEAN const_ts__GMM__UpdateType_combined_defval;
const BOOLEAN& ts__GMM__UpdateType_combined_defval = const_ts__GMM__UpdateType_combined_defval;
BOOLEAN const_ts__GMM__UpdateType_follow__on__pending_defval;
const BOOLEAN& ts__GMM__UpdateType_follow__on__pending_defval = const_ts__GMM__UpdateType_follow__on__pending_defval;
MobileL3__GMM__SM__Types::DRXParameterV_template template_ts__DrxParameterV;
const MobileL3__GMM__SM__Types::DRXParameterV_template& ts__DrxParameterV = template_ts__DrxParameterV;
MobileL3__GMM__SM__Types::A5BITS_template template_ts__a5bits__a51a53;
const MobileL3__GMM__SM__Types::A5BITS_template& ts__a5bits__a51a53 = template_ts__a5bits__a51a53;
BITSTRING const_ts__RaCapRec_att_defval;
const BITSTRING& ts__RaCapRec_att_defval = const_ts__RaCapRec_att_defval;
MobileL3__GMM__SM__Types::MultislotCap__GPRS_template template_ts__RaCapRec_mscap__gprs_defval;
const MobileL3__GMM__SM__Types::MultislotCap__GPRS_template& ts__RaCapRec_mscap__gprs_defval = template_ts__RaCapRec_mscap__gprs_defval;
MobileL3__GMM__SM__Types::MultislotCap__EGPRS_template template_ts__RaCapRec_mscap__egprs_defval;
const MobileL3__GMM__SM__Types::MultislotCap__EGPRS_template& ts__RaCapRec_mscap__egprs_defval = template_ts__RaCapRec_mscap__egprs_defval;
MobileL3__GMM__SM__Types::MSRadioAccessCapabilityLV_template template_ts__MS__RaCapa;
const MobileL3__GMM__SM__Types::MSRadioAccessCapabilityLV_template& ts__MS__RaCapa = template_ts__MS__RaCapa;
BOOLEAN const_ts__GMM__ATTACH__REQ_combined_defval;
const BOOLEAN& ts__GMM__ATTACH__REQ_combined_defval = const_ts__GMM__ATTACH__REQ_combined_defval;
BOOLEAN const_ts__GMM__ATTACH__REQ_follow__on__pending_defval;
const BOOLEAN& ts__GMM__ATTACH__REQ_follow__on__pending_defval = const_ts__GMM__ATTACH__REQ_follow__on__pending_defval;
MobileL3__CommonIE__Types::MobileStationClassmark2__TLV_template template_ts__GMM__ATTACH__REQ_cm2__tlv_defval;
const MobileL3__CommonIE__Types::MobileStationClassmark2__TLV_template& ts__GMM__ATTACH__REQ_cm2__tlv_defval = template_ts__GMM__ATTACH__REQ_cm2__tlv_defval;
MobileL3__CommonIE__Types::MobileStationClassmark3__TLV_template template_ts__GMM__ATTACH__REQ_cm3__tlv_defval;
const MobileL3__CommonIE__Types::MobileStationClassmark3__TLV_template& ts__GMM__ATTACH__REQ_cm3__tlv_defval = template_ts__GMM__ATTACH__REQ_cm3__tlv_defval;
MobileL3__GMM__SM__Types::NetworkResourceIdentifierContainerTLV_template template_ts__GMM__ATTACH__REQ_nri_defval;
const MobileL3__GMM__SM__Types::NetworkResourceIdentifierContainerTLV_template& ts__GMM__ATTACH__REQ_nri_defval = template_ts__GMM__ATTACH__REQ_nri_defval;
MobileL3__GMM__SM__Types::P__TMSISignatureTV_template template_ts__GMM__ATTACH__REQ_p__tmsi__sig_defval;
const MobileL3__GMM__SM__Types::P__TMSISignatureTV_template& ts__GMM__ATTACH__REQ_p__tmsi__sig_defval = template_ts__GMM__ATTACH__REQ_p__tmsi__sig_defval;
MobileL3__CommonIE__Types::P__TMSI__TypeTV_template template_ts__GMM__ATTACH__REQ_p__tmsi__type_defval;
const MobileL3__CommonIE__Types::P__TMSI__TypeTV_template& ts__GMM__ATTACH__REQ_p__tmsi__type_defval = template_ts__GMM__ATTACH__REQ_p__tmsi__type_defval;
MobileL3__CommonIE__Types::MobileIdentityTLV_template template_ts__GMM__ATTACH__REQ_add__p__tmsi_defval;
const MobileL3__CommonIE__Types::MobileIdentityTLV_template& ts__GMM__ATTACH__REQ_add__p__tmsi_defval = template_ts__GMM__ATTACH__REQ_add__p__tmsi_defval;
MobileL3__CommonIE__Types::RoutingAreaIdentification2TLV_template template_ts__GMM__ATTACH__REQ_add__rai_defval;
const MobileL3__CommonIE__Types::RoutingAreaIdentification2TLV_template& ts__GMM__ATTACH__REQ_add__rai_defval = template_ts__GMM__ATTACH__REQ_add__rai_defval;
BITSTRING_template template_tr__GMM__ATTACH__ACCEPT_res_defval;
const BITSTRING_template& tr__GMM__ATTACH__ACCEPT_res_defval = template_tr__GMM__ATTACH__ACCEPT_res_defval;
MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_template template_tr__GMM__ATTACH__ACCEPT_ra_defval;
const MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_template& tr__GMM__ATTACH__ACCEPT_ra_defval = template_tr__GMM__ATTACH__ACCEPT_ra_defval;
OCTETSTRING_template template_tr__GMM__ATTACH__ACCEPT_ptmsi_defval;
const OCTETSTRING_template& tr__GMM__ATTACH__ACCEPT_ptmsi_defval = template_tr__GMM__ATTACH__ACCEPT_ptmsi_defval;
MobileL3__Types::PDU__L3__MS__SGSN_template template_ts__GMM__ATTACH__COMPL;
const MobileL3__Types::PDU__L3__MS__SGSN_template& ts__GMM__ATTACH__COMPL = template_ts__GMM__ATTACH__COMPL;
BOOLEAN const_ts__GMM__RAU__REQ_follow__on__pending_defval;
const BOOLEAN& ts__GMM__RAU__REQ_follow__on__pending_defval = const_ts__GMM__RAU__REQ_follow__on__pending_defval;
MobileL3__CommonIE__Types::MobileStationClassmark2__TLV_template template_ts__GMM__RAU__REQ_cm2__tlv_defval;
const MobileL3__CommonIE__Types::MobileStationClassmark2__TLV_template& ts__GMM__RAU__REQ_cm2__tlv_defval = template_ts__GMM__RAU__REQ_cm2__tlv_defval;
MobileL3__CommonIE__Types::MobileStationClassmark3__TLV_template template_ts__GMM__RAU__REQ_cm3__tlv_defval;
const MobileL3__CommonIE__Types::MobileStationClassmark3__TLV_template& ts__GMM__RAU__REQ_cm3__tlv_defval = template_ts__GMM__RAU__REQ_cm3__tlv_defval;
OCTETSTRING_template template_ts__GMM__RAU__REQ_p__tmsi_defval;
const OCTETSTRING_template& ts__GMM__RAU__REQ_p__tmsi_defval = template_ts__GMM__RAU__REQ_p__tmsi_defval;
MobileL3__GMM__SM__Types::NetworkResourceIdentifierContainerTLV_template template_ts__GMM__RAU__REQ_nri_defval;
const MobileL3__GMM__SM__Types::NetworkResourceIdentifierContainerTLV_template& ts__GMM__RAU__REQ_nri_defval = template_ts__GMM__RAU__REQ_nri_defval;
MobileL3__GMM__SM__Types::P__TMSISignatureTV_template template_ts__GMM__RAU__REQ_p__tmsi__sig_defval;
const MobileL3__GMM__SM__Types::P__TMSISignatureTV_template& ts__GMM__RAU__REQ_p__tmsi__sig_defval = template_ts__GMM__RAU__REQ_p__tmsi__sig_defval;
MobileL3__CommonIE__Types::P__TMSI__TypeTV_template template_ts__GMM__RAU__REQ_p__tmsi__type_defval;
const MobileL3__CommonIE__Types::P__TMSI__TypeTV_template& ts__GMM__RAU__REQ_p__tmsi__type_defval = template_ts__GMM__RAU__REQ_p__tmsi__type_defval;
MobileL3__CommonIE__Types::MobileIdentityTLV_template template_ts__GMM__RAU__REQ_add__p__tmsi_defval;
const MobileL3__CommonIE__Types::MobileIdentityTLV_template& ts__GMM__RAU__REQ_add__p__tmsi_defval = template_ts__GMM__RAU__REQ_add__p__tmsi_defval;
MobileL3__CommonIE__Types::RoutingAreaIdentification2TLV_template template_ts__GMM__RAU__REQ_add__rai_defval;
const MobileL3__CommonIE__Types::RoutingAreaIdentification2TLV_template& ts__GMM__RAU__REQ_add__rai_defval = template_ts__GMM__RAU__REQ_add__rai_defval;
MobileL3__GMM__SM__Types::MSNetworkCapabilityV_template template_ts__GMM__RAU__REQ_ms__network__cap_defval;
const MobileL3__GMM__SM__Types::MSNetworkCapabilityV_template& ts__GMM__RAU__REQ_ms__network__cap_defval = template_ts__GMM__RAU__REQ_ms__network__cap_defval;
OCTETSTRING_template template_tr__GMM__RAU__REJECT_cause_defval;
const OCTETSTRING_template& tr__GMM__RAU__REJECT_cause_defval = template_tr__GMM__RAU__REJECT_cause_defval;
BITSTRING_template template_tr__GMM__RAU__ACCEPT_res_defval;
const BITSTRING_template& tr__GMM__RAU__ACCEPT_res_defval = template_tr__GMM__RAU__ACCEPT_res_defval;
MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_template template_tr__GMM__RAU__ACCEPT_ra_defval;
const MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_template& tr__GMM__RAU__ACCEPT_ra_defval = template_tr__GMM__RAU__ACCEPT_ra_defval;
OCTETSTRING_template template_tr__GMM__RAU__ACCEPT_ptmsi_defval;
const OCTETSTRING_template& tr__GMM__RAU__ACCEPT_ptmsi_defval = template_tr__GMM__RAU__ACCEPT_ptmsi_defval;
MobileL3__Types::PDU__L3__MS__SGSN_template template_ts__GMM__RAU__COMPL;
const MobileL3__Types::PDU__L3__MS__SGSN_template& ts__GMM__RAU__COMPL = template_ts__GMM__RAU__COMPL;
MobileL3__Types::PDU__L3__MS__SGSN_template template_ts__GMM__PTMSI__REALL__COMPL;
const MobileL3__Types::PDU__L3__MS__SGSN_template& ts__GMM__PTMSI__REALL__COMPL = template_ts__GMM__PTMSI__REALL__COMPL;
BITSTRING_template template_tr__GMM__ID__REQ_id__type_defval;
const BITSTRING_template& tr__GMM__ID__REQ_id__type_defval = template_tr__GMM__ID__REQ_id__type_defval;
OCTETSTRING_template template_tr__GMM__AUTH__REQ_rand_defval;
const OCTETSTRING_template& tr__GMM__AUTH__REQ_rand_defval = template_tr__GMM__AUTH__REQ_rand_defval;
BITSTRING_template template_tr__GMM__AUTH__REQ_ciph__alg_defval;
const BITSTRING_template& tr__GMM__AUTH__REQ_ciph__alg_defval = template_tr__GMM__AUTH__REQ_ciph__alg_defval;
BITSTRING const_c__GMM__DTT__MO__GPRS;
const BITSTRING& c__GMM__DTT__MO__GPRS = const_c__GMM__DTT__MO__GPRS;
BITSTRING const_c__GMM__DTT__MO__IMSI;
const BITSTRING& c__GMM__DTT__MO__IMSI = const_c__GMM__DTT__MO__IMSI;
BITSTRING const_c__GMM__DTT__MO__GPRS__IMSI__COMBINED;
const BITSTRING& c__GMM__DTT__MO__GPRS__IMSI__COMBINED = const_c__GMM__DTT__MO__GPRS__IMSI__COMBINED;
BITSTRING const_c__GMM__DTT__MT__REATTACH__REQUIRED;
const BITSTRING& c__GMM__DTT__MT__REATTACH__REQUIRED = const_c__GMM__DTT__MT__REATTACH__REQUIRED;
BITSTRING const_c__GMM__DTT__MT__REATTACH__NOT__REQUIRED;
const BITSTRING& c__GMM__DTT__MT__REATTACH__NOT__REQUIRED = const_c__GMM__DTT__MT__REATTACH__NOT__REQUIRED;
BITSTRING const_c__GMM__DTT__MT__IMSI__DETACH;
const BITSTRING& c__GMM__DTT__MT__IMSI__DETACH = const_c__GMM__DTT__MT__IMSI__DETACH;
BOOLEAN const_ts__GMM__DetType_power__off_defval;
const BOOLEAN& ts__GMM__DetType_power__off_defval = const_ts__GMM__DetType_power__off_defval;
BITSTRING const_c__GMM__PMTSI__TYPE__NATIVE;
const BITSTRING& c__GMM__PMTSI__TYPE__NATIVE = const_c__GMM__PMTSI__TYPE__NATIVE;
BITSTRING const_c__GMM__PMTSI__TYPE__MAPPED;
const BITSTRING& c__GMM__PMTSI__TYPE__MAPPED = const_c__GMM__PMTSI__TYPE__MAPPED;
BITSTRING const_ts__GMM__DET__REQ__MO_dtt_defval;
const BITSTRING& ts__GMM__DET__REQ__MO_dtt_defval = const_ts__GMM__DET__REQ__MO_dtt_defval;
BOOLEAN const_ts__GMM__DET__REQ__MO_power__off_defval;
const BOOLEAN& ts__GMM__DET__REQ__MO_power__off_defval = const_ts__GMM__DET__REQ__MO_power__off_defval;
OCTETSTRING_template template_ts__GMM__DET__REQ__MO_p__tmsi_defval;
const OCTETSTRING_template& ts__GMM__DET__REQ__MO_p__tmsi_defval = template_ts__GMM__DET__REQ__MO_p__tmsi_defval;
OCTETSTRING_template template_ts__GMM__DET__REQ__MO_p__tmsi__sig_defval;
const OCTETSTRING_template& ts__GMM__DET__REQ__MO_p__tmsi__sig_defval = template_ts__GMM__DET__REQ__MO_p__tmsi__sig_defval;
BITSTRING const_ts__GMM__DET__REQ__MO__mi_dtt_defval;
const BITSTRING& ts__GMM__DET__REQ__MO__mi_dtt_defval = const_ts__GMM__DET__REQ__MO__mi_dtt_defval;
BOOLEAN const_ts__GMM__DET__REQ__MO__mi_power__off_defval;
const BOOLEAN& ts__GMM__DET__REQ__MO__mi_power__off_defval = const_ts__GMM__DET__REQ__MO__mi_power__off_defval;
OCTETSTRING_template template_ts__GMM__DET__REQ__MO__mi_p__tmsi__sig_defval;
const OCTETSTRING_template& ts__GMM__DET__REQ__MO__mi_p__tmsi__sig_defval = template_ts__GMM__DET__REQ__MO__mi_p__tmsi__sig_defval;
MobileL3__Types::PDU__L3__SGSN__MS_template template_tr__GMM__DET__ACCEPT__MT;
const MobileL3__Types::PDU__L3__SGSN__MS_template& tr__GMM__DET__ACCEPT__MT = template_tr__GMM__DET__ACCEPT__MT;
BITSTRING_template template_tr__GMM__DET__REQ__MT_dtt_defval;
const BITSTRING_template& tr__GMM__DET__REQ__MT_dtt_defval = template_tr__GMM__DET__REQ__MT_dtt_defval;
BITSTRING_template template_tr__GMM__DET__REQ__MT_forceToStandby_defval;
const BITSTRING_template& tr__GMM__DET__REQ__MT_forceToStandby_defval = template_tr__GMM__DET__REQ__MT_forceToStandby_defval;
OCTETSTRING_template template_tr__GMM__DET__REQ__MT_cause_defval;
const OCTETSTRING_template& tr__GMM__DET__REQ__MT_cause_defval = template_tr__GMM__DET__REQ__MT_cause_defval;
BITSTRING_template template_tr__ServiceTypeV_serviceType_defval;
const BITSTRING_template& tr__ServiceTypeV_serviceType_defval = template_tr__ServiceTypeV_serviceType_defval;
INTEGER_template template_ts__GMM__SERVICE__REQ_cksn_defval;
const INTEGER_template& ts__GMM__SERVICE__REQ_cksn_defval = template_ts__GMM__SERVICE__REQ_cksn_defval;
OCTETSTRING_template template_ts__GMM__SERVICE__REQ_pdp__status_defval;
const OCTETSTRING_template& ts__GMM__SERVICE__REQ_pdp__status_defval = template_ts__GMM__SERVICE__REQ_pdp__status_defval;
MobileL3__GMM__SM__Types::PDPContextStatusTLV_template template_tr__GMM__SERVICE__ACC_pdp__status_defval;
const MobileL3__GMM__SM__Types::PDPContextStatusTLV_template& tr__GMM__SERVICE__ACC_pdp__status_defval = template_tr__GMM__SERVICE__ACC_pdp__status_defval;
MobileL3__GMM__SM__Types::GMM__CauseV_template template_tr__GMM__SERVICE__REJ_gmmCause_defval;
const MobileL3__GMM__SM__Types::GMM__CauseV_template& tr__GMM__SERVICE__REJ_gmmCause_defval = template_tr__GMM__SERVICE__REJ_gmmCause_defval;
MobileL3__GMM__SM__Types::GPRSTimer2TLV_template template_tr__GMM__SERVICE__REJ_t3346_defval;
const MobileL3__GMM__SM__Types::GPRSTimer2TLV_template& tr__GMM__SERVICE__REJ_t3346_defval = template_tr__GMM__SERVICE__REJ_t3346_defval;
MobileL3__Types::PDU__L3__MS__SGSN_template template_ts__GMM__DET__ACCEPT__MO;
const MobileL3__Types::PDU__L3__MS__SGSN_template& ts__GMM__DET__ACCEPT__MO = template_ts__GMM__DET__ACCEPT__MO;
OCTETSTRING_template template_ts__SM__ACT__PDP__REQ_apn_defval;
const OCTETSTRING_template& ts__SM__ACT__PDP__REQ_apn_defval = template_ts__SM__ACT__PDP__REQ_apn_defval;
MobileL3__GMM__SM__Types::ProtocolConfigOptionsV_template template_ts__SM__ACT__PDP__REQ_pco_defval;
const MobileL3__GMM__SM__Types::ProtocolConfigOptionsV_template& ts__SM__ACT__PDP__REQ_pco_defval = template_ts__SM__ACT__PDP__REQ_pco_defval;
BITSTRING_template template_tr__SM__ACT__PDP__REJ_tid_defval;
const BITSTRING_template& tr__SM__ACT__PDP__REJ_tid_defval = template_tr__SM__ACT__PDP__REJ_tid_defval;
OCTETSTRING_template template_tr__SM__ACT__PDP__REJ_cause_defval;
const OCTETSTRING_template& tr__SM__ACT__PDP__REJ_cause_defval = template_tr__SM__ACT__PDP__REJ_cause_defval;
BITSTRING_template template_tr__SM__ACT__PDP__ACCEPT_tid_defval;
const BITSTRING_template& tr__SM__ACT__PDP__ACCEPT_tid_defval = template_tr__SM__ACT__PDP__ACCEPT_tid_defval;
BITSTRING_template template_tr__SM__ACT__PDP__ACCEPT_sapi_defval;
const BITSTRING_template& tr__SM__ACT__PDP__ACCEPT_sapi_defval = template_tr__SM__ACT__PDP__ACCEPT_sapi_defval;
MobileL3__GMM__SM__Types::QoSV_template template_tr__SM__ACT__PDP__ACCEPT_qos_defval;
const MobileL3__GMM__SM__Types::QoSV_template& tr__SM__ACT__PDP__ACCEPT_qos_defval = template_tr__SM__ACT__PDP__ACCEPT_qos_defval;
BOOLEAN_template template_ts__SM__DEACT__PDP__REQ__MO_tdown_defval;
const BOOLEAN_template& ts__SM__DEACT__PDP__REQ__MO_tdown_defval = template_ts__SM__DEACT__PDP__REQ__MO_tdown_defval;
MobileL3__GMM__SM__Types::ProtocolConfigOptionsV_template template_ts__SM__DEACT__PDP__REQ__MO_pco_defval;
const MobileL3__GMM__SM__Types::ProtocolConfigOptionsV_template& ts__SM__DEACT__PDP__REQ__MO_pco_defval = template_ts__SM__DEACT__PDP__REQ__MO_pco_defval;
BOOLEAN_template template_ts__SM__DEACT__PDP__REQ__MT_tdown_defval;
const BOOLEAN_template& ts__SM__DEACT__PDP__REQ__MT_tdown_defval = template_ts__SM__DEACT__PDP__REQ__MT_tdown_defval;
MobileL3__GMM__SM__Types::ProtocolConfigOptionsV_template template_ts__SM__DEACT__PDP__REQ__MT_pco_defval;
const MobileL3__GMM__SM__Types::ProtocolConfigOptionsV_template& ts__SM__DEACT__PDP__REQ__MT_pco_defval = template_ts__SM__DEACT__PDP__REQ__MT_pco_defval;
BOOLEAN_template template_tr__SM__DEACT__PDP__REQ__MT_tdown_defval;
const BOOLEAN_template& tr__SM__DEACT__PDP__REQ__MT_tdown_defval = template_tr__SM__DEACT__PDP__REQ__MT_tdown_defval;
MobileL3__GMM__SM__Types::ProtocolConfigOptionsV_template template_tr__SM__DEACT__PDP__REQ__MT_pco_defval;
const MobileL3__GMM__SM__Types::ProtocolConfigOptionsV_template& tr__SM__DEACT__PDP__REQ__MT_pco_defval = template_tr__SM__DEACT__PDP__REQ__MT_pco_defval;
BITSTRING_template template_tr__SM__DEACT__PDP__ACCEPT__MT_tid_defval;
const BITSTRING_template& tr__SM__DEACT__PDP__ACCEPT__MT_tid_defval = template_tr__SM__DEACT__PDP__ACCEPT__MT_tid_defval;
BITSTRING_template template_tr__SM__DEACT__PDP__ACCEPT__MO_tid_defval;
const BITSTRING_template& tr__SM__DEACT__PDP__ACCEPT__MO_tid_defval = template_tr__SM__DEACT__PDP__ACCEPT__MO_tid_defval;
MobileL3__SMS__Types::TP__OA_template template_tr__SMS__DELIVER_src__addr_defval;
const MobileL3__SMS__Types::TP__OA_template& tr__SMS__DELIVER_src__addr_defval = template_tr__SMS__DELIVER_src__addr_defval;
OCTETSTRING_template template_tr__SMS__DELIVER_user__data_defval;
const OCTETSTRING_template& tr__SMS__DELIVER_user__data_defval = template_tr__SMS__DELIVER_user__data_defval;
OCTETSTRING_template template_tr__SMS__DELIVER_pid_defval;
const OCTETSTRING_template& tr__SMS__DELIVER_pid_defval = template_tr__SMS__DELIVER_pid_defval;
OCTETSTRING_template template_tr__SMS__DELIVER_dcs_defval;
const OCTETSTRING_template& tr__SMS__DELIVER_dcs_defval = template_tr__SMS__DELIVER_dcs_defval;
BITSTRING_template template_tr__SMS__DELIVER_mms_defval;
const BITSTRING_template& tr__SMS__DELIVER_mms_defval = template_tr__SMS__DELIVER_mms_defval;
MobileL3__SMS__Types::L3__SMS__MS__SGSN_template template_ts__CP__ACK__MO;
const MobileL3__SMS__Types::L3__SMS__MS__SGSN_template& ts__CP__ACK__MO = template_ts__CP__ACK__MO;
MobileL3__SMS__Types::L3__SMS__SGSN__MS_template template_tr__CP__ACK__MT;
const MobileL3__SMS__Types::L3__SMS__SGSN__MS_template& tr__CP__ACK__MT = template_tr__CP__ACK__MT;
MobileL3__Types::PDU__ML3__NW__MS_template template_tr__ML3__MT__MM__Info;
const MobileL3__Types::PDU__ML3__NW__MS_template& tr__ML3__MT__MM__Info = template_tr__ML3__MT__MM__Info;
OCTETSTRING_template template_ts__RRM__PhysicalInfo_ta_defval;
const OCTETSTRING_template& ts__RRM__PhysicalInfo_ta_defval = template_ts__RRM__PhysicalInfo_ta_defval;
OCTETSTRING_template template_tr__RRM__PhysicalInfo_ta_defval;
const OCTETSTRING_template& tr__RRM__PhysicalInfo_ta_defval = template_tr__RRM__PhysicalInfo_ta_defval;
OCTETSTRING_template template_tr__ML3__MT__BCC_bcc_defval;
const OCTETSTRING_template& tr__ML3__MT__BCC_bcc_defval = template_tr__ML3__MT__BCC_bcc_defval;
OCTETSTRING_template template_tr__ML3__MT__GCC_gcc_defval;
const OCTETSTRING_template& tr__ML3__MT__GCC_gcc_defval = template_tr__ML3__MT__GCC_gcc_defval;
TTCN_Module module_object("L3_Templates", __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 */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

const char *CmServiceType::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case CM__TYPE__MO__CALL: return "CM_TYPE_MO_CALL";
case CM__TYPE__EMERG__CALL: return "CM_TYPE_EMERG_CALL";
case CM__TYPE__MO__SMS: return "CM_TYPE_MO_SMS";
case CM__TYPE__SS__ACT: return "CM_TYPE_SS_ACT";
case CM__TYPE__VGCS: return "CM_TYPE_VGCS";
case CM__TYPE__VBS: return "CM_TYPE_VBS";
case CM__TYPE__LCS: return "CM_TYPE_LCS";
default:
return "<unknown>";
}
}

CmServiceType::enum_type CmServiceType::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, "CM_TYPE_MO_CALL")) return CM__TYPE__MO__CALL;
if (!strcmp(str_par, "CM_TYPE_EMERG_CALL")) return CM__TYPE__EMERG__CALL;
if (!strcmp(str_par, "CM_TYPE_MO_SMS")) return CM__TYPE__MO__SMS;
if (!strcmp(str_par, "CM_TYPE_SS_ACT")) return CM__TYPE__SS__ACT;
if (!strcmp(str_par, "CM_TYPE_VGCS")) return CM__TYPE__VGCS;
if (!strcmp(str_par, "CM_TYPE_VBS")) return CM__TYPE__VBS;
if (!strcmp(str_par, "CM_TYPE_LCS")) return CM__TYPE__LCS;
}
return UNKNOWN_VALUE;
}

boolean CmServiceType::is_valid_enum(int int_par)
{
switch (int_par) {
case 1:
case 2:
case 4:
case 8:
case 9:
case 10:
case 11:
return TRUE;
default:
return FALSE;
}
}

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

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

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

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

void CmServiceType::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 CmServiceType::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", "@L3_Templates.CmServiceType");
  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 @L3_Templates.CmServiceType.");
  }
}

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

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

void CmServiceType_template::copy_template(const CmServiceType_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 CmServiceType_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 CmServiceType_template(*other_value.implication_.precondition);
implication_.implied_template = new CmServiceType_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 @L3_Templates.CmServiceType.");
}
}

CmServiceType_template::CmServiceType_template()
{
}

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

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

CmServiceType_template::CmServiceType_template(CmServiceType::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean CmServiceType_template::match(CmServiceType::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 @L3_Templates.CmServiceType.");
}
return FALSE;
}

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

CmServiceType::enum_type CmServiceType_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 @L3_Templates.CmServiceType.");
return single_value;
}

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

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

void CmServiceType_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(CmServiceType::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 CmServiceType_template::log_match(const CmServiceType& 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 CmServiceType_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 @L3_Templates.CmServiceType.");
}
}

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

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

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

void CmServiceType_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 : "@L3_Templates.CmServiceType");
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

const char *CmIdentityType::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case CM__ID__TYPE__IMSI: return "CM_ID_TYPE_IMSI";
case CM__ID__TYPE__IMEI: return "CM_ID_TYPE_IMEI";
case CM__ID__TYPE__IMEISV: return "CM_ID_TYPE_IMEISV";
case CM__ID__TYPE__TMSI: return "CM_ID_TYPE_TMSI";
case CM__ID__TYPE__PTMSI__RAI__PTMSI__SIG: return "CM_ID_TYPE_PTMSI_RAI_PTMSI_SIG";
default:
return "<unknown>";
}
}

CmIdentityType::enum_type CmIdentityType::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, "CM_ID_TYPE_IMSI")) return CM__ID__TYPE__IMSI;
if (!strcmp(str_par, "CM_ID_TYPE_IMEI")) return CM__ID__TYPE__IMEI;
if (!strcmp(str_par, "CM_ID_TYPE_IMEISV")) return CM__ID__TYPE__IMEISV;
if (!strcmp(str_par, "CM_ID_TYPE_TMSI")) return CM__ID__TYPE__TMSI;
if (!strcmp(str_par, "CM_ID_TYPE_PTMSI_RAI_PTMSI_SIG")) return CM__ID__TYPE__PTMSI__RAI__PTMSI__SIG;
}
return UNKNOWN_VALUE;
}

boolean CmIdentityType::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 CmIdentityType::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 @L3_Templates.CmIdentityType.", enum_par==UNBOUND_VALUE?"unbound":"invalid");
return enum_par;
}

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

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

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

void CmIdentityType::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 CmIdentityType::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", "@L3_Templates.CmIdentityType");
  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 @L3_Templates.CmIdentityType.");
  }
}

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

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

void CmIdentityType_template::copy_template(const CmIdentityType_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 CmIdentityType_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 CmIdentityType_template(*other_value.implication_.precondition);
implication_.implied_template = new CmIdentityType_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 @L3_Templates.CmIdentityType.");
}
}

CmIdentityType_template::CmIdentityType_template()
{
}

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

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

CmIdentityType_template::CmIdentityType_template(CmIdentityType::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean CmIdentityType_template::match(CmIdentityType::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 @L3_Templates.CmIdentityType.");
}
return FALSE;
}

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

CmIdentityType::enum_type CmIdentityType_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 @L3_Templates.CmIdentityType.");
return single_value;
}

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

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

void CmIdentityType_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(CmIdentityType::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 CmIdentityType_template::log_match(const CmIdentityType& 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 CmIdentityType_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 @L3_Templates.CmIdentityType.");
}
}

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

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

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

void CmIdentityType_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 : "@L3_Templates.CmIdentityType");
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

const char *ServiceType::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case SERVICE__TYPE__Signalling: return "SERVICE_TYPE_Signalling";
case SERVICE__TYPE__Data: return "SERVICE_TYPE_Data";
case SERVICE__TYPE__Paging__Response: return "SERVICE_TYPE_Paging_Response";
case SERVICE__TYPE__MBMS__Multicast__Service__Reception: return "SERVICE_TYPE_MBMS_Multicast_Service_Reception";
case SERVICE__TYPE__MBMS__Broadcast__Service__Reception: return "SERVICE_TYPE_MBMS_Broadcast_Service_Reception";
default:
return "<unknown>";
}
}

ServiceType::enum_type ServiceType::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, "SERVICE_TYPE_Signalling")) return SERVICE__TYPE__Signalling;
if (!strcmp(str_par, "SERVICE_TYPE_Data")) return SERVICE__TYPE__Data;
if (!strcmp(str_par, "SERVICE_TYPE_Paging_Response")) return SERVICE__TYPE__Paging__Response;
if (!strcmp(str_par, "SERVICE_TYPE_MBMS_Multicast_Service_Reception")) return SERVICE__TYPE__MBMS__Multicast__Service__Reception;
if (!strcmp(str_par, "SERVICE_TYPE_MBMS_Broadcast_Service_Reception")) return SERVICE__TYPE__MBMS__Broadcast__Service__Reception;
}
return UNKNOWN_VALUE;
}

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

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

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

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

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

void ServiceType::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 ServiceType::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", "@L3_Templates.ServiceType");
  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 @L3_Templates.ServiceType.");
  }
}

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

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

void ServiceType_template::copy_template(const ServiceType_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 ServiceType_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 ServiceType_template(*other_value.implication_.precondition);
implication_.implied_template = new ServiceType_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 @L3_Templates.ServiceType.");
}
}

ServiceType_template::ServiceType_template()
{
}

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

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

ServiceType_template::ServiceType_template(ServiceType::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean ServiceType_template::match(ServiceType::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 @L3_Templates.ServiceType.");
}
return FALSE;
}

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

ServiceType::enum_type ServiceType_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 @L3_Templates.ServiceType.");
return single_value;
}

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

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

void ServiceType_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(ServiceType::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 ServiceType_template::log_match(const ServiceType& 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 ServiceType_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 @L3_Templates.ServiceType.");
}
}

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

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

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

void ServiceType_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 : "@L3_Templates.ServiceType");
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

const char *GprsAttachType::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case GPRS__ATT__T__GPRS: return "GPRS_ATT_T_GPRS";
case GPRS__ATT__T__GPRS__IMSI__COMBINED: return "GPRS_ATT_T_GPRS_IMSI_COMBINED";
default:
return "<unknown>";
}
}

GprsAttachType::enum_type GprsAttachType::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, "GPRS_ATT_T_GPRS")) return GPRS__ATT__T__GPRS;
if (!strcmp(str_par, "GPRS_ATT_T_GPRS_IMSI_COMBINED")) return GPRS__ATT__T__GPRS__IMSI__COMBINED;
}
return UNKNOWN_VALUE;
}

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

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

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

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

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

void GprsAttachType::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 GprsAttachType::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", "@L3_Templates.GprsAttachType");
  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 @L3_Templates.GprsAttachType.");
  }
}

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

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

void GprsAttachType_template::copy_template(const GprsAttachType_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 GprsAttachType_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 GprsAttachType_template(*other_value.implication_.precondition);
implication_.implied_template = new GprsAttachType_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 @L3_Templates.GprsAttachType.");
}
}

GprsAttachType_template::GprsAttachType_template()
{
}

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

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

GprsAttachType_template::GprsAttachType_template(GprsAttachType::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean GprsAttachType_template::match(GprsAttachType::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 @L3_Templates.GprsAttachType.");
}
return FALSE;
}

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

GprsAttachType::enum_type GprsAttachType_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 @L3_Templates.GprsAttachType.");
return single_value;
}

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

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

void GprsAttachType_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(GprsAttachType::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 GprsAttachType_template::log_match(const GprsAttachType& 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 GprsAttachType_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 @L3_Templates.GprsAttachType.");
}
}

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

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

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

void GprsAttachType_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 : "@L3_Templates.GprsAttachType");
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

const char *GprsUpdateType::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case GPRS__UPD__T__RA: return "GPRS_UPD_T_RA";
case GPRS__UPD__T__RA__LA__COMBINED: return "GPRS_UPD_T_RA_LA_COMBINED";
case GPRS__UPD__T__RA__LA__COMBINED__IMSI__ATT: return "GPRS_UPD_T_RA_LA_COMBINED_IMSI_ATT";
case GPRS__UPD__T__PERIODIC: return "GPRS_UPD_T_PERIODIC";
default:
return "<unknown>";
}
}

GprsUpdateType::enum_type GprsUpdateType::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, "GPRS_UPD_T_RA")) return GPRS__UPD__T__RA;
if (!strcmp(str_par, "GPRS_UPD_T_RA_LA_COMBINED")) return GPRS__UPD__T__RA__LA__COMBINED;
if (!strcmp(str_par, "GPRS_UPD_T_RA_LA_COMBINED_IMSI_ATT")) return GPRS__UPD__T__RA__LA__COMBINED__IMSI__ATT;
if (!strcmp(str_par, "GPRS_UPD_T_PERIODIC")) return GPRS__UPD__T__PERIODIC;
}
return UNKNOWN_VALUE;
}

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

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

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

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

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

void GprsUpdateType::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 GprsUpdateType::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", "@L3_Templates.GprsUpdateType");
  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 @L3_Templates.GprsUpdateType.");
  }
}

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

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

void GprsUpdateType_template::copy_template(const GprsUpdateType_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 GprsUpdateType_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 GprsUpdateType_template(*other_value.implication_.precondition);
implication_.implied_template = new GprsUpdateType_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 @L3_Templates.GprsUpdateType.");
}
}

GprsUpdateType_template::GprsUpdateType_template()
{
}

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

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

GprsUpdateType_template::GprsUpdateType_template(GprsUpdateType::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

boolean GprsUpdateType_template::match(GprsUpdateType::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 @L3_Templates.GprsUpdateType.");
}
return FALSE;
}

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

GprsUpdateType::enum_type GprsUpdateType_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 @L3_Templates.GprsUpdateType.");
return single_value;
}

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

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

void GprsUpdateType_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_enum(GprsUpdateType::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 GprsUpdateType_template::log_match(const GprsUpdateType& 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 GprsUpdateType_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 @L3_Templates.GprsUpdateType.");
}
}

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

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

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

void GprsUpdateType_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 : "@L3_Templates.GprsUpdateType");
}


/* Bodies of functions, altsteps and testcases */

MobileL3__CommonIE__Types::ML3__Cause__TLV_template ts__ML3__Cause(const BITSTRING& cause, const BITSTRING& loc, const BITSTRING& std)
{
TTCN_Location current_location("L3_Templates.ttcn", 56, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_Cause");
MobileL3__CommonIE__Types::ML3__Cause__TLV_template ret_val;
ret_val.elementIdentifier() = os_0;
ret_val.lengthIndicator() = 0;
{
MobileL3__CommonIE__Types::ML3__Cause__oct3_template& tmp_0 = ret_val.oct3();
tmp_0.location() = loc;
tmp_0.spare1__1() = bs_0;
tmp_0.codingStandard() = std;
tmp_0.ext1() = bs_0;
tmp_0.recommendation() = OMIT_VALUE;
tmp_0.ext2() = OMIT_VALUE;
}
{
MobileL3__CommonIE__Types::ML3__Cause__oct4_template& tmp_1 = ret_val.oct4();
tmp_1.causeValue() = cause;
tmp_1.ext3() = bs_1;
}
ret_val.diagnostics() = OMIT_VALUE;
return ret_val;
}

MobileL3__CommonIE__Types::ML3__Cause__LV_template ts__ML3__Cause__LV(const BITSTRING& cause, const BITSTRING& loc, const BITSTRING& std)
{
TTCN_Location current_location("L3_Templates.ttcn", 74, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_Cause_LV");
MobileL3__CommonIE__Types::ML3__Cause__LV_template ret_val;
ret_val.lengthIndicator() = 0;
{
MobileL3__CommonIE__Types::ML3__Cause__oct3_template& tmp_2 = ret_val.oct3();
tmp_2.location() = loc;
tmp_2.spare1__1() = bs_0;
tmp_2.codingStandard() = std;
tmp_2.ext1() = bs_0;
tmp_2.recommendation() = OMIT_VALUE;
tmp_2.ext2() = OMIT_VALUE;
}
{
MobileL3__CommonIE__Types::ML3__Cause__oct4_template& tmp_3 = ret_val.oct4();
tmp_3.causeValue() = cause;
tmp_3.ext3() = bs_1;
}
ret_val.diagnostics() = OMIT_VALUE;
return ret_val;
}

MobileL3__CommonIE__Types::MobileIdentityTLV_template ts__MI__TLV(const MobileL3__CommonIE__Types::MobileIdentityV_template& mi)
{
TTCN_Location current_location("L3_Templates.ttcn", 93, TTCN_Location::LOCATION_TEMPLATE, "ts_MI_TLV");
MobileL3__CommonIE__Types::MobileIdentityTLV_template ret_val;
ret_val.elementIdentifier() = bs_4;
ret_val.spare1() = bs_0;
ret_val.mobileIdentityLV() = ts__MI__LV(mi);
return ret_val;
}

MobileL3__CommonIE__Types::MobileIdentityTLV_template tr__MI__TLV(const MobileL3__CommonIE__Types::MobileIdentityV_template& mi)
{
TTCN_Location current_location("L3_Templates.ttcn", 98, TTCN_Location::LOCATION_TEMPLATE, "tr_MI_TLV");
MobileL3__CommonIE__Types::MobileIdentityTLV_template ret_val;
ret_val.elementIdentifier() = bs_4;
ret_val.spare1() = bs_0;
ret_val.mobileIdentityLV() = tr__MI__LV(mi);
return ret_val;
}

MobileL3__CommonIE__Types::MobileIdentityLV_template ts__MI__LV(const MobileL3__CommonIE__Types::MobileIdentityV_template& mi)
{
TTCN_Location current_location("L3_Templates.ttcn", 104, TTCN_Location::LOCATION_TEMPLATE, "ts_MI_LV");
MobileL3__CommonIE__Types::MobileIdentityLV_template ret_val;
ret_val.lengthIndicator() = 0;
ret_val.mobileIdentityV() = mi;
return ret_val;
}

MobileL3__CommonIE__Types::MobileIdentityLV_template tr__MI__LV(const MobileL3__CommonIE__Types::MobileIdentityV_template& mi)
{
TTCN_Location current_location("L3_Templates.ttcn", 108, TTCN_Location::LOCATION_TEMPLATE, "tr_MI_LV");
MobileL3__CommonIE__Types::MobileIdentityLV_template ret_val;
ret_val.lengthIndicator() = ANY_VALUE;
ret_val.mobileIdentityV() = mi;
return ret_val;
}

MobileL3__CommonIE__Types::MobileIdentityV_template t__MI__NoIdentity(const HEXSTRING_template& filler)
{
TTCN_Location current_location("L3_Templates.ttcn", 114, TTCN_Location::LOCATION_TEMPLATE, "t_MI_NoIdentity");
MobileL3__CommonIE__Types::MobileIdentityV_template ret_val;
ret_val.typeOfIdentity() = bs_5;
{
MobileL3__CommonIE__Types::No__Identity_template& tmp_4 = ret_val.oddEvenInd__identity().no__identity();
tmp_4.oddevenIndicator() = bs_0;
tmp_4.fillerDigits() = filler;
}
return ret_val;
}

MobileL3__CommonIE__Types::MobileIdentityV_template t__MI__TMSI(const OCTETSTRING_template& tmsi)
{
TTCN_Location current_location("L3_Templates.ttcn", 126, TTCN_Location::LOCATION_TEMPLATE, "t_MI_TMSI");
MobileL3__CommonIE__Types::MobileIdentityV_template ret_val;
ret_val.typeOfIdentity() = bs_6;
{
MobileL3__CommonIE__Types::TMSI__PTMSI_template& tmp_5 = ret_val.oddEvenInd__identity().tmsi__ptmsi();
tmp_5.oddevenIndicator() = bs_0;
tmp_5.fillerDigit() = bs_7;
tmp_5.octets() = tmsi;
}
return ret_val;
}

MobileL3__CommonIE__Types::IMSI__L3_template f__tr__MI__IMSI(const HEXSTRING_template& digits)
{
TTCN_Location current_location("L3_Templates.ttcn", 137, TTCN_Location::LOCATION_FUNCTION, "f_tr_MI_IMSI");
current_location.update_lineno(139);
/* L3_Templates.ttcn, line 139 */
if (digits.get_istemplate_kind((const char*)cs_0)) {
current_location.update_lineno(140);
/* L3_Templates.ttcn, line 140 */
return MobileL3__CommonIE__Types::IMSI__L3_template(ANY_VALUE);
}
else {
current_location.update_lineno(142);
/* L3_Templates.ttcn, line 142 */
return MobileL3__CommonIE__Types::IMSI__L3_template(f__enc__IMSI__L3(digits.valueof()));
}
}

MobileL3__CommonIE__Types::MobileIdentityV_template tr__MI__IMSI(const HEXSTRING_template& imsi)
{
TTCN_Location current_location("L3_Templates.ttcn", 145, TTCN_Location::LOCATION_TEMPLATE, "tr_MI_IMSI");
MobileL3__CommonIE__Types::MobileIdentityV_template ret_val;
ret_val.typeOfIdentity() = bs_8;
ret_val.oddEvenInd__identity().imsi() = f__tr__MI__IMSI(imsi);
return ret_val;
}

MobileL3__CommonIE__Types::MobileIdentityV_template ts__MI__IMSI(const HEXSTRING& imsi)
{
TTCN_Location current_location("L3_Templates.ttcn", 151, TTCN_Location::LOCATION_TEMPLATE, "ts_MI_IMSI");
MobileL3__CommonIE__Types::MobileIdentityV_template ret_val;
ret_val.typeOfIdentity() = bs_8;
ret_val.oddEvenInd__identity().imsi() = f__enc__IMSI__L3(imsi);
return ret_val;
}

MobileL3__CommonIE__Types::MobileIdentityLV_template ts__MI__TMSI__LV(const OCTETSTRING_template& tmsi)
{
TTCN_Location current_location("L3_Templates.ttcn", 160, TTCN_Location::LOCATION_TEMPLATE, "ts_MI_TMSI_LV");
MobileL3__CommonIE__Types::MobileIdentityLV_template ret_val;
ret_val.lengthIndicator() = 0;
{
MobileL3__CommonIE__Types::MobileIdentityV_template& tmp_6 = ret_val.mobileIdentityV();
tmp_6.typeOfIdentity() = bs_5;
{
MobileL3__CommonIE__Types::TMSI__PTMSI_template& tmp_7 = tmp_6.oddEvenInd__identity().tmsi__ptmsi();
tmp_7.oddevenIndicator() = bs_0;
tmp_7.fillerDigit() = bs_7;
tmp_7.octets() = tmsi;
}
}
return ret_val;
}

MobileL3__GMM__SM__Types::MSNetworkCapabilityTLV_template ts__GMM__MsNetCapTLV(const MobileL3__GMM__SM__Types::MSNetworkCapabilityV_template& ms__network__cap)
{
TTCN_Location current_location("L3_Templates.ttcn", 174, TTCN_Location::LOCATION_FUNCTION, "ts_GMM_MsNetCapTLV");
current_location.update_lineno(175);
/* L3_Templates.ttcn, line 175 */
MobileL3__GMM__SM__Types::MSNetworkCapabilityTLV_template ret;
current_location.update_lineno(176);
/* L3_Templates.ttcn, line 176 */
if (ms__network__cap.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(177);
/* L3_Templates.ttcn, line 177 */
return MobileL3__GMM__SM__Types::MSNetworkCapabilityTLV_template(OMIT_VALUE);
}
else {
current_location.update_lineno(179);
/* L3_Templates.ttcn, line 179 */
ret.elementIdentifier() = os_1;
{
MobileL3__GMM__SM__Types::MSNetworkCapabilityLV_template& tmp_9 = ret.mSNetworkCapabilityLV();
tmp_9.lengthIndicator() = 0;
tmp_9.msNetworkCapabilityV() = ms__network__cap;
}
current_location.update_lineno(186);
/* L3_Templates.ttcn, line 186 */
return ret;
}
}

MobileL3__CommonIE__Types::MobileIdentityTLV_template ts__MI__TMSI__TLV(const OCTETSTRING_template& tmsi)
{
TTCN_Location current_location("L3_Templates.ttcn", 191, TTCN_Location::LOCATION_FUNCTION, "ts_MI_TMSI_TLV");
current_location.update_lineno(192);
/* L3_Templates.ttcn, line 192 */
MobileL3__CommonIE__Types::MobileIdentityTLV_template ret;
current_location.update_lineno(193);
/* L3_Templates.ttcn, line 193 */
if (tmsi.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(194);
/* L3_Templates.ttcn, line 194 */
return MobileL3__CommonIE__Types::MobileIdentityTLV_template(OMIT_VALUE);
}
else {
current_location.update_lineno(196);
/* L3_Templates.ttcn, line 196 */
ret.elementIdentifier() = bs_9;
ret.spare1() = bs_0;
ret.mobileIdentityLV() = ts__MI__TMSI__LV(OCTETSTRING_template(tmsi.valueof()));
current_location.update_lineno(201);
/* L3_Templates.ttcn, line 201 */
return ret;
}
}

MobileL3__CommonIE__Types::MobileIdentityLV_template ts__MI__TMSI__NRI__LV(const INTEGER& nri__v, const INTEGER& nri__bitlen)
{
TTCN_Location current_location("L3_Templates.ttcn", 205, TTCN_Location::LOCATION_TEMPLATE, "ts_MI_TMSI_NRI_LV");
MobileL3__CommonIE__Types::MobileIdentityLV_template ret_val;
ret_val = ts__MI__TMSI__LV(OCTETSTRING_template(Osmocom__Types::f__gen__tmsi(0, nri__v, nri__bitlen, Osmocom__Types::f__gen__tmsi_base__tmsi_defval)));
return ret_val;
}

MobileL3__CommonIE__Types::MobileIdentityTLV_template ts__MI__IMEISV__TLV(const HEXSTRING& imeisv)
{
TTCN_Location current_location("L3_Templates.ttcn", 208, TTCN_Location::LOCATION_TEMPLATE, "ts_MI_IMEISV_TLV");
MobileL3__CommonIE__Types::MobileIdentityTLV_template ret_val;
ret_val.elementIdentifier() = bs_9;
ret_val.spare1() = bs_0;
ret_val.mobileIdentityLV() = ts__MI__IMEISV__LV(imeisv);
return ret_val;
}

MobileL3__CommonIE__Types::IMSI__L3 f__enc__IMSI__L3(const HEXSTRING& digits)
{
TTCN_Location current_location("L3_Templates.ttcn", 214, TTCN_Location::LOCATION_FUNCTION, "f_enc_IMSI_L3");
current_location.update_lineno(215);
/* L3_Templates.ttcn, line 215 */
MobileL3__CommonIE__Types::IMSI__L3 l3;
current_location.update_lineno(216);
/* L3_Templates.ttcn, line 216 */
INTEGER len(digits.lengthof());
current_location.update_lineno(217);
/* L3_Templates.ttcn, line 217 */
if ((rem(len, 2) == 1)) {
current_location.update_lineno(218);
/* L3_Templates.ttcn, line 218 */
l3.oddevenIndicator() = bs_1;
current_location.update_lineno(219);
/* L3_Templates.ttcn, line 219 */
l3.fillerDigit() = OMIT_VALUE;
}
else {
current_location.update_lineno(221);
/* L3_Templates.ttcn, line 221 */
l3.oddevenIndicator() = bs_0;
current_location.update_lineno(222);
/* L3_Templates.ttcn, line 222 */
l3.fillerDigit() = bs_7;
}
current_location.update_lineno(224);
/* L3_Templates.ttcn, line 224 */
l3.digits() = digits;
current_location.update_lineno(225);
/* L3_Templates.ttcn, line 225 */
return l3;
}

MobileL3__CommonIE__Types::IMEI__L3 f__enc__IMEI__L3(const HEXSTRING& digits)
{
TTCN_Location current_location("L3_Templates.ttcn", 228, TTCN_Location::LOCATION_FUNCTION, "f_enc_IMEI_L3");
current_location.update_lineno(229);
/* L3_Templates.ttcn, line 229 */
MobileL3__CommonIE__Types::IMEI__L3 l3;
current_location.update_lineno(230);
/* L3_Templates.ttcn, line 230 */
INTEGER len(digits.lengthof());
current_location.update_lineno(244);
/* L3_Templates.ttcn, line 244 */
l3.oddevenIndicator() = bs_1;
current_location.update_lineno(245);
/* L3_Templates.ttcn, line 245 */
l3.digits() = digits;
current_location.update_lineno(246);
/* L3_Templates.ttcn, line 246 */
return l3;
}

MobileL3__CommonIE__Types::IMEI__SV f__enc__IMEI__SV(const HEXSTRING& digits)
{
TTCN_Location current_location("L3_Templates.ttcn", 249, TTCN_Location::LOCATION_FUNCTION, "f_enc_IMEI_SV");
current_location.update_lineno(250);
/* L3_Templates.ttcn, line 250 */
MobileL3__CommonIE__Types::IMEI__SV l3;
current_location.update_lineno(251);
/* L3_Templates.ttcn, line 251 */
INTEGER len(digits.lengthof());
current_location.update_lineno(252);
/* L3_Templates.ttcn, line 252 */
if ((rem(len, 2) == 1)) {
current_location.update_lineno(253);
/* L3_Templates.ttcn, line 253 */
l3.oddevenIndicator() = bs_1;
}
else {
current_location.update_lineno(255);
/* L3_Templates.ttcn, line 255 */
l3.oddevenIndicator() = bs_0;
}
current_location.update_lineno(257);
/* L3_Templates.ttcn, line 257 */
l3.digits() = digits;
current_location.update_lineno(258);
/* L3_Templates.ttcn, line 258 */
l3.fillerDigit() = bs_7;
current_location.update_lineno(259);
/* L3_Templates.ttcn, line 259 */
return l3;
}

MobileL3__CommonIE__Types::MobileIdentityLV_template ts__MI__IMSI__LV(const HEXSTRING& imsi__digits)
{
TTCN_Location current_location("L3_Templates.ttcn", 263, TTCN_Location::LOCATION_TEMPLATE, "ts_MI_IMSI_LV");
MobileL3__CommonIE__Types::MobileIdentityLV_template ret_val;
ret_val.lengthIndicator() = 0;
{
MobileL3__CommonIE__Types::MobileIdentityV_template& tmp_22 = ret_val.mobileIdentityV();
tmp_22.typeOfIdentity() = bs_8;
tmp_22.oddEvenInd__identity().imsi() = f__enc__IMSI__L3(imsi__digits);
}
return ret_val;
}

MobileL3__CommonIE__Types::MobileIdentityLV_template ts__MI__IMEI__LV(const HEXSTRING& imei__digits)
{
TTCN_Location current_location("L3_Templates.ttcn", 274, TTCN_Location::LOCATION_TEMPLATE, "ts_MI_IMEI_LV");
MobileL3__CommonIE__Types::MobileIdentityLV_template ret_val;
ret_val.lengthIndicator() = 0;
{
MobileL3__CommonIE__Types::MobileIdentityV_template& tmp_23 = ret_val.mobileIdentityV();
tmp_23.typeOfIdentity() = bs_10;
tmp_23.oddEvenInd__identity().imei() = f__enc__IMEI__L3(imei__digits);
}
return ret_val;
}

MobileL3__CommonIE__Types::MobileIdentityLV_template ts__MI__IMEISV__LV(const HEXSTRING& imei__digits)
{
TTCN_Location current_location("L3_Templates.ttcn", 285, TTCN_Location::LOCATION_TEMPLATE, "ts_MI_IMEISV_LV");
MobileL3__CommonIE__Types::MobileIdentityLV_template ret_val;
ret_val.lengthIndicator() = 0;
{
MobileL3__CommonIE__Types::MobileIdentityV_template& tmp_24 = ret_val.mobileIdentityV();
tmp_24.typeOfIdentity() = bs_11;
tmp_24.oddEvenInd__identity().imei__sv() = f__enc__IMEI__SV(imei__digits);
}
return ret_val;
}

MobileL3__GMM__SM__Types::PDPContextStatusTLV_template ts__PDPContextStatusTLV(const OCTETSTRING_template& status)
{
TTCN_Location current_location("L3_Templates.ttcn", 344, TTCN_Location::LOCATION_TEMPLATE, "ts_PDPContextStatusTLV");
MobileL3__GMM__SM__Types::PDPContextStatusTLV_template ret_val;
ret_val.elementIdentifier() = os_2;
ret_val.lengthIndicator() = 0;
ret_val.valueField() = status;
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__LU__REQ(const MobileL3__MM__Types::LocationUpdatingType_template& lu__type, const MobileL3__CommonIE__Types::MobileIdentityLV_template& mi__lv, const OCTETSTRING_template& mcc__mnc)
{
TTCN_Location current_location("L3_Templates.ttcn", 352, TTCN_Location::LOCATION_TEMPLATE, "ts_LU_REQ");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__LocationUpdateRequest_template& tmp_27 = ret_val.msgs().mm().locationUpdateRequest();
tmp_27.messageType() = bs_16;
tmp_27.nsd() = bs_14;
tmp_27.locationUpdatingType() = lu__type;
{
MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_template& tmp_28 = tmp_27.cipheringKeySequenceNumber();
tmp_28.keySequence() = bs_5;
tmp_28.spare() = bs_0;
}
{
MobileL3__CommonIE__Types::LocationAreaIdentification__V_template& tmp_29 = tmp_27.locationAreaIdentification();
tmp_29.mcc__mnc() = mcc__mnc;
tmp_29.lac() = os_4;
}
tmp_27.mobileStationClassmark1() = ts__CM1(ts__CM1_a5__1__unavail_defval, ts__CM1_rev_defval, ts__CM1_esind_defval);
tmp_27.mobileIdentityLV() = mi__lv;
tmp_27.classmarkInformationType2__forUMTS() = OMIT_VALUE;
tmp_27.additionalUpdateParameterTV() = OMIT_VALUE;
tmp_27.deviceProperties() = OMIT_VALUE;
tmp_27.mS__NetworkFeatureSupport() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template ts__LU__ACCEPT(const MobileL3__CommonIE__Types::MobileIdentityTLV_template& mi__tlv)
{
TTCN_Location current_location("L3_Templates.ttcn", 381, TTCN_Location::LOCATION_TEMPLATE, "ts_LU_ACCEPT");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__LocationUpdateAccept_template& tmp_30 = ret_val.msgs().mm().locationUpdateAccept();
tmp_30.messageType() = bs_16;
tmp_30.nsd() = bs_14;
{
MobileL3__CommonIE__Types::LocationAreaIdentification__V_template& tmp_31 = tmp_30.locationAreaIdentification();
tmp_31.mcc__mnc() = os_5;
tmp_31.lac() = os_4;
}
tmp_30.mobileIdentityTLV() = mi__tlv;
tmp_30.followOnProceed() = OMIT_VALUE;
tmp_30.cTS__Permission() = OMIT_VALUE;
tmp_30.equivalentPLMNs() = OMIT_VALUE;
tmp_30.emergencyNumberList() = OMIT_VALUE;
tmp_30.perMS__T3212() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__CM__SERV__REQ(const CmServiceType& serv__type, const MobileL3__CommonIE__Types::MobileIdentityLV& mi__lv)
{
TTCN_Location current_location("L3_Templates.ttcn", 407, TTCN_Location::LOCATION_TEMPLATE, "ts_CM_SERV_REQ");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__CMServiceRequest_template& tmp_32 = ret_val.msgs().mm().cMServiceRequest();
tmp_32.messageType() = bs_16;
tmp_32.nsd() = bs_14;
tmp_32.cm__ServiceType() = int2bit(CmServiceType::enum2int(serv__type), 4);
{
MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_template& tmp_33 = tmp_32.cipheringKeySequenceNumber();
tmp_33.keySequence() = bs_5;
tmp_33.spare() = bs_0;
}
tmp_32.mobileStationClassmark2() = ts__CM2;
tmp_32.mobileIdentity() = mi__lv;
tmp_32.priorityLevel() = OMIT_VALUE;
tmp_32.additionalUpdateParameterTV() = OMIT_VALUE;
tmp_32.deviceProperties() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template ts__CM__SERV__REJ(const OCTETSTRING& rejectCause)
{
TTCN_Location current_location("L3_Templates.ttcn", 429, TTCN_Location::LOCATION_TEMPLATE, "ts_CM_SERV_REJ");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__CMServiceReject_template& tmp_34 = ret_val.msgs().mm().cMServiceReject();
tmp_34.messageType() = bs_16;
tmp_34.nsd() = bs_14;
tmp_34.rejectCause() = rejectCause;
tmp_34.t3246__Value() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__CM__REESTABL__REQ(const MobileL3__CommonIE__Types::MobileIdentityLV& mi__lv)
{
TTCN_Location current_location("L3_Templates.ttcn", 446, TTCN_Location::LOCATION_TEMPLATE, "ts_CM_REESTABL_REQ");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__CMReestablishmentRequest_template& tmp_35 = ret_val.msgs().mm().cMReEstablReq();
tmp_35.messageType() = bs_16;
tmp_35.nsd() = bs_14;
{
MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_template& tmp_36 = tmp_35.cipheringKeySequenceNumber();
tmp_36.keySequence() = bs_5;
tmp_36.spare() = bs_0;
}
tmp_35.spare() = bs_15;
tmp_35.mobileStationClassmark2() = ts__CM2;
tmp_35.mobileIdentityLV() = mi__lv;
tmp_35.locationAreaIdentification() = OMIT_VALUE;
tmp_35.deviceProperties() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_template ts__CKSN(const INTEGER_template& key__seq)
{
TTCN_Location current_location("L3_Templates.ttcn", 467, TTCN_Location::LOCATION_TEMPLATE, "ts_CKSN");
MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_template ret_val;
ret_val.keySequence() = int2bit(key__seq.valueof(), 3);
ret_val.spare() = bs_0;
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__CM__REEST__REQ(const INTEGER& cksn, const MobileL3__CommonIE__Types::MobileIdentityLV& mi__lv)
{
TTCN_Location current_location("L3_Templates.ttcn", 473, TTCN_Location::LOCATION_TEMPLATE, "ts_CM_REEST_REQ");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__CMReestablishmentRequest_template& tmp_37 = ret_val.msgs().mm().cMReEstablReq();
tmp_37.messageType() = bs_17;
tmp_37.nsd() = bs_14;
tmp_37.cipheringKeySequenceNumber() = ts__CKSN(INTEGER_template(cksn));
tmp_37.spare() = bs_15;
tmp_37.mobileStationClassmark2() = ts__CM2;
tmp_37.mobileIdentityLV() = mi__lv;
tmp_37.locationAreaIdentification() = OMIT_VALUE;
tmp_37.deviceProperties() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__MT__simple(const BITSTRING_template& discr)
{
TTCN_Location current_location("L3_Templates.ttcn", 495, TTCN_Location::LOCATION_TEMPLATE, "tr_MT_simple");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = discr;
ret_val.tiOrSkip().skipIndicator() = bs_15;
ret_val.msgs() = ANY_VALUE;
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__CM__SERV__REJ(const OCTETSTRING_template& rej__cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 520, TTCN_Location::LOCATION_TEMPLATE, "tr_CM_SERV_REJ");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_18;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__CMServiceReject_template& tmp_39 = ret_val.msgs().mm().cMServiceReject();
tmp_39.messageType() = bs_20;
tmp_39.nsd() = ANY_VALUE;
tmp_39.rejectCause() = rej__cause;
tmp_39.t3246__Value() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__PAGING__REQ1(const MobileL3__CommonIE__Types::MobileIdentityLV_template& mi1, const MobileL3__CommonIE__Types::MobileIdentityTLV_template& mi2)
{
TTCN_Location current_location("L3_Templates.ttcn", 537, TTCN_Location::LOCATION_TEMPLATE, "tr_PAGING_REQ1");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_21;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__PagingReq__Type1__NW__MS_template& tmp_40 = ret_val.msgs().rrm().pagingReq__Type1();
tmp_40.messageType() = bs_22;
tmp_40.pageMode() = ANY_VALUE;
tmp_40.channelNeeded() = ANY_VALUE;
tmp_40.mobileIdentity1() = mi1;
tmp_40.mobileIdentity2() = mi2;
tmp_40.p1RestOctets() = ANY_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__PAGING__REQ2(const OCTETSTRING_template& mi1, const OCTETSTRING_template& mi2, const MobileL3__CommonIE__Types::MobileIdentityTLV_template& mi3)
{
TTCN_Location current_location("L3_Templates.ttcn", 557, TTCN_Location::LOCATION_TEMPLATE, "tr_PAGING_REQ2");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_21;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__PagingReq__Type2__NW__MS_template& tmp_41 = ret_val.msgs().rrm().pagingReq__Type2();
tmp_41.messageType() = bs_23;
tmp_41.pageMode() = ANY_VALUE;
tmp_41.channelNeeded() = ANY_VALUE;
tmp_41.mobileIdentity1() = mi1;
tmp_41.mobileIdentity2() = mi2;
tmp_41.mobileIdentity3() = mi3;
tmp_41.p2RestOctets() = ANY_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__PAGING__REQ3(const OCTETSTRING_template& mi1, const OCTETSTRING_template& mi2, const OCTETSTRING_template& mi3, const OCTETSTRING_template& mi4)
{
TTCN_Location current_location("L3_Templates.ttcn", 579, TTCN_Location::LOCATION_TEMPLATE, "tr_PAGING_REQ3");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_21;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__PagingReq__Type3__NW__MS_template& tmp_42 = ret_val.msgs().rrm().pagingReq__Type3();
tmp_42.messageType() = bs_24;
tmp_42.pageMode() = ANY_VALUE;
tmp_42.channelNeeded() = ANY_VALUE;
tmp_42.mobileIdentity1() = mi1;
tmp_42.mobileIdentity2() = mi2;
tmp_42.mobileIdentity3() = mi3;
tmp_42.mobileIdentity4() = mi4;
tmp_42.p3RestOctets() = ANY_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__PAG__RESP(const MobileL3__CommonIE__Types::MobileIdentityLV_template& mi__lv)
{
TTCN_Location current_location("L3_Templates.ttcn", 606, TTCN_Location::LOCATION_TEMPLATE, "ts_PAG_RESP");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__PagingResponse__MS__NW_template& tmp_43 = ret_val.msgs().rrm().pagingResponse();
tmp_43.messageType() = bs_25;
{
MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_template& tmp_44 = tmp_43.cipheringKeySequenceNumber();
tmp_44.keySequence() = bs_5;
tmp_44.spare() = bs_0;
}
tmp_43.spare1__4() = bs_15;
tmp_43.mobileStationClassmark() = ts__CM2;
tmp_43.mobileIdentity() = mi__lv;
tmp_43.additionalUpdateParameters() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__RRM__Types::ChannelDescription2__V_template tr__ChannelDescription2__V(const BITSTRING_template& timeslotNumber, const BITSTRING_template& channelTypeandTDMAOffset)
{
TTCN_Location current_location("L3_Templates.ttcn", 625, TTCN_Location::LOCATION_TEMPLATE, "tr_ChannelDescription2_V");
MobileL3__RRM__Types::ChannelDescription2__V_template ret_val;
ret_val.timeslotNumber() = timeslotNumber;
ret_val.channelTypeandTDMAOffset() = channelTypeandTDMAOffset;
ret_val.octet3() = ANY_VALUE;
ret_val.octet4() = ANY_VALUE;
return ret_val;
}

MobileL3__RRM__Types::ChannelMode__V_template tr__ChannelMode__V(const OCTETSTRING_template& mode)
{
TTCN_Location current_location("L3_Templates.ttcn", 633, TTCN_Location::LOCATION_TEMPLATE, "tr_ChannelMode_V");
MobileL3__RRM__Types::ChannelMode__V_template ret_val;
ret_val.mode() = mode;
return ret_val;
}

MobileL3__RRM__Types::ExtendedTSCSet__TV_template tr__ExtendedTSCSet__TV(const BITSTRING_template& cSDomainTSCSet)
{
TTCN_Location current_location("L3_Templates.ttcn", 637, TTCN_Location::LOCATION_TEMPLATE, "tr_ExtendedTSCSet_TV");
MobileL3__RRM__Types::ExtendedTSCSet__TV_template ret_val;
ret_val.elementIdentifier() = os_6;
ret_val.cSDomainTSCSet() = cSDomainTSCSet;
ret_val.secondPSDomainTSCAssigned() = ANY_VALUE;
ret_val.primaryPSDomainTSCSet() = ANY_VALUE;
ret_val.secondaryPSDomainTSCSet() = ANY_VALUE;
ret_val.secondaryPSDomainTSCValue() = ANY_VALUE;
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__RRM__ModeModify(const MobileL3__RRM__Types::ChannelDescription2__V_template& desc, const MobileL3__RRM__Types::ChannelMode__V_template& mode, const MobileL3__RRM__Types::ExtendedTSCSet__TV_template& extendedTSCSet)
{
TTCN_Location current_location("L3_Templates.ttcn", 646, TTCN_Location::LOCATION_TEMPLATE, "tr_RRM_ModeModify");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_21;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__ChannelModeModify__NW__MS_template& tmp_45 = ret_val.msgs().rrm().channelModeModify();
tmp_45.messageType() = bs_26;
tmp_45.channelDescription() = desc;
tmp_45.channelMode() = mode;
tmp_45.vGCS__TargetModeIndication() = OMIT_VALUE;
tmp_45.multiRateConfiguration() = OMIT_VALUE;
tmp_45.vGCS__Ciphering__Parameters() = OMIT_VALUE;
tmp_45.extendedTSCSet() = extendedTSCSet;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__RRM__ModeModifyAck(const MobileL3__RRM__Types::ChannelDescription2__V& desc, const MobileL3__RRM__Types::ChannelMode__V& mode, const MobileL3__RRM__Types::ExtendedTSCSet__TV_template& extendedTSCSet)
{
TTCN_Location current_location("L3_Templates.ttcn", 668, TTCN_Location::LOCATION_TEMPLATE, "ts_RRM_ModeModifyAck");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__ChannelModeModifyAck__MS__NW_template& tmp_46 = ret_val.msgs().rrm().channelModeModifyAck();
tmp_46.messageType() = bs_27;
tmp_46.channelDescription() = desc;
tmp_46.channelMode() = mode;
tmp_46.extendedTSCSet() = extendedTSCSet;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template ts__RRM__CiphModeCmd(const BITSTRING& alg__id)
{
TTCN_Location current_location("L3_Templates.ttcn", 686, TTCN_Location::LOCATION_TEMPLATE, "ts_RRM_CiphModeCmd");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__CipheringModeCommand__NW__MS_template& tmp_47 = ret_val.msgs().rrm().cipheringModeCommand();
tmp_47.messageType() = bs_28;
{
MobileL3__RRM__Types::CipherModeSetting__V_template& tmp_48 = tmp_47.cipherModeSetting();
tmp_48.sC() = bs_1;
tmp_48.algorithmIdentifier() = alg__id;
}
{
MobileL3__RRM__Types::CipherModeResponse__V_template& tmp_49 = tmp_47.cipherModeResponse();
tmp_49.cR() = bs_0;
tmp_49.spare() = bs_5;
}
}
return ret_val;
}

MobileL3__RRM__Types::ChannelMode__TV_template tr__ChannelMode__TV(const OCTETSTRING_template& mode)
{
TTCN_Location current_location("L3_Templates.ttcn", 723, TTCN_Location::LOCATION_TEMPLATE, "tr_ChannelMode_TV");
MobileL3__RRM__Types::ChannelMode__TV_template ret_val;
ret_val.elementIdentifier() = os_7;
ret_val.mode() = mode;
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__RR__AssignmentCommand(const MobileL3__RRM__Types::ChannelDescription2__V_template& desc, const MobileL3__RRM__Types::ChannelMode__TV_template& mode, const MobileL3__RRM__Types::ExtendedTSCSet__TV_template& extendedTSCSet)
{
TTCN_Location current_location("L3_Templates.ttcn", 728, TTCN_Location::LOCATION_TEMPLATE, "tr_RR_AssignmentCommand");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_21;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__AssignmentCommand__NW__MS_template& tmp_51 = ret_val.msgs().rrm().assignmentCommand();
tmp_51.messageType() = bs_30;
tmp_51.descrOf1stChAfterTime() = desc;
tmp_51.PowerCommand() = ANY_VALUE;
tmp_51.frequencyList__at() = OMIT_VALUE;
tmp_51.cellChannelDescr() = OMIT_VALUE;
tmp_51.descrMultislotAllocation() = OMIT_VALUE;
tmp_51.modeOf1stChannel() = mode;
tmp_51.channelSet2() = OMIT_VALUE;
tmp_51.channelSet3() = OMIT_VALUE;
tmp_51.channelSet4() = OMIT_VALUE;
tmp_51.channelSet5() = OMIT_VALUE;
tmp_51.channelSet6() = OMIT_VALUE;
tmp_51.channelSet7() = OMIT_VALUE;
tmp_51.channelSet8() = OMIT_VALUE;
tmp_51.descrOf2ndChAfterTime() = OMIT_VALUE;
tmp_51.modeOf2ndChannel() = OMIT_VALUE;
tmp_51.mobileAllocation__at() = OMIT_VALUE;
tmp_51.startingTime() = OMIT_VALUE;
tmp_51.frequencyList__bt() = OMIT_VALUE;
tmp_51.descrOf1stCh__bt() = OMIT_VALUE;
tmp_51.descrOf2ndCh__bt() = OMIT_VALUE;
tmp_51.frequencyChannelSequence() = OMIT_VALUE;
tmp_51.mobileAllocation__bt() = OMIT_VALUE;
tmp_51.cipherModeSetting() = OMIT_VALUE;
tmp_51.vGCS__TargetModeIndication() = OMIT_VALUE;
tmp_51.multiRateConfiguration() = OMIT_VALUE;
tmp_51.vGCS__Ciphering__Parameters() = OMIT_VALUE;
tmp_51.extendedTSCSet__afterTime() = extendedTSCSet;
tmp_51.extendedTSCSet__beforeTime() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__RRM__AssignmentComplete(const OCTETSTRING& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 774, TTCN_Location::LOCATION_TEMPLATE, "ts_RRM_AssignmentComplete");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__AssignmentComplete__MS__NW_template& tmp_52 = ret_val.msgs().rrm().assignmentComplete();
tmp_52.messageType() = bs_31;
tmp_52.rR__Cause().valuePart() = cause;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__RRM__AssignmentFailure(const OCTETSTRING& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 791, TTCN_Location::LOCATION_TEMPLATE, "ts_RRM_AssignmentFailure");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__AssignmentFailure__MS__NW_template& tmp_53 = ret_val.msgs().rrm().assignmentFailure();
tmp_53.messageType() = bs_32;
tmp_53.rR__Cause().valuePart() = cause;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__RRM__HandoverFailure(const OCTETSTRING& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 808, TTCN_Location::LOCATION_TEMPLATE, "ts_RRM_HandoverFailure");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__HandoverFailure__MS__NW_template& tmp_54 = ret_val.msgs().rrm().handoverFailure();
tmp_54.messageType() = bs_33;
tmp_54.rRCause().valuePart() = cause;
tmp_54.pSCause() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__RRM__HandoverComplete(const OCTETSTRING& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 826, TTCN_Location::LOCATION_TEMPLATE, "ts_RRM_HandoverComplete");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__HandoverComplete__MS__NW_template& tmp_55 = ret_val.msgs().rrm().handoverComplete();
tmp_55.messageType() = bs_34;
tmp_55.rRCause().valuePart() = cause;
tmp_55.mobileObsservedTimeDiff() = OMIT_VALUE;
tmp_55.mobileTimeDifferenceHyperframe() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__RR__APP__INFO(const BITSTRING_template& apdu__id, const OCTETSTRING_template& data, const MobileL3__RRM__Types::APDU__Flags__V_template& flags)
{
TTCN_Location current_location("L3_Templates.ttcn", 845, TTCN_Location::LOCATION_TEMPLATE, "tr_RR_APP_INFO");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__ApplicationInformation_template& tmp_56 = ret_val.msgs().rrm().applicationInformation();
tmp_56.messageType() = bs_35;
tmp_56.aPDU__ID() = apdu__id;
tmp_56.aPDU__Flags() = flags;
{
MobileL3__RRM__Types::APDU__Data__LV_template& tmp_57 = tmp_56.aPDU__Data();
tmp_57.lengthIndicator() = ANY_VALUE;
tmp_57.aPDU__DataValue() = data;
}
}
return ret_val;
}

MobileL3__CommonIE__Types::MobileStationClassmark3__TLV_template ts__CM3__TLV(const OCTETSTRING_template& cm3)
{
TTCN_Location current_location("L3_Templates.ttcn", 990, TTCN_Location::LOCATION_FUNCTION, "ts_CM3_TLV");
current_location.update_lineno(991);
/* L3_Templates.ttcn, line 991 */
if ((!(cm3.is_value()))) {
current_location.update_lineno(992);
/* L3_Templates.ttcn, line 992 */
return MobileL3__CommonIE__Types::MobileStationClassmark3__TLV_template(OMIT_VALUE);
}
current_location.update_lineno(994);
/* L3_Templates.ttcn, line 994 */
MobileL3__CommonIE__Types::MobileStationClassmark3__TLV_template ret;
ret.elementIdentifier() = os_11;
ret.lengthIndicator() = 0;
ret.valuePart() = cm3;
current_location.update_lineno(999);
/* L3_Templates.ttcn, line 999 */
return ret;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__RRM__CM__CHG(const MobileL3__CommonIE__Types::MobileStationClassmark2__LV& cm2, const MobileL3__CommonIE__Types::MobileStationClassmark3__TLV_template& cm3)
{
TTCN_Location current_location("L3_Templates.ttcn", 1002, TTCN_Location::LOCATION_TEMPLATE, "ts_RRM_CM_CHG");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_21;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__ClassmarkChange__MS__NW_template& tmp_63 = ret_val.msgs().rrm().classmarkChange();
tmp_63.messageType() = bs_40;
tmp_63.mobileStationClassmark2() = cm2;
tmp_63.mobileStationClassmark3() = cm3;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__RRM__UL__REL(const OCTETSTRING& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 1034, TTCN_Location::LOCATION_TEMPLATE, "ts_RRM_UL_REL");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_21;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__UplinkRelease_template& tmp_65 = ret_val.msgs().rrm().uplinkRelease();
tmp_65.messageType() = bs_42;
tmp_65.rR__Cause().valuePart() = cause;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__RRM__DTM__ASS__FAIL(const OCTETSTRING& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 1051, TTCN_Location::LOCATION_TEMPLATE, "ts_RRM_DTM_ASS_FAIL");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_21;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__DTM__AssignmentFailure__MS__NW_template& tmp_66 = ret_val.msgs().rrm().dTM__AssignmentFailure();
tmp_66.messageType() = bs_43;
tmp_66.rR__Cause().valuePart() = cause;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template tr__RRM__RR__STATUS(const OCTETSTRING_template& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 1068, TTCN_Location::LOCATION_TEMPLATE, "tr_RRM_RR_STATUS");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_21;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__RR__Status_template& tmp_67 = ret_val.msgs().rrm().rR__Status();
tmp_67.messageType() = bs_44;
tmp_67.rR__Cause().valuePart() = cause;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__RRM__RR__RELEASE(const OCTETSTRING_template& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 1085, TTCN_Location::LOCATION_TEMPLATE, "tr_RRM_RR_RELEASE");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_21;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__ChannelRelease__NW__MS_template& tmp_68 = ret_val.msgs().rrm().channelRelease();
tmp_68.messageType() = bs_45;
tmp_68.rRCause().valuePart() = cause;
tmp_68.bARange() = ANY_OR_OMIT;
tmp_68.groupChannelDescription() = ANY_OR_OMIT;
tmp_68.groupCipherKeyNumber() = ANY_OR_OMIT;
tmp_68.gPRSResumption() = ANY_OR_OMIT;
tmp_68.bAListPref() = ANY_OR_OMIT;
tmp_68.uTRANFrequencyList() = ANY_OR_OMIT;
tmp_68.cellChannelDescr() = ANY_OR_OMIT;
tmp_68.cellSelectionIndicator() = ANY_OR_OMIT;
tmp_68.enhanced__DTM__CS__Release__Indication() = ANY_OR_OMIT;
tmp_68.vGCS__Ciphering__Parameters() = ANY_OR_OMIT;
tmp_68.group__Channel__Description__2() = ANY_OR_OMIT;
tmp_68.talkerIdentity() = ANY_OR_OMIT;
tmp_68.talkerPriorityStatus() = ANY_OR_OMIT;
tmp_68.vGCS__AMR__Configuration() = ANY_OR_OMIT;
tmp_68.individual__Priorities() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__RRM__RR__RELEASE__CellSelectInd(const OCTETSTRING_template& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 1117, TTCN_Location::LOCATION_TEMPLATE, "tr_RRM_RR_RELEASE_CellSelectInd");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val(tr__RRM__RR__RELEASE(cause));
{
MobileL3__RRM__Types::CellSelectionIndicatorAfterReleaseOfAll__TCH__and__SDCCH__IE_template& tmp_69 = ret_val.msgs().rrm().channelRelease().cellSelectionIndicator();
tmp_69.elementIdentifier() = os_12;
tmp_69.lengthIndicator() = ANY_VALUE;
tmp_69.cellSelectionIndicatorValue() = ANY_VALUE;
}
return ret_val;
}

MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_template ts__ML3__IE__CKSN(const INTEGER& cksn)
{
TTCN_Location current_location("L3_Templates.ttcn", 1157, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_IE_CKSN");
MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_template ret_val;
ret_val.keySequence() = int2bit(cksn, 3);
ret_val.spare() = bs_0;
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__LU__Req(const MobileL3__MM__Types::LocationUpdatingType& lu__type, const MobileL3__CommonIE__Types::LocationAreaIdentification__V& lai, const MobileL3__CommonIE__Types::MobileIdentityLV& mi, const MobileL3__CommonIE__Types::MobileStationClassmark1__V& cm1)
{
TTCN_Location current_location("L3_Templates.ttcn", 1162, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_LU_Req");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val(ts__ML3__MO);
{
MobileL3__MM__Types::PDU__ML3__LocationUpdateRequest_template& tmp_70 = ret_val.msgs().mm().locationUpdateRequest();
tmp_70.messageType() = bs_46;
tmp_70.nsd() = bs_14;
tmp_70.locationUpdatingType() = lu__type;
tmp_70.cipheringKeySequenceNumber() = ts__ML3__IE__CKSN(0);
tmp_70.locationAreaIdentification() = lai;
tmp_70.mobileStationClassmark1() = cm1;
tmp_70.mobileIdentityLV() = mi;
tmp_70.classmarkInformationType2__forUMTS() = OMIT_VALUE;
tmp_70.additionalUpdateParameterTV() = OMIT_VALUE;
tmp_70.deviceProperties() = OMIT_VALUE;
tmp_70.mS__NetworkFeatureSupport() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__LU__Rej(const OCTETSTRING_template& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 1217, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_LU_Rej");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_18;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__LocationUpdateReject_template& tmp_73 = ret_val.msgs().mm().locationUpdateReject();
tmp_73.messageType() = bs_49;
tmp_73.nsd() = bs_14;
tmp_73.rejectCause() = cause;
tmp_73.t3246__Value() = ANY_OR_OMIT;
}
return ret_val;
}

BITSTRING_template f__id__type__or__any(const CmIdentityType_template& id__type)
{
TTCN_Location current_location("L3_Templates.ttcn", 1234, TTCN_Location::LOCATION_FUNCTION, "f_id_type_or_any");
current_location.update_lineno(1235);
/* L3_Templates.ttcn, line 1235 */
if (id__type.get_istemplate_kind((const char*)cs_0)) {
current_location.update_lineno(1236);
/* L3_Templates.ttcn, line 1236 */
return BITSTRING_template(ANY_VALUE);
}
else {
current_location.update_lineno(1238);
/* L3_Templates.ttcn, line 1238 */
return BITSTRING_template(int2bit(CmIdentityType::enum2int(id__type.valueof()), 3));
}
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__MM__ID__Req(const CmIdentityType_template& id__type)
{
TTCN_Location current_location("L3_Templates.ttcn", 1242, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_MM_ID_Req");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_18;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__IdentityRequest_template& tmp_74 = ret_val.msgs().mm().identityRequest();
tmp_74.messageType() = bs_50;
tmp_74.nsd() = bs_14;
tmp_74.identityType() = f__id__type__or__any(id__type);
tmp_74.spare1__5() = ANY_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__MM__ID__Rsp(const MobileL3__CommonIE__Types::MobileIdentityLV& mi)
{
TTCN_Location current_location("L3_Templates.ttcn", 1259, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_MM_ID_Rsp");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val(ts__ML3__MO);
{
MobileL3__MM__Types::PDU__ML3__IdentityResponse_template& tmp_75 = ret_val.msgs().mm().identityResponse();
tmp_75.messageType() = bs_51;
tmp_75.nsd() = bs_14;
tmp_75.mobileIdentityLV() = mi;
tmp_75.p__TMSI__TypeTV() = OMIT_VALUE;
tmp_75.routingAreaIdentification2TLV() = OMIT_VALUE;
tmp_75.p__TMSISignature2TLV() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__MM__ID__Rsp__IMSI(const HEXSTRING& imsi)
{
TTCN_Location current_location("L3_Templates.ttcn", 1273, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_MM_ID_Rsp_IMSI");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val = ts__ML3__MO__MM__ID__Rsp(ts__MI__IMSI__LV(imsi).valueof());
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__MM__ID__Rsp__IMEI(const HEXSTRING& imei)
{
TTCN_Location current_location("L3_Templates.ttcn", 1275, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_MM_ID_Rsp_IMEI");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val = ts__ML3__MO__MM__ID__Rsp(ts__MI__IMEI__LV(imei).valueof());
return ret_val;
}

MobileL3__CommonIE__Types::MobileStationClassmark1__V_template ts__CM1(const BITSTRING& a5__1__unavail, const BITSTRING& rev, const BITSTRING& esind)
{
TTCN_Location current_location("L3_Templates.ttcn", 1279, TTCN_Location::LOCATION_TEMPLATE, "ts_CM1");
MobileL3__CommonIE__Types::MobileStationClassmark1__V_template ret_val;
ret_val.rf__PowerCapability() = bs_10;
ret_val.a5__1() = a5__1__unavail;
ret_val.esind() = esind;
ret_val.revisionLevel() = rev;
ret_val.spare1__1() = bs_0;
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__MM__IMSI__DET__Ind(const MobileL3__CommonIE__Types::MobileIdentityLV& mi, const MobileL3__CommonIE__Types::MobileStationClassmark1__V_template& cm1)
{
TTCN_Location current_location("L3_Templates.ttcn", 1287, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_MM_IMSI_DET_Ind");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val(ts__ML3__MO);
{
MobileL3__MM__Types::PDU__ML3__IMSI__DetachIndication_template& tmp_76 = ret_val.msgs().mm().imsiDetachIndication();
tmp_76.messageType() = bs_52;
tmp_76.nsd() = bs_14;
tmp_76.mobileStationClassmark1() = cm1;
tmp_76.mobileIdentityLV() = mi;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__CC(const INTEGER& tid)
{
TTCN_Location current_location("L3_Templates.ttcn", 1302, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_CC");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_77 = ret_val.tiOrSkip().transactionId();
tmp_77.tio() = int2bit(tid, 3);
tmp_77.tiFlag() = bs_0;
tmp_77.tIExtension() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__CC__Types::CalledPartyBCD__Number_template ts__Called(const HEXSTRING& digits)
{
TTCN_Location current_location("L3_Templates.ttcn", 1314, TTCN_Location::LOCATION_TEMPLATE, "ts_Called");
MobileL3__CC__Types::CalledPartyBCD__Number_template ret_val;
ret_val.elementIdentifier() = os_13;
ret_val.lengthIndicator() = 0;
ret_val.numberingPlanIdentification() = bs_15;
ret_val.typeOfNumber() = bs_5;
ret_val.ext1() = bs_1;
ret_val.digits() = digits;
return ret_val;
}

MobileL3__CC__Types::CalledPartyBCD__Number_template tr__Called(const HEXSTRING_template& digits)
{
TTCN_Location current_location("L3_Templates.ttcn", 1323, TTCN_Location::LOCATION_TEMPLATE, "tr_Called");
MobileL3__CC__Types::CalledPartyBCD__Number_template ret_val;
ret_val.elementIdentifier() = os_13;
ret_val.lengthIndicator() = ANY_VALUE;
ret_val.numberingPlanIdentification() = ANY_VALUE;
ret_val.typeOfNumber() = ANY_VALUE;
ret_val.ext1() = bs_1;
ret_val.digits() = digits;
return ret_val;
}

HEXSTRING f__pad__digits(const HEXSTRING& digits)
{
TTCN_Location current_location("L3_Templates.ttcn", 1332, TTCN_Location::LOCATION_FUNCTION, "f_pad_digits");
current_location.update_lineno(1333);
/* L3_Templates.ttcn, line 1333 */
if ((mod(digits.lengthof(), 2) != 0)) {
current_location.update_lineno(1336);
/* L3_Templates.ttcn, line 1336 */
return (digits + hs_0);
}
current_location.update_lineno(1338);
/* L3_Templates.ttcn, line 1338 */
return digits;
}

MobileL3__CC__Types::CallingPartyBCD__Number_template tr__Calling(const HEXSTRING_template& digits)
{
TTCN_Location current_location("L3_Templates.ttcn", 1341, TTCN_Location::LOCATION_TEMPLATE, "tr_Calling");
MobileL3__CC__Types::CallingPartyBCD__Number_template ret_val;
ret_val.elementIdentifier() = os_14;
ret_val.lengthIndicator() = ANY_VALUE;
ret_val.oct3() = ANY_VALUE;
ret_val.digits() = f__pad__digits(digits.valueof());
return ret_val;
}

MobileL3__CC__Types::Speech__AuxiliarySpeech_template ts__SpeechAux(const INTEGER& ver, const BITSTRING& suffix)
{
TTCN_Location current_location("L3_Templates.ttcn", 1350, TTCN_Location::LOCATION_TEMPLATE, "ts_SpeechAux");
MobileL3__CC__Types::Speech__AuxiliarySpeech_template ret_val;
ret_val.speechVersionIndication() = (int2bit((ver - 1), 3) + suffix);
ret_val.spare1__1() = bs_0;
ret_val.cTM__or__Spare() = bs_0;
ret_val.coding() = bs_0;
ret_val.extension__octet__3a__3b() = bs_0;
return ret_val;
}

MobileL3__CC__Types::Speech__AuxiliarySpeech_template ts__SpeechAuxFR(const INTEGER& ver)
{
TTCN_Location current_location("L3_Templates.ttcn", 1358, TTCN_Location::LOCATION_TEMPLATE, "ts_SpeechAuxFR");
MobileL3__CC__Types::Speech__AuxiliarySpeech_template ret_val;
ret_val = ts__SpeechAux(ver, bs_0);
return ret_val;
}

MobileL3__CC__Types::Speech__AuxiliarySpeech_template ts__SpeechAuxHR(const INTEGER& ver)
{
TTCN_Location current_location("L3_Templates.ttcn", 1359, TTCN_Location::LOCATION_TEMPLATE, "ts_SpeechAuxHR");
MobileL3__CC__Types::Speech__AuxiliarySpeech_template ret_val;
ret_val = ts__SpeechAux(ver, bs_1);
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__CC__SETUP(const INTEGER& tid, const HEXSTRING& called, const MobileL3__CC__Types::BearerCapability__TLV_template& bcap)
{
TTCN_Location current_location("L3_Templates.ttcn", 1483, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_CC_SETUP");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_85 = ret_val.tiOrSkip().transactionId();
tmp_85.tio() = int2bit(tid, 3);
tmp_85.tiFlag() = bs_0;
tmp_85.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__Setup__MS__NW_template& tmp_86 = ret_val.msgs().cc().setup__MS__NW();
tmp_86.messageType() = bs_55;
tmp_86.nsd() = bs_14;
tmp_86.bcRepeatIndicator() = OMIT_VALUE;
tmp_86.bearerCapability1() = bcap;
tmp_86.bearerCapability2() = OMIT_VALUE;
tmp_86.facility() = OMIT_VALUE;
tmp_86.callingPartySubAddress() = OMIT_VALUE;
tmp_86.calledPartyBCD__Number() = ts__Called(called);
tmp_86.calledPartySubAddress() = OMIT_VALUE;
tmp_86.llc__RepeatIndicator() = OMIT_VALUE;
tmp_86.lowLayerCompatibility1() = OMIT_VALUE;
tmp_86.lowLayerCompatibility2() = OMIT_VALUE;
tmp_86.hlc__RepeatIndicator() = OMIT_VALUE;
tmp_86.highLayerCompatibility1() = OMIT_VALUE;
tmp_86.highLayerCompatibility2() = OMIT_VALUE;
tmp_86.user__user() = OMIT_VALUE;
tmp_86.ss__VersionIndicator() = OMIT_VALUE;
tmp_86.clir__Suppression() = OMIT_VALUE;
tmp_86.clir__Invocation() = OMIT_VALUE;
tmp_86.cC__Capabilities() = OMIT_VALUE;
tmp_86.facility__ccbs1() = OMIT_VALUE;
tmp_86.facility__ccbs2() = OMIT_VALUE;
tmp_86.streamIdentifier() = OMIT_VALUE;
tmp_86.supportedCodecs() = OMIT_VALUE;
tmp_86.redial() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__CC__EMERG__SETUP(const INTEGER& tid, const MobileL3__CC__Types::BearerCapability__TLV_template& bcap)
{
TTCN_Location current_location("L3_Templates.ttcn", 1525, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_CC_EMERG_SETUP");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_87 = ret_val.tiOrSkip().transactionId();
tmp_87.tio() = int2bit(tid, 3);
tmp_87.tiFlag() = bs_0;
tmp_87.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__EmergencySetup_template& tmp_88 = ret_val.msgs().cc().emergencySetup();
tmp_88.messageType() = bs_56;
tmp_88.nsd() = bs_14;
tmp_88.bearerCapability() = bcap;
tmp_88.streamIdentifier() = OMIT_VALUE;
tmp_88.supportedCodecs() = OMIT_VALUE;
tmp_88.emergencyCategory() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__CC__CALL__PROC(const INTEGER& tid)
{
TTCN_Location current_location("L3_Templates.ttcn", 1549, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_CC_CALL_PROC");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_89 = ret_val.tiOrSkip().transactionId();
tmp_89.tio() = int2bit(tid, 3);
tmp_89.tiFlag() = ANY_VALUE;
tmp_89.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__CallProceeding_template& tmp_90 = ret_val.msgs().cc().callProceeding();
tmp_90.messageType() = bs_48;
tmp_90.nsd() = bs_14;
tmp_90.repeatIndicator() = ANY_OR_OMIT;
tmp_90.bearerCapability1() = ANY_OR_OMIT;
tmp_90.bearerCapability2() = ANY_OR_OMIT;
tmp_90.facility() = ANY_OR_OMIT;
tmp_90.progressIndicator() = ANY_OR_OMIT;
tmp_90.priorityGranted() = ANY_OR_OMIT;
tmp_90.networkCCCapabilities() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__CC__ALERTING(const INTEGER& tid)
{
TTCN_Location current_location("L3_Templates.ttcn", 1575, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_CC_ALERTING");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_91 = ret_val.tiOrSkip().transactionId();
tmp_91.tio() = int2bit(tid, 3);
tmp_91.tiFlag() = ANY_VALUE;
tmp_91.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__Alerting__NW__MS_template& tmp_92 = ret_val.msgs().cc().alerting__NW__MS();
tmp_92.messageType() = bs_52;
tmp_92.nsd() = bs_14;
tmp_92.facility() = ANY_OR_OMIT;
tmp_92.progressIndicator() = ANY_OR_OMIT;
tmp_92.user__user() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__CC__ALERTING(const INTEGER& tid)
{
TTCN_Location current_location("L3_Templates.ttcn", 1597, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_CC_ALERTING");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_93 = ret_val.tiOrSkip().transactionId();
tmp_93.tio() = int2bit(tid, 3);
tmp_93.tiFlag() = bs_1;
tmp_93.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__Alerting__MS__NW_template& tmp_94 = ret_val.msgs().cc().alerting__MS__NW();
tmp_94.messageType() = bs_52;
tmp_94.nsd() = bs_14;
tmp_94.facility() = OMIT_VALUE;
tmp_94.user__user() = OMIT_VALUE;
tmp_94.ss__VersionIndicator() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MT__CC__ALERTING(const INTEGER& tid)
{
TTCN_Location current_location("L3_Templates.ttcn", 1619, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MT_CC_ALERTING");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_95 = ret_val.tiOrSkip().transactionId();
tmp_95.tio() = int2bit(tid, 3);
tmp_95.tiFlag() = bs_1;
tmp_95.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__Alerting__MS__NW_template& tmp_96 = ret_val.msgs().cc().alerting__MS__NW();
tmp_96.messageType() = bs_52;
tmp_96.nsd() = bs_14;
tmp_96.facility() = OMIT_VALUE;
tmp_96.user__user() = OMIT_VALUE;
tmp_96.ss__VersionIndicator() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__CC__CONNECT(const INTEGER& tid)
{
TTCN_Location current_location("L3_Templates.ttcn", 1641, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_CC_CONNECT");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_97 = ret_val.tiOrSkip().transactionId();
tmp_97.tio() = int2bit(tid, 3);
tmp_97.tiFlag() = bs_1;
tmp_97.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__Connect__MS__NW_template& tmp_98 = ret_val.msgs().cc().connect__MS__NW();
tmp_98.messageType() = bs_57;
tmp_98.nsd() = bs_14;
tmp_98.facility() = OMIT_VALUE;
tmp_98.connectedSubAddress() = OMIT_VALUE;
tmp_98.user__user() = OMIT_VALUE;
tmp_98.ss__VersionIndicator() = OMIT_VALUE;
tmp_98.streamIdentifier() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__CC__CONNECT(const INTEGER& tid)
{
TTCN_Location current_location("L3_Templates.ttcn", 1665, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_CC_CONNECT");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_99 = ret_val.tiOrSkip().transactionId();
tmp_99.tio() = int2bit(tid, 3);
tmp_99.tiFlag() = bs_1;
tmp_99.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__Connect__NW__MS_template& tmp_100 = ret_val.msgs().cc().connect__NW__MS();
tmp_100.messageType() = bs_57;
tmp_100.nsd() = bs_14;
tmp_100.facility() = ANY_OR_OMIT;
tmp_100.progressIndicator() = ANY_OR_OMIT;
tmp_100.connectedNumber() = ANY_OR_OMIT;
tmp_100.connectedSubAddress() = ANY_OR_OMIT;
tmp_100.user__user() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__CC__CONNECT__ACK(const INTEGER& tid)
{
TTCN_Location current_location("L3_Templates.ttcn", 1689, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_CC_CONNECT_ACK");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_101 = ret_val.tiOrSkip().transactionId();
tmp_101.tio() = int2bit(tid, 3);
tmp_101.tiFlag() = bs_0;
tmp_101.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__ConnectAck_template& tmp_102 = ret_val.msgs().cc().connectAck();
tmp_102.messageType() = bs_58;
tmp_102.nsd() = bs_14;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__CC__START__DTMF(const INTEGER& tid, const CHARSTRING& number)
{
TTCN_Location current_location("L3_Templates.ttcn", 1708, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_CC_START_DTMF");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_103 = ret_val.tiOrSkip().transactionId();
tmp_103.tio() = int2bit(tid, 3);
tmp_103.tiFlag() = bs_0;
tmp_103.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__StartDTMF_template& tmp_104 = ret_val.msgs().cc().startDTMF();
tmp_104.messageType() = bs_59;
tmp_104.nsd() = bs_14;
{
MobileL3__CC__Types::KeypadFacility_template& tmp_105 = tmp_104.keypadFacility();
tmp_105.elementIdentifier() = os_15;
tmp_105.keypadInformation() = int2bit(char2int(number), 7);
tmp_105.spare__1() = bs_0;
}
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__CC__DISC(const INTEGER& tid)
{
TTCN_Location current_location("L3_Templates.ttcn", 1732, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_CC_DISC");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_106 = ret_val.tiOrSkip().transactionId();
tmp_106.tio() = int2bit(tid, 3);
tmp_106.tiFlag() = ANY_VALUE;
tmp_106.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__Disconnect__NW__MS_template& tmp_107 = ret_val.msgs().cc().disconnect__NW__MS();
tmp_107.messageType() = bs_60;
tmp_107.nsd() = bs_14;
tmp_107.cause() = ANY_VALUE;
tmp_107.facility() = ANY_OR_OMIT;
tmp_107.progressIndicator() = ANY_OR_OMIT;
tmp_107.user__user() = ANY_OR_OMIT;
tmp_107.allowedActions() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__CC__DISC(const INTEGER& tid, const BITSTRING& tid__remote, const BITSTRING& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 1756, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_CC_DISC");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_108 = ret_val.tiOrSkip().transactionId();
tmp_108.tio() = int2bit(tid, 3);
tmp_108.tiFlag() = tid__remote;
tmp_108.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__Disconnect__MS__NW_template& tmp_109 = ret_val.msgs().cc().disconnect__MS__NW();
tmp_109.messageType() = bs_60;
tmp_109.nsd() = bs_14;
tmp_109.cause() = ts__ML3__Cause__LV(cause, ts__ML3__Cause__LV_loc_defval, ts__ML3__Cause__LV_std_defval);
tmp_109.facility() = OMIT_VALUE;
tmp_109.user__user() = OMIT_VALUE;
tmp_109.ss__VersionIndicator() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__CC__RELEASE(const INTEGER& tid)
{
TTCN_Location current_location("L3_Templates.ttcn", 1779, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_CC_RELEASE");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_110 = ret_val.tiOrSkip().transactionId();
tmp_110.tio() = int2bit(tid, 3);
tmp_110.tiFlag() = ANY_VALUE;
tmp_110.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__Release__NW__MS_template& tmp_111 = ret_val.msgs().cc().release__NW__MS();
tmp_111.messageType() = bs_61;
tmp_111.nsd() = bs_14;
tmp_111.cause() = ANY_VALUE;
tmp_111.secondCause() = ANY_OR_OMIT;
tmp_111.facility() = ANY_OR_OMIT;
tmp_111.user__user() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__CC__RELEASE(const INTEGER& tid, const BITSTRING& tid__remote, const BITSTRING& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 1802, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_CC_RELEASE");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_112 = ret_val.tiOrSkip().transactionId();
tmp_112.tio() = int2bit(tid, 3);
tmp_112.tiFlag() = tid__remote;
tmp_112.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__Release__MS__NW_template& tmp_113 = ret_val.msgs().cc().release__MS__NW();
tmp_113.messageType() = bs_61;
tmp_113.nsd() = bs_14;
tmp_113.cause() = ts__ML3__Cause(cause, ts__ML3__Cause_loc_defval, ts__ML3__Cause_std_defval);
tmp_113.secondCause() = OMIT_VALUE;
tmp_113.facility() = OMIT_VALUE;
tmp_113.user__user() = OMIT_VALUE;
tmp_113.ss__VersionIndicator() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__CC__REL__COMPL(const INTEGER& tid, const BITSTRING& tid__remote)
{
TTCN_Location current_location("L3_Templates.ttcn", 1827, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_CC_REL_COMPL");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_114 = ret_val.tiOrSkip().transactionId();
tmp_114.tio() = int2bit(tid, 3);
tmp_114.tiFlag() = tid__remote;
tmp_114.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__ReleaseComplete__MS__NW_template& tmp_115 = ret_val.msgs().cc().releaseComplete__MS__NW();
tmp_115.messageType() = bs_62;
tmp_115.nsd() = bs_14;
tmp_115.cause() = OMIT_VALUE;
tmp_115.facility() = OMIT_VALUE;
tmp_115.user__user() = OMIT_VALUE;
tmp_115.ss__VersionIndicator() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__CC__REL__COMPL(const INTEGER& tid)
{
TTCN_Location current_location("L3_Templates.ttcn", 1850, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_CC_REL_COMPL");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_116 = ret_val.tiOrSkip().transactionId();
tmp_116.tio() = int2bit(tid, 3);
tmp_116.tiFlag() = ANY_VALUE;
tmp_116.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__ReleaseComplete__NW__MS_template& tmp_117 = ret_val.msgs().cc().releaseComplete__NW__MS();
tmp_117.messageType() = bs_62;
tmp_117.nsd() = bs_14;
tmp_117.cause() = ANY_OR_OMIT;
tmp_117.facility() = ANY_OR_OMIT;
tmp_117.user__user() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__MM__AUTH__REQ(const OCTETSTRING_template& rand)
{
TTCN_Location current_location("L3_Templates.ttcn", 1874, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_MM_AUTH_REQ");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_18;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__AuthenticationRequest_template& tmp_118 = ret_val.msgs().mm().authenticationRequest();
tmp_118.messageType() = bs_63;
tmp_118.nsd() = bs_14;
tmp_118.cipheringKeySequenceNumber() = ANY_VALUE;
tmp_118.spare2__4() = ANY_VALUE;
tmp_118.authenticationParRAND() = rand;
tmp_118.authenticationParAUTN() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__MM__AUTH__REQ__3G(const OCTETSTRING_template& rand, const OCTETSTRING_template& autn)
{
TTCN_Location current_location("L3_Templates.ttcn", 1893, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_MM_AUTH_REQ_3G");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_18;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__AuthenticationRequest_template& tmp_119 = ret_val.msgs().mm().authenticationRequest();
tmp_119.messageType() = bs_63;
tmp_119.nsd() = bs_14;
tmp_119.cipheringKeySequenceNumber() = ANY_VALUE;
tmp_119.spare2__4() = ANY_VALUE;
tmp_119.authenticationParRAND() = rand;
{
MobileL3__MM__Types::AuthenticationParameterAUTNTLV_template& tmp_120 = tmp_119.authenticationParAUTN();
tmp_120.elementIdentifier() = os_11;
tmp_120.lengthIndicator() = ANY_VALUE;
tmp_120.autnValue() = autn;
}
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MT__MM__AUTH__RESP__2G(const OCTETSTRING& sres)
{
TTCN_Location current_location("L3_Templates.ttcn", 1916, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MT_MM_AUTH_RESP_2G");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_18;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__AuthenticationResponse_template& tmp_121 = ret_val.msgs().mm().authenticationResponse();
tmp_121.messageType() = bs_64;
tmp_121.nsd() = bs_14;
tmp_121.authenticationParSRES() = sres;
tmp_121.authenticationParSRESext() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MT__MM__AUTH__RESP__3G(const OCTETSTRING& sres, const OCTETSTRING& res)
{
TTCN_Location current_location("L3_Templates.ttcn", 1933, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MT_MM_AUTH_RESP_3G");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_18;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__AuthenticationResponse_template& tmp_122 = ret_val.msgs().mm().authenticationResponse();
tmp_122.messageType() = bs_64;
tmp_122.nsd() = bs_14;
tmp_122.authenticationParSRES() = sres;
{
MobileL3__MM__Types::AuthenticationResponseParameterUMTSTLV_template& tmp_123 = tmp_122.authenticationParSRESext();
tmp_123.elementIdentifier() = os_16;
tmp_123.lengthIndicator() = 0;
tmp_123.valueField() = res;
}
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__CC__CALL__CONF(const INTEGER& tid, const MobileL3__CC__Types::BearerCapability__TLV_template& bcap)
{
TTCN_Location current_location("L3_Templates.ttcn", 1954, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_CC_CALL_CONF");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_124 = ret_val.tiOrSkip().transactionId();
tmp_124.tio() = int2bit(tid, 3);
tmp_124.tiFlag() = bs_1;
tmp_124.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__CallConfirmed_template& tmp_125 = ret_val.msgs().cc().callConfirmed();
tmp_125.messageType() = bs_46;
tmp_125.nsd() = bs_14;
tmp_125.repeatIndicator() = OMIT_VALUE;
tmp_125.bearerCapability1() = bcap;
tmp_125.bearerCapability2() = OMIT_VALUE;
tmp_125.cause() = OMIT_VALUE;
tmp_125.cC__Capabilities() = OMIT_VALUE;
tmp_125.streamIdentifier() = OMIT_VALUE;
tmp_125.supportedCodecs() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__CC__SETUP(const INTEGER& tid, const HEXSTRING_template& called, const HEXSTRING_template& calling, const MobileL3__CC__Types::BearerCapability__TLV_template& bcap)
{
TTCN_Location current_location("L3_Templates.ttcn", 1982, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_CC_SETUP");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_53;
{
MobileL3__Types::L3__TransactionId_template& tmp_126 = ret_val.tiOrSkip().transactionId();
tmp_126.tio() = int2bit(tid, 3);
tmp_126.tiFlag() = bs_0;
tmp_126.tIExtension() = OMIT_VALUE;
}
{
MobileL3__CC__Types::PDU__ML3__Setup__NW__MS_template& tmp_127 = ret_val.msgs().cc().setup__NW__MS();
tmp_127.messageType() = bs_55;
tmp_127.nsd() = bs_14;
tmp_127.bcRepeatIndicator() = ANY_OR_OMIT;
tmp_127.bearerCapability1() = bcap;
tmp_127.bearerCapability2() = ANY_OR_OMIT;
tmp_127.facility() = ANY_OR_OMIT;
tmp_127.progressIndicator() = ANY_OR_OMIT;
tmp_127.signal() = ANY_OR_OMIT;
{
MobileL3__CC__Types::CallingPartyBCD__Number_template& tmp_128 = tmp_127.callingPartyBCD__Number();
tmp_128 = tr__Calling(calling);
tmp_128.set_ifpresent();
}
tmp_127.callingPartySubAddress() = ANY_OR_OMIT;
{
MobileL3__CC__Types::CalledPartyBCD__Number_template& tmp_129 = tmp_127.calledPartyBCD__Number();
tmp_129 = tr__Called(called);
tmp_129.set_ifpresent();
}
tmp_127.calledPartySubAddress() = ANY_OR_OMIT;
tmp_127.redirectingPartyBCDNumber() = ANY_OR_OMIT;
tmp_127.redirectingPartySubaddress() = ANY_OR_OMIT;
tmp_127.llc__RepeatIndicator() = ANY_OR_OMIT;
tmp_127.lowLayerCompatibility1() = ANY_OR_OMIT;
tmp_127.lowLayerCompatibility2() = ANY_OR_OMIT;
tmp_127.hlc__RepeatIndicator() = ANY_OR_OMIT;
tmp_127.highLayerCompatibility1() = ANY_OR_OMIT;
tmp_127.highLayerCompatibility2() = ANY_OR_OMIT;
tmp_127.user__user() = ANY_OR_OMIT;
tmp_127.priority() = ANY_OR_OMIT;
tmp_127.alert() = ANY_OR_OMIT;
tmp_127.networkCCCapabilities() = ANY_OR_OMIT;
tmp_127.causeofNoCli() = ANY_OR_OMIT;
tmp_127.backupBearerCapacity() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__CommonIE__Types::Facility__TLV_template ts__FacTLV(const OCTETSTRING& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2031, TTCN_Location::LOCATION_TEMPLATE, "ts_FacTLV");
MobileL3__CommonIE__Types::Facility__TLV_template ret_val;
ret_val.elementIdentifier() = os_17;
ret_val.lengthIndicator() = facility.lengthof();
ret_val.facilityInformation() = facility;
return ret_val;
}

MobileL3__CommonIE__Types::Facility__TLV_template tr__FacTLV(const OCTETSTRING_template& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2036, TTCN_Location::LOCATION_TEMPLATE, "tr_FacTLV");
MobileL3__CommonIE__Types::Facility__TLV_template ret_val;
ret_val.elementIdentifier() = os_17;
ret_val.lengthIndicator() = ANY_VALUE;
ret_val.facilityInformation() = facility;
return ret_val;
}

MobileL3__CommonIE__Types::Facility__LV_template ts__FacLV(const OCTETSTRING& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2042, TTCN_Location::LOCATION_TEMPLATE, "ts_FacLV");
MobileL3__CommonIE__Types::Facility__LV_template ret_val;
ret_val.lengthIndicator() = facility.lengthof();
ret_val.facilityInformation() = facility;
return ret_val;
}

MobileL3__CommonIE__Types::Facility__LV_template tr__FacLV(const OCTETSTRING_template& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2046, TTCN_Location::LOCATION_TEMPLATE, "tr_FacLV");
MobileL3__CommonIE__Types::Facility__LV_template ret_val;
ret_val.lengthIndicator() = ANY_VALUE;
ret_val.facilityInformation() = facility;
return ret_val;
}

MobileL3__CommonIE__Types::Facility__TLV_template f__facility__or__omit(const OCTETSTRING_template& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2051, TTCN_Location::LOCATION_FUNCTION, "f_facility_or_omit");
current_location.update_lineno(2053);
/* L3_Templates.ttcn, line 2053 */
if (facility.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(2054);
/* L3_Templates.ttcn, line 2054 */
return MobileL3__CommonIE__Types::Facility__TLV_template(OMIT_VALUE);
}
else {
current_location.update_lineno(2056);
/* L3_Templates.ttcn, line 2056 */
return ts__FacTLV(facility.valueof());
}
}

MobileL3__CommonIE__Types::Facility__TLV_template f__facility__or__wc(const OCTETSTRING_template& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2059, TTCN_Location::LOCATION_FUNCTION, "f_facility_or_wc");
current_location.update_lineno(2061);
/* L3_Templates.ttcn, line 2061 */
if (facility.get_istemplate_kind((const char*)cs_2)) {
current_location.update_lineno(2062);
/* L3_Templates.ttcn, line 2062 */
return MobileL3__CommonIE__Types::Facility__TLV_template(ANY_OR_OMIT);
}
else {
current_location.update_lineno(2063);
/* L3_Templates.ttcn, line 2063 */
if (facility.get_istemplate_kind((const char*)cs_0)) {
current_location.update_lineno(2064);
/* L3_Templates.ttcn, line 2064 */
return MobileL3__CommonIE__Types::Facility__TLV_template(ANY_VALUE);
}
else {
current_location.update_lineno(2065);
/* L3_Templates.ttcn, line 2065 */
if (facility.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(2066);
/* L3_Templates.ttcn, line 2066 */
return MobileL3__CommonIE__Types::Facility__TLV_template(OMIT_VALUE);
}
else {
current_location.update_lineno(2068);
/* L3_Templates.ttcn, line 2068 */
return tr__FacTLV(facility);
}
}
}
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__SS__REGISTER(const INTEGER& tid, const BITSTRING& ti__flag, const OCTETSTRING& facility, const MobileL3__CommonIE__Types::SS__VersionIndicator_template& ss__ver)
{
TTCN_Location current_location("L3_Templates.ttcn", 2072, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_SS_REGISTER");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_65;
{
MobileL3__Types::L3__TransactionId_template& tmp_130 = ret_val.tiOrSkip().transactionId();
tmp_130.tio() = int2bit(tid, 3);
tmp_130.tiFlag() = ti__flag;
tmp_130.tIExtension() = OMIT_VALUE;
}
{
MobileL3__SS__Types::PDU__ML3__SS__Register__MS__NW_template& tmp_131 = ret_val.msgs().ss().register_();
tmp_131.messageType() = bs_66;
tmp_131.nsd() = bs_14;
tmp_131.facility() = ts__FacTLV(facility);
tmp_131.ss__version() = ss__ver;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template tr__ML3__MO__SS__REGISTER(const INTEGER_template& tid, const BITSTRING_template& ti__flag, const OCTETSTRING_template& facility, const MobileL3__CommonIE__Types::SS__VersionIndicator_template& ss__ver)
{
TTCN_Location current_location("L3_Templates.ttcn", 2096, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MO_SS_REGISTER");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_65;
{
MobileL3__Types::L3__TransactionId_template& tmp_132 = ret_val.tiOrSkip().transactionId();
tmp_132.tio() = f__tid__or__wc(tid);
tmp_132.tiFlag() = ti__flag;
tmp_132.tIExtension() = OMIT_VALUE;
}
{
MobileL3__SS__Types::PDU__ML3__SS__Register__MS__NW_template& tmp_133 = ret_val.msgs().ss().register_();
tmp_133.messageType() = bs_66;
tmp_133.nsd() = bs_14;
tmp_133.facility() = tr__FacTLV(facility);
tmp_133.ss__version() = ss__ver;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template ts__ML3__MT__SS__REGISTER(const INTEGER& tid, const BITSTRING& ti__flag, const OCTETSTRING& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2121, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MT_SS_REGISTER");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_65;
{
MobileL3__Types::L3__TransactionId_template& tmp_134 = ret_val.tiOrSkip().transactionId();
tmp_134.tio() = int2bit(tid, 3);
tmp_134.tiFlag() = ti__flag;
tmp_134.tIExtension() = OMIT_VALUE;
}
{
MobileL3__SS__Types::PDU__ML3__SS__Register__NW__MS_template& tmp_135 = ret_val.msgs().ss().register_();
tmp_135.messageType() = bs_66;
tmp_135.nsd() = bs_14;
tmp_135.facility() = ts__FacTLV(facility);
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__SS__REGISTER(const INTEGER_template& tid, const BITSTRING_template& ti__flag, const OCTETSTRING_template& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2143, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_SS_REGISTER");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_65;
{
MobileL3__Types::L3__TransactionId_template& tmp_136 = ret_val.tiOrSkip().transactionId();
tmp_136.tio() = f__tid__or__wc(tid);
tmp_136.tiFlag() = ti__flag;
tmp_136.tIExtension() = OMIT_VALUE;
}
{
MobileL3__SS__Types::PDU__ML3__SS__Register__NW__MS_template& tmp_137 = ret_val.msgs().ss().register_();
tmp_137.messageType() = bs_66;
tmp_137.nsd() = bs_14;
tmp_137.facility() = tr__FacTLV(facility);
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__SS__FACILITY(const INTEGER& tid, const BITSTRING& ti__flag, const OCTETSTRING& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2166, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_SS_FACILITY");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_65;
{
MobileL3__Types::L3__TransactionId_template& tmp_138 = ret_val.tiOrSkip().transactionId();
tmp_138.tio() = int2bit(tid, 3);
tmp_138.tiFlag() = ti__flag;
tmp_138.tIExtension() = OMIT_VALUE;
}
{
MobileL3__SS__Types::PDU__ML3__SS__Facility_template& tmp_139 = ret_val.msgs().ss().facility();
tmp_139.messageType() = bs_67;
tmp_139.nsd() = bs_14;
tmp_139.facility() = ts__FacLV(facility);
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template tr__ML3__MO__SS__FACILITY(const INTEGER_template& tid, const BITSTRING_template& ti__flag, const OCTETSTRING_template& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2188, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MO_SS_FACILITY");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_65;
{
MobileL3__Types::L3__TransactionId_template& tmp_140 = ret_val.tiOrSkip().transactionId();
tmp_140.tio() = f__tid__or__wc(tid);
tmp_140.tiFlag() = ti__flag;
tmp_140.tIExtension() = OMIT_VALUE;
}
{
MobileL3__SS__Types::PDU__ML3__SS__Facility_template& tmp_141 = ret_val.msgs().ss().facility();
tmp_141.messageType() = bs_67;
tmp_141.nsd() = bs_14;
tmp_141.facility() = tr__FacLV(facility);
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template ts__ML3__MT__SS__FACILITY(const INTEGER& tid, const BITSTRING& ti__flag, const OCTETSTRING& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2211, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MT_SS_FACILITY");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_65;
{
MobileL3__Types::L3__TransactionId_template& tmp_142 = ret_val.tiOrSkip().transactionId();
tmp_142.tio() = int2bit(tid, 3);
tmp_142.tiFlag() = ti__flag;
tmp_142.tIExtension() = OMIT_VALUE;
}
{
MobileL3__SS__Types::PDU__ML3__SS__Facility_template& tmp_143 = ret_val.msgs().ss().facility();
tmp_143.messageType() = bs_67;
tmp_143.nsd() = bs_14;
tmp_143.facility() = ts__FacLV(facility);
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__SS__FACILITY(const INTEGER_template& tid, const BITSTRING_template& ti__flag, const OCTETSTRING_template& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2233, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_SS_FACILITY");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_65;
{
MobileL3__Types::L3__TransactionId_template& tmp_144 = ret_val.tiOrSkip().transactionId();
tmp_144.tio() = f__tid__or__wc(tid);
tmp_144.tiFlag() = ti__flag;
tmp_144.tIExtension() = OMIT_VALUE;
}
{
MobileL3__SS__Types::PDU__ML3__SS__Facility_template& tmp_145 = ret_val.msgs().ss().facility();
tmp_145.messageType() = bs_67;
tmp_145.nsd() = bs_14;
tmp_145.facility() = tr__FacLV(facility);
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__SS__RELEASE__COMPLETE(const INTEGER& tid, const BITSTRING& ti__flag, const MobileL3__CommonIE__Types::ML3__Cause__TLV_template& cause, const OCTETSTRING_template& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2256, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_SS_RELEASE_COMPLETE");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_65;
{
MobileL3__Types::L3__TransactionId_template& tmp_146 = ret_val.tiOrSkip().transactionId();
tmp_146.tio() = int2bit(tid, 3);
tmp_146.tiFlag() = ti__flag;
tmp_146.tIExtension() = OMIT_VALUE;
}
{
MobileL3__SS__Types::PDU__ML3__SS__ReleaseComplete_template& tmp_147 = ret_val.msgs().ss().releaseComplete__MS__NW();
tmp_147.messageType() = bs_62;
tmp_147.nsd() = bs_14;
tmp_147.cause() = cause;
tmp_147.facility() = f__facility__or__omit(facility);
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template tr__ML3__MO__SS__RELEASE__COMPLETE(const INTEGER_template& tid, const BITSTRING_template& ti__flag, const MobileL3__CommonIE__Types::ML3__Cause__TLV_template& cause, const OCTETSTRING_template& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2280, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MO_SS_RELEASE_COMPLETE");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_65;
{
MobileL3__Types::L3__TransactionId_template& tmp_148 = ret_val.tiOrSkip().transactionId();
tmp_148.tio() = f__tid__or__wc(tid);
tmp_148.tiFlag() = ti__flag;
tmp_148.tIExtension() = OMIT_VALUE;
}
{
MobileL3__SS__Types::PDU__ML3__SS__ReleaseComplete_template& tmp_149 = ret_val.msgs().ss().releaseComplete__MS__NW();
tmp_149.messageType() = bs_62;
tmp_149.nsd() = bs_14;
tmp_149.cause() = cause;
tmp_149.facility() = f__facility__or__wc(facility);
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template ts__ML3__MT__SS__RELEASE__COMPLETE(const INTEGER& tid, const BITSTRING& ti__flag, const MobileL3__CommonIE__Types::ML3__Cause__TLV_template& cause, const OCTETSTRING_template& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2305, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MT_SS_RELEASE_COMPLETE");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_65;
{
MobileL3__Types::L3__TransactionId_template& tmp_150 = ret_val.tiOrSkip().transactionId();
tmp_150.tio() = int2bit(tid, 3);
tmp_150.tiFlag() = ti__flag;
tmp_150.tIExtension() = OMIT_VALUE;
}
{
MobileL3__SS__Types::PDU__ML3__SS__ReleaseComplete_template& tmp_151 = ret_val.msgs().ss().releaseComplete__NW__MS();
tmp_151.messageType() = bs_62;
tmp_151.nsd() = bs_14;
tmp_151.cause() = cause;
tmp_151.facility() = f__facility__or__omit(facility);
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__SS__RELEASE__COMPLETE(const INTEGER_template& tid, const BITSTRING_template& ti__flag, const MobileL3__CommonIE__Types::ML3__Cause__TLV_template& cause, const OCTETSTRING_template& facility)
{
TTCN_Location current_location("L3_Templates.ttcn", 2329, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_SS_RELEASE_COMPLETE");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_65;
{
MobileL3__Types::L3__TransactionId_template& tmp_152 = ret_val.tiOrSkip().transactionId();
tmp_152.tio() = f__tid__or__wc(tid);
tmp_152.tiFlag() = ti__flag;
tmp_152.tIExtension() = OMIT_VALUE;
}
{
MobileL3__SS__Types::PDU__ML3__SS__ReleaseComplete_template& tmp_153 = ret_val.msgs().ss().releaseComplete__NW__MS();
tmp_153.messageType() = bs_62;
tmp_153.nsd() = bs_14;
tmp_153.cause() = cause;
tmp_153.facility() = f__facility__or__wc(facility);
}
return ret_val;
}

MobileL3__GMM__SM__Types::AttachTypeV ts__GMM__AttachType(const BOOLEAN& combined, const BOOLEAN& )
{
TTCN_Location current_location("L3_Templates.ttcn", 2390, TTCN_Location::LOCATION_FUNCTION, "ts_GMM_AttachType");
current_location.update_lineno(2392);
/* L3_Templates.ttcn, line 2392 */
MobileL3__GMM__SM__Types::AttachTypeV att;
current_location.update_lineno(2393);
/* L3_Templates.ttcn, line 2393 */
if (combined) {
current_location.update_lineno(2394);
/* L3_Templates.ttcn, line 2394 */
att.attachType() = bs_11;
}
else {
current_location.update_lineno(2396);
/* L3_Templates.ttcn, line 2396 */
att.attachType() = bs_8;
}
current_location.update_lineno(2398);
/* L3_Templates.ttcn, line 2398 */
att.for__l3() = Osmocom__Types::bool2bit(combined);
current_location.update_lineno(2399);
/* L3_Templates.ttcn, line 2399 */
return att;
}

MobileL3__GMM__SM__Types::UpdateTypeV_template ts__GMM__UpdateType(const GprsUpdateType& upd__t, const BOOLEAN& combined, const BOOLEAN& )
{
TTCN_Location current_location("L3_Templates.ttcn", 2410, TTCN_Location::LOCATION_TEMPLATE, "ts_GMM_UpdateType");
MobileL3__GMM__SM__Types::UpdateTypeV_template ret_val;
ret_val.valueField() = int2bit(GprsUpdateType::enum2int(upd__t), 3);
ret_val.for__l3() = Osmocom__Types::bool2bit(combined);
return ret_val;
}

BITSTRING f__presence__bit__MultislotCap__GPRS(const MobileL3__GMM__SM__Types::MultislotCap__GPRS_template& mscap__gprs)
{
TTCN_Location current_location("L3_Templates.ttcn", 2423, TTCN_Location::LOCATION_FUNCTION, "f_presence_bit_MultislotCap_GPRS");
current_location.update_lineno(2424);
/* L3_Templates.ttcn, line 2424 */
if (mscap__gprs.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(2425);
/* L3_Templates.ttcn, line 2425 */
return bs_0;
}
current_location.update_lineno(2427);
/* L3_Templates.ttcn, line 2427 */
return bs_1;
}

BITSTRING f__presence__bit__MultislotCap__EGPRS(const MobileL3__GMM__SM__Types::MultislotCap__EGPRS_template& mscap__egprs)
{
TTCN_Location current_location("L3_Templates.ttcn", 2429, TTCN_Location::LOCATION_FUNCTION, "f_presence_bit_MultislotCap_EGPRS");
current_location.update_lineno(2430);
/* L3_Templates.ttcn, line 2430 */
if (mscap__egprs.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(2431);
/* L3_Templates.ttcn, line 2431 */
return bs_0;
}
current_location.update_lineno(2433);
/* L3_Templates.ttcn, line 2433 */
return bs_1;
}

MobileL3__GMM__SM__Types::MSRACapabilityValuesRecord_template ts__RaCapRec(const BITSTRING& att, const MobileL3__GMM__SM__Types::MultislotCap__GPRS_template& mscap__gprs, const MobileL3__GMM__SM__Types::MultislotCap__EGPRS_template& mscap__egprs)
{
TTCN_Location current_location("L3_Templates.ttcn", 2446, TTCN_Location::LOCATION_TEMPLATE, "ts_RaCapRec");
MobileL3__GMM__SM__Types::MSRACapabilityValuesRecord_template ret_val;
{
MobileL3__GMM__SM__Types::MSRACapabilityValuesExclude1111_template& tmp_157 = ret_val.mSRACapabilityValues().mSRACapabilityValuesExclude1111();
tmp_157.accessTechnType() = att;
{
MobileL3__GMM__SM__Types::AccessCapabilitiesStruct_template& tmp_158 = tmp_157.accessCapabilities();
tmp_158.lengthIndicator() = 0;
{
MobileL3__GMM__SM__Types::AccessCapabilities_template& tmp_159 = tmp_158.accessCapabilities();
tmp_159.rfPowerCapability() = bs_8;
tmp_159.presenceBitA5() = bs_0;
tmp_159.a5bits() = ts__a5bits__a51a53;
tmp_159.esind() = bs_1;
tmp_159.psbit() = bs_0;
tmp_159.vgcs() = bs_0;
tmp_159.vbs() = bs_0;
tmp_159.presenceBitMultislot() = bs_1;
{
MobileL3__GMM__SM__Types::MultislotCap_template& tmp_160 = tmp_159.multislotcap();
tmp_160.presenceBitHscsd() = bs_0;
tmp_160.hscsdmultislotclass() = OMIT_VALUE;
tmp_160.presenceBitGprs() = f__presence__bit__MultislotCap__GPRS(mscap__gprs);
tmp_160.gprsmultislot() = mscap__gprs;
tmp_160.presenceBitSms() = bs_0;
tmp_160.multislotCap__SMS() = OMIT_VALUE;
{
MobileL3__GMM__SM__Types::MultislotCapAdditionsAfterRel97_template& tmp_161 = tmp_160.multislotCapAdditionsAfterRel97();
tmp_161.presenceBitEcsdmulti() = bs_0;
tmp_161.ecsdmultislotclass() = OMIT_VALUE;
tmp_161.presenceBitEgprsmulti() = f__presence__bit__MultislotCap__EGPRS(mscap__egprs);
tmp_161.multislotCap__EGPRS() = mscap__egprs;
tmp_161.presenceBitDtmGprsmulti() = bs_0;
tmp_161.multislotCapdtmgprsmultislotsubclass() = OMIT_VALUE;
}
}
tmp_159.accessCapAdditionsAfterRel97() = OMIT_VALUE;
}
tmp_158.spare__bits() = OMIT_VALUE;
}
}
ret_val.presenceBitMSRACap() = bs_0;
return ret_val;
}

MobileL3__GMM__SM__Types::NetworkResourceIdentifierContainerTLV_template ts__GMM__NRI(const INTEGER& nri)
{
TTCN_Location current_location("L3_Templates.ttcn", 2493, TTCN_Location::LOCATION_TEMPLATE, "ts_GMM_NRI");
MobileL3__GMM__SM__Types::NetworkResourceIdentifierContainerTLV_template ret_val;
ret_val.elementIdentifier() = os_18;
{
MobileL3__GMM__SM__Types::NetworkResourceIdentifierContainerLV_template& tmp_163 = ret_val.networkResourceIdentifierContainerLV();
tmp_163.lengthIndicator() = 2;
{
MobileL3__GMM__SM__Types::NetworkResourceIdentifierContainerV_template& tmp_164 = tmp_163.networkResourceIdentifierContainerV();
tmp_164.nRIContainerValue() = Osmocom__Types::f__bits__reversed(int2bit(nri, 10));
tmp_164.spare() = bs_16;
}
}
return ret_val;
}

MobileL3__Types::PDU__L3__MS__SGSN_template ts__GMM__ATTACH__REQ(const MobileL3__CommonIE__Types::MobileIdentityLV& mi__lv, const MobileL3__GMM__SM__Types::RoutingAreaIdentificationV& old__ra, const BOOLEAN& combined, const BOOLEAN& follow__on__pending, const MobileL3__CommonIE__Types::MobileStationClassmark2__TLV_template& cm2__tlv, const MobileL3__CommonIE__Types::MobileStationClassmark3__TLV_template& cm3__tlv, const MobileL3__GMM__SM__Types::NetworkResourceIdentifierContainerTLV_template& nri, const MobileL3__GMM__SM__Types::P__TMSISignatureTV_template& p__tmsi__sig, const MobileL3__CommonIE__Types::P__TMSI__TypeTV_template& p__tmsi__type, const MobileL3__CommonIE__Types::MobileIdentityTLV_template& add__p__tmsi, const MobileL3__CommonIE__Types::RoutingAreaIdentification2TLV_template& add__rai)
{
TTCN_Location current_location("L3_Templates.ttcn", 2504, TTCN_Location::LOCATION_TEMPLATE, "ts_GMM_ATTACH_REQ");
MobileL3__Types::PDU__L3__MS__SGSN_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__AttachRequest_template& tmp_165 = ret_val.msgs().gprs__mm().attachRequest();
tmp_165.messageType() = bs_25;
tmp_165.msNetworkCapability() = ts__GMM__MsNetCapLV;
tmp_165.attachType() = ts__GMM__AttachType(combined, follow__on__pending);
{
MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_template& tmp_166 = tmp_165.gprsCKSN();
tmp_166.keySequence() = bs_68;
tmp_166.spare() = bs_0;
}
tmp_165.drxParam() = ts__DrxParameterV;
tmp_165.mobileIdentity() = mi__lv;
tmp_165.oldRoutingAreaID() = old__ra;
tmp_165.msRACap() = ts__MS__RaCapa;
tmp_165.ptmsiSignature() = p__tmsi__sig;
tmp_165.reqGPRStimer() = OMIT_VALUE;
tmp_165.tmsiStatus() = OMIT_VALUE;
tmp_165.pC__LCSCapability() = OMIT_VALUE;
tmp_165.mobileStationClassmark2() = cm2__tlv;
tmp_165.mobileStationClassmark3() = cm3__tlv;
tmp_165.supportedCodecs() = OMIT_VALUE;
tmp_165.uENetworkCapability() = OMIT_VALUE;
tmp_165.additionalMobileIdentity() = add__p__tmsi;
tmp_165.routingAreaIdentification2() = add__rai;
tmp_165.voiceDomainandUEsUsageSetting() = OMIT_VALUE;
tmp_165.deviceProperties() = OMIT_VALUE;
tmp_165.p__TMSI__Type() = p__tmsi__type;
tmp_165.mS__NetworkFeatureSupport() = OMIT_VALUE;
tmp_165.oldLocationAreaIdentification() = OMIT_VALUE;
tmp_165.additionalUpdateType() = OMIT_VALUE;
tmp_165.tMSIBasedNRIcontainer() = nri;
tmp_165.t3324() = OMIT_VALUE;
tmp_165.t3312__ExtendedValue() = OMIT_VALUE;
tmp_165.extendedDRXParameters() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__CommonIE__Types::MobileIdentityTLV_template tr__MI__TMSI__TLV(const OCTETSTRING_template& tmsi)
{
TTCN_Location current_location("L3_Templates.ttcn", 2555, TTCN_Location::LOCATION_FUNCTION, "tr_MI_TMSI_TLV");
current_location.update_lineno(2556);
/* L3_Templates.ttcn, line 2556 */
if (tmsi.get_istemplate_kind((const char*)cs_2)) {
current_location.update_lineno(2557);
/* L3_Templates.ttcn, line 2557 */
return MobileL3__CommonIE__Types::MobileIdentityTLV_template(ANY_OR_OMIT);
}
else {
current_location.update_lineno(2558);
/* L3_Templates.ttcn, line 2558 */
if (tmsi.get_istemplate_kind((const char*)cs_0)) {
current_location.update_lineno(2559);
/* L3_Templates.ttcn, line 2559 */
return MobileL3__CommonIE__Types::MobileIdentityTLV_template(ANY_VALUE);
}
else {
current_location.update_lineno(2561);
/* L3_Templates.ttcn, line 2561 */
MobileL3__CommonIE__Types::MobileIdentityTLV_template mi;
mi.elementIdentifier() = bs_69;
mi.spare1() = bs_0;
{
MobileL3__CommonIE__Types::MobileIdentityLV_template& tmp_167 = mi.mobileIdentityLV();
tmp_167.lengthIndicator() = 4;
{
MobileL3__CommonIE__Types::MobileIdentityV_template& tmp_168 = tmp_167.mobileIdentityV();
tmp_168.typeOfIdentity() = bs_6;
{
MobileL3__CommonIE__Types::TMSI__PTMSI_template& tmp_169 = tmp_168.oddEvenInd__identity().tmsi__ptmsi();
tmp_169.oddevenIndicator() = bs_1;
tmp_169.fillerDigit() = bs_7;
tmp_169.octets() = tmsi;
}
}
}
current_location.update_lineno(2578);
/* L3_Templates.ttcn, line 2578 */
return mi;
}
}
}

MobileL3__Types::PDU__L3__SGSN__MS_template tr__GMM__ATTACH__ACCEPT(const BITSTRING_template& res, const MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_template& ra, const OCTETSTRING_template& ptmsi)
{
TTCN_Location current_location("L3_Templates.ttcn", 2582, TTCN_Location::LOCATION_TEMPLATE, "tr_GMM_ATTACH_ACCEPT");
MobileL3__Types::PDU__L3__SGSN__MS_template ret_val;
ret_val.discriminator() = bs_70;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__AttachAccept_template& tmp_170 = ret_val.msgs().gprs__mm().attachAccept();
tmp_170.messageType() = bs_71;
{
MobileL3__GMM__SM__Types::AttachResultV_template& tmp_171 = tmp_170.attachResult();
tmp_171.resultOfAttach() = res;
tmp_171.fop__l3() = ANY_VALUE;
}
tmp_170.forceToStandby() = ANY_VALUE;
tmp_170.updateTimer() = ANY_VALUE;
tmp_170.radioPriority() = ANY_VALUE;
tmp_170.radioPriorityTOM8() = ANY_VALUE;
tmp_170.routingAreaIdentification() = ra;
tmp_170.ptmsiSignature() = ANY_OR_OMIT;
tmp_170.readyTimer() = ANY_OR_OMIT;
tmp_170.allocatedPTMSI() = tr__MI__TMSI__TLV(ptmsi);
tmp_170.msIdentity() = ANY_OR_OMIT;
tmp_170.gmmCause() = ANY_OR_OMIT;
tmp_170.t3302() = ANY_OR_OMIT;
tmp_170.cellNotification() = ANY_OR_OMIT;
tmp_170.equivalentPLMNs() = ANY_OR_OMIT;
tmp_170.networkFeatureSupport() = ANY_OR_OMIT;
tmp_170.emergencyNumberList() = ANY_OR_OMIT;
tmp_170.requestedMSInformation() = ANY_OR_OMIT;
tmp_170.t3319() = ANY_OR_OMIT;
tmp_170.t3323() = ANY_OR_OMIT;
tmp_170.t3312__ExtendedValue() = ANY_OR_OMIT;
tmp_170.additionalNetworkFeatureSupport() = ANY_OR_OMIT;
tmp_170.t3324() = ANY_OR_OMIT;
tmp_170.extendedDRXParameters() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__L3__SGSN__MS_template tr__GMM__ATTACH__REJECT(const OCTETSTRING_template& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 2621, TTCN_Location::LOCATION_TEMPLATE, "tr_GMM_ATTACH_REJECT");
MobileL3__Types::PDU__L3__SGSN__MS_template ret_val;
ret_val.discriminator() = bs_70;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__AttachReject_template& tmp_172 = ret_val.msgs().gprs__mm().attachReject();
tmp_172.messageType() = bs_72;
tmp_172.gmmCause().causeValue() = cause;
tmp_172.t3302() = ANY_OR_OMIT;
tmp_172.t3346() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__L3__MS__SGSN_template ts__GMM__RAU__REQ(const MobileL3__CommonIE__Types::MobileIdentityLV& , const GprsUpdateType& upd__type, const MobileL3__GMM__SM__Types::RoutingAreaIdentificationV& old__ra, const BOOLEAN& follow__on__pending, const MobileL3__CommonIE__Types::MobileStationClassmark2__TLV_template& cm2__tlv, const MobileL3__CommonIE__Types::MobileStationClassmark3__TLV_template& cm3__tlv, const OCTETSTRING_template& p__tmsi, const MobileL3__GMM__SM__Types::NetworkResourceIdentifierContainerTLV_template& nri, const MobileL3__GMM__SM__Types::P__TMSISignatureTV_template& p__tmsi__sig, const MobileL3__CommonIE__Types::P__TMSI__TypeTV_template& p__tmsi__type, const MobileL3__CommonIE__Types::MobileIdentityTLV_template& add__p__tmsi, const MobileL3__CommonIE__Types::RoutingAreaIdentification2TLV_template& add__rai, const MobileL3__GMM__SM__Types::MSNetworkCapabilityV_template& ms__network__cap)
{
TTCN_Location current_location("L3_Templates.ttcn", 2657, TTCN_Location::LOCATION_TEMPLATE, "ts_GMM_RAU_REQ");
MobileL3__Types::PDU__L3__MS__SGSN_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__RoutingAreaUpdateRequest_template& tmp_174 = ret_val.msgs().gprs__mm().routingAreaUpdateRequest();
tmp_174.messageType() = bs_25;
tmp_174.updateType() = ts__GMM__UpdateType(upd__type, follow__on__pending, ts__GMM__UpdateType_follow__on__pending_defval);
{
MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_template& tmp_175 = tmp_174.gprsCKSN();
tmp_175.keySequence() = bs_68;
tmp_175.spare() = bs_0;
}
tmp_174.oldRoutingAreaId() = old__ra;
tmp_174.msRACap() = ts__MS__RaCapa;
tmp_174.oldPTMSISignature() = p__tmsi__sig;
tmp_174.readyTimerValue() = OMIT_VALUE;
tmp_174.drxParameter() = OMIT_VALUE;
tmp_174.tmsiStatus() = OMIT_VALUE;
tmp_174.ptmsi() = ts__MI__TMSI__TLV(p__tmsi);
tmp_174.mSNetworkCapability() = ts__GMM__MsNetCapTLV(ms__network__cap);
tmp_174.pdpContextStatus() = OMIT_VALUE;
tmp_174.pC__LCSCapability() = OMIT_VALUE;
tmp_174.mBMS__ContextStatus() = OMIT_VALUE;
tmp_174.uENetworkCapability() = OMIT_VALUE;
tmp_174.additionalMobileIdentity() = add__p__tmsi;
tmp_174.oldRoutingAreaIdentification2() = add__rai;
tmp_174.mobileStationClassmark2() = cm2__tlv;
tmp_174.mobileStationClassmark3() = cm3__tlv;
tmp_174.supportedCodecs() = OMIT_VALUE;
tmp_174.voiceDomainUEUsageSetting() = OMIT_VALUE;
tmp_174.p__TMSI__Type() = p__tmsi__type;
tmp_174.deviceProperties() = OMIT_VALUE;
tmp_174.mS__NetworkFeatureSupport() = OMIT_VALUE;
tmp_174.oldLocationAreaIdentification() = OMIT_VALUE;
tmp_174.additionalUpdateType() = OMIT_VALUE;
tmp_174.tMSIBasedNRIcontainer() = nri;
tmp_174.t3324() = OMIT_VALUE;
tmp_174.t3312__ExtendedValue() = OMIT_VALUE;
tmp_174.extendedDRXParameters() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__L3__SGSN__MS_template tr__GMM__RAU__REJECT(const OCTETSTRING_template& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 2713, TTCN_Location::LOCATION_TEMPLATE, "tr_GMM_RAU_REJECT");
MobileL3__Types::PDU__L3__SGSN__MS_template ret_val;
ret_val.discriminator() = bs_70;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__RoutingAreaUpdateReject_template& tmp_176 = ret_val.msgs().gprs__mm().routingAreaUpdateReject();
tmp_176.messageType() = bs_73;
tmp_176.gmmCause().causeValue() = cause;
tmp_176.forceToStandby() = ANY_VALUE;
tmp_176.spare() = bs_15;
tmp_176.t3302() = ANY_OR_OMIT;
tmp_176.t3346() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__L3__SGSN__MS_template tr__GMM__RAU__ACCEPT(const BITSTRING_template& res, const MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_template& ra, const OCTETSTRING_template& ptmsi)
{
TTCN_Location current_location("L3_Templates.ttcn", 2734, TTCN_Location::LOCATION_TEMPLATE, "tr_GMM_RAU_ACCEPT");
MobileL3__Types::PDU__L3__SGSN__MS_template ret_val;
ret_val.discriminator() = bs_70;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__RoutingAreaUpdateAccept_template& tmp_177 = ret_val.msgs().gprs__mm().routingAreaUpdateAccept();
tmp_177.messageType() = bs_74;
tmp_177.forceToStandby() = ANY_VALUE;
{
MobileL3__GMM__SM__Types::UpdateResultV_template& tmp_178 = tmp_177.updateResult();
tmp_178.valueField() = res;
tmp_178.fOP__l3() = ANY_VALUE;
}
tmp_177.raUpdateTimer() = ANY_VALUE;
tmp_177.routingAreaId() = ra;
tmp_177.ptmsiSignature() = ANY_OR_OMIT;
tmp_177.allocatedPTMSI() = tr__MI__TMSI__TLV(ptmsi);
tmp_177.msIdentity() = ANY_OR_OMIT;
tmp_177.receiveNPDUNumbers() = ANY_OR_OMIT;
tmp_177.readyTimer() = ANY_OR_OMIT;
tmp_177.gmmCause() = ANY_OR_OMIT;
tmp_177.t3302() = ANY_OR_OMIT;
tmp_177.cellNotification() = ANY_OR_OMIT;
tmp_177.equivalentPLMNs() = ANY_OR_OMIT;
tmp_177.pdpContextStatus() = ANY_OR_OMIT;
tmp_177.networkFeatureSupport() = ANY_OR_OMIT;
tmp_177.emergencyNumberList() = ANY_OR_OMIT;
tmp_177.mBMS__ContextStatus() = ANY_OR_OMIT;
tmp_177.requestedMSInformation() = ANY_OR_OMIT;
tmp_177.t3319() = ANY_OR_OMIT;
tmp_177.t3323() = ANY_OR_OMIT;
tmp_177.t3312__ExtendedValue() = ANY_OR_OMIT;
tmp_177.additionalNetworkFeatureSupport() = ANY_OR_OMIT;
tmp_177.t3324() = ANY_OR_OMIT;
tmp_177.extendedDRXParameters() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__L3__MS__SGSN_template ts__GMM__AUTH__CIPH__COMPL(const MobileL3__GMM__SM__Types::ACReferenceNumberV& ref, const OCTETSTRING& res)
{
TTCN_Location current_location("L3_Templates.ttcn", 2805, TTCN_Location::LOCATION_TEMPLATE, "ts_GMM_AUTH_CIPH_COMPL");
MobileL3__Types::PDU__L3__MS__SGSN_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__AuthenticationAndCipheringResponse_template& tmp_180 = ret_val.msgs().gprs__mm().authenticationAndCipheringResponse();
tmp_180.messageType() = bs_25;
tmp_180.acReferenceNumber() = ref;
tmp_180.spare() = bs_15;
{
MobileL3__MM__Types::AuthenticationResponseParameterTV_template& tmp_181 = tmp_180.authenticationParResp();
tmp_181.elementIdentifier() = os_19;
tmp_181.valueField() = res;
}
tmp_180.imeisv() = OMIT_VALUE;
tmp_180.authenticationRespParExt() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__L3__SGSN__MS_template tr__GMM__ID__REQ(const BITSTRING_template& id__type)
{
TTCN_Location current_location("L3_Templates.ttcn", 2827, TTCN_Location::LOCATION_TEMPLATE, "tr_GMM_ID_REQ");
MobileL3__Types::PDU__L3__SGSN__MS_template ret_val;
ret_val.discriminator() = bs_70;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__IdentityRequest_template& tmp_182 = ret_val.msgs().gprs__mm().identityRequest();
tmp_182.messageType() = bs_75;
{
MobileL3__GMM__SM__Types::IdentityType2V_template& tmp_183 = tmp_182.identityType();
tmp_183.valueField() = id__type;
tmp_183.spare() = bs_0;
}
tmp_182.forceToStandby() = ANY_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__L3__MS__SGSN_template ts__GMM__ID__RESP(const MobileL3__CommonIE__Types::MobileIdentityLV& mi__lv)
{
TTCN_Location current_location("L3_Templates.ttcn", 2843, TTCN_Location::LOCATION_TEMPLATE, "ts_GMM_ID_RESP");
MobileL3__Types::PDU__L3__MS__SGSN_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__IdentityResponse_template& tmp_184 = ret_val.msgs().gprs__mm().identityResponse();
tmp_184.messageType() = bs_25;
tmp_184.mobileIdentity() = mi__lv;
}
return ret_val;
}

MobileL3__Types::PDU__L3__SGSN__MS_template tr__GMM__AUTH__REQ(const OCTETSTRING_template& rand, const BITSTRING_template& ciph__alg)
{
TTCN_Location current_location("L3_Templates.ttcn", 2858, TTCN_Location::LOCATION_TEMPLATE, "tr_GMM_AUTH_REQ");
MobileL3__Types::PDU__L3__SGSN__MS_template ret_val;
ret_val.discriminator() = bs_70;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__AuthenticationAndCipheringRequest_template& tmp_185 = ret_val.msgs().gprs__mm().authenticationAndCipheringRequest();
tmp_185.messageType() = bs_44;
{
MobileL3__GMM__SM__Types::CipheringAlgorithmV_template& tmp_186 = tmp_185.cipheringAlgorithm();
tmp_186.valueField() = ciph__alg;
tmp_186.spare() = bs_0;
}
tmp_185.imeisvRequest() = ANY_VALUE;
tmp_185.forceToStandby() = ANY_VALUE;
tmp_185.acReferenceNumber() = ANY_VALUE;
{
MobileL3__MM__Types::AuthenticationParameterRANDTV_template& tmp_187 = tmp_185.authenticationParameterRAND();
tmp_187.elementIdentifier() = os_16;
tmp_187.randValue() = rand;
}
tmp_185.cipheringKeySequenceNumber() = ANY_OR_OMIT;
tmp_185.authenticationParameterAUTN() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__L3__MS__SGSN_template ts__GMM__AUTH__RESP__2G(const BITSTRING& ac__ref, const OCTETSTRING& sres)
{
TTCN_Location current_location("L3_Templates.ttcn", 2882, TTCN_Location::LOCATION_TEMPLATE, "ts_GMM_AUTH_RESP_2G");
MobileL3__Types::PDU__L3__MS__SGSN_template ret_val;
ret_val.discriminator() = bs_70;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__AuthenticationAndCipheringResponse_template& tmp_188 = ret_val.msgs().gprs__mm().authenticationAndCipheringResponse();
tmp_188.messageType() = bs_41;
tmp_188.acReferenceNumber().valueField() = ac__ref;
tmp_188.spare() = bs_15;
{
MobileL3__MM__Types::AuthenticationResponseParameterTV_template& tmp_189 = tmp_188.authenticationParResp();
tmp_189.elementIdentifier() = os_19;
tmp_189.valueField() = sres;
}
tmp_188.imeisv() = OMIT_VALUE;
tmp_188.authenticationRespParExt() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__L3__MS__SGSN_template ts__GMM__AUTH__FAIL__UMTS__AKA__RESYNC(const OCTETSTRING& auts)
{
TTCN_Location current_location("L3_Templates.ttcn", 2904, TTCN_Location::LOCATION_TEMPLATE, "ts_GMM_AUTH_FAIL_UMTS_AKA_RESYNC");
MobileL3__Types::PDU__L3__MS__SGSN_template ret_val;
ret_val.discriminator() = bs_70;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__AuthenticationAndCipheringFailure_template& tmp_190 = ret_val.msgs().gprs__mm().authenticationAndCipheringFailure();
tmp_190.messageType() = bs_76;
tmp_190.gmmCause().causeValue() = os_20;
{
MobileL3__MM__Types::AuthenticationFailureParametersTLV_template& tmp_191 = tmp_190.authenticationFailureParam();
tmp_191.elementIdentifier() = os_21;
tmp_191.lengthIndicator() = 14;
tmp_191.valueField() = auts;
}
}
return ret_val;
}

MobileL3__GMM__SM__Types::DetachTypeV_template ts__GMM__DetType(const BITSTRING& dtt, const BOOLEAN& power__off)
{
TTCN_Location current_location("L3_Templates.ttcn", 2935, TTCN_Location::LOCATION_TEMPLATE, "ts_GMM_DetType");
MobileL3__GMM__SM__Types::DetachTypeV_template ret_val;
ret_val.detachType() = dtt;
ret_val.powerOffFlag() = Osmocom__Types::bool2bit(power__off);
return ret_val;
}

MobileL3__GMM__SM__Types::P__TMSISignatureTV_template ts__PtmsiSigTV(const OCTETSTRING_template& val)
{
TTCN_Location current_location("L3_Templates.ttcn", 2940, TTCN_Location::LOCATION_FUNCTION, "ts_PtmsiSigTV");
current_location.update_lineno(2941);
/* L3_Templates.ttcn, line 2941 */
MobileL3__GMM__SM__Types::P__TMSISignatureTV_template ret;
current_location.update_lineno(2942);
/* L3_Templates.ttcn, line 2942 */
if (val.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(2943);
/* L3_Templates.ttcn, line 2943 */
return MobileL3__GMM__SM__Types::P__TMSISignatureTV_template(OMIT_VALUE);
}
else {
current_location.update_lineno(2945);
/* L3_Templates.ttcn, line 2945 */
ret.elementIdentifier() = os_22;
ret.valueField() = val.valueof();
current_location.update_lineno(2949);
/* L3_Templates.ttcn, line 2949 */
return ret;
}
}

MobileL3__CommonIE__Types::P__TMSISignature2TLV_template ts__PtmsiSigTLV(const OCTETSTRING_template& val)
{
TTCN_Location current_location("L3_Templates.ttcn", 2953, TTCN_Location::LOCATION_FUNCTION, "ts_PtmsiSigTLV");
current_location.update_lineno(2954);
/* L3_Templates.ttcn, line 2954 */
MobileL3__CommonIE__Types::P__TMSISignature2TLV_template ret;
current_location.update_lineno(2955);
/* L3_Templates.ttcn, line 2955 */
if (val.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(2956);
/* L3_Templates.ttcn, line 2956 */
return MobileL3__CommonIE__Types::P__TMSISignature2TLV_template(OMIT_VALUE);
}
else {
current_location.update_lineno(2958);
/* L3_Templates.ttcn, line 2958 */
ret.elementIdentifier() = os_22;
ret.lengthIndicator() = 3;
ret.valueField() = val.valueof();
current_location.update_lineno(2963);
/* L3_Templates.ttcn, line 2963 */
return ret;
}
}

MobileL3__CommonIE__Types::P__TMSI__TypeTV_template ts__PtmsiTypeTV(const BITSTRING_template& val)
{
TTCN_Location current_location("L3_Templates.ttcn", 2971, TTCN_Location::LOCATION_FUNCTION, "ts_PtmsiTypeTV");
current_location.update_lineno(2972);
/* L3_Templates.ttcn, line 2972 */
MobileL3__CommonIE__Types::P__TMSI__TypeTV_template ret;
current_location.update_lineno(2973);
/* L3_Templates.ttcn, line 2973 */
if (val.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(2974);
/* L3_Templates.ttcn, line 2974 */
return MobileL3__CommonIE__Types::P__TMSI__TypeTV_template(OMIT_VALUE);
}
else {
current_location.update_lineno(2976);
/* L3_Templates.ttcn, line 2976 */
ret.pTMSI__TypeValue() = val.valueof();
ret.spare() = bs_5;
ret.elementIdentifier() = bs_77;
current_location.update_lineno(2981);
/* L3_Templates.ttcn, line 2981 */
return ret;
}
}

MobileL3__CommonIE__Types::RoutingAreaIdentification2TLV_template ts__RoutingAreaIdentification2TLV(const OCTETSTRING_template& val)
{
TTCN_Location current_location("L3_Templates.ttcn", 2985, TTCN_Location::LOCATION_FUNCTION, "ts_RoutingAreaIdentification2TLV");
current_location.update_lineno(2986);
/* L3_Templates.ttcn, line 2986 */
MobileL3__CommonIE__Types::RoutingAreaIdentification2TLV_template ret;
current_location.update_lineno(2987);
/* L3_Templates.ttcn, line 2987 */
if (val.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(2988);
/* L3_Templates.ttcn, line 2988 */
return MobileL3__CommonIE__Types::RoutingAreaIdentification2TLV_template(OMIT_VALUE);
}
else {
current_location.update_lineno(2990);
/* L3_Templates.ttcn, line 2990 */
ret.elementIdentifier() = os_23;
ret.lengthIndicator() = 6;
ret.routingAreaIdentification2() = val.valueof();
current_location.update_lineno(2995);
/* L3_Templates.ttcn, line 2995 */
return ret;
}
}

MobileL3__Types::PDU__L3__MS__SGSN_template ts__GMM__DET__REQ__MO(const BITSTRING& dtt, const BOOLEAN& power__off, const OCTETSTRING_template& p__tmsi, const OCTETSTRING_template& p__tmsi__sig)
{
TTCN_Location current_location("L3_Templates.ttcn", 3000, TTCN_Location::LOCATION_TEMPLATE, "ts_GMM_DET_REQ_MO");
MobileL3__Types::PDU__L3__MS__SGSN_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__DetachRequest__MS__SGSN_template& tmp_196 = ret_val.msgs().gprs__mm().detachRequest__MS__SGSN();
tmp_196.messageType() = bs_25;
tmp_196.detachType() = ts__GMM__DetType(dtt, power__off).valueof();
tmp_196.spare() = bs_15;
tmp_196.ptmsi() = ts__MI__TMSI__TLV(p__tmsi);
tmp_196.ptmsiSignature() = ts__PtmsiSigTLV(p__tmsi__sig);
}
return ret_val;
}

MobileL3__Types::PDU__L3__MS__SGSN_template ts__GMM__DET__REQ__MO__mi(const BITSTRING& dtt, const BOOLEAN& power__off, const MobileL3__CommonIE__Types::MobileIdentityTLV_template& p__tmsi, const OCTETSTRING_template& p__tmsi__sig)
{
TTCN_Location current_location("L3_Templates.ttcn", 3021, TTCN_Location::LOCATION_TEMPLATE, "ts_GMM_DET_REQ_MO_mi");
MobileL3__Types::PDU__L3__MS__SGSN_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__DetachRequest__MS__SGSN_template& tmp_197 = ret_val.msgs().gprs__mm().detachRequest__MS__SGSN();
tmp_197.messageType() = bs_25;
tmp_197.detachType() = ts__GMM__DetType(dtt, power__off).valueof();
tmp_197.spare() = bs_15;
tmp_197.ptmsi() = p__tmsi;
tmp_197.ptmsiSignature() = ts__PtmsiSigTLV(p__tmsi__sig);
}
return ret_val;
}

MobileL3__Types::PDU__L3__SGSN__MS_template tr__GMM__DET__REQ__MT(const BITSTRING_template& dtt, const BITSTRING_template& forceToStandby, const OCTETSTRING_template& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 3058, TTCN_Location::LOCATION_TEMPLATE, "tr_GMM_DET_REQ_MT");
MobileL3__Types::PDU__L3__SGSN__MS_template ret_val;
ret_val.discriminator() = bs_70;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__DetachRequest__SGSN__MS_template& tmp_199 = ret_val.msgs().gprs__mm().detachRequest__SGSN__MS();
tmp_199.messageType() = bs_79;
{
MobileL3__GMM__SM__Types::DetachTypeV_template& tmp_200 = tmp_199.detachType();
tmp_200.detachType() = dtt;
tmp_200.powerOffFlag() = ANY_VALUE;
}
{
MobileL3__GMM__SM__Types::ForceToStandbyV_template& tmp_201 = tmp_199.forceToStandby();
tmp_201.forceToStandbyValue() = forceToStandby;
tmp_201.spare() = bs_0;
}
{
MobileL3__GMM__SM__Types::GMM__CauseTV_template& tmp_202 = tmp_199.gmmCause();
tmp_202.elementIdentifier() = os_24;
tmp_202.causeValue().causeValue() = cause;
}
}
return ret_val;
}

MobileL3__GMM__SM__Types::ServiceTypeV_template ts__ServiceTypeV(const ServiceType_template& serviceType)
{
TTCN_Location current_location("L3_Templates.ttcn", 3081, TTCN_Location::LOCATION_TEMPLATE, "ts_ServiceTypeV");
MobileL3__GMM__SM__Types::ServiceTypeV_template ret_val;
ret_val.serviceType() = int2bit(ServiceType::enum2int(serviceType.valueof()), 3);
ret_val.spare() = bs_0;
return ret_val;
}

MobileL3__GMM__SM__Types::ServiceTypeV_template tr__ServiceTypeV(const BITSTRING_template& serviceType)
{
TTCN_Location current_location("L3_Templates.ttcn", 3085, TTCN_Location::LOCATION_TEMPLATE, "tr_ServiceTypeV");
MobileL3__GMM__SM__Types::ServiceTypeV_template ret_val;
ret_val.serviceType() = serviceType;
ret_val.spare() = bs_0;
return ret_val;
}

MobileL3__Types::PDU__L3__MS__SGSN_template ts__GMM__SERVICE__REQ(const ServiceType_template& service__type, const OCTETSTRING_template& p__tmsi, const INTEGER_template& cksn, const OCTETSTRING_template& pdp__status)
{
TTCN_Location current_location("L3_Templates.ttcn", 3091, TTCN_Location::LOCATION_TEMPLATE, "ts_GMM_SERVICE_REQ");
MobileL3__Types::PDU__L3__MS__SGSN_template ret_val;
ret_val.discriminator() = bs_70;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__ServiceRequest_template& tmp_203 = ret_val.msgs().gprs__mm().serviceRequest();
tmp_203.messageType() = bs_80;
tmp_203.cipheringKeySeqNum() = ts__CKSN(cksn);
tmp_203.serviceType() = ts__ServiceTypeV(service__type);
tmp_203.ptmsi() = ts__MI__TMSI__LV(p__tmsi);
tmp_203.pdpContextStatus() = ts__PDPContextStatusTLV(pdp__status);
tmp_203.mBMS__ContextStatus() = OMIT_VALUE;
tmp_203.uplinkDataStatus() = OMIT_VALUE;
tmp_203.deviceProperties() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__L3__SGSN__MS_template tr__GMM__SERVICE__ACC(const MobileL3__GMM__SM__Types::PDPContextStatusTLV_template& pdp__status)
{
TTCN_Location current_location("L3_Templates.ttcn", 3116, TTCN_Location::LOCATION_TEMPLATE, "tr_GMM_SERVICE_ACC");
MobileL3__Types::PDU__L3__SGSN__MS_template ret_val;
ret_val.discriminator() = bs_70;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__ServiceAccept_template& tmp_204 = ret_val.msgs().gprs__mm().serviceAccept();
tmp_204.messageType() = bs_45;
tmp_204.pdpContextStatus() = pdp__status;
tmp_204.mBMS__ContextStatus() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__L3__SGSN__MS_template tr__GMM__SERVICE__REJ(const MobileL3__GMM__SM__Types::GMM__CauseV_template& gmmCause, const MobileL3__GMM__SM__Types::GPRSTimer2TLV_template& t3346)
{
TTCN_Location current_location("L3_Templates.ttcn", 3133, TTCN_Location::LOCATION_TEMPLATE, "tr_GMM_SERVICE_REJ");
MobileL3__Types::PDU__L3__SGSN__MS_template ret_val;
ret_val.discriminator() = bs_70;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__ServiceReject_template& tmp_205 = ret_val.msgs().gprs__mm().serviceReject();
tmp_205.messageType() = bs_42;
tmp_205.gmmCause() = gmmCause;
tmp_205.t3346() = t3346;
}
return ret_val;
}

MobileL3__GMM__SM__Types::AccessPointNameTLV_template ts__ApnTLV(const OCTETSTRING_template& apn)
{
TTCN_Location current_location("L3_Templates.ttcn", 3164, TTCN_Location::LOCATION_FUNCTION, "ts_ApnTLV");
current_location.update_lineno(3165);
/* L3_Templates.ttcn, line 3165 */
if (apn.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(3166);
/* L3_Templates.ttcn, line 3166 */
return MobileL3__GMM__SM__Types::AccessPointNameTLV_template(OMIT_VALUE);
}
else {
current_location.update_lineno(3168);
/* L3_Templates.ttcn, line 3168 */
MobileL3__GMM__SM__Types::AccessPointNameTLV_template ret;
ret.elementIdentifier() = os_25;
ret.lengthIndicator() = 0;
ret.accessPointNameValue() = apn;
current_location.update_lineno(3173);
/* L3_Templates.ttcn, line 3173 */
return ret;
}
}

MobileL3__GMM__SM__Types::ProtocolConfigOptionsTLV_template ts__PcoTLV(const MobileL3__GMM__SM__Types::ProtocolConfigOptionsV_template& pco)
{
TTCN_Location current_location("L3_Templates.ttcn", 3177, TTCN_Location::LOCATION_FUNCTION, "ts_PcoTLV");
current_location.update_lineno(3179);
/* L3_Templates.ttcn, line 3179 */
if (pco.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(3180);
/* L3_Templates.ttcn, line 3180 */
return MobileL3__GMM__SM__Types::ProtocolConfigOptionsTLV_template(OMIT_VALUE);
}
else {
current_location.update_lineno(3182);
/* L3_Templates.ttcn, line 3182 */
MobileL3__GMM__SM__Types::ProtocolConfigOptionsTLV_template ret;
ret.elementIdentifier() = os_26;
ret.lengthIndicator() = 0;
ret.protocolConfigOptionsV() = pco;
current_location.update_lineno(3187);
/* L3_Templates.ttcn, line 3187 */
return ret;
}
}

MobileL3__GMM__SM__Types::TearDownIndicatorTV_template ts__TearDownIndicatorTV(const BOOLEAN_template& ind)
{
TTCN_Location current_location("L3_Templates.ttcn", 3191, TTCN_Location::LOCATION_FUNCTION, "ts_TearDownIndicatorTV");
current_location.update_lineno(3193);
/* L3_Templates.ttcn, line 3193 */
if (ind.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(3194);
/* L3_Templates.ttcn, line 3194 */
return MobileL3__GMM__SM__Types::TearDownIndicatorTV_template(OMIT_VALUE);
}
else {
current_location.update_lineno(3196);
/* L3_Templates.ttcn, line 3196 */
MobileL3__GMM__SM__Types::TearDownIndicatorTV_template ret;
{
MobileL3__GMM__SM__Types::TearDownIndicatorV_template& tmp_206 = ret.tearDownIndicatorV();
tmp_206.tdi__flag() = Osmocom__Types::bool2bit(ind.valueof());
tmp_206.spare() = bs_5;
}
ret.elementIdentifier() = bs_81;
current_location.update_lineno(3203);
/* L3_Templates.ttcn, line 3203 */
return ret;
}
}

MobileL3__Types::PDU__L3__MS__SGSN_template ts__SM__ACT__PDP__REQ(const BITSTRING& tid, const BITSTRING& nsapi, const BITSTRING& sapi, const MobileL3__GMM__SM__Types::QoSV& qos, const MobileL3__GMM__SM__Types::PDPAddressV& addr, const OCTETSTRING_template& apn, const MobileL3__GMM__SM__Types::ProtocolConfigOptionsV_template& pco)
{
TTCN_Location current_location("L3_Templates.ttcn", 3207, TTCN_Location::LOCATION_TEMPLATE, "ts_SM_ACT_PDP_REQ");
MobileL3__Types::PDU__L3__MS__SGSN_template ret_val;
ret_val.discriminator() = bs_15;
{
MobileL3__Types::L3__TransactionId_template& tmp_207 = ret_val.tiOrSkip().transactionId();
tmp_207.tio() = tid;
tmp_207.tiFlag() = bs_0;
tmp_207.tIExtension() = OMIT_VALUE;
}
{
MobileL3__GMM__SM__Types::PDU__SM__ActivatePDPContextRequest_template& tmp_208 = ret_val.msgs().gprs__sm().activatePDPContextRequest();
tmp_208.messageType() = bs_25;
{
MobileL3__GMM__SM__Types::NSAPIV_template& tmp_209 = tmp_208.requestedNSAPI();
tmp_209.valueField() = nsapi;
tmp_209.spare() = bs_15;
}
{
MobileL3__GMM__SM__Types::LLC__SAPIV_template& tmp_210 = tmp_208.requestedLLCSAPI();
tmp_210.valueField() = sapi;
tmp_210.spare() = bs_15;
}
{
MobileL3__GMM__SM__Types::QoSLV_template& tmp_211 = tmp_208.requestedQoS();
tmp_211.lengthIndicator() = 0;
tmp_211.qoSV() = qos;
}
{
MobileL3__GMM__SM__Types::PDPAddressLV_template& tmp_212 = tmp_208.requestedPDPaddress();
tmp_212.lengthIndicator() = 0;
tmp_212.pdpAddressV() = addr;
}
tmp_208.accessPointName() = ts__ApnTLV(apn);
tmp_208.protocolConfigOpts() = ts__PcoTLV(pco);
tmp_208.requestType() = OMIT_VALUE;
tmp_208.deviceProperties() = OMIT_VALUE;
tmp_208.nBIFOM__Container() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__L3__SGSN__MS_template tr__SM__ACT__PDP__REJ(const BITSTRING_template& tid, const OCTETSTRING_template& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 3244, TTCN_Location::LOCATION_TEMPLATE, "tr_SM_ACT_PDP_REJ");
MobileL3__Types::PDU__L3__SGSN__MS_template ret_val;
ret_val.discriminator() = bs_82;
{
MobileL3__Types::L3__TransactionId_template& tmp_213 = ret_val.tiOrSkip().transactionId();
tmp_213.tio() = tid;
tmp_213.tiFlag() = bs_1;
tmp_213.tIExtension() = OMIT_VALUE;
}
{
MobileL3__GMM__SM__Types::PDU__SM__ActivatePDPContextReject_template& tmp_214 = ret_val.msgs().gprs__sm().activatePDPContextReject();
tmp_214.messageType() = bs_83;
tmp_214.smCause() = cause;
tmp_214.protocolConfigOpts() = ANY_OR_OMIT;
tmp_214.backOffTimer() = ANY_OR_OMIT;
tmp_214.reAttemptIndicator() = ANY_OR_OMIT;
tmp_214.nBIFOM__Container() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__L3__SGSN__MS_template tr__SM__ACT__PDP__ACCEPT(const BITSTRING_template& tid, const BITSTRING_template& sapi, const MobileL3__GMM__SM__Types::QoSV_template& qos)
{
TTCN_Location current_location("L3_Templates.ttcn", 3267, TTCN_Location::LOCATION_TEMPLATE, "tr_SM_ACT_PDP_ACCEPT");
MobileL3__Types::PDU__L3__SGSN__MS_template ret_val;
ret_val.discriminator() = bs_82;
{
MobileL3__Types::L3__TransactionId_template& tmp_215 = ret_val.tiOrSkip().transactionId();
tmp_215.tio() = tid;
tmp_215.tiFlag() = bs_1;
tmp_215.tIExtension() = OMIT_VALUE;
}
{
MobileL3__GMM__SM__Types::PDU__SM__ActivatePDPContextAccept_template& tmp_216 = ret_val.msgs().gprs__sm().activatePDPContextAccept();
tmp_216.messageType() = bs_84;
{
MobileL3__GMM__SM__Types::LLC__SAPIV_template& tmp_217 = tmp_216.negotiatedLLCSAPI();
tmp_217.valueField() = sapi;
tmp_217.spare() = bs_15;
}
{
MobileL3__GMM__SM__Types::QoSLV_template& tmp_218 = tmp_216.negotiatedQoS();
tmp_218.lengthIndicator() = ANY_VALUE;
tmp_218.qoSV() = qos;
}
tmp_216.radioPriority() = ANY_VALUE;
tmp_216.spare() = bs_15;
tmp_216.pdpAddress() = ANY_OR_OMIT;
tmp_216.protocolConfigOpts() = ANY_OR_OMIT;
tmp_216.packetFlowID() = ANY_OR_OMIT;
tmp_216.sMCause2() = ANY_OR_OMIT;
tmp_216.connectivityType() = ANY_OR_OMIT;
tmp_216.wLANOffloadIndication() = ANY_OR_OMIT;
tmp_216.nBIFOM__Container() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__L3__MS__SGSN_template ts__SM__DEACT__PDP__REQ__MO(const BITSTRING& tid, const OCTETSTRING& cause, const BOOLEAN_template& tdown, const MobileL3__GMM__SM__Types::ProtocolConfigOptionsV_template& pco)
{
TTCN_Location current_location("L3_Templates.ttcn", 3301, TTCN_Location::LOCATION_TEMPLATE, "ts_SM_DEACT_PDP_REQ_MO");
MobileL3__Types::PDU__L3__MS__SGSN_template ret_val;
ret_val.discriminator() = bs_82;
{
MobileL3__Types::L3__TransactionId_template& tmp_219 = ret_val.tiOrSkip().transactionId();
tmp_219.tio() = tid;
tmp_219.tiFlag() = bs_0;
tmp_219.tIExtension() = OMIT_VALUE;
}
{
MobileL3__GMM__SM__Types::PDU__SM__DeactivatePDPContextRequest_template& tmp_220 = ret_val.msgs().gprs__sm().deactivatePDPContextRequest();
tmp_220.messageType() = bs_85;
tmp_220.smCause() = cause;
tmp_220.tearDownIndicator() = ts__TearDownIndicatorTV(tdown);
tmp_220.protocolConfigOpts() = ts__PcoTLV(pco);
tmp_220.mBMSprotocolConfigOptions() = OMIT_VALUE;
tmp_220.t3396() = OMIT_VALUE;
tmp_220.wLANOffloadIndication() = OMIT_VALUE;
tmp_220.nBIFOM__Container() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__L3__SGSN__MS_template ts__SM__DEACT__PDP__REQ__MT(const BITSTRING& tid, const OCTETSTRING& cause, const BOOLEAN_template& tdown, const MobileL3__GMM__SM__Types::ProtocolConfigOptionsV_template& pco)
{
TTCN_Location current_location("L3_Templates.ttcn", 3329, TTCN_Location::LOCATION_TEMPLATE, "ts_SM_DEACT_PDP_REQ_MT");
MobileL3__Types::PDU__L3__SGSN__MS_template ret_val;
ret_val.discriminator() = bs_82;
{
MobileL3__Types::L3__TransactionId_template& tmp_221 = ret_val.tiOrSkip().transactionId();
tmp_221.tio() = tid;
tmp_221.tiFlag() = bs_1;
tmp_221.tIExtension() = OMIT_VALUE;
}
{
MobileL3__GMM__SM__Types::PDU__SM__DeactivatePDPContextRequest_template& tmp_222 = ret_val.msgs().gprs__sm().deactivatePDPContextRequest();
tmp_222.messageType() = bs_85;
tmp_222.smCause() = cause;
tmp_222.tearDownIndicator() = ts__TearDownIndicatorTV(tdown);
tmp_222.protocolConfigOpts() = ts__PcoTLV(pco);
tmp_222.mBMSprotocolConfigOptions() = OMIT_VALUE;
tmp_222.t3396() = OMIT_VALUE;
tmp_222.wLANOffloadIndication() = OMIT_VALUE;
tmp_222.nBIFOM__Container() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__L3__SGSN__MS_template tr__SM__DEACT__PDP__REQ__MT(const BITSTRING_template& tid, const OCTETSTRING_template& cause, const BOOLEAN_template& tdown, const MobileL3__GMM__SM__Types::ProtocolConfigOptionsV_template& pco)
{
TTCN_Location current_location("L3_Templates.ttcn", 3357, TTCN_Location::LOCATION_TEMPLATE, "tr_SM_DEACT_PDP_REQ_MT");
MobileL3__Types::PDU__L3__SGSN__MS_template ret_val;
ret_val.discriminator() = bs_82;
{
MobileL3__Types::L3__TransactionId_template& tmp_223 = ret_val.tiOrSkip().transactionId();
tmp_223.tio() = tid;
tmp_223.tiFlag() = bs_1;
tmp_223.tIExtension() = OMIT_VALUE;
}
{
MobileL3__GMM__SM__Types::PDU__SM__DeactivatePDPContextRequest_template& tmp_224 = ret_val.msgs().gprs__sm().deactivatePDPContextRequest();
tmp_224.messageType() = bs_85;
tmp_224.smCause() = cause;
tmp_224.tearDownIndicator() = ts__TearDownIndicatorTV(tdown);
tmp_224.protocolConfigOpts() = ts__PcoTLV(pco);
tmp_224.mBMSprotocolConfigOptions() = ANY_OR_OMIT;
tmp_224.t3396() = ANY_OR_OMIT;
tmp_224.wLANOffloadIndication() = ANY_OR_OMIT;
tmp_224.nBIFOM__Container() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__L3__SGSN__MS_template tr__SM__DEACT__PDP__ACCEPT__MT(const BITSTRING_template& tid)
{
TTCN_Location current_location("L3_Templates.ttcn", 3385, TTCN_Location::LOCATION_TEMPLATE, "tr_SM_DEACT_PDP_ACCEPT_MT");
MobileL3__Types::PDU__L3__SGSN__MS_template ret_val;
ret_val.discriminator() = bs_82;
{
MobileL3__Types::L3__TransactionId_template& tmp_225 = ret_val.tiOrSkip().transactionId();
tmp_225.tio() = tid;
tmp_225.tiFlag() = bs_1;
tmp_225.tIExtension() = OMIT_VALUE;
}
{
MobileL3__GMM__SM__Types::PDU__SM__DeactivatePDPContextAccept_template& tmp_226 = ret_val.msgs().gprs__sm().deactivatePDPContextAccept();
tmp_226.messageType() = bs_86;
tmp_226.protocolConfigOpts() = ANY_OR_OMIT;
tmp_226.mBMSprotocolConfigOptions() = ANY_OR_OMIT;
tmp_226.nBIFOM__Container() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__L3__MS__SGSN_template tr__SM__DEACT__PDP__ACCEPT__MO(const BITSTRING_template& tid)
{
TTCN_Location current_location("L3_Templates.ttcn", 3407, TTCN_Location::LOCATION_TEMPLATE, "tr_SM_DEACT_PDP_ACCEPT_MO");
MobileL3__Types::PDU__L3__MS__SGSN_template ret_val;
ret_val.discriminator() = bs_82;
{
MobileL3__Types::L3__TransactionId_template& tmp_227 = ret_val.tiOrSkip().transactionId();
tmp_227.tio() = tid;
tmp_227.tiFlag() = bs_0;
tmp_227.tIExtension() = OMIT_VALUE;
}
{
MobileL3__GMM__SM__Types::PDU__SM__DeactivatePDPContextAccept_template& tmp_228 = ret_val.msgs().gprs__sm().deactivatePDPContextAccept();
tmp_228.messageType() = bs_86;
tmp_228.protocolConfigOpts() = ANY_OR_OMIT;
tmp_228.mBMSprotocolConfigOptions() = ANY_OR_OMIT;
tmp_228.nBIFOM__Container() = ANY_OR_OMIT;
}
return ret_val;
}

MobileL3__Types::PDU__L3__MS__SGSN_template ts__SM__DEACT__PDP__ACCEPT__MO(const BITSTRING& tid)
{
TTCN_Location current_location("L3_Templates.ttcn", 3429, TTCN_Location::LOCATION_TEMPLATE, "ts_SM_DEACT_PDP_ACCEPT_MO");
MobileL3__Types::PDU__L3__MS__SGSN_template ret_val;
ret_val.discriminator() = bs_82;
{
MobileL3__Types::L3__TransactionId_template& tmp_229 = ret_val.tiOrSkip().transactionId();
tmp_229.tio() = tid;
tmp_229.tiFlag() = bs_0;
tmp_229.tIExtension() = OMIT_VALUE;
}
{
MobileL3__GMM__SM__Types::PDU__SM__DeactivatePDPContextAccept_template& tmp_230 = ret_val.msgs().gprs__sm().deactivatePDPContextAccept();
tmp_230.messageType() = bs_86;
tmp_230.protocolConfigOpts() = OMIT_VALUE;
tmp_230.mBMSprotocolConfigOptions() = OMIT_VALUE;
tmp_230.nBIFOM__Container() = OMIT_VALUE;
}
return ret_val;
}

OCTETSTRING enc__MobileIdentityLV(const MobileL3__CommonIE__Types::MobileIdentityLV& si)
{
if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
TTCN_Logger::log_event_str("enc_MobileIdentityLV(): Encoding @MobileL3_CommonIE_Types.MobileIdentityLV: ");
si.log();
TTCN_Logger::end_event();
}
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
TTCN_Buffer ttcn_buffer;
si.encode(MobileL3__CommonIE__Types::MobileIdentityLV_descr_, ttcn_buffer, TTCN_EncDec::CT_RAW, 0);
OCTETSTRING ret_val;
ttcn_buffer.get_string(ret_val);
if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
TTCN_Logger::log_event_str("enc_MobileIdentityLV(): Stream after encoding: ");
ret_val.log();
TTCN_Logger::end_event();
}
return ret_val;
}

MobileL3__CommonIE__Types::MobileIdentityV dec__MobileIdentityV(const OCTETSTRING& mi)
{
if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
TTCN_Logger::log_event_str("dec_MobileIdentityV(): Stream before decoding: ");
mi.log();
TTCN_Logger::end_event();
}
TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT);
TTCN_EncDec::clear_error();
TTCN_Buffer ttcn_buffer(mi);
MobileL3__CommonIE__Types::MobileIdentityV ret_val;
ret_val.decode(MobileL3__CommonIE__Types::MobileIdentityV_descr_, ttcn_buffer, TTCN_EncDec::CT_RAW);
if (TTCN_Logger::log_this_event(TTCN_Logger::DEBUG_ENCDEC)) {
TTCN_Logger::begin_event(TTCN_Logger::DEBUG_ENCDEC);
TTCN_Logger::log_event_str("dec_MobileIdentityV(): Decoded @MobileL3_CommonIE_Types.MobileIdentityV: ");
ret_val.log();
TTCN_Logger::end_event();
}
if (TTCN_EncDec::get_last_error_type() == TTCN_EncDec::ET_NONE) {
if (ttcn_buffer.get_pos() < ttcn_buffer.get_len()) {
ttcn_buffer.cut();
OCTETSTRING tmp_os;
ttcn_buffer.get_string(tmp_os);
TTCN_Logger::begin_event_log2str();
tmp_os.log();
CHARSTRING remaining_stream = TTCN_Logger::end_event_log2str();
TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_EXTRA_DATA, "dec_MobileIdentityV(): Data remained at the end of the stream after successful decoding: %s", (const char*) remaining_stream);
}
}
return ret_val;
}

MobileL3__SMS__Types::TPDU__RP__DATA__MS__SGSN_template ts__SMS__SUBMIT(const OCTETSTRING& msg__ref, const MobileL3__SMS__Types::TP__DA_template& dst__addr, const OCTETSTRING_template& pid, const OCTETSTRING_template& dcs, const INTEGER& length__ind, const OCTETSTRING& user__data)
{
TTCN_Location current_location("L3_Templates.ttcn", 3463, TTCN_Location::LOCATION_TEMPLATE, "ts_SMS_SUBMIT");
MobileL3__SMS__Types::TPDU__RP__DATA__MS__SGSN_template ret_val;
{
MobileL3__SMS__Types::SMS__SUBMIT_template& tmp_231 = ret_val.sMS__SUBMIT();
tmp_231.tP__MTI() = bs_13;
tmp_231.tP__RD() = bs_1;
tmp_231.tP__VPF() = bs_14;
tmp_231.tP__SRR() = bs_0;
tmp_231.tP__UDHI() = bs_0;
tmp_231.tP__RP() = bs_0;
tmp_231.tP__MR() = msg__ref;
tmp_231.tP__DA() = dst__addr;
tmp_231.tP__PID() = pid;
tmp_231.tP__DCS() = dcs;
tmp_231.tP__VP() = OMIT_VALUE;
{
MobileL3__SMS__Types::TP__UDL__UD_template& tmp_232 = tmp_231.tP__UDL__UD();
tmp_232.tP__LengthIndicator() = length__ind;
tmp_232.tP__UD() = user__data;
}
}
return ret_val;
}

MobileL3__SMS__Types::TPDU__RP__DATA__SGSN__MS_template tr__SMS__DELIVER(const MobileL3__SMS__Types::TP__OA_template& src__addr, const OCTETSTRING_template& user__data, const OCTETSTRING_template& pid, const OCTETSTRING_template& dcs, const BITSTRING_template& mms)
{
TTCN_Location current_location("L3_Templates.ttcn", 3485, TTCN_Location::LOCATION_TEMPLATE, "tr_SMS_DELIVER");
MobileL3__SMS__Types::TPDU__RP__DATA__SGSN__MS_template ret_val;
{
MobileL3__SMS__Types::SMS__DELIVER_template& tmp_233 = ret_val.sMS__DELIVER();
tmp_233.tP__MTI() = bs_14;
tmp_233.tP__MMS() = mms;
tmp_233.tP__LP() = ANY_VALUE;
tmp_233.tP__Spare() = bs_0;
tmp_233.tP__SRI() = bs_0;
tmp_233.tP__UDHI() = bs_0;
tmp_233.tP__RP() = bs_0;
tmp_233.tP__OA() = src__addr;
tmp_233.tP__PID() = pid;
tmp_233.tP__DCS() = dcs;
tmp_233.tP__SCTS() = ANY_VALUE;
{
MobileL3__SMS__Types::TP__UDL__UD_template& tmp_234 = tmp_233.tP__UDL__UD();
tmp_234.tP__LengthIndicator() = ANY_VALUE;
tmp_234.tP__UD() = user__data;
}
}
return ret_val;
}

MobileL3__SMS__Types::RP__OriginatorAddressLV ts__RpOrig(const MobileL3__SMS__Types::RP__NumberingPlan__and__NumberDigits_template& rp__orig)
{
TTCN_Location current_location("L3_Templates.ttcn", 3511, TTCN_Location::LOCATION_FUNCTION, "ts_RpOrig");
current_location.update_lineno(3513);
/* L3_Templates.ttcn, line 3513 */
MobileL3__SMS__Types::RP__OriginatorAddressLV ret;
current_location.update_lineno(3514);
/* L3_Templates.ttcn, line 3514 */
if (rp__orig.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(3515);
/* L3_Templates.ttcn, line 3515 */
ret.lengthIndicator() = 0;
ret.rP__OriginatorAddress() = OMIT_VALUE;
}
else {
current_location.update_lineno(3517);
/* L3_Templates.ttcn, line 3517 */
ret.lengthIndicator() = 0;
ret.rP__OriginatorAddress() = rp__orig.valueof();
}
current_location.update_lineno(3519);
/* L3_Templates.ttcn, line 3519 */
return ret;
}

MobileL3__SMS__Types::RP__DestinationAddressLV ts__RpDst(const MobileL3__SMS__Types::RP__NumberingPlan__and__NumberDigits_template& rp__dst)
{
TTCN_Location current_location("L3_Templates.ttcn", 3522, TTCN_Location::LOCATION_FUNCTION, "ts_RpDst");
current_location.update_lineno(3524);
/* L3_Templates.ttcn, line 3524 */
MobileL3__SMS__Types::RP__DestinationAddressLV ret;
current_location.update_lineno(3525);
/* L3_Templates.ttcn, line 3525 */
if (rp__dst.get_istemplate_kind((const char*)cs_1)) {
current_location.update_lineno(3526);
/* L3_Templates.ttcn, line 3526 */
ret.lengthIndicator() = 0;
ret.rP__DestinationAddress() = OMIT_VALUE;
}
else {
current_location.update_lineno(3528);
/* L3_Templates.ttcn, line 3528 */
ret.lengthIndicator() = 0;
ret.rP__DestinationAddress() = rp__dst.valueof();
}
current_location.update_lineno(3530);
/* L3_Templates.ttcn, line 3530 */
return ret;
}

MobileL3__SMS__Types::RPDU__MS__SGSN_template ts__RP__DATA__MO(const OCTETSTRING& msg__ref, const MobileL3__SMS__Types::RP__NumberingPlan__and__NumberDigits_template& rp__orig, const MobileL3__SMS__Types::RP__NumberingPlan__and__NumberDigits_template& rp__dst, const MobileL3__SMS__Types::TPDU__RP__DATA__MS__SGSN_template& tpdu)
{
TTCN_Location current_location("L3_Templates.ttcn", 3533, TTCN_Location::LOCATION_TEMPLATE, "ts_RP_DATA_MO");
MobileL3__SMS__Types::RPDU__MS__SGSN_template ret_val;
{
MobileL3__SMS__Types::RP__DATA__MS__SGSN_template& tmp_239 = ret_val.rP__DATA__MS__SGSN();
tmp_239.rP__MTI() = bs_5;
tmp_239.rP__Spare() = bs_39;
tmp_239.rP__MessageReference() = msg__ref;
tmp_239.rP__OriginatorAddress() = ts__RpOrig(rp__orig);
tmp_239.rP__DestinationAddress() = ts__RpDst(rp__dst);
{
MobileL3__SMS__Types::RP__DATA__User__DataLV__MS__SGSN_template& tmp_240 = tmp_239.rP__User__Data();
tmp_240.rP__LengthIndicator() = 0;
tmp_240.rP__TPDU() = tpdu;
}
}
return ret_val;
}

MobileL3__SMS__Types::RPDU__SGSN__MS_template tr__RP__DATA__MT(const OCTETSTRING_template& msg__ref, const MobileL3__SMS__Types::RP__NumberingPlan__and__NumberDigits_template& rp__orig, const MobileL3__SMS__Types::RP__NumberingPlan__and__NumberDigits_template& rp__dst, const MobileL3__SMS__Types::TPDU__RP__DATA__SGSN__MS_template& tpdu)
{
TTCN_Location current_location("L3_Templates.ttcn", 3550, TTCN_Location::LOCATION_TEMPLATE, "tr_RP_DATA_MT");
MobileL3__SMS__Types::RPDU__SGSN__MS_template ret_val;
{
MobileL3__SMS__Types::RP__DATA__SGSN__MS_template& tmp_241 = ret_val.rP__DATA__SGSN__MS();
tmp_241.rP__MTI() = bs_8;
tmp_241.rP__Spare() = bs_39;
tmp_241.rP__MessageReference() = msg__ref;
{
MobileL3__SMS__Types::RP__OriginatorAddressLV_template& tmp_242 = tmp_241.rP__OriginatorAddress();
tmp_242.lengthIndicator() = ANY_VALUE;
tmp_242.rP__OriginatorAddress() = rp__orig;
}
{
MobileL3__SMS__Types::RP__DestinationAddressLV_template& tmp_243 = tmp_241.rP__DestinationAddress();
tmp_243.lengthIndicator() = ANY_VALUE;
tmp_243.rP__DestinationAddress() = rp__dst;
}
{
MobileL3__SMS__Types::RP__DATA__User__DataLV__SGSN__MS_template& tmp_244 = tmp_241.rP__User__Data();
tmp_244.rP__LengthIndicator() = ANY_VALUE;
tmp_244.rP__TPDU() = tpdu;
}
}
return ret_val;
}

MobileL3__SMS__Types::RPDU__MS__SGSN_template ts__RP__ACK__MO(const OCTETSTRING& msg__ref)
{
TTCN_Location current_location("L3_Templates.ttcn", 3568, TTCN_Location::LOCATION_TEMPLATE, "ts_RP_ACK_MO");
MobileL3__SMS__Types::RPDU__MS__SGSN_template ret_val;
{
MobileL3__SMS__Types::RP__ACK__MS__SGSN_template& tmp_245 = ret_val.rP__ACK__MS__SGSN();
tmp_245.rP__MTI() = bs_10;
tmp_245.rP__Spare() = bs_39;
tmp_245.rP__MessageReference() = msg__ref;
tmp_245.rP__User__Data() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__SMS__Types::RPDU__SGSN__MS_template tr__RP__ACK__MT(const OCTETSTRING_template& msg__ref)
{
TTCN_Location current_location("L3_Templates.ttcn", 3577, TTCN_Location::LOCATION_TEMPLATE, "tr_RP_ACK_MT");
MobileL3__SMS__Types::RPDU__SGSN__MS_template ret_val;
{
MobileL3__SMS__Types::RP__ACK__SGSN__MS_template& tmp_246 = ret_val.rP__ACK__SGSN__MS();
tmp_246.rP__MTI() = bs_11;
tmp_246.rP__Spare() = bs_39;
tmp_246.rP__MessageReference() = msg__ref;
tmp_246.rP__User__Data() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__SMS__Types::RPDU__MS__SGSN_template ts__RP__ERROR__MO(const OCTETSTRING& msg__ref, const INTEGER& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 3586, TTCN_Location::LOCATION_TEMPLATE, "ts_RP_ERROR_MO");
MobileL3__SMS__Types::RPDU__MS__SGSN_template ret_val;
{
MobileL3__SMS__Types::RP__ERROR__MS__SGSN_template& tmp_247 = ret_val.rP__ERROR__MS__SGSN();
tmp_247.rP__MTI() = bs_6;
tmp_247.rP__Spare() = bs_39;
tmp_247.rP__Message__Reference() = msg__ref;
{
MobileL3__SMS__Types::RP__CauseLV_template& tmp_248 = tmp_247.rP__CauseLV();
tmp_248.rP__LengthIndicator() = 0;
{
MobileL3__SMS__Types::RP__CauseV_template& tmp_249 = tmp_248.rP__CauseV();
tmp_249.causeValue() = int2bit(cause, 7);
tmp_249.ext() = bs_0;
}
tmp_248.rP__diagnisticField() = OMIT_VALUE;
}
tmp_247.rP__User__Data() = OMIT_VALUE;
}
return ret_val;
}

BITSTRING_template f__cause__or__wc(const INTEGER_template& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 3603, TTCN_Location::LOCATION_FUNCTION, "f_cause_or_wc");
current_location.update_lineno(3604);
/* L3_Templates.ttcn, line 3604 */
if (cause.get_istemplate_kind((const char*)cs_0)) {
current_location.update_lineno(3605);
/* L3_Templates.ttcn, line 3605 */
return BITSTRING_template(ANY_VALUE);
}
else {
current_location.update_lineno(3606);
/* L3_Templates.ttcn, line 3606 */
if (cause.get_istemplate_kind((const char*)cs_2)) {
current_location.update_lineno(3607);
/* L3_Templates.ttcn, line 3607 */
return BITSTRING_template(ANY_OR_OMIT);
}
else {
current_location.update_lineno(3609);
/* L3_Templates.ttcn, line 3609 */
return BITSTRING_template(int2bit(cause.valueof(), 7));
}
}
}

MobileL3__SMS__Types::RPDU__SGSN__MS_template tr__RP__ERROR__MT(const OCTETSTRING_template& msg__ref, const INTEGER_template& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 3613, TTCN_Location::LOCATION_TEMPLATE, "tr_RP_ERROR_MT");
MobileL3__SMS__Types::RPDU__SGSN__MS_template ret_val;
{
MobileL3__SMS__Types::RP__ERROR__SGSN__MS_template& tmp_250 = ret_val.rP__ERROR__SGSN__MS();
tmp_250.rP__MTI() = bs_87;
tmp_250.rP__Spare() = bs_39;
tmp_250.rP__Message__Reference() = msg__ref;
{
MobileL3__SMS__Types::RP__CauseLV_template& tmp_251 = tmp_250.rP__CauseLV();
tmp_251.rP__LengthIndicator() = ANY_VALUE;
{
MobileL3__SMS__Types::RP__CauseV_template& tmp_252 = tmp_251.rP__CauseV();
tmp_252.causeValue() = f__cause__or__wc(cause);
tmp_252.ext() = bs_0;
}
tmp_251.rP__diagnisticField() = OMIT_VALUE;
}
tmp_250.rP__User__Data() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__SMS__Types::RPDU__MS__SGSN_template ts__RP__SMMA__MO(const OCTETSTRING& msg__ref)
{
TTCN_Location current_location("L3_Templates.ttcn", 3631, TTCN_Location::LOCATION_TEMPLATE, "ts_RP_SMMA_MO");
MobileL3__SMS__Types::RPDU__MS__SGSN_template ret_val;
{
MobileL3__SMS__Types::RP__SMMA_template& tmp_253 = ret_val.rP__SMMA();
tmp_253.rP__MTI() = bs_37;
tmp_253.rP__Spare() = bs_39;
tmp_253.rP__MessageReference() = msg__ref;
}
return ret_val;
}

MobileL3__SMS__Types::L3__SMS__MS__SGSN_template ts__CP__DATA__MO(const MobileL3__SMS__Types::RPDU__MS__SGSN_template& rpdu)
{
TTCN_Location current_location("L3_Templates.ttcn", 3644, TTCN_Location::LOCATION_TEMPLATE, "ts_CP_DATA_MO");
MobileL3__SMS__Types::L3__SMS__MS__SGSN_template ret_val;
{
MobileL3__SMS__Types::CP__DATA__MS__SGSN_template& tmp_254 = ret_val.cP__DATA();
tmp_254.cP__messageType() = bs_88;
{
MobileL3__SMS__Types::CP__User__DataLV__MS__SGSN_template& tmp_255 = tmp_254.cP__User__Data();
tmp_255.lengthIndicator() = 0;
tmp_255.cP__RPDU() = rpdu;
}
}
return ret_val;
}

MobileL3__SMS__Types::L3__SMS__MS__SGSN_template ts__CP__ERROR__MO(const OCTETSTRING& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 3660, TTCN_Location::LOCATION_TEMPLATE, "ts_CP_ERROR_MO");
MobileL3__SMS__Types::L3__SMS__MS__SGSN_template ret_val;
{
MobileL3__SMS__Types::CP__ERROR_template& tmp_256 = ret_val.cP__ERROR();
tmp_256.cP__messageType() = bs_26;
tmp_256.cP__Cause().causeValue() = cause;
}
return ret_val;
}

MobileL3__SMS__Types::L3__SMS__SGSN__MS_template tr__CP__DATA__MT(const MobileL3__SMS__Types::RPDU__SGSN__MS_template& rpdu)
{
TTCN_Location current_location("L3_Templates.ttcn", 3669, TTCN_Location::LOCATION_TEMPLATE, "tr_CP_DATA_MT");
MobileL3__SMS__Types::L3__SMS__SGSN__MS_template ret_val;
{
MobileL3__SMS__Types::CP__DATA__SGSN__MS_template& tmp_257 = ret_val.cP__DATA();
tmp_257.cP__messageType() = bs_88;
{
MobileL3__SMS__Types::CP__User__DataLV__SGSN__MS_template& tmp_258 = tmp_257.cP__User__Data();
tmp_258.lengthIndicator() = ANY_VALUE;
tmp_258.cP__RPDU() = rpdu;
}
}
return ret_val;
}

MobileL3__SMS__Types::L3__SMS__SGSN__MS_template tr__CP__ERROR__MT(const OCTETSTRING_template& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 3685, TTCN_Location::LOCATION_TEMPLATE, "tr_CP_ERROR_MT");
MobileL3__SMS__Types::L3__SMS__SGSN__MS_template ret_val;
{
MobileL3__SMS__Types::CP__ERROR_template& tmp_259 = ret_val.cP__ERROR();
tmp_259.cP__messageType() = bs_26;
tmp_259.cP__Cause().causeValue() = cause;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__SMS(const INTEGER& tid, const BITSTRING& ti__flag, const MobileL3__SMS__Types::L3__SMS__MS__SGSN_template& sms__mo)
{
TTCN_Location current_location("L3_Templates.ttcn", 3696, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_SMS");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_81;
{
MobileL3__Types::L3__TransactionId_template& tmp_260 = ret_val.tiOrSkip().transactionId();
tmp_260.tio() = int2bit(tid, 3);
tmp_260.tiFlag() = ti__flag;
tmp_260.tIExtension() = OMIT_VALUE;
}
ret_val.msgs().sms() = sms__mo;
return ret_val;
}

BITSTRING_template f__tid__or__wc(const INTEGER_template& tid)
{
TTCN_Location current_location("L3_Templates.ttcn", 3711, TTCN_Location::LOCATION_FUNCTION, "f_tid_or_wc");
current_location.update_lineno(3712);
/* L3_Templates.ttcn, line 3712 */
BITSTRING_template ret;
current_location.update_lineno(3713);
/* L3_Templates.ttcn, line 3713 */
if (tid.get_istemplate_kind((const char*)cs_2)) {
current_location.update_lineno(3714);
/* L3_Templates.ttcn, line 3714 */
return BITSTRING_template(ANY_OR_OMIT);
}
else {
current_location.update_lineno(3715);
/* L3_Templates.ttcn, line 3715 */
if (tid.get_istemplate_kind((const char*)cs_0)) {
current_location.update_lineno(3716);
/* L3_Templates.ttcn, line 3716 */
return BITSTRING_template(ANY_VALUE);
}
else {
current_location.update_lineno(3718);
/* L3_Templates.ttcn, line 3718 */
return BITSTRING_template(int2bit(tid.valueof(), 3));
}
}
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__SMS(const INTEGER_template& tid, const BITSTRING_template& ti__flag, const MobileL3__SMS__Types::L3__SMS__SGSN__MS_template& sms__mt)
{
TTCN_Location current_location("L3_Templates.ttcn", 3722, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_SMS");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_81;
{
MobileL3__Types::L3__TransactionId_template& tmp_261 = ret_val.tiOrSkip().transactionId();
tmp_261.tio() = f__tid__or__wc(tid);
tmp_261.tiFlag() = ti__flag;
tmp_261.tIExtension() = OMIT_VALUE;
}
ret_val.msgs().sms() = sms__mt;
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__RRM__GprsSuspReq(const OCTETSTRING_template& tlli, const MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_template& rai, const OCTETSTRING_template& cause)
{
TTCN_Location current_location("L3_Templates.ttcn", 3758, TTCN_Location::LOCATION_TEMPLATE, "ts_RRM_GprsSuspReq");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__GPRS__SuspensionRequest__MS__NW_template& tmp_263 = ret_val.msgs().rrm().gPRS__suspensionRequest();
tmp_263.messageType() = bs_90;
tmp_263.tLLI() = tlli;
tmp_263.routingAreaIdentification() = rai;
tmp_263.suspensionCause() = cause;
tmp_263.service__Support() = OMIT_VALUE;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template ts__RRM__PhysicalInfo(const OCTETSTRING_template& ta)
{
TTCN_Location current_location("L3_Templates.ttcn", 3778, TTCN_Location::LOCATION_TEMPLATE, "ts_RRM_PhysicalInfo");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_15;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__PhysicalInformation__NW__MS_template& tmp_264 = ret_val.msgs().rrm().physicalInformation();
tmp_264.messageType() = bs_91;
tmp_264.timingAdvance() = ta;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__RRM__PhysicalInfo(const OCTETSTRING_template& ta)
{
TTCN_Location current_location("L3_Templates.ttcn", 3793, TTCN_Location::LOCATION_TEMPLATE, "tr_RRM_PhysicalInfo");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_21;
ret_val.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__PhysicalInformation__NW__MS_template& tmp_265 = ret_val.msgs().rrm().physicalInformation();
tmp_265.messageType() = bs_91;
tmp_265.timingAdvance() = ta;
}
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__BCC(const INTEGER& tid, const OCTETSTRING& bcc)
{
TTCN_Location current_location("L3_Templates.ttcn", 3809, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_BCC");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_2;
{
MobileL3__Types::L3__TransactionId_template& tmp_266 = ret_val.tiOrSkip().transactionId();
tmp_266.tio() = int2bit(tid, 3);
tmp_266.tiFlag() = bs_0;
tmp_266.tIExtension() = OMIT_VALUE;
}
ret_val.msgs().bcc() = bcc;
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__BCC(const INTEGER& tid, const OCTETSTRING_template& bcc)
{
TTCN_Location current_location("L3_Templates.ttcn", 3822, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_BCC");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_2;
{
MobileL3__Types::L3__TransactionId_template& tmp_267 = ret_val.tiOrSkip().transactionId();
tmp_267.tio() = int2bit(tid, 3);
tmp_267.tiFlag() = bs_1;
tmp_267.tIExtension() = OMIT_VALUE;
}
ret_val.msgs().bcc() = bcc;
return ret_val;
}

MobileL3__Types::PDU__ML3__MS__NW_template ts__ML3__MO__GCC(const INTEGER& tid, const OCTETSTRING& gcc)
{
TTCN_Location current_location("L3_Templates.ttcn", 3836, TTCN_Location::LOCATION_TEMPLATE, "ts_ML3_MO_GCC");
MobileL3__Types::PDU__ML3__MS__NW_template ret_val;
ret_val.discriminator() = bs_15;
{
MobileL3__Types::L3__TransactionId_template& tmp_268 = ret_val.tiOrSkip().transactionId();
tmp_268.tio() = int2bit(tid, 3);
tmp_268.tiFlag() = bs_0;
tmp_268.tIExtension() = OMIT_VALUE;
}
ret_val.msgs().gcc() = gcc;
return ret_val;
}

MobileL3__Types::PDU__ML3__NW__MS_template tr__ML3__MT__GCC(const INTEGER& tid, const OCTETSTRING_template& gcc)
{
TTCN_Location current_location("L3_Templates.ttcn", 3849, TTCN_Location::LOCATION_TEMPLATE, "tr_ML3_MT_GCC");
MobileL3__Types::PDU__ML3__NW__MS_template ret_val;
ret_val.discriminator() = bs_15;
{
MobileL3__Types::L3__TransactionId_template& tmp_269 = ret_val.tiOrSkip().transactionId();
tmp_269.tio() = int2bit(tid, 3);
tmp_269.tiFlag() = bs_1;
tmp_269.tIExtension() = OMIT_VALUE;
}
ret_val.msgs().gcc() = gcc;
return ret_val;
}


/* Bodies of static functions */

void pre_init_module()
{
TTCN_Location current_location("L3_Templates.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "L3_Templates");
Osmocom__Types::module_object.pre_init_module();
MobileL3__Types::module_object.pre_init_module();
current_location.update_lineno(25);
/* L3_Templates.ttcn, line 25 */
const_c__TIF__ORIG = bs_0;
current_location.update_lineno(26);
/* L3_Templates.ttcn, line 26 */
const_c__TIF__REPL = bs_1;
module_object.add_function("f_tr_MI_IMSI", (genericfunc_t)&f__tr__MI__IMSI, NULL);
module_object.add_function("ts_GMM_MsNetCapTLV", (genericfunc_t)&ts__GMM__MsNetCapTLV, NULL);
module_object.add_function("ts_MI_TMSI_TLV", (genericfunc_t)&ts__MI__TMSI__TLV, NULL);
module_object.add_function("f_enc_IMSI_L3", (genericfunc_t)&f__enc__IMSI__L3, NULL);
module_object.add_function("f_enc_IMEI_L3", (genericfunc_t)&f__enc__IMEI__L3, NULL);
module_object.add_function("f_enc_IMEI_SV", (genericfunc_t)&f__enc__IMEI__SV, NULL);
module_object.add_function("ts_CM3_TLV", (genericfunc_t)&ts__CM3__TLV, NULL);
module_object.add_function("f_id_type_or_any", (genericfunc_t)&f__id__type__or__any, NULL);
module_object.add_function("f_pad_digits", (genericfunc_t)&f__pad__digits, NULL);
module_object.add_function("f_facility_or_omit", (genericfunc_t)&f__facility__or__omit, NULL);
module_object.add_function("f_facility_or_wc", (genericfunc_t)&f__facility__or__wc, NULL);
module_object.add_function("ts_GMM_AttachType", (genericfunc_t)&ts__GMM__AttachType, NULL);
module_object.add_function("f_presence_bit_MultislotCap_GPRS", (genericfunc_t)&f__presence__bit__MultislotCap__GPRS, NULL);
module_object.add_function("f_presence_bit_MultislotCap_EGPRS", (genericfunc_t)&f__presence__bit__MultislotCap__EGPRS, NULL);
module_object.add_function("tr_MI_TMSI_TLV", (genericfunc_t)&tr__MI__TMSI__TLV, NULL);
current_location.update_lineno(2927);
/* L3_Templates.ttcn, line 2927 */
const_c__GMM__DTT__MO__GPRS = bs_8;
current_location.update_lineno(2928);
/* L3_Templates.ttcn, line 2928 */
const_c__GMM__DTT__MO__IMSI = bs_10;
current_location.update_lineno(2929);
/* L3_Templates.ttcn, line 2929 */
const_c__GMM__DTT__MO__GPRS__IMSI__COMBINED = bs_11;
current_location.update_lineno(2931);
/* L3_Templates.ttcn, line 2931 */
const_c__GMM__DTT__MT__REATTACH__REQUIRED = bs_8;
current_location.update_lineno(2932);
/* L3_Templates.ttcn, line 2932 */
const_c__GMM__DTT__MT__REATTACH__NOT__REQUIRED = bs_10;
current_location.update_lineno(2933);
/* L3_Templates.ttcn, line 2933 */
const_c__GMM__DTT__MT__IMSI__DETACH = bs_11;
module_object.add_function("ts_PtmsiSigTV", (genericfunc_t)&ts__PtmsiSigTV, NULL);
module_object.add_function("ts_PtmsiSigTLV", (genericfunc_t)&ts__PtmsiSigTLV, NULL);
current_location.update_lineno(2968);
/* L3_Templates.ttcn, line 2968 */
const_c__GMM__PMTSI__TYPE__NATIVE = bs_0;
current_location.update_lineno(2969);
/* L3_Templates.ttcn, line 2969 */
const_c__GMM__PMTSI__TYPE__MAPPED = bs_1;
module_object.add_function("ts_PtmsiTypeTV", (genericfunc_t)&ts__PtmsiTypeTV, NULL);
module_object.add_function("ts_RoutingAreaIdentification2TLV", (genericfunc_t)&ts__RoutingAreaIdentification2TLV, NULL);
module_object.add_function("ts_ApnTLV", (genericfunc_t)&ts__ApnTLV, NULL);
module_object.add_function("ts_PcoTLV", (genericfunc_t)&ts__PcoTLV, NULL);
module_object.add_function("ts_TearDownIndicatorTV", (genericfunc_t)&ts__TearDownIndicatorTV, NULL);
module_object.add_function("enc_MobileIdentityLV", (genericfunc_t)&enc__MobileIdentityLV, NULL);
module_object.add_function("dec_MobileIdentityV", (genericfunc_t)&dec__MobileIdentityV, NULL);
module_object.add_function("ts_RpOrig", (genericfunc_t)&ts__RpOrig, NULL);
module_object.add_function("ts_RpDst", (genericfunc_t)&ts__RpDst, NULL);
module_object.add_function("f_cause_or_wc", (genericfunc_t)&f__cause__or__wc, NULL);
module_object.add_function("f_tid_or_wc", (genericfunc_t)&f__tid__or__wc, NULL);
}

void post_init_module()
{
TTCN_Location current_location("L3_Templates.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "L3_Templates");
Osmocom__Types::module_object.post_init_module();
MobileL3__Types::module_object.post_init_module();
current_location.update_lineno(56);
/* L3_Templates.ttcn, line 56 */
const_ts__ML3__Cause_loc_defval = bs_2;
current_location.update_lineno(56);
/* L3_Templates.ttcn, line 56 */
const_ts__ML3__Cause_std_defval = bs_3;
current_location.update_lineno(74);
/* L3_Templates.ttcn, line 74 */
const_ts__ML3__Cause__LV_loc_defval = bs_2;
current_location.update_lineno(74);
/* L3_Templates.ttcn, line 74 */
const_ts__ML3__Cause__LV_std_defval = bs_3;
current_location.update_lineno(114);
/* L3_Templates.ttcn, line 114 */
template_t__MI__NoIdentity_filler_defval = hs_0;
current_location.update_lineno(205);
/* L3_Templates.ttcn, line 205 */
const_ts__MI__TMSI__NRI__LV_nri__bitlen_defval = 10;
current_location.update_lineno(297);
/* L3_Templates.ttcn, line 297 */
template_ts__CM2.lengthIndicator() = 0;
template_ts__CM2.rf__PowerCapability() = bs_5;
template_ts__CM2.a5__1() = bs_0;
template_ts__CM2.esind() = bs_1;
template_ts__CM2.revisionLevel() = bs_12;
template_ts__CM2.spare1__1() = bs_0;
{
MobileL3__CommonIE__Types::MobileStationClassmark2__oct4_template& tmp_25 = template_ts__CM2.mobileStationClassmark2__oct4();
tmp_25.fc() = bs_1;
tmp_25.vgcs() = bs_0;
tmp_25.vbs() = bs_0;
tmp_25.sm__Capability() = bs_1;
tmp_25.ss__ScreenIndicator() = bs_13;
tmp_25.ps__Capability() = bs_1;
tmp_25.spare2__1() = bs_0;
}
{
MobileL3__CommonIE__Types::MobileStationClassmark2__oct5_template& tmp_26 = template_ts__CM2.mobileStationClassmark2__oct5();
tmp_26.a5__2() = bs_0;
tmp_26.a5__3() = bs_1;
tmp_26.cmsp() = bs_0;
tmp_26.solsa() = bs_0;
tmp_26.ucs2() = bs_0;
tmp_26.lcsva__cap() = bs_0;
tmp_26.spare5__7() = bs_0;
tmp_26.cm3() = bs_0;
}
current_location.update_lineno(325);
/* L3_Templates.ttcn, line 325 */
template_LU__Type__Normal.lut() = bs_14;
template_LU__Type__Normal.spare1__1() = bs_0;
template_LU__Type__Normal.fop() = bs_0;
current_location.update_lineno(331);
/* L3_Templates.ttcn, line 331 */
template_LU__Type__Periodic.lut() = bs_13;
template_LU__Type__Periodic.spare1__1() = bs_0;
template_LU__Type__Periodic.fop() = bs_0;
current_location.update_lineno(337);
/* L3_Templates.ttcn, line 337 */
template_LU__Type__IMSI__Attach.lut() = bs_12;
template_LU__Type__IMSI__Attach.spare1__1() = bs_0;
template_LU__Type__IMSI__Attach.fop() = bs_0;
current_location.update_lineno(344);
/* L3_Templates.ttcn, line 344 */
template_ts__PDPContextStatusTLV_status_defval = os_3;
current_location.update_lineno(354);
/* L3_Templates.ttcn, line 354 */
template_ts__LU__REQ_mcc__mnc_defval = os_5;
current_location.update_lineno(381);
/* L3_Templates.ttcn, line 381 */
template_ts__LU__ACCEPT_mi__tlv_defval = OMIT_VALUE;
current_location.update_lineno(495);
/* L3_Templates.ttcn, line 495 */
template_tr__MT__simple_discr_defval = ANY_VALUE;
current_location.update_lineno(504);
/* L3_Templates.ttcn, line 504 */
template_tr__CM__SERV__ACC.discriminator() = bs_18;
template_tr__CM__SERV__ACC.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__CMServiceAccept_template& tmp_38 = template_tr__CM__SERV__ACC.msgs().mm().cMServiceAccept();
tmp_38.messageType() = bs_19;
tmp_38.nsd() = ANY_VALUE;
}
current_location.update_lineno(520);
/* L3_Templates.ttcn, line 520 */
template_tr__CM__SERV__REJ_rej__cause_defval = ANY_VALUE;
current_location.update_lineno(537);
/* L3_Templates.ttcn, line 537 */
template_tr__PAGING__REQ1_mi1_defval = ANY_VALUE;
current_location.update_lineno(538);
/* L3_Templates.ttcn, line 538 */
template_tr__PAGING__REQ1_mi2_defval = ANY_OR_OMIT;
current_location.update_lineno(557);
/* L3_Templates.ttcn, line 557 */
template_tr__PAGING__REQ2_mi1_defval = ANY_VALUE;
current_location.update_lineno(558);
/* L3_Templates.ttcn, line 558 */
template_tr__PAGING__REQ2_mi2_defval = ANY_VALUE;
current_location.update_lineno(559);
/* L3_Templates.ttcn, line 559 */
template_tr__PAGING__REQ2_mi3_defval = ANY_OR_OMIT;
current_location.update_lineno(579);
/* L3_Templates.ttcn, line 579 */
template_tr__PAGING__REQ3_mi1_defval = ANY_VALUE;
current_location.update_lineno(580);
/* L3_Templates.ttcn, line 580 */
template_tr__PAGING__REQ3_mi2_defval = ANY_VALUE;
current_location.update_lineno(581);
/* L3_Templates.ttcn, line 581 */
template_tr__PAGING__REQ3_mi3_defval = ANY_VALUE;
current_location.update_lineno(582);
/* L3_Templates.ttcn, line 582 */
template_tr__PAGING__REQ3_mi4_defval = ANY_VALUE;
current_location.update_lineno(625);
/* L3_Templates.ttcn, line 625 */
template_tr__ChannelDescription2__V_timeslotNumber_defval = ANY_VALUE;
current_location.update_lineno(626);
/* L3_Templates.ttcn, line 626 */
template_tr__ChannelDescription2__V_channelTypeandTDMAOffset_defval = ANY_VALUE;
current_location.update_lineno(637);
/* L3_Templates.ttcn, line 637 */
template_tr__ExtendedTSCSet__TV_cSDomainTSCSet_defval = ANY_VALUE;
current_location.update_lineno(646);
/* L3_Templates.ttcn, line 646 */
template_tr__RRM__ModeModify_desc_defval = ANY_VALUE;
current_location.update_lineno(647);
/* L3_Templates.ttcn, line 647 */
template_tr__RRM__ModeModify_mode_defval = ANY_VALUE;
current_location.update_lineno(669);
/* L3_Templates.ttcn, line 669 */
template_ts__RRM__ModeModifyAck_extendedTSCSet_defval = OMIT_VALUE;
current_location.update_lineno(708);
/* L3_Templates.ttcn, line 708 */
template_ts__RRM__CiphModeCompl.discriminator() = bs_15;
template_ts__RRM__CiphModeCompl.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__CipheringModeComplete__MS__NW_template& tmp_50 = template_ts__RRM__CiphModeCompl.msgs().rrm().cipheringModeComplete();
tmp_50.messageType() = bs_29;
tmp_50.mobileEquipmentIdentity() = OMIT_VALUE;
}
current_location.update_lineno(729);
/* L3_Templates.ttcn, line 729 */
template_tr__RR__AssignmentCommand_desc_defval = ANY_VALUE;
current_location.update_lineno(730);
/* L3_Templates.ttcn, line 730 */
template_tr__RR__AssignmentCommand_mode_defval = ANY_VALUE;
current_location.update_lineno(731);
/* L3_Templates.ttcn, line 731 */
template_tr__RR__AssignmentCommand_extendedTSCSet_defval = OMIT_VALUE;
current_location.update_lineno(847);
/* L3_Templates.ttcn, line 847 */
template_tr__RR__APP__INFO_flags_defval = ANY_VALUE;
current_location.update_lineno(867);
/* L3_Templates.ttcn, line 867 */
template_ts__RR__HandoverCommand.discriminator() = bs_21;
template_ts__RR__HandoverCommand.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__HandoverCommand__NW__MS_template& tmp_58 = template_ts__RR__HandoverCommand.msgs().rrm().handoverCommand();
tmp_58.messageType() = bs_36;
{
MobileL3__RRM__Types::CellDescription__V_template& tmp_59 = tmp_58.cellDescription();
tmp_59.bcc() = bs_8;
tmp_59.ncc() = bs_10;
tmp_59.BCCHArfcn__HighPart() = bs_3;
tmp_59.BCCHArfcn__LowPart() = os_8;
}
{
MobileL3__RRM__Types::ChannelDescription2__V_template& tmp_60 = tmp_58.channelDescription2();
tmp_60.timeslotNumber() = bs_37;
tmp_60.channelTypeandTDMAOffset() = bs_38;
tmp_60.octet3() = os_9;
tmp_60.octet4() = os_10;
}
tmp_58.handoverReference().handoverReferenceValue() = os_9;
{
MobileL3__RRM__Types::PowerCommandAndAccesstype__V_template& tmp_61 = tmp_58.powerCommandAndAccesstype();
tmp_61.powerlevel() = bs_39;
tmp_61.fPC__EP() = bs_0;
tmp_61.ePC__Mode() = bs_0;
tmp_61.aTC() = bs_0;
}
tmp_58.synchronizationIndication() = OMIT_VALUE;
tmp_58.frequencyShortListAfterTime() = OMIT_VALUE;
tmp_58.frequencyListAfterTime() = OMIT_VALUE;
tmp_58.cellChannelDescription() = OMIT_VALUE;
tmp_58.multislotAllocation() = OMIT_VALUE;
tmp_58.modeOfChannelSet1() = OMIT_VALUE;
tmp_58.modeOfChannelSet2() = OMIT_VALUE;
tmp_58.modeOfChannelSet3() = OMIT_VALUE;
tmp_58.modeOfChannelSet4() = OMIT_VALUE;
tmp_58.modeOfChannelSet5() = OMIT_VALUE;
tmp_58.modeOfChannelSet6() = OMIT_VALUE;
tmp_58.modeOfChannelSet7() = OMIT_VALUE;
tmp_58.modeOfChannelSet8() = OMIT_VALUE;
tmp_58.descrOf2ndCh__at() = OMIT_VALUE;
tmp_58.modeOf2ndChannel() = OMIT_VALUE;
tmp_58.frequencyChannelSequence__at() = OMIT_VALUE;
tmp_58.mobileAllocation__at() = OMIT_VALUE;
tmp_58.startingTime() = OMIT_VALUE;
tmp_58.timeDifference() = OMIT_VALUE;
tmp_58.timingAdvance() = OMIT_VALUE;
tmp_58.frequencyShortListBeforeTime() = OMIT_VALUE;
tmp_58.frequencyListBeforeTime() = OMIT_VALUE;
tmp_58.descrOf1stCh__bt() = OMIT_VALUE;
tmp_58.descrOf2ndCh__bt() = OMIT_VALUE;
tmp_58.frequencyChannelSequence__bt() = OMIT_VALUE;
tmp_58.mobileAllocation__bt() = OMIT_VALUE;
tmp_58.cipherModeSetting() = OMIT_VALUE;
tmp_58.vGCS__TargetModeIndication() = OMIT_VALUE;
tmp_58.multiRateConfiguration() = OMIT_VALUE;
tmp_58.dynamicARFCN__Mapping() = OMIT_VALUE;
tmp_58.vGCS__Ciphering__Parameters() = OMIT_VALUE;
tmp_58.dedicatedServiceInformation() = OMIT_VALUE;
tmp_58.pLMNIndex() = OMIT_VALUE;
tmp_58.extendedTSCSet__afterTime() = OMIT_VALUE;
tmp_58.extendedTSCSet__beforeTime() = OMIT_VALUE;
}
current_location.update_lineno(937);
/* L3_Templates.ttcn, line 937 */
template_tr__RR__HandoverCommand.discriminator() = bs_21;
template_tr__RR__HandoverCommand.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__HandoverCommand__NW__MS_template& tmp_62 = template_tr__RR__HandoverCommand.msgs().rrm().handoverCommand();
tmp_62.messageType() = bs_36;
tmp_62.cellDescription() = ANY_VALUE;
tmp_62.channelDescription2() = ANY_VALUE;
tmp_62.handoverReference() = ANY_VALUE;
tmp_62.powerCommandAndAccesstype() = ANY_VALUE;
tmp_62.synchronizationIndication() = ANY_OR_OMIT;
tmp_62.frequencyShortListAfterTime() = ANY_OR_OMIT;
tmp_62.frequencyListAfterTime() = ANY_OR_OMIT;
tmp_62.cellChannelDescription() = ANY_OR_OMIT;
tmp_62.multislotAllocation() = ANY_OR_OMIT;
tmp_62.modeOfChannelSet1() = ANY_OR_OMIT;
tmp_62.modeOfChannelSet2() = ANY_OR_OMIT;
tmp_62.modeOfChannelSet3() = ANY_OR_OMIT;
tmp_62.modeOfChannelSet4() = ANY_OR_OMIT;
tmp_62.modeOfChannelSet5() = ANY_OR_OMIT;
tmp_62.modeOfChannelSet6() = ANY_OR_OMIT;
tmp_62.modeOfChannelSet7() = ANY_OR_OMIT;
tmp_62.modeOfChannelSet8() = ANY_OR_OMIT;
tmp_62.descrOf2ndCh__at() = ANY_OR_OMIT;
tmp_62.modeOf2ndChannel() = ANY_OR_OMIT;
tmp_62.frequencyChannelSequence__at() = ANY_OR_OMIT;
tmp_62.mobileAllocation__at() = ANY_OR_OMIT;
tmp_62.startingTime() = ANY_OR_OMIT;
tmp_62.timeDifference() = ANY_OR_OMIT;
tmp_62.timingAdvance() = ANY_OR_OMIT;
tmp_62.frequencyShortListBeforeTime() = ANY_OR_OMIT;
tmp_62.frequencyListBeforeTime() = ANY_OR_OMIT;
tmp_62.descrOf1stCh__bt() = ANY_OR_OMIT;
tmp_62.descrOf2ndCh__bt() = ANY_OR_OMIT;
tmp_62.frequencyChannelSequence__bt() = ANY_OR_OMIT;
tmp_62.mobileAllocation__bt() = ANY_OR_OMIT;
tmp_62.cipherModeSetting() = ANY_OR_OMIT;
tmp_62.vGCS__TargetModeIndication() = ANY_OR_OMIT;
tmp_62.multiRateConfiguration() = ANY_OR_OMIT;
tmp_62.dynamicARFCN__Mapping() = ANY_OR_OMIT;
tmp_62.vGCS__Ciphering__Parameters() = ANY_OR_OMIT;
tmp_62.dedicatedServiceInformation() = ANY_OR_OMIT;
tmp_62.pLMNIndex() = ANY_OR_OMIT;
tmp_62.extendedTSCSet__afterTime() = ANY_OR_OMIT;
tmp_62.extendedTSCSet__beforeTime() = ANY_OR_OMIT;
}
current_location.update_lineno(1003);
/* L3_Templates.ttcn, line 1003 */
template_ts__RRM__CM__CHG_cm3_defval = OMIT_VALUE;
current_location.update_lineno(1019);
/* L3_Templates.ttcn, line 1019 */
template_tr__RRM__CM__ENQUIRY.discriminator() = bs_21;
template_tr__RRM__CM__ENQUIRY.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__RRM__Types::PDU__RRM__ClassmarkEnquiry__NW__MS_template& tmp_64 = template_tr__RRM__CM__ENQUIRY.msgs().rrm().classmarkEnquiry();
tmp_64.messageType() = bs_41;
tmp_64.classmarkEnquiryMask() = ANY_OR_OMIT;
}
current_location.update_lineno(1068);
/* L3_Templates.ttcn, line 1068 */
template_tr__RRM__RR__STATUS_cause_defval = ANY_VALUE;
current_location.update_lineno(1085);
/* L3_Templates.ttcn, line 1085 */
template_tr__RRM__RR__RELEASE_cause_defval = ANY_VALUE;
current_location.update_lineno(1117);
/* L3_Templates.ttcn, line 1117 */
template_tr__RRM__RR__RELEASE__CellSelectInd_cause_defval = ANY_VALUE;
current_location.update_lineno(1131);
/* L3_Templates.ttcn, line 1131 */
template_ts__ML3__MO.discriminator() = bs_15;
template_ts__ML3__MO.tiOrSkip().skipIndicator() = bs_15;
template_ts__ML3__MO.msgs() = ANY_VALUE;
current_location.update_lineno(1139);
/* L3_Templates.ttcn, line 1139 */
template_ts__ML3__IE__LuType.lut() = ANY_VALUE;
template_ts__ML3__IE__LuType.spare1__1() = bs_0;
template_ts__ML3__IE__LuType.fop() = bs_0;
current_location.update_lineno(1145);
/* L3_Templates.ttcn, line 1145 */
template_ts__ML3__IE__LuType__Normal = ts__ML3__IE__LuType;
template_ts__ML3__IE__LuType__Normal.lut() = bs_14;
current_location.update_lineno(1149);
/* L3_Templates.ttcn, line 1149 */
template_ts__ML3__IE__LuType__Periodic = ts__ML3__IE__LuType;
template_ts__ML3__IE__LuType__Periodic.lut() = bs_13;
current_location.update_lineno(1153);
/* L3_Templates.ttcn, line 1153 */
template_ts__ML3__IE__LuType__Attach = ts__ML3__IE__LuType;
template_ts__ML3__IE__LuType__Attach.lut() = bs_12;
current_location.update_lineno(1184);
/* L3_Templates.ttcn, line 1184 */
template_ts__ML3__MO__TmsiRealloc__Cmpl = ts__ML3__MO;
{
MobileL3__MM__Types::PDU__ML3__TMSI__ReallocationComplete_template& tmp_71 = template_ts__ML3__MO__TmsiRealloc__Cmpl.msgs().mm().tmsiReallocComplete();
tmp_71.messageType() = bs_47;
tmp_71.nsd() = bs_14;
}
current_location.update_lineno(1195);
/* L3_Templates.ttcn, line 1195 */
template_tr__ML3__MT__LU__Acc.discriminator() = bs_18;
template_tr__ML3__MT__LU__Acc.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__LocationUpdateAccept_template& tmp_72 = template_tr__ML3__MT__LU__Acc.msgs().mm().locationUpdateAccept();
tmp_72.messageType() = bs_48;
tmp_72.nsd() = bs_14;
tmp_72.locationAreaIdentification() = ANY_VALUE;
tmp_72.mobileIdentityTLV() = ANY_OR_OMIT;
tmp_72.followOnProceed() = ANY_OR_OMIT;
tmp_72.cTS__Permission() = ANY_OR_OMIT;
tmp_72.equivalentPLMNs() = ANY_OR_OMIT;
tmp_72.emergencyNumberList() = ANY_OR_OMIT;
tmp_72.perMS__T3212() = ANY_OR_OMIT;
}
current_location.update_lineno(1217);
/* L3_Templates.ttcn, line 1217 */
template_tr__ML3__MT__LU__Rej_cause_defval = ANY_VALUE;
current_location.update_lineno(1242);
/* L3_Templates.ttcn, line 1242 */
template_tr__ML3__MT__MM__ID__Req_id__type_defval = ANY_VALUE;
current_location.update_lineno(1279);
/* L3_Templates.ttcn, line 1279 */
const_ts__CM1_a5__1__unavail_defval = bs_0;
current_location.update_lineno(1279);
/* L3_Templates.ttcn, line 1279 */
const_ts__CM1_rev_defval = bs_12;
current_location.update_lineno(1279);
/* L3_Templates.ttcn, line 1279 */
const_ts__CM1_esind_defval = bs_1;
current_location.update_lineno(1288);
/* L3_Templates.ttcn, line 1288 */
template_ts__ML3__MO__MM__IMSI__DET__Ind_cm1_defval = ts__CM1(ts__CM1_a5__1__unavail_defval, ts__CM1_rev_defval, ts__CM1_esind_defval);
current_location.update_lineno(1362);
/* L3_Templates.ttcn, line 1362 */
template_ts__Bcap__voice.elementIdentifier() = os_8;
template_ts__Bcap__voice.lengthIndicator() = 0;
{
MobileL3__CC__Types::BC__octet3_template& tmp_78 = template_ts__Bcap__voice.octet3();
tmp_78.informationTransferCapability() = bs_5;
tmp_78.transferMode() = bs_0;
tmp_78.codingStandard() = bs_0;
tmp_78.radioChannelRequirement() = bs_3;
tmp_78.extension__octet__3() = bs_0;
{
MobileL3__CC__Types::Speech__AuxiliarySpeech__List_template& tmp_79 = tmp_78.speech__aux__3a__3b();
tmp_79.set_size(5);
tmp_79[0] = ts__SpeechAuxHR(3).valueof();
tmp_79[1] = ts__SpeechAuxFR(3).valueof();
tmp_79[2] = ts__SpeechAuxFR(2).valueof();
tmp_79[3] = ts__SpeechAuxFR(1).valueof();
tmp_79[4] = ts__SpeechAuxHR(1).valueof();
}
}
template_ts__Bcap__voice.octet4() = OMIT_VALUE;
template_ts__Bcap__voice.octet5() = OMIT_VALUE;
template_ts__Bcap__voice.octet6() = OMIT_VALUE;
template_ts__Bcap__voice.octet7() = OMIT_VALUE;
current_location.update_lineno(1386);
/* L3_Templates.ttcn, line 1386 */
template_ts__Bcap__voice__mt.elementIdentifier() = os_8;
template_ts__Bcap__voice__mt.lengthIndicator() = 1;
{
MobileL3__CC__Types::BC__octet3_template& tmp_80 = template_ts__Bcap__voice__mt.octet3();
tmp_80.informationTransferCapability() = bs_5;
tmp_80.transferMode() = bs_0;
tmp_80.codingStandard() = bs_0;
tmp_80.radioChannelRequirement() = bs_13;
tmp_80.extension__octet__3() = bs_1;
tmp_80.speech__aux__3a__3b() = OMIT_VALUE;
}
template_ts__Bcap__voice__mt.octet4() = OMIT_VALUE;
template_ts__Bcap__voice__mt.octet5() = OMIT_VALUE;
template_ts__Bcap__voice__mt.octet6() = OMIT_VALUE;
template_ts__Bcap__voice__mt.octet7() = OMIT_VALUE;
current_location.update_lineno(1404);
/* L3_Templates.ttcn, line 1404 */
template_ts__Bcap__csd.elementIdentifier() = os_8;
template_ts__Bcap__csd.lengthIndicator() = 0;
{
MobileL3__CC__Types::BC__octet3_template& tmp_81 = template_ts__Bcap__csd.octet3();
tmp_81.informationTransferCapability() = bs_8;
tmp_81.transferMode() = bs_0;
tmp_81.codingStandard() = bs_0;
tmp_81.radioChannelRequirement() = bs_3;
tmp_81.extension__octet__3() = bs_0;
tmp_81.speech__aux__3a__3b() = OMIT_VALUE;
}
{
MobileL3__CC__Types::BC__octet4_template& tmp_82 = template_ts__Bcap__csd.octet4();
tmp_82.establishment() = bs_0;
tmp_82.nirr() = bs_1;
tmp_82.configuration() = bs_0;
tmp_82.duplexMode() = bs_1;
tmp_82.structure() = bs_14;
tmp_82.compression() = bs_0;
tmp_82.extension__octet__4() = bs_1;
}
{
MobileL3__CC__Types::BC__octet5_template& tmp_83 = template_ts__Bcap__csd.octet5();
tmp_83.signallingAccessProtocol() = bs_8;
tmp_83.rateAdaptation() = bs_13;
tmp_83.accessId() = bs_14;
tmp_83.extension__octet__5() = bs_0;
tmp_83.spare2__3() = OMIT_VALUE;
tmp_83.otherRateAdaptation() = OMIT_VALUE;
tmp_83.otherInformationTransferCapability() = OMIT_VALUE;
tmp_83.extension__octet__5a() = OMIT_VALUE;
tmp_83.spare3__1() = OMIT_VALUE;
tmp_83.inbandNegotiation() = OMIT_VALUE;
tmp_83.assignor__assignee() = OMIT_VALUE;
tmp_83.lli() = OMIT_VALUE;
tmp_83.mode() = OMIT_VALUE;
tmp_83.multiframe() = OMIT_VALUE;
tmp_83.hdrNohdr() = OMIT_VALUE;
tmp_83.extension__octet__5b() = OMIT_VALUE;
}
{
MobileL3__CC__Types::BC__octet6_template& tmp_84 = template_ts__Bcap__csd.octet6();
tmp_84.synchronous__asynchronous() = bs_1;
tmp_84.userInformationLayer1Protocol() = bs_15;
tmp_84.layer1Id() = bs_13;
tmp_84.extension__octet__6() = bs_0;
tmp_84.userRate() = bs_54;
tmp_84.numberDataBits() = bs_0;
tmp_84.negotiation() = bs_0;
tmp_84.numberStopBits() = bs_0;
tmp_84.extension__octet__6a() = bs_1;
tmp_84.parity() = bs_5;
tmp_84.nicOnRX() = bs_0;
tmp_84.nicOnTX() = bs_0;
tmp_84.intermediateRate() = bs_12;
tmp_84.extension__octet__6b() = bs_1;
tmp_84.modemType() = bs_39;
tmp_84.connectionElement() = bs_14;
tmp_84.extension__octet__6c() = bs_0;
tmp_84.fixedNetworkUserRate() = OMIT_VALUE;
tmp_84.otherModemType() = OMIT_VALUE;
tmp_84.extension__octet__6d() = OMIT_VALUE;
tmp_84.maxNumberOfTrafficChannels() = OMIT_VALUE;
tmp_84.acceptableChannelCodings() = OMIT_VALUE;
tmp_84.extension__octet__6e() = OMIT_VALUE;
tmp_84.wantedAirInterfaceUserRate() = OMIT_VALUE;
tmp_84.uimi() = OMIT_VALUE;
tmp_84.extension__octet__6f() = OMIT_VALUE;
tmp_84.spare() = OMIT_VALUE;
tmp_84.asymetryIndication() = OMIT_VALUE;
tmp_84.acceptableChannelCodingsExt() = OMIT_VALUE;
tmp_84.extension__octet__6g() = OMIT_VALUE;
}
template_ts__Bcap__csd.octet7() = OMIT_VALUE;
current_location.update_lineno(1483);
/* L3_Templates.ttcn, line 1483 */
template_ts__ML3__MO__CC__SETUP_bcap_defval = ts__Bcap__voice;
current_location.update_lineno(1525);
/* L3_Templates.ttcn, line 1525 */
template_ts__ML3__MO__CC__EMERG__SETUP_bcap_defval = ts__Bcap__voice;
current_location.update_lineno(1827);
/* L3_Templates.ttcn, line 1827 */
const_ts__ML3__MO__CC__REL__COMPL_tid__remote_defval = bs_0;
current_location.update_lineno(1874);
/* L3_Templates.ttcn, line 1874 */
template_tr__ML3__MT__MM__AUTH__REQ_rand_defval = ANY_VALUE;
current_location.update_lineno(1893);
/* L3_Templates.ttcn, line 1893 */
template_tr__ML3__MT__MM__AUTH__REQ__3G_rand_defval = ANY_VALUE;
current_location.update_lineno(1955);
/* L3_Templates.ttcn, line 1955 */
template_ts__ML3__MO__CC__CALL__CONF_bcap_defval = OMIT_VALUE;
current_location.update_lineno(1982);
/* L3_Templates.ttcn, line 1982 */
template_tr__ML3__MT__CC__SETUP_called_defval = ANY_OR_OMIT;
current_location.update_lineno(1983);
/* L3_Templates.ttcn, line 1983 */
template_tr__ML3__MT__CC__SETUP_calling_defval = ANY_OR_OMIT;
current_location.update_lineno(1984);
/* L3_Templates.ttcn, line 1984 */
template_tr__ML3__MT__CC__SETUP_bcap_defval = ANY_OR_OMIT;
current_location.update_lineno(2075);
/* L3_Templates.ttcn, line 2075 */
template_ts__ML3__MO__SS__REGISTER_ss__ver_defval = OMIT_VALUE;
current_location.update_lineno(2099);
/* L3_Templates.ttcn, line 2099 */
template_tr__ML3__MO__SS__REGISTER_ss__ver_defval = OMIT_VALUE;
current_location.update_lineno(2258);
/* L3_Templates.ttcn, line 2258 */
template_ts__ML3__MO__SS__RELEASE__COMPLETE_cause_defval = OMIT_VALUE;
current_location.update_lineno(2259);
/* L3_Templates.ttcn, line 2259 */
template_ts__ML3__MO__SS__RELEASE__COMPLETE_facility_defval = OMIT_VALUE;
current_location.update_lineno(2282);
/* L3_Templates.ttcn, line 2282 */
template_tr__ML3__MO__SS__RELEASE__COMPLETE_cause_defval = ANY_OR_OMIT;
current_location.update_lineno(2283);
/* L3_Templates.ttcn, line 2283 */
template_tr__ML3__MO__SS__RELEASE__COMPLETE_facility_defval = ANY_OR_OMIT;
current_location.update_lineno(2307);
/* L3_Templates.ttcn, line 2307 */
template_ts__ML3__MT__SS__RELEASE__COMPLETE_cause_defval = OMIT_VALUE;
current_location.update_lineno(2308);
/* L3_Templates.ttcn, line 2308 */
template_ts__ML3__MT__SS__RELEASE__COMPLETE_facility_defval = OMIT_VALUE;
current_location.update_lineno(2331);
/* L3_Templates.ttcn, line 2331 */
template_tr__ML3__MT__SS__RELEASE__COMPLETE_cause_defval = ANY_OR_OMIT;
current_location.update_lineno(2332);
/* L3_Templates.ttcn, line 2332 */
template_tr__ML3__MT__SS__RELEASE__COMPLETE_facility_defval = ANY_OR_OMIT;
current_location.update_lineno(2358);
/* L3_Templates.ttcn, line 2358 */
template_ts__GMM__MsNetCapV.gea1bit() = bs_1;
template_ts__GMM__MsNetCapV.smCapabilitiesviaDedicatedChannels() = bs_1;
template_ts__GMM__MsNetCapV.smCapabilitiesviaGPRSChannels() = bs_0;
template_ts__GMM__MsNetCapV.ucs2Support() = bs_1;
template_ts__GMM__MsNetCapV.ssScreeningIndicator() = bs_13;
template_ts__GMM__MsNetCapV.solSACapability() = bs_0;
template_ts__GMM__MsNetCapV.revisionLevelIndicatior() = bs_1;
template_ts__GMM__MsNetCapV.pFCFeatureMode() = OMIT_VALUE;
template_ts__GMM__MsNetCapV.extendedGEAbits() = OMIT_VALUE;
template_ts__GMM__MsNetCapV.lcsVAcapability() = OMIT_VALUE;
template_ts__GMM__MsNetCapV.pSInterRATHOtoUTRANIuModeCapability() = OMIT_VALUE;
template_ts__GMM__MsNetCapV.pSInterRATHOtoEUTRANS1ModeCapability() = OMIT_VALUE;
template_ts__GMM__MsNetCapV.eMMCombinedProceduresCapability() = OMIT_VALUE;
template_ts__GMM__MsNetCapV.iSRSupport() = OMIT_VALUE;
template_ts__GMM__MsNetCapV.sRVCCtoGERANUTRANCapability() = OMIT_VALUE;
template_ts__GMM__MsNetCapV.ePCCapability() = OMIT_VALUE;
template_ts__GMM__MsNetCapV.nFCapability() = OMIT_VALUE;
template_ts__GMM__MsNetCapV.gERANNertworkSharingCapability() = OMIT_VALUE;
template_ts__GMM__MsNetCapV.spare__octets() = OMIT_VALUE;
current_location.update_lineno(2380);
/* L3_Templates.ttcn, line 2380 */
template_ts__GMM__MsNetCapLV.lengthIndicator() = 0;
template_ts__GMM__MsNetCapLV.msNetworkCapabilityV() = ts__GMM__MsNetCapV;
current_location.update_lineno(2390);
/* L3_Templates.ttcn, line 2390 */
const_ts__GMM__AttachType_combined_defval = FALSE;
current_location.update_lineno(2390);
/* L3_Templates.ttcn, line 2390 */
const_ts__GMM__AttachType_follow__on__pending_defval = FALSE;
current_location.update_lineno(2410);
/* L3_Templates.ttcn, line 2410 */
const_ts__GMM__UpdateType_combined_defval = FALSE;
current_location.update_lineno(2411);
/* L3_Templates.ttcn, line 2411 */
const_ts__GMM__UpdateType_follow__on__pending_defval = FALSE;
current_location.update_lineno(2416);
/* L3_Templates.ttcn, line 2416 */
template_ts__DrxParameterV.splitPGCycleCode() = os_9;
template_ts__DrxParameterV.nonDRXTimer() = bs_5;
template_ts__DrxParameterV.splitOnCCCH() = bs_0;
template_ts__DrxParameterV.cnSpecificDRXCycleLength() = bs_15;
current_location.update_lineno(2436);
/* L3_Templates.ttcn, line 2436 */
template_ts__a5bits__a51a53.a51() = bs_1;
template_ts__a5bits__a51a53.a52() = bs_0;
template_ts__a5bits__a51a53.a53() = bs_1;
template_ts__a5bits__a51a53.a54() = bs_0;
template_ts__a5bits__a51a53.a55() = bs_0;
template_ts__a5bits__a51a53.a56() = bs_0;
template_ts__a5bits__a51a53.a57() = bs_0;
current_location.update_lineno(2446);
/* L3_Templates.ttcn, line 2446 */
const_ts__RaCapRec_att_defval = bs_2;
current_location.update_lineno(2446);
/* L3_Templates.ttcn, line 2446 */
template_ts__RaCapRec_mscap__gprs_defval = OMIT_VALUE;
current_location.update_lineno(2446);
/* L3_Templates.ttcn, line 2446 */
template_ts__RaCapRec_mscap__egprs_defval = OMIT_VALUE;
current_location.update_lineno(2486);
/* L3_Templates.ttcn, line 2486 */
template_ts__MS__RaCapa.lengthIndicator() = 0;
{
MobileL3__GMM__SM__Types::MSRadioAccessCapabilityV_template& tmp_162 = template_ts__MS__RaCapa.msRadioAccessCapabilityV();
tmp_162.set_size(1);
tmp_162[0] = ts__RaCapRec(bs_2, ts__RaCapRec_mscap__gprs_defval, ts__RaCapRec_mscap__egprs_defval);
}
current_location.update_lineno(2506);
/* L3_Templates.ttcn, line 2506 */
const_ts__GMM__ATTACH__REQ_combined_defval = FALSE;
current_location.update_lineno(2506);
/* L3_Templates.ttcn, line 2506 */
const_ts__GMM__ATTACH__REQ_follow__on__pending_defval = FALSE;
current_location.update_lineno(2507);
/* L3_Templates.ttcn, line 2507 */
template_ts__GMM__ATTACH__REQ_cm2__tlv_defval = OMIT_VALUE;
current_location.update_lineno(2508);
/* L3_Templates.ttcn, line 2508 */
template_ts__GMM__ATTACH__REQ_cm3__tlv_defval = OMIT_VALUE;
current_location.update_lineno(2509);
/* L3_Templates.ttcn, line 2509 */
template_ts__GMM__ATTACH__REQ_nri_defval = OMIT_VALUE;
current_location.update_lineno(2510);
/* L3_Templates.ttcn, line 2510 */
template_ts__GMM__ATTACH__REQ_p__tmsi__sig_defval = OMIT_VALUE;
current_location.update_lineno(2511);
/* L3_Templates.ttcn, line 2511 */
template_ts__GMM__ATTACH__REQ_p__tmsi__type_defval = OMIT_VALUE;
current_location.update_lineno(2512);
/* L3_Templates.ttcn, line 2512 */
template_ts__GMM__ATTACH__REQ_add__p__tmsi_defval = OMIT_VALUE;
current_location.update_lineno(2513);
/* L3_Templates.ttcn, line 2513 */
template_ts__GMM__ATTACH__REQ_add__rai_defval = OMIT_VALUE;
current_location.update_lineno(2582);
/* L3_Templates.ttcn, line 2582 */
template_tr__GMM__ATTACH__ACCEPT_res_defval = ANY_VALUE;
current_location.update_lineno(2583);
/* L3_Templates.ttcn, line 2583 */
template_tr__GMM__ATTACH__ACCEPT_ra_defval = ANY_VALUE;
current_location.update_lineno(2584);
/* L3_Templates.ttcn, line 2584 */
template_tr__GMM__ATTACH__ACCEPT_ptmsi_defval = ANY_OR_OMIT;
current_location.update_lineno(2641);
/* L3_Templates.ttcn, line 2641 */
template_ts__GMM__ATTACH__COMPL.discriminator() = bs_15;
template_ts__GMM__ATTACH__COMPL.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__AttachComplete_template& tmp_173 = template_ts__GMM__ATTACH__COMPL.msgs().gprs__mm().attachComplete();
tmp_173.messageType() = bs_25;
tmp_173.interRATHandoverInformation() = OMIT_VALUE;
tmp_173.eUTRANinterRATHandoverInformation() = OMIT_VALUE;
}
current_location.update_lineno(2660);
/* L3_Templates.ttcn, line 2660 */
const_ts__GMM__RAU__REQ_follow__on__pending_defval = FALSE;
current_location.update_lineno(2661);
/* L3_Templates.ttcn, line 2661 */
template_ts__GMM__RAU__REQ_cm2__tlv_defval = OMIT_VALUE;
current_location.update_lineno(2662);
/* L3_Templates.ttcn, line 2662 */
template_ts__GMM__RAU__REQ_cm3__tlv_defval = OMIT_VALUE;
current_location.update_lineno(2663);
/* L3_Templates.ttcn, line 2663 */
template_ts__GMM__RAU__REQ_p__tmsi_defval = OMIT_VALUE;
current_location.update_lineno(2664);
/* L3_Templates.ttcn, line 2664 */
template_ts__GMM__RAU__REQ_nri_defval = OMIT_VALUE;
current_location.update_lineno(2665);
/* L3_Templates.ttcn, line 2665 */
template_ts__GMM__RAU__REQ_p__tmsi__sig_defval = OMIT_VALUE;
current_location.update_lineno(2666);
/* L3_Templates.ttcn, line 2666 */
template_ts__GMM__RAU__REQ_p__tmsi__type_defval = OMIT_VALUE;
current_location.update_lineno(2667);
/* L3_Templates.ttcn, line 2667 */
template_ts__GMM__RAU__REQ_add__p__tmsi_defval = OMIT_VALUE;
current_location.update_lineno(2668);
/* L3_Templates.ttcn, line 2668 */
template_ts__GMM__RAU__REQ_add__rai_defval = OMIT_VALUE;
current_location.update_lineno(2669);
/* L3_Templates.ttcn, line 2669 */
template_ts__GMM__RAU__REQ_ms__network__cap_defval = OMIT_VALUE;
current_location.update_lineno(2713);
/* L3_Templates.ttcn, line 2713 */
template_tr__GMM__RAU__REJECT_cause_defval = ANY_VALUE;
current_location.update_lineno(2734);
/* L3_Templates.ttcn, line 2734 */
template_tr__GMM__RAU__ACCEPT_res_defval = ANY_VALUE;
current_location.update_lineno(2735);
/* L3_Templates.ttcn, line 2735 */
template_tr__GMM__RAU__ACCEPT_ra_defval = ANY_VALUE;
current_location.update_lineno(2736);
/* L3_Templates.ttcn, line 2736 */
template_tr__GMM__RAU__ACCEPT_ptmsi_defval = ANY_OR_OMIT;
current_location.update_lineno(2774);
/* L3_Templates.ttcn, line 2774 */
template_ts__GMM__RAU__COMPL.discriminator() = bs_15;
template_ts__GMM__RAU__COMPL.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__RoutingAreaUpdateComplete_template& tmp_179 = template_ts__GMM__RAU__COMPL.msgs().gprs__mm().routingAreaUpdateComplete();
tmp_179.messageType() = bs_25;
tmp_179.receiveNPDUNumbers() = OMIT_VALUE;
tmp_179.interRATHandoverInformation() = OMIT_VALUE;
tmp_179.eUTRANinterRATHandoverInformation() = OMIT_VALUE;
}
current_location.update_lineno(2791);
/* L3_Templates.ttcn, line 2791 */
template_ts__GMM__PTMSI__REALL__COMPL.discriminator() = bs_15;
template_ts__GMM__PTMSI__REALL__COMPL.tiOrSkip().skipIndicator() = bs_15;
template_ts__GMM__PTMSI__REALL__COMPL.msgs().gprs__mm().p__TMSIReallocationComplete().messageType() = bs_25;
current_location.update_lineno(2827);
/* L3_Templates.ttcn, line 2827 */
template_tr__GMM__ID__REQ_id__type_defval = ANY_VALUE;
current_location.update_lineno(2858);
/* L3_Templates.ttcn, line 2858 */
template_tr__GMM__AUTH__REQ_rand_defval = ANY_VALUE;
current_location.update_lineno(2858);
/* L3_Templates.ttcn, line 2858 */
template_tr__GMM__AUTH__REQ_ciph__alg_defval = ANY_VALUE;
current_location.update_lineno(2935);
/* L3_Templates.ttcn, line 2935 */
const_ts__GMM__DetType_power__off_defval = FALSE;
current_location.update_lineno(3000);
/* L3_Templates.ttcn, line 3000 */
const_ts__GMM__DET__REQ__MO_dtt_defval = bs_8;
current_location.update_lineno(3001);
/* L3_Templates.ttcn, line 3001 */
const_ts__GMM__DET__REQ__MO_power__off_defval = FALSE;
current_location.update_lineno(3002);
/* L3_Templates.ttcn, line 3002 */
template_ts__GMM__DET__REQ__MO_p__tmsi_defval = OMIT_VALUE;
current_location.update_lineno(3003);
/* L3_Templates.ttcn, line 3003 */
template_ts__GMM__DET__REQ__MO_p__tmsi__sig_defval = OMIT_VALUE;
current_location.update_lineno(3021);
/* L3_Templates.ttcn, line 3021 */
const_ts__GMM__DET__REQ__MO__mi_dtt_defval = bs_8;
current_location.update_lineno(3022);
/* L3_Templates.ttcn, line 3022 */
const_ts__GMM__DET__REQ__MO__mi_power__off_defval = FALSE;
current_location.update_lineno(3024);
/* L3_Templates.ttcn, line 3024 */
template_ts__GMM__DET__REQ__MO__mi_p__tmsi__sig_defval = OMIT_VALUE;
current_location.update_lineno(3042);
/* L3_Templates.ttcn, line 3042 */
template_tr__GMM__DET__ACCEPT__MT.discriminator() = bs_70;
template_tr__GMM__DET__ACCEPT__MT.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__GMM__SM__Types::PDU__GMM__DetachAccept__SGSN__MS_template& tmp_198 = template_tr__GMM__DET__ACCEPT__MT.msgs().gprs__mm().detachAccept__SGSN__MS();
tmp_198.messageType() = bs_78;
tmp_198.forceToStandby() = ANY_VALUE;
tmp_198.spare() = bs_15;
}
current_location.update_lineno(3059);
/* L3_Templates.ttcn, line 3059 */
template_tr__GMM__DET__REQ__MT_dtt_defval = ANY_OR_OMIT;
current_location.update_lineno(3060);
/* L3_Templates.ttcn, line 3060 */
template_tr__GMM__DET__REQ__MT_forceToStandby_defval = ANY_VALUE;
current_location.update_lineno(3061);
/* L3_Templates.ttcn, line 3061 */
template_tr__GMM__DET__REQ__MT_cause_defval = ANY_OR_OMIT;
current_location.update_lineno(3085);
/* L3_Templates.ttcn, line 3085 */
template_tr__ServiceTypeV_serviceType_defval = ANY_VALUE;
current_location.update_lineno(3093);
/* L3_Templates.ttcn, line 3093 */
template_ts__GMM__SERVICE__REQ_cksn_defval = 0;
current_location.update_lineno(3094);
/* L3_Templates.ttcn, line 3094 */
template_ts__GMM__SERVICE__REQ_pdp__status_defval = os_3;
current_location.update_lineno(3116);
/* L3_Templates.ttcn, line 3116 */
template_tr__GMM__SERVICE__ACC_pdp__status_defval = ANY_OR_OMIT;
current_location.update_lineno(3133);
/* L3_Templates.ttcn, line 3133 */
template_tr__GMM__SERVICE__REJ_gmmCause_defval = ANY_VALUE;
current_location.update_lineno(3134);
/* L3_Templates.ttcn, line 3134 */
template_tr__GMM__SERVICE__REJ_t3346_defval = ANY_OR_OMIT;
current_location.update_lineno(3150);
/* L3_Templates.ttcn, line 3150 */
template_ts__GMM__DET__ACCEPT__MO.discriminator() = bs_70;
template_ts__GMM__DET__ACCEPT__MO.tiOrSkip().skipIndicator() = bs_15;
template_ts__GMM__DET__ACCEPT__MO.msgs().gprs__mm().detachAccept__MS__SGSN().messageType() = bs_25;
current_location.update_lineno(3209);
/* L3_Templates.ttcn, line 3209 */
template_ts__SM__ACT__PDP__REQ_apn_defval = OMIT_VALUE;
current_location.update_lineno(3210);
/* L3_Templates.ttcn, line 3210 */
template_ts__SM__ACT__PDP__REQ_pco_defval = OMIT_VALUE;
current_location.update_lineno(3244);
/* L3_Templates.ttcn, line 3244 */
template_tr__SM__ACT__PDP__REJ_tid_defval = ANY_VALUE;
current_location.update_lineno(3244);
/* L3_Templates.ttcn, line 3244 */
template_tr__SM__ACT__PDP__REJ_cause_defval = ANY_VALUE;
current_location.update_lineno(3267);
/* L3_Templates.ttcn, line 3267 */
template_tr__SM__ACT__PDP__ACCEPT_tid_defval = ANY_VALUE;
current_location.update_lineno(3267);
/* L3_Templates.ttcn, line 3267 */
template_tr__SM__ACT__PDP__ACCEPT_sapi_defval = ANY_VALUE;
current_location.update_lineno(3268);
/* L3_Templates.ttcn, line 3268 */
template_tr__SM__ACT__PDP__ACCEPT_qos_defval = ANY_VALUE;
current_location.update_lineno(3302);
/* L3_Templates.ttcn, line 3302 */
template_ts__SM__DEACT__PDP__REQ__MO_tdown_defval = OMIT_VALUE;
current_location.update_lineno(3303);
/* L3_Templates.ttcn, line 3303 */
template_ts__SM__DEACT__PDP__REQ__MO_pco_defval = OMIT_VALUE;
current_location.update_lineno(3330);
/* L3_Templates.ttcn, line 3330 */
template_ts__SM__DEACT__PDP__REQ__MT_tdown_defval = OMIT_VALUE;
current_location.update_lineno(3331);
/* L3_Templates.ttcn, line 3331 */
template_ts__SM__DEACT__PDP__REQ__MT_pco_defval = OMIT_VALUE;
current_location.update_lineno(3358);
/* L3_Templates.ttcn, line 3358 */
template_tr__SM__DEACT__PDP__REQ__MT_tdown_defval = OMIT_VALUE;
current_location.update_lineno(3359);
/* L3_Templates.ttcn, line 3359 */
template_tr__SM__DEACT__PDP__REQ__MT_pco_defval = OMIT_VALUE;
current_location.update_lineno(3385);
/* L3_Templates.ttcn, line 3385 */
template_tr__SM__DEACT__PDP__ACCEPT__MT_tid_defval = ANY_VALUE;
current_location.update_lineno(3407);
/* L3_Templates.ttcn, line 3407 */
template_tr__SM__DEACT__PDP__ACCEPT__MO_tid_defval = ANY_VALUE;
current_location.update_lineno(3485);
/* L3_Templates.ttcn, line 3485 */
template_tr__SMS__DELIVER_src__addr_defval = ANY_VALUE;
current_location.update_lineno(3486);
/* L3_Templates.ttcn, line 3486 */
template_tr__SMS__DELIVER_user__data_defval = ANY_VALUE;
current_location.update_lineno(3487);
/* L3_Templates.ttcn, line 3487 */
template_tr__SMS__DELIVER_pid_defval = ANY_VALUE;
current_location.update_lineno(3487);
/* L3_Templates.ttcn, line 3487 */
template_tr__SMS__DELIVER_dcs_defval = ANY_VALUE;
current_location.update_lineno(3488);
/* L3_Templates.ttcn, line 3488 */
template_tr__SMS__DELIVER_mms_defval = ANY_VALUE;
current_location.update_lineno(3654);
/* L3_Templates.ttcn, line 3654 */
template_ts__CP__ACK__MO.cP__ACK().cP__messageType() = bs_72;
current_location.update_lineno(3679);
/* L3_Templates.ttcn, line 3679 */
template_tr__CP__ACK__MT.cP__ACK().cP__messageType() = bs_72;
current_location.update_lineno(3737);
/* L3_Templates.ttcn, line 3737 */
template_tr__ML3__MT__MM__Info.discriminator() = bs_18;
template_tr__ML3__MT__MM__Info.tiOrSkip().skipIndicator() = bs_15;
{
MobileL3__MM__Types::PDU__ML3__MMInformation_template& tmp_262 = template_tr__ML3__MT__MM__Info.msgs().mm().mMInformation();
tmp_262.messageType() = bs_89;
tmp_262.nsd() = bs_14;
tmp_262.fullNetworkName() = ANY_OR_OMIT;
tmp_262.shortNetworkName() = ANY_OR_OMIT;
tmp_262.localtimeZone() = ANY_OR_OMIT;
tmp_262.univTime() = ANY_OR_OMIT;
tmp_262.lSAIdentity() = ANY_OR_OMIT;
tmp_262.networkDST() = ANY_OR_OMIT;
}
current_location.update_lineno(3779);
/* L3_Templates.ttcn, line 3779 */
template_ts__RRM__PhysicalInfo_ta_defval = os_9;
current_location.update_lineno(3794);
/* L3_Templates.ttcn, line 3794 */
template_tr__RRM__PhysicalInfo_ta_defval = ANY_VALUE;
current_location.update_lineno(3822);
/* L3_Templates.ttcn, line 3822 */
template_tr__ML3__MT__BCC_bcc_defval = ANY_VALUE;
current_location.update_lineno(3849);
/* L3_Templates.ttcn, line 3849 */
template_tr__ML3__MT__GCC_gcc_defval = ANY_VALUE;
}


} /* end of namespace */
