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

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

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

/* Including header files */

#include "SCCPasp_Types.hh"

namespace SCCPasp__Types {

/* Literal string constants */

const unsigned char module_checksum[] = { 0x5a, 0x98, 0x75, 0x25, 0xd6, 0xd0, 0xc7, 0x9d, 0x01, 0xc6, 0xb5, 0x2a, 0xdf, 0x1d, 0xee, 0xad };

/* Global variable definitions */

const XERdescriptor_t       SCCP__ASPfield__AddressIndicator_pointCodeIndic_xer_ = { {"pointCodeIndic>\n", "pointCodeIndic>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SCCP__ASPfield__AddressIndicator_pointCodeIndic_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SCCP__ASPfield__AddressIndicator_pointCodeIndic_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_AddressIndicator.pointCodeIndic", &BITSTRING_ber_, &General__Types::BIT1n_raw_, NULL, &SCCP__ASPfield__AddressIndicator_pointCodeIndic_xer_, &BITSTRING_json_, &SCCP__ASPfield__AddressIndicator_pointCodeIndic_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__ASPfield__AddressIndicator_pointCodeIndic_default_coding("RAW");
const XERdescriptor_t       SCCP__ASPfield__AddressIndicator_ssnIndicator_xer_ = { {"ssnIndicator>\n", "ssnIndicator>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SCCP__ASPfield__AddressIndicator_ssnIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SCCP__ASPfield__AddressIndicator_ssnIndicator_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_AddressIndicator.ssnIndicator", &BITSTRING_ber_, &General__Types::BIT1n_raw_, NULL, &SCCP__ASPfield__AddressIndicator_ssnIndicator_xer_, &BITSTRING_json_, &SCCP__ASPfield__AddressIndicator_ssnIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__ASPfield__AddressIndicator_ssnIndicator_default_coding("RAW");
const XERdescriptor_t       SCCP__ASPfield__AddressIndicator_globalTitleIndic_xer_ = { {"globalTitleIndic>\n", "globalTitleIndic>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SCCP__ASPfield__AddressIndicator_globalTitleIndic_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SCCP__ASPfield__AddressIndicator_globalTitleIndic_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_AddressIndicator.globalTitleIndic", &BITSTRING_ber_, &General__Types::BIT4n_raw_, NULL, &SCCP__ASPfield__AddressIndicator_globalTitleIndic_xer_, &BITSTRING_json_, &SCCP__ASPfield__AddressIndicator_globalTitleIndic_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__ASPfield__AddressIndicator_globalTitleIndic_default_coding("RAW");
const XERdescriptor_t       SCCP__ASPfield__AddressIndicator_routingIndicator_xer_ = { {"routingIndicator>\n", "routingIndicator>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SCCP__ASPfield__AddressIndicator_routingIndicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SCCP__ASPfield__AddressIndicator_routingIndicator_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_AddressIndicator.routingIndicator", &BITSTRING_ber_, &General__Types::BIT1n_raw_, NULL, &SCCP__ASPfield__AddressIndicator_routingIndicator_xer_, &BITSTRING_json_, &SCCP__ASPfield__AddressIndicator_routingIndicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__ASPfield__AddressIndicator_routingIndicator_default_coding("RAW");
// No XER for SCCP__ASPfield__AddressIndicator
const TTCN_Typedescriptor_t SCCP__ASPfield__AddressIndicator_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_AddressIndicator", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__ASPfield__SignallingPointCode_xer_ = { {"SCCP_ASPfield_SignallingPointCode>\n", "SCCP_ASPfield_SignallingPointCode>\n"}, {35, 35}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__ASPfield__SignallingPointCode_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_SignallingPointCode", &BITSTRING_ber_, &BITSTRING_raw_, NULL, &SCCP__ASPfield__SignallingPointCode_xer_, &BITSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for SCCP__ASPfield__GlobalTitle
const TTCN_Typedescriptor_t SCCP__ASPfield__GlobalTitle_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__ASPfield__GlobalTitle__NoA_natureOfAddress_xer_ = { {"natureOfAddress>\n", "natureOfAddress>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SCCP__ASPfield__GlobalTitle__NoA_natureOfAddress_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SCCP__ASPfield__GlobalTitle__NoA_natureOfAddress_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle_NoA.natureOfAddress", &BITSTRING_ber_, &General__Types::BIT7n_raw_, NULL, &SCCP__ASPfield__GlobalTitle__NoA_natureOfAddress_xer_, &BITSTRING_json_, &SCCP__ASPfield__GlobalTitle__NoA_natureOfAddress_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__ASPfield__GlobalTitle__NoA_natureOfAddress_default_coding("RAW");
const XERdescriptor_t       SCCP__ASPfield__GlobalTitle__NoA_oddeven_xer_ = { {"oddeven>\n", "oddeven>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SCCP__ASPfield__GlobalTitle__NoA_oddeven_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SCCP__ASPfield__GlobalTitle__NoA_oddeven_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle_NoA.oddeven", &BITSTRING_ber_, &General__Types::BIT1n_raw_, NULL, &SCCP__ASPfield__GlobalTitle__NoA_oddeven_xer_, &BITSTRING_json_, &SCCP__ASPfield__GlobalTitle__NoA_oddeven_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__ASPfield__GlobalTitle__NoA_oddeven_default_coding("RAW");
const XERdescriptor_t       SCCP__ASPfield__GlobalTitle__NoA_globalTitleAddress_xer_ = { {"globalTitleAddress>\n", "globalTitleAddress>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__ASPfield__GlobalTitle__NoA_globalTitleAddress_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle_NoA.globalTitleAddress", NULL, &HEXSTRING_raw_, NULL, &SCCP__ASPfield__GlobalTitle__NoA_globalTitleAddress_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for SCCP__ASPfield__GlobalTitle__NoA
const TTCN_Typedescriptor_t SCCP__ASPfield__GlobalTitle__NoA_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle_NoA", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__ASPfield__GlobalTitle__TT_translationType_xer_ = { {"translationType>\n", "translationType>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int SCCP__ASPfield__GlobalTitle__TT_translationType_oer_ext_arr_[0] = {};
const int SCCP__ASPfield__GlobalTitle__TT_translationType_oer_p_[0] = {};
const TTCN_OERdescriptor_t SCCP__ASPfield__GlobalTitle__TT_translationType_oer_ = { -1, TRUE, 1, FALSE, 0, 0, SCCP__ASPfield__GlobalTitle__TT_translationType_oer_ext_arr_, 0, SCCP__ASPfield__GlobalTitle__TT_translationType_oer_p_};
const TTCN_Typedescriptor_t SCCP__ASPfield__GlobalTitle__TT_translationType_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT.translationType", &OCTETSTRING_ber_, &General__Types::OCT1n_raw_, &OCTETSTRING_text_, &SCCP__ASPfield__GlobalTitle__TT_translationType_xer_, &OCTETSTRING_json_, &SCCP__ASPfield__GlobalTitle__TT_translationType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__ASPfield__GlobalTitle__TT_translationType_default_coding("RAW");
const XERdescriptor_t       SCCP__ASPfield__GlobalTitle__TT_globalTitleAddress_xer_ = { {"globalTitleAddress>\n", "globalTitleAddress>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__ASPfield__GlobalTitle__TT_globalTitleAddress_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT.globalTitleAddress", NULL, &HEXSTRING_raw_, NULL, &SCCP__ASPfield__GlobalTitle__TT_globalTitleAddress_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for SCCP__ASPfield__GlobalTitle__TT
const TTCN_Typedescriptor_t SCCP__ASPfield__GlobalTitle__TT_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__ASPfield__GlobalTitle__TT__NP__ES_translationType_xer_ = { {"translationType>\n", "translationType>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int SCCP__ASPfield__GlobalTitle__TT__NP__ES_translationType_oer_ext_arr_[0] = {};
const int SCCP__ASPfield__GlobalTitle__TT__NP__ES_translationType_oer_p_[0] = {};
const TTCN_OERdescriptor_t SCCP__ASPfield__GlobalTitle__TT__NP__ES_translationType_oer_ = { -1, TRUE, 1, FALSE, 0, 0, SCCP__ASPfield__GlobalTitle__TT__NP__ES_translationType_oer_ext_arr_, 0, SCCP__ASPfield__GlobalTitle__TT__NP__ES_translationType_oer_p_};
const TTCN_Typedescriptor_t SCCP__ASPfield__GlobalTitle__TT__NP__ES_translationType_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT_NP_ES.translationType", &OCTETSTRING_ber_, &General__Types::OCT1n_raw_, &OCTETSTRING_text_, &SCCP__ASPfield__GlobalTitle__TT__NP__ES_translationType_xer_, &OCTETSTRING_json_, &SCCP__ASPfield__GlobalTitle__TT__NP__ES_translationType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__ASPfield__GlobalTitle__TT__NP__ES_translationType_default_coding("RAW");
const XERdescriptor_t       SCCP__ASPfield__GlobalTitle__TT__NP__ES_encodingScheme_xer_ = { {"encodingScheme>\n", "encodingScheme>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SCCP__ASPfield__GlobalTitle__TT__NP__ES_encodingScheme_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SCCP__ASPfield__GlobalTitle__TT__NP__ES_encodingScheme_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT_NP_ES.encodingScheme", &BITSTRING_ber_, &General__Types::BIT4n_raw_, NULL, &SCCP__ASPfield__GlobalTitle__TT__NP__ES_encodingScheme_xer_, &BITSTRING_json_, &SCCP__ASPfield__GlobalTitle__TT__NP__ES_encodingScheme_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__ASPfield__GlobalTitle__TT__NP__ES_encodingScheme_default_coding("RAW");
const XERdescriptor_t       SCCP__ASPfield__GlobalTitle__TT__NP__ES_numberingPlan_xer_ = { {"numberingPlan>\n", "numberingPlan>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SCCP__ASPfield__GlobalTitle__TT__NP__ES_numberingPlan_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SCCP__ASPfield__GlobalTitle__TT__NP__ES_numberingPlan_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT_NP_ES.numberingPlan", &BITSTRING_ber_, &General__Types::BIT4n_raw_, NULL, &SCCP__ASPfield__GlobalTitle__TT__NP__ES_numberingPlan_xer_, &BITSTRING_json_, &SCCP__ASPfield__GlobalTitle__TT__NP__ES_numberingPlan_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__ASPfield__GlobalTitle__TT__NP__ES_numberingPlan_default_coding("RAW");
const XERdescriptor_t       SCCP__ASPfield__GlobalTitle__TT__NP__ES_globalTitleAddress_xer_ = { {"globalTitleAddress>\n", "globalTitleAddress>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__ASPfield__GlobalTitle__TT__NP__ES_globalTitleAddress_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT_NP_ES.globalTitleAddress", NULL, &HEXSTRING_raw_, NULL, &SCCP__ASPfield__GlobalTitle__TT__NP__ES_globalTitleAddress_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for SCCP__ASPfield__GlobalTitle__TT__NP__ES
const TTCN_Typedescriptor_t SCCP__ASPfield__GlobalTitle__TT__NP__ES_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT_NP_ES", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_translationType_xer_ = { {"translationType>\n", "translationType>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_translationType_oer_ext_arr_[0] = {};
const int SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_translationType_oer_p_[0] = {};
const TTCN_OERdescriptor_t SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_translationType_oer_ = { -1, TRUE, 1, FALSE, 0, 0, SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_translationType_oer_ext_arr_, 0, SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_translationType_oer_p_};
const TTCN_Typedescriptor_t SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_translationType_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA.translationType", &OCTETSTRING_ber_, &General__Types::OCT1n_raw_, &OCTETSTRING_text_, &SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_translationType_xer_, &OCTETSTRING_json_, &SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_translationType_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_translationType_default_coding("RAW");
const XERdescriptor_t       SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_encodingScheme_xer_ = { {"encodingScheme>\n", "encodingScheme>\n"}, {16, 16}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_encodingScheme_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_encodingScheme_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA.encodingScheme", &BITSTRING_ber_, &General__Types::BIT4n_raw_, NULL, &SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_encodingScheme_xer_, &BITSTRING_json_, &SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_encodingScheme_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_encodingScheme_default_coding("RAW");
const XERdescriptor_t       SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_numberingPlan_xer_ = { {"numberingPlan>\n", "numberingPlan>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_numberingPlan_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_numberingPlan_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA.numberingPlan", &BITSTRING_ber_, &General__Types::BIT4n_raw_, NULL, &SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_numberingPlan_xer_, &BITSTRING_json_, &SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_numberingPlan_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_numberingPlan_default_coding("RAW");
const XERdescriptor_t       SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_natureOfAddress_xer_ = { {"natureOfAddress>\n", "natureOfAddress>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_natureOfAddress_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_natureOfAddress_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA.natureOfAddress", &BITSTRING_ber_, &General__Types::BIT7n_raw_, NULL, &SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_natureOfAddress_xer_, &BITSTRING_json_, &SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_natureOfAddress_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_natureOfAddress_default_coding("RAW");
const XERdescriptor_t       SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_globalTitleAddress_xer_ = { {"globalTitleAddress>\n", "globalTitleAddress>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_globalTitleAddress_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA.globalTitleAddress", NULL, &HEXSTRING_raw_, NULL, &SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_globalTitleAddress_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA
const TTCN_Typedescriptor_t SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_descr_ = { "@SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for SCCP__PAR__Address
const TTCN_Typedescriptor_t SCCP__PAR__Address_descr_ = { "@SCCPasp_Types.SCCP_PAR_Address", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__PAR__Address_signPointCode_xer_ = { {"signPointCode>\n", "signPointCode>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SCCP__PAR__Address_signPointCode_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SCCP__PAR__Address_signPointCode_descr_ = { "@SCCPasp_Types.SCCP_PAR_Address.signPointCode", &BITSTRING_ber_, &BITSTRING_raw_, NULL, &SCCP__PAR__Address_signPointCode_xer_, &BITSTRING_json_, &SCCP__PAR__Address_signPointCode_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__PAR__Address_subsystemNumber_xer_ = { {"subsystemNumber>\n", "subsystemNumber>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__PAR__Address_subsystemNumber_descr_ = { "@SCCPasp_Types.SCCP_PAR_Address.subsystemNumber", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &SCCP__PAR__Address_subsystemNumber_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__PAR__Quality__Of__Service_xer_ = { {"SCCP_PAR_Quality_Of_Service>\n", "SCCP_PAR_Quality_Of_Service>\n"}, {29, 29}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__PAR__Quality__Of__Service_descr_ = { "@SCCPasp_Types.SCCP_PAR_Quality_Of_Service", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &SCCP__PAR__Quality__Of__Service_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__PAR__Expedited__Data__Sel_xer_ = { {"SCCP_PAR_Expedited_Data_Sel>\n", "SCCP_PAR_Expedited_Data_Sel>\n"}, {29, 29}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__PAR__Expedited__Data__Sel_descr_ = { "@SCCPasp_Types.SCCP_PAR_Expedited_Data_Sel", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &SCCP__PAR__Expedited__Data__Sel_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__PAR__UserData_xer_ = { {"SCCP_PAR_UserData>\n", "SCCP_PAR_UserData>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int SCCP__PAR__UserData_oer_ext_arr_[0] = {};
const int SCCP__PAR__UserData_oer_p_[0] = {};
const TTCN_OERdescriptor_t SCCP__PAR__UserData_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SCCP__PAR__UserData_oer_ext_arr_, 0, SCCP__PAR__UserData_oer_p_};
const TTCN_Typedescriptor_t SCCP__PAR__UserData_descr_ = { "@SCCPasp_Types.SCCP_PAR_UserData", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &SCCP__PAR__UserData_xer_, &OCTETSTRING_json_, &SCCP__PAR__UserData_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__PAR__Connection__Id_xer_ = { {"SCCP_PAR_Connection_Id>\n", "SCCP_PAR_Connection_Id>\n"}, {24, 24}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__PAR__Connection__Id_descr_ = { "@SCCPasp_Types.SCCP_PAR_Connection_Id", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &SCCP__PAR__Connection__Id_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__PAR__Importance_xer_ = { {"SCCP_PAR_Importance>\n", "SCCP_PAR_Importance>\n"}, {21, 21}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__PAR__Importance_descr_ = { "@SCCPasp_Types.SCCP_PAR_Importance", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &SCCP__PAR__Importance_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__PAR__Originator_xer_ = { {"SCCP_PAR_Originator>\n", "SCCP_PAR_Originator>\n"}, {21, 21}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__PAR__Originator_descr_ = { "@SCCPasp_Types.SCCP_PAR_Originator", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &SCCP__PAR__Originator_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__PAR__Reason_xer_ = { {"SCCP_PAR_Reason>\n", "SCCP_PAR_Reason>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__PAR__Reason_descr_ = { "@SCCPasp_Types.SCCP_PAR_Reason", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &SCCP__PAR__Reason_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__PAR__Return__Option_xer_ = { {"SCCP_PAR_Return_Option>\n", "SCCP_PAR_Return_Option>\n"}, {24, 24}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SCCP__PAR__Return__Option_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SCCP__PAR__Return__Option_descr_ = { "@SCCPasp_Types.SCCP_PAR_Return_Option", &BITSTRING_ber_, &General__Types::BIT8n_raw_, NULL, &SCCP__PAR__Return__Option_xer_, &BITSTRING_json_, &SCCP__PAR__Return__Option_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__PAR__Return__Option_default_coding("RAW");
const XERdescriptor_t       SCCP__PAR__Sequence__Control_xer_ = { {"SCCP_PAR_Sequence_Control>\n", "SCCP_PAR_Sequence_Control>\n"}, {27, 27}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SCCP__PAR__Sequence__Control_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SCCP__PAR__Sequence__Control_descr_ = { "@SCCPasp_Types.SCCP_PAR_Sequence_Control", &BITSTRING_ber_, &General__Types::BIT8n_raw_, NULL, &SCCP__PAR__Sequence__Control_xer_, &BITSTRING_json_, &SCCP__PAR__Sequence__Control_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SCCP__PAR__Sequence__Control_default_coding("RAW");
const XERdescriptor_t       SCCP__PAR__Reason__For__Return_xer_ = { {"SCCP_PAR_Reason_For_Return>\n", "SCCP_PAR_Reason_For_Return>\n"}, {28, 28}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__PAR__Reason__For__Return_descr_ = { "@SCCPasp_Types.SCCP_PAR_Reason_For_Return", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &SCCP__PAR__Reason__For__Return_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__PAR__SubSystemNumber_xer_ = { {"SCCP_PAR_SubSystemNumber>\n", "SCCP_PAR_SubSystemNumber>\n"}, {26, 26}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__PAR__SubSystemNumber_descr_ = { "@SCCPasp_Types.SCCP_PAR_SubSystemNumber", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &SCCP__PAR__SubSystemNumber_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__PAR__User__Status_xer_ = { {"SCCP_PAR_User_Status>\n", "SCCP_PAR_User_Status>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__PAR__User__Status_descr_ = { "@SCCPasp_Types.SCCP_PAR_User_Status", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &SCCP__PAR__User__Status_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SCCP__PAR__Subsystem__multi__indicator_xer_ = { {"SCCP_PAR_Subsystem_multi_indicator>\n", "SCCP_PAR_Subsystem_multi_indicator>\n"}, {36, 36}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SCCP__PAR__Subsystem__multi__indicator_descr_ = { "@SCCPasp_Types.SCCP_PAR_Subsystem_multi_indicator", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &SCCP__PAR__Subsystem__multi__indicator_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__CONNECT__req
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__req_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__req_expeditedDataSel_xer_ = { {"expeditedDataSel>\n", "expeditedDataSel>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__req_expeditedDataSel_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__req_expeditedDataSel_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req.expeditedDataSel", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__CONNECT__req_expeditedDataSel_xer_, &INTEGER_json_, &ASP__SCCP__N__CONNECT__req_expeditedDataSel_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__req_qualityOfService_xer_ = { {"qualityOfService>\n", "qualityOfService>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__req_qualityOfService_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__req_qualityOfService_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req.qualityOfService", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__CONNECT__req_qualityOfService_xer_, &INTEGER_json_, &ASP__SCCP__N__CONNECT__req_qualityOfService_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__req_userData_xer_ = { {"userData>\n", "userData>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ASP__SCCP__N__CONNECT__req_userData_oer_ext_arr_[0] = {};
const int ASP__SCCP__N__CONNECT__req_userData_oer_p_[0] = {};
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__req_userData_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ASP__SCCP__N__CONNECT__req_userData_oer_ext_arr_, 0, ASP__SCCP__N__CONNECT__req_userData_oer_p_};
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__req_userData_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req.userData", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ASP__SCCP__N__CONNECT__req_userData_xer_, &OCTETSTRING_json_, &ASP__SCCP__N__CONNECT__req_userData_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__req_connectionId_xer_ = { {"connectionId>\n", "connectionId>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__req_connectionId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__req_connectionId_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req.connectionId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__CONNECT__req_connectionId_xer_, &INTEGER_json_, &ASP__SCCP__N__CONNECT__req_connectionId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__req_importance_xer_ = { {"importance>\n", "importance>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__req_importance_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__req_importance_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req.importance", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__CONNECT__req_importance_xer_, &INTEGER_json_, &ASP__SCCP__N__CONNECT__req_importance_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__CONNECT__ind
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__ind_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_ind", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__ind_qualityOfService_xer_ = { {"qualityOfService>\n", "qualityOfService>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__ind_qualityOfService_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__ind_qualityOfService_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.qualityOfService", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__CONNECT__ind_qualityOfService_xer_, &INTEGER_json_, &ASP__SCCP__N__CONNECT__ind_qualityOfService_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__ind_userData_xer_ = { {"userData>\n", "userData>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ASP__SCCP__N__CONNECT__ind_userData_oer_ext_arr_[0] = {};
const int ASP__SCCP__N__CONNECT__ind_userData_oer_p_[0] = {};
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__ind_userData_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ASP__SCCP__N__CONNECT__ind_userData_oer_ext_arr_, 0, ASP__SCCP__N__CONNECT__ind_userData_oer_p_};
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__ind_userData_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.userData", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ASP__SCCP__N__CONNECT__ind_userData_xer_, &OCTETSTRING_json_, &ASP__SCCP__N__CONNECT__ind_userData_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__ind_connectionId_xer_ = { {"connectionId>\n", "connectionId>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__ind_connectionId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__ind_connectionId_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.connectionId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__CONNECT__ind_connectionId_xer_, &INTEGER_json_, &ASP__SCCP__N__CONNECT__ind_connectionId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__ind_importance_xer_ = { {"importance>\n", "importance>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__ind_importance_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__ind_importance_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.importance", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__CONNECT__ind_importance_xer_, &INTEGER_json_, &ASP__SCCP__N__CONNECT__ind_importance_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__CONNECT__res
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__res_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_res", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__res_expeditedDataSel_xer_ = { {"expeditedDataSel>\n", "expeditedDataSel>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__res_expeditedDataSel_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__res_expeditedDataSel_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_res.expeditedDataSel", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__CONNECT__res_expeditedDataSel_xer_, &INTEGER_json_, &ASP__SCCP__N__CONNECT__res_expeditedDataSel_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__res_qualityOfService_xer_ = { {"qualityOfService>\n", "qualityOfService>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__res_qualityOfService_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__res_qualityOfService_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_res.qualityOfService", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__CONNECT__res_qualityOfService_xer_, &INTEGER_json_, &ASP__SCCP__N__CONNECT__res_qualityOfService_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__res_userData_xer_ = { {"userData>\n", "userData>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ASP__SCCP__N__CONNECT__res_userData_oer_ext_arr_[0] = {};
const int ASP__SCCP__N__CONNECT__res_userData_oer_p_[0] = {};
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__res_userData_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ASP__SCCP__N__CONNECT__res_userData_oer_ext_arr_, 0, ASP__SCCP__N__CONNECT__res_userData_oer_p_};
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__res_userData_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_res.userData", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ASP__SCCP__N__CONNECT__res_userData_xer_, &OCTETSTRING_json_, &ASP__SCCP__N__CONNECT__res_userData_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__res_connectionId_xer_ = { {"connectionId>\n", "connectionId>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__res_connectionId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__res_connectionId_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_res.connectionId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__CONNECT__res_connectionId_xer_, &INTEGER_json_, &ASP__SCCP__N__CONNECT__res_connectionId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__res_importance_xer_ = { {"importance>\n", "importance>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__res_importance_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__res_importance_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_res.importance", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__CONNECT__res_importance_xer_, &INTEGER_json_, &ASP__SCCP__N__CONNECT__res_importance_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__CONNECT__cfm
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__cfm_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__cfm_qualityOfService_xer_ = { {"qualityOfService>\n", "qualityOfService>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__cfm_qualityOfService_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__cfm_qualityOfService_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.qualityOfService", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__CONNECT__cfm_qualityOfService_xer_, &INTEGER_json_, &ASP__SCCP__N__CONNECT__cfm_qualityOfService_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__cfm_userData_xer_ = { {"userData>\n", "userData>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ASP__SCCP__N__CONNECT__cfm_userData_oer_ext_arr_[0] = {};
const int ASP__SCCP__N__CONNECT__cfm_userData_oer_p_[0] = {};
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__cfm_userData_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ASP__SCCP__N__CONNECT__cfm_userData_oer_ext_arr_, 0, ASP__SCCP__N__CONNECT__cfm_userData_oer_p_};
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__cfm_userData_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.userData", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ASP__SCCP__N__CONNECT__cfm_userData_xer_, &OCTETSTRING_json_, &ASP__SCCP__N__CONNECT__cfm_userData_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__cfm_connectionId_xer_ = { {"connectionId>\n", "connectionId>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__cfm_connectionId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__cfm_connectionId_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.connectionId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__CONNECT__cfm_connectionId_xer_, &INTEGER_json_, &ASP__SCCP__N__CONNECT__cfm_connectionId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__CONNECT__cfm_importance_xer_ = { {"importance>\n", "importance>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__CONNECT__cfm_importance_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__CONNECT__cfm_importance_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.importance", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__CONNECT__cfm_importance_xer_, &INTEGER_json_, &ASP__SCCP__N__CONNECT__cfm_importance_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__DATA__req_userData_xer_ = { {"userData>\n", "userData>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ASP__SCCP__N__DATA__req_userData_oer_ext_arr_[0] = {};
const int ASP__SCCP__N__DATA__req_userData_oer_p_[0] = {};
const TTCN_OERdescriptor_t ASP__SCCP__N__DATA__req_userData_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ASP__SCCP__N__DATA__req_userData_oer_ext_arr_, 0, ASP__SCCP__N__DATA__req_userData_oer_p_};
const TTCN_Typedescriptor_t ASP__SCCP__N__DATA__req_userData_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DATA_req.userData", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ASP__SCCP__N__DATA__req_userData_xer_, &OCTETSTRING_json_, &ASP__SCCP__N__DATA__req_userData_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__DATA__req
const TTCN_Typedescriptor_t ASP__SCCP__N__DATA__req_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DATA_req", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__DATA__req_connectionId_xer_ = { {"connectionId>\n", "connectionId>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__DATA__req_connectionId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__DATA__req_connectionId_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DATA_req.connectionId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__DATA__req_connectionId_xer_, &INTEGER_json_, &ASP__SCCP__N__DATA__req_connectionId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__DATA__req_importance_xer_ = { {"importance>\n", "importance>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__DATA__req_importance_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__DATA__req_importance_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DATA_req.importance", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__DATA__req_importance_xer_, &INTEGER_json_, &ASP__SCCP__N__DATA__req_importance_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__DATA__ind_userData_xer_ = { {"userData>\n", "userData>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ASP__SCCP__N__DATA__ind_userData_oer_ext_arr_[0] = {};
const int ASP__SCCP__N__DATA__ind_userData_oer_p_[0] = {};
const TTCN_OERdescriptor_t ASP__SCCP__N__DATA__ind_userData_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ASP__SCCP__N__DATA__ind_userData_oer_ext_arr_, 0, ASP__SCCP__N__DATA__ind_userData_oer_p_};
const TTCN_Typedescriptor_t ASP__SCCP__N__DATA__ind_userData_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DATA_ind.userData", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ASP__SCCP__N__DATA__ind_userData_xer_, &OCTETSTRING_json_, &ASP__SCCP__N__DATA__ind_userData_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__DATA__ind
const TTCN_Typedescriptor_t ASP__SCCP__N__DATA__ind_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DATA_ind", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__DATA__ind_connectionId_xer_ = { {"connectionId>\n", "connectionId>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__DATA__ind_connectionId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__DATA__ind_connectionId_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DATA_ind.connectionId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__DATA__ind_connectionId_xer_, &INTEGER_json_, &ASP__SCCP__N__DATA__ind_connectionId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__DATA__ind_importance_xer_ = { {"importance>\n", "importance>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__DATA__ind_importance_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__DATA__ind_importance_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DATA_ind.importance", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__DATA__ind_importance_xer_, &INTEGER_json_, &ASP__SCCP__N__DATA__ind_importance_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__DISCONNECT__req_reason_xer_ = { {"reason>\n", "reason>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__DISCONNECT__req_reason_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__DISCONNECT__req_reason_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.reason", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__DISCONNECT__req_reason_xer_, &INTEGER_json_, &ASP__SCCP__N__DISCONNECT__req_reason_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__DISCONNECT__req
const TTCN_Typedescriptor_t ASP__SCCP__N__DISCONNECT__req_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__DISCONNECT__req_userData_xer_ = { {"userData>\n", "userData>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ASP__SCCP__N__DISCONNECT__req_userData_oer_ext_arr_[0] = {};
const int ASP__SCCP__N__DISCONNECT__req_userData_oer_p_[0] = {};
const TTCN_OERdescriptor_t ASP__SCCP__N__DISCONNECT__req_userData_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ASP__SCCP__N__DISCONNECT__req_userData_oer_ext_arr_, 0, ASP__SCCP__N__DISCONNECT__req_userData_oer_p_};
const TTCN_Typedescriptor_t ASP__SCCP__N__DISCONNECT__req_userData_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.userData", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ASP__SCCP__N__DISCONNECT__req_userData_xer_, &OCTETSTRING_json_, &ASP__SCCP__N__DISCONNECT__req_userData_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__DISCONNECT__req_connectionId_xer_ = { {"connectionId>\n", "connectionId>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__DISCONNECT__req_connectionId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__DISCONNECT__req_connectionId_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.connectionId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__DISCONNECT__req_connectionId_xer_, &INTEGER_json_, &ASP__SCCP__N__DISCONNECT__req_connectionId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__DISCONNECT__req_importance_xer_ = { {"importance>\n", "importance>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__DISCONNECT__req_importance_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__DISCONNECT__req_importance_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.importance", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__DISCONNECT__req_importance_xer_, &INTEGER_json_, &ASP__SCCP__N__DISCONNECT__req_importance_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__DISCONNECT__ind_originator_xer_ = { {"originator>\n", "originator>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__DISCONNECT__ind_originator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__DISCONNECT__ind_originator_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.originator", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__DISCONNECT__ind_originator_xer_, &INTEGER_json_, &ASP__SCCP__N__DISCONNECT__ind_originator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__DISCONNECT__ind_reason_xer_ = { {"reason>\n", "reason>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__DISCONNECT__ind_reason_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__DISCONNECT__ind_reason_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.reason", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__DISCONNECT__ind_reason_xer_, &INTEGER_json_, &ASP__SCCP__N__DISCONNECT__ind_reason_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__DISCONNECT__ind
const TTCN_Typedescriptor_t ASP__SCCP__N__DISCONNECT__ind_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__DISCONNECT__ind_userData_xer_ = { {"userData>\n", "userData>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ASP__SCCP__N__DISCONNECT__ind_userData_oer_ext_arr_[0] = {};
const int ASP__SCCP__N__DISCONNECT__ind_userData_oer_p_[0] = {};
const TTCN_OERdescriptor_t ASP__SCCP__N__DISCONNECT__ind_userData_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ASP__SCCP__N__DISCONNECT__ind_userData_oer_ext_arr_, 0, ASP__SCCP__N__DISCONNECT__ind_userData_oer_p_};
const TTCN_Typedescriptor_t ASP__SCCP__N__DISCONNECT__ind_userData_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.userData", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ASP__SCCP__N__DISCONNECT__ind_userData_xer_, &OCTETSTRING_json_, &ASP__SCCP__N__DISCONNECT__ind_userData_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__DISCONNECT__ind_connectionId_xer_ = { {"connectionId>\n", "connectionId>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__DISCONNECT__ind_connectionId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__DISCONNECT__ind_connectionId_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.connectionId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__DISCONNECT__ind_connectionId_xer_, &INTEGER_json_, &ASP__SCCP__N__DISCONNECT__ind_connectionId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__DISCONNECT__ind_importance_xer_ = { {"importance>\n", "importance>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__DISCONNECT__ind_importance_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__DISCONNECT__ind_importance_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.importance", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__DISCONNECT__ind_importance_xer_, &INTEGER_json_, &ASP__SCCP__N__DISCONNECT__ind_importance_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__UNITDATA__req_userData_xer_ = { {"userData>\n", "userData>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ASP__SCCP__N__UNITDATA__req_userData_oer_ext_arr_[0] = {};
const int ASP__SCCP__N__UNITDATA__req_userData_oer_p_[0] = {};
const TTCN_OERdescriptor_t ASP__SCCP__N__UNITDATA__req_userData_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ASP__SCCP__N__UNITDATA__req_userData_oer_ext_arr_, 0, ASP__SCCP__N__UNITDATA__req_userData_oer_p_};
const TTCN_Typedescriptor_t ASP__SCCP__N__UNITDATA__req_userData_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.userData", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ASP__SCCP__N__UNITDATA__req_userData_xer_, &OCTETSTRING_json_, &ASP__SCCP__N__UNITDATA__req_userData_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__UNITDATA__req
const TTCN_Typedescriptor_t ASP__SCCP__N__UNITDATA__req_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_req", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__UNITDATA__req_sequenceControl_xer_ = { {"sequenceControl>\n", "sequenceControl>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__UNITDATA__req_sequenceControl_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__UNITDATA__req_sequenceControl_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.sequenceControl", &BITSTRING_ber_, &General__Types::BIT8n_raw_, NULL, &ASP__SCCP__N__UNITDATA__req_sequenceControl_xer_, &BITSTRING_json_, &ASP__SCCP__N__UNITDATA__req_sequenceControl_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ASP__SCCP__N__UNITDATA__req_sequenceControl_default_coding("RAW");
const XERdescriptor_t       ASP__SCCP__N__UNITDATA__req_returnOption_xer_ = { {"returnOption>\n", "returnOption>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__UNITDATA__req_returnOption_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__UNITDATA__req_returnOption_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.returnOption", &BITSTRING_ber_, &General__Types::BIT8n_raw_, NULL, &ASP__SCCP__N__UNITDATA__req_returnOption_xer_, &BITSTRING_json_, &ASP__SCCP__N__UNITDATA__req_returnOption_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ASP__SCCP__N__UNITDATA__req_returnOption_default_coding("RAW");
const XERdescriptor_t       ASP__SCCP__N__UNITDATA__req_importance_xer_ = { {"importance>\n", "importance>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__UNITDATA__req_importance_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__UNITDATA__req_importance_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.importance", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__UNITDATA__req_importance_xer_, &INTEGER_json_, &ASP__SCCP__N__UNITDATA__req_importance_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__UNITDATA__ind_userData_xer_ = { {"userData>\n", "userData>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ASP__SCCP__N__UNITDATA__ind_userData_oer_ext_arr_[0] = {};
const int ASP__SCCP__N__UNITDATA__ind_userData_oer_p_[0] = {};
const TTCN_OERdescriptor_t ASP__SCCP__N__UNITDATA__ind_userData_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ASP__SCCP__N__UNITDATA__ind_userData_oer_ext_arr_, 0, ASP__SCCP__N__UNITDATA__ind_userData_oer_p_};
const TTCN_Typedescriptor_t ASP__SCCP__N__UNITDATA__ind_userData_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.userData", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ASP__SCCP__N__UNITDATA__ind_userData_xer_, &OCTETSTRING_json_, &ASP__SCCP__N__UNITDATA__ind_userData_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__UNITDATA__ind
const TTCN_Typedescriptor_t ASP__SCCP__N__UNITDATA__ind_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__UNITDATA__ind_sequenceControl_xer_ = { {"sequenceControl>\n", "sequenceControl>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__UNITDATA__ind_sequenceControl_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__UNITDATA__ind_sequenceControl_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.sequenceControl", &BITSTRING_ber_, &General__Types::BIT8n_raw_, NULL, &ASP__SCCP__N__UNITDATA__ind_sequenceControl_xer_, &BITSTRING_json_, &ASP__SCCP__N__UNITDATA__ind_sequenceControl_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ASP__SCCP__N__UNITDATA__ind_sequenceControl_default_coding("RAW");
const XERdescriptor_t       ASP__SCCP__N__UNITDATA__ind_returnOption_xer_ = { {"returnOption>\n", "returnOption>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__UNITDATA__ind_returnOption_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__UNITDATA__ind_returnOption_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.returnOption", &BITSTRING_ber_, &General__Types::BIT8n_raw_, NULL, &ASP__SCCP__N__UNITDATA__ind_returnOption_xer_, &BITSTRING_json_, &ASP__SCCP__N__UNITDATA__ind_returnOption_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING ASP__SCCP__N__UNITDATA__ind_returnOption_default_coding("RAW");
const XERdescriptor_t       ASP__SCCP__N__UNITDATA__ind_importance_xer_ = { {"importance>\n", "importance>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__UNITDATA__ind_importance_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__UNITDATA__ind_importance_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.importance", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__UNITDATA__ind_importance_xer_, &INTEGER_json_, &ASP__SCCP__N__UNITDATA__ind_importance_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__NOTICE__ind_reasonForReturn_xer_ = { {"reasonForReturn>\n", "reasonForReturn>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__NOTICE__ind_reasonForReturn_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__NOTICE__ind_reasonForReturn_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.reasonForReturn", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__NOTICE__ind_reasonForReturn_xer_, &INTEGER_json_, &ASP__SCCP__N__NOTICE__ind_reasonForReturn_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__NOTICE__ind_userData_xer_ = { {"userData>\n", "userData>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const int ASP__SCCP__N__NOTICE__ind_userData_oer_ext_arr_[0] = {};
const int ASP__SCCP__N__NOTICE__ind_userData_oer_p_[0] = {};
const TTCN_OERdescriptor_t ASP__SCCP__N__NOTICE__ind_userData_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ASP__SCCP__N__NOTICE__ind_userData_oer_ext_arr_, 0, ASP__SCCP__N__NOTICE__ind_userData_oer_p_};
const TTCN_Typedescriptor_t ASP__SCCP__N__NOTICE__ind_userData_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.userData", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ASP__SCCP__N__NOTICE__ind_userData_xer_, &OCTETSTRING_json_, &ASP__SCCP__N__NOTICE__ind_userData_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__NOTICE__ind
const TTCN_Typedescriptor_t ASP__SCCP__N__NOTICE__ind_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_NOTICE_ind", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__NOTICE__ind_importance_xer_ = { {"importance>\n", "importance>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__NOTICE__ind_importance_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__NOTICE__ind_importance_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.importance", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__NOTICE__ind_importance_xer_, &INTEGER_json_, &ASP__SCCP__N__NOTICE__ind_importance_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__STATE__ind_affectedSubSystem_xer_ = { {"affectedSubSystem>\n", "affectedSubSystem>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__STATE__ind_affectedSubSystem_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__STATE__ind_affectedSubSystem_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_STATE_ind.affectedSubSystem", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__STATE__ind_affectedSubSystem_xer_, &INTEGER_json_, &ASP__SCCP__N__STATE__ind_affectedSubSystem_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__STATE__ind_userStatus_xer_ = { {"userStatus>\n", "userStatus>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__STATE__ind_userStatus_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__STATE__ind_userStatus_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_STATE_ind.userStatus", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__STATE__ind_userStatus_xer_, &INTEGER_json_, &ASP__SCCP__N__STATE__ind_userStatus_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__STATE__ind
const TTCN_Typedescriptor_t ASP__SCCP__N__STATE__ind_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_STATE_ind", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__STATE__ind_subsystmultiindicator_xer_ = { {"subsystmultiindicator>\n", "subsystmultiindicator>\n"}, {23, 23}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__STATE__ind_subsystmultiindicator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__STATE__ind_subsystmultiindicator_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_STATE_ind.subsystmultiindicator", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__STATE__ind_subsystmultiindicator_xer_, &INTEGER_json_, &ASP__SCCP__N__STATE__ind_subsystmultiindicator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__RESET__req_originator_xer_ = { {"originator>\n", "originator>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__RESET__req_originator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__RESET__req_originator_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_RESET_req.originator", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__RESET__req_originator_xer_, &INTEGER_json_, &ASP__SCCP__N__RESET__req_originator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__RESET__req_reason_xer_ = { {"reason>\n", "reason>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__RESET__req_reason_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__RESET__req_reason_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_RESET_req.reason", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__RESET__req_reason_xer_, &INTEGER_json_, &ASP__SCCP__N__RESET__req_reason_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__RESET__req
const TTCN_Typedescriptor_t ASP__SCCP__N__RESET__req_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_RESET_req", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__RESET__req_connectionId_xer_ = { {"connectionId>\n", "connectionId>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__RESET__req_connectionId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__RESET__req_connectionId_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_RESET_req.connectionId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__RESET__req_connectionId_xer_, &INTEGER_json_, &ASP__SCCP__N__RESET__req_connectionId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__RESET__ind_originator_xer_ = { {"originator>\n", "originator>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__RESET__ind_originator_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__RESET__ind_originator_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_RESET_ind.originator", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__RESET__ind_originator_xer_, &INTEGER_json_, &ASP__SCCP__N__RESET__ind_originator_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__RESET__ind_reason_xer_ = { {"reason>\n", "reason>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__RESET__ind_reason_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__RESET__ind_reason_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_RESET_ind.reason", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__RESET__ind_reason_xer_, &INTEGER_json_, &ASP__SCCP__N__RESET__ind_reason_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__RESET__ind
const TTCN_Typedescriptor_t ASP__SCCP__N__RESET__ind_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_RESET_ind", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__RESET__ind_connectionId_xer_ = { {"connectionId>\n", "connectionId>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__RESET__ind_connectionId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__RESET__ind_connectionId_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_RESET_ind.connectionId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__RESET__ind_connectionId_xer_, &INTEGER_json_, &ASP__SCCP__N__RESET__ind_connectionId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__RESET__resp
const TTCN_Typedescriptor_t ASP__SCCP__N__RESET__resp_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_RESET_resp", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__RESET__resp_connectionId_xer_ = { {"connectionId>\n", "connectionId>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__RESET__resp_connectionId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__RESET__resp_connectionId_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_RESET_resp.connectionId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__RESET__resp_connectionId_xer_, &INTEGER_json_, &ASP__SCCP__N__RESET__resp_connectionId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for ASP__SCCP__N__RESET__cfm
const TTCN_Typedescriptor_t ASP__SCCP__N__RESET__cfm_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_RESET_cfm", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       ASP__SCCP__N__RESET__cfm_connectionId_xer_ = { {"connectionId>\n", "connectionId>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t ASP__SCCP__N__RESET__cfm_connectionId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t ASP__SCCP__N__RESET__cfm_connectionId_descr_ = { "@SCCPasp_Types.ASP_SCCP_N_RESET_cfm.connectionId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SCCP__N__RESET__cfm_connectionId_xer_, &INTEGER_json_, &ASP__SCCP__N__RESET__cfm_connectionId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
ASP__SCCP__N__CONNECT__req_template template_tr__ASP__N__CONNECT__req;
const ASP__SCCP__N__CONNECT__req_template& tr__ASP__N__CONNECT__req = template_tr__ASP__N__CONNECT__req;
ASP__SCCP__N__CONNECT__ind_template template_tr__ASP__N__CONNECT__ind;
const ASP__SCCP__N__CONNECT__ind_template& tr__ASP__N__CONNECT__ind = template_tr__ASP__N__CONNECT__ind;
ASP__SCCP__N__CONNECT__res_template template_tr__ASP__N__CONNECT__res;
const ASP__SCCP__N__CONNECT__res_template& tr__ASP__N__CONNECT__res = template_tr__ASP__N__CONNECT__res;
ASP__SCCP__N__CONNECT__cfm_template template_tr__ASP__N__CONNECT__cfm;
const ASP__SCCP__N__CONNECT__cfm_template& tr__ASP__N__CONNECT__cfm = template_tr__ASP__N__CONNECT__cfm;
ASP__SCCP__N__DATA__req_template template_tr__ASP__N__DATA__req;
const ASP__SCCP__N__DATA__req_template& tr__ASP__N__DATA__req = template_tr__ASP__N__DATA__req;
ASP__SCCP__N__DATA__ind_template template_tr__ASP__N__DATA__ind;
const ASP__SCCP__N__DATA__ind_template& tr__ASP__N__DATA__ind = template_tr__ASP__N__DATA__ind;
ASP__SCCP__N__DISCONNECT__req_template template_tr__ASP__N__DISCONNECT__req;
const ASP__SCCP__N__DISCONNECT__req_template& tr__ASP__N__DISCONNECT__req = template_tr__ASP__N__DISCONNECT__req;
ASP__SCCP__N__DISCONNECT__ind_template template_tr__ASP__N__DISCONNECT__ind;
const ASP__SCCP__N__DISCONNECT__ind_template& tr__ASP__N__DISCONNECT__ind = template_tr__ASP__N__DISCONNECT__ind;
ASP__SCCP__N__UNITDATA__req_template template_tr__ASP__N__UNITDATA__req;
const ASP__SCCP__N__UNITDATA__req_template& tr__ASP__N__UNITDATA__req = template_tr__ASP__N__UNITDATA__req;
ASP__SCCP__N__UNITDATA__ind_template template_tr__ASP__N__UNITDATA__ind;
const ASP__SCCP__N__UNITDATA__ind_template& tr__ASP__N__UNITDATA__ind = template_tr__ASP__N__UNITDATA__ind;
ASP__SCCP__N__NOTICE__ind_template template_tr__ASP__N__NOTICE__ind;
const ASP__SCCP__N__NOTICE__ind_template& tr__ASP__N__NOTICE__ind = template_tr__ASP__N__NOTICE__ind;
ASP__SCCP__N__STATE__ind_template template_tr__ASP__N__STATE__ind;
const ASP__SCCP__N__STATE__ind_template& tr__ASP__N__STATE__ind = template_tr__ASP__N__STATE__ind;
ASP__SCCP__N__RESET__req_template template_tr__ASP__N__RESET__req;
const ASP__SCCP__N__RESET__req_template& tr__ASP__N__RESET__req = template_tr__ASP__N__RESET__req;
ASP__SCCP__N__RESET__ind_template template_tr__ASP__N__RESET__ind;
const ASP__SCCP__N__RESET__ind_template& tr__ASP__N__RESET__ind = template_tr__ASP__N__RESET__ind;
ASP__SCCP__N__RESET__resp_template template_tr__ASP__N__RESET__resp;
const ASP__SCCP__N__RESET__resp_template& tr__ASP__N__RESET__resp = template_tr__ASP__N__RESET__resp;
ASP__SCCP__N__RESET__cfm_template template_tr__ASP__N__RESET__cfm;
const ASP__SCCP__N__RESET__cfm_template& tr__ASP__N__RESET__cfm = template_tr__ASP__N__RESET__cfm;
TTCN_Module module_object("SCCPasp_Types", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

const RuntimeVersionChecker ver_checker(  current_runtime_version.requires_major_version_9,
  current_runtime_version.requires_minor_version_0,
  current_runtime_version.requires_patch_level_0,  current_runtime_version.requires_runtime_1);

/* Member functions of C++ classes */

SCCP__ASPfield__AddressIndicator::SCCP__ASPfield__AddressIndicator()
{
}

SCCP__ASPfield__AddressIndicator::SCCP__ASPfield__AddressIndicator(const BITSTRING& par_pointCodeIndic,
    const BITSTRING& par_ssnIndicator,
    const BITSTRING& par_globalTitleIndic,
    const BITSTRING& par_routingIndicator)
  :   field_pointCodeIndic(par_pointCodeIndic),
  field_ssnIndicator(par_ssnIndicator),
  field_globalTitleIndic(par_globalTitleIndic),
  field_routingIndicator(par_routingIndicator)
{
}

SCCP__ASPfield__AddressIndicator::SCCP__ASPfield__AddressIndicator(const SCCP__ASPfield__AddressIndicator& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.SCCP_ASPfield_AddressIndicator.");
if (other_value.pointCodeIndic().is_bound()) field_pointCodeIndic = other_value.pointCodeIndic();
else field_pointCodeIndic.clean_up();
if (other_value.ssnIndicator().is_bound()) field_ssnIndicator = other_value.ssnIndicator();
else field_ssnIndicator.clean_up();
if (other_value.globalTitleIndic().is_bound()) field_globalTitleIndic = other_value.globalTitleIndic();
else field_globalTitleIndic.clean_up();
if (other_value.routingIndicator().is_bound()) field_routingIndicator = other_value.routingIndicator();
else field_routingIndicator.clean_up();
}

void SCCP__ASPfield__AddressIndicator::clean_up()
{
field_pointCodeIndic.clean_up();
field_ssnIndicator.clean_up();
field_globalTitleIndic.clean_up();
field_routingIndicator.clean_up();
}

const TTCN_Typedescriptor_t* SCCP__ASPfield__AddressIndicator::get_descriptor() const { return &SCCP__ASPfield__AddressIndicator_descr_; }
SCCP__ASPfield__AddressIndicator& SCCP__ASPfield__AddressIndicator::operator=(const SCCP__ASPfield__AddressIndicator& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.SCCP_ASPfield_AddressIndicator.");
  if (other_value.pointCodeIndic().is_bound()) field_pointCodeIndic = other_value.pointCodeIndic();
  else field_pointCodeIndic.clean_up();
  if (other_value.ssnIndicator().is_bound()) field_ssnIndicator = other_value.ssnIndicator();
  else field_ssnIndicator.clean_up();
  if (other_value.globalTitleIndic().is_bound()) field_globalTitleIndic = other_value.globalTitleIndic();
  else field_globalTitleIndic.clean_up();
  if (other_value.routingIndicator().is_bound()) field_routingIndicator = other_value.routingIndicator();
  else field_routingIndicator.clean_up();
}
return *this;
}

boolean SCCP__ASPfield__AddressIndicator::operator==(const SCCP__ASPfield__AddressIndicator& other_value) const
{
return field_pointCodeIndic==other_value.field_pointCodeIndic
  && field_ssnIndicator==other_value.field_ssnIndicator
  && field_globalTitleIndic==other_value.field_globalTitleIndic
  && field_routingIndicator==other_value.field_routingIndicator;
}

boolean SCCP__ASPfield__AddressIndicator::is_bound() const
{
return (field_pointCodeIndic.is_bound())
  || (field_ssnIndicator.is_bound())
  || (field_globalTitleIndic.is_bound())
  || (field_routingIndicator.is_bound());
}
boolean SCCP__ASPfield__AddressIndicator::is_value() const
{
return field_pointCodeIndic.is_value()
  && field_ssnIndicator.is_value()
  && field_globalTitleIndic.is_value()
  && field_routingIndicator.is_value();
}
void SCCP__ASPfield__AddressIndicator::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ pointCodeIndic := ");
field_pointCodeIndic.log();
TTCN_Logger::log_event_str(", ssnIndicator := ");
field_ssnIndicator.log();
TTCN_Logger::log_event_str(", globalTitleIndic := ");
field_globalTitleIndic.log();
TTCN_Logger::log_event_str(", routingIndicator := ");
field_routingIndicator.log();
TTCN_Logger::log_event_str(" }");
}

void SCCP__ASPfield__AddressIndicator::set_implicit_omit()
{
if (pointCodeIndic().is_bound()) pointCodeIndic().set_implicit_omit();
if (ssnIndicator().is_bound()) ssnIndicator().set_implicit_omit();
if (globalTitleIndic().is_bound()) globalTitleIndic().set_implicit_omit();
if (routingIndicator().is_bound()) routingIndicator().set_implicit_omit();
}

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

void SCCP__ASPfield__AddressIndicator::encode_text(Text_Buf& text_buf) const
{
field_pointCodeIndic.encode_text(text_buf);
field_ssnIndicator.encode_text(text_buf);
field_globalTitleIndic.encode_text(text_buf);
field_routingIndicator.encode_text(text_buf);
}

void SCCP__ASPfield__AddressIndicator::decode_text(Text_Buf& text_buf)
{
field_pointCodeIndic.decode_text(text_buf);
field_ssnIndicator.decode_text(text_buf);
field_globalTitleIndic.decode_text(text_buf);
field_routingIndicator.decode_text(text_buf);
}

struct SCCP__ASPfield__AddressIndicator_template::single_value_struct {
BITSTRING_template field_pointCodeIndic;
BITSTRING_template field_ssnIndicator;
BITSTRING_template field_globalTitleIndic;
BITSTRING_template field_routingIndicator;
};

void SCCP__ASPfield__AddressIndicator_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_pointCodeIndic = ANY_VALUE;
single_value->field_ssnIndicator = ANY_VALUE;
single_value->field_globalTitleIndic = ANY_VALUE;
single_value->field_routingIndicator = ANY_VALUE;
}
}
}

void SCCP__ASPfield__AddressIndicator_template::copy_value(const SCCP__ASPfield__AddressIndicator& other_value)
{
single_value = new single_value_struct;
if (other_value.pointCodeIndic().is_bound()) {
  single_value->field_pointCodeIndic = other_value.pointCodeIndic();
} else {
  single_value->field_pointCodeIndic.clean_up();
}
if (other_value.ssnIndicator().is_bound()) {
  single_value->field_ssnIndicator = other_value.ssnIndicator();
} else {
  single_value->field_ssnIndicator.clean_up();
}
if (other_value.globalTitleIndic().is_bound()) {
  single_value->field_globalTitleIndic = other_value.globalTitleIndic();
} else {
  single_value->field_globalTitleIndic.clean_up();
}
if (other_value.routingIndicator().is_bound()) {
  single_value->field_routingIndicator = other_value.routingIndicator();
} else {
  single_value->field_routingIndicator.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void SCCP__ASPfield__AddressIndicator_template::copy_template(const SCCP__ASPfield__AddressIndicator_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.pointCodeIndic().get_selection()) {
single_value->field_pointCodeIndic = other_value.pointCodeIndic();
} else {
single_value->field_pointCodeIndic.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ssnIndicator().get_selection()) {
single_value->field_ssnIndicator = other_value.ssnIndicator();
} else {
single_value->field_ssnIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.globalTitleIndic().get_selection()) {
single_value->field_globalTitleIndic = other_value.globalTitleIndic();
} else {
single_value->field_globalTitleIndic.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.routingIndicator().get_selection()) {
single_value->field_routingIndicator = other_value.routingIndicator();
} else {
single_value->field_routingIndicator.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new SCCP__ASPfield__AddressIndicator_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 SCCP__ASPfield__AddressIndicator_template(*other_value.implication_.precondition);
implication_.implied_template = new SCCP__ASPfield__AddressIndicator_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.SCCP_ASPfield_AddressIndicator.");
break;
}
set_selection(other_value);
}

SCCP__ASPfield__AddressIndicator_template::SCCP__ASPfield__AddressIndicator_template()
{
}

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

SCCP__ASPfield__AddressIndicator_template::SCCP__ASPfield__AddressIndicator_template(const SCCP__ASPfield__AddressIndicator& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean SCCP__ASPfield__AddressIndicator_template::match(const SCCP__ASPfield__AddressIndicator& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.pointCodeIndic().is_bound()) return FALSE;
if(!single_value->field_pointCodeIndic.match(other_value.pointCodeIndic(), legacy))return FALSE;
if(!other_value.ssnIndicator().is_bound()) return FALSE;
if(!single_value->field_ssnIndicator.match(other_value.ssnIndicator(), legacy))return FALSE;
if(!other_value.globalTitleIndic().is_bound()) return FALSE;
if(!single_value->field_globalTitleIndic.match(other_value.globalTitleIndic(), legacy))return FALSE;
if(!other_value.routingIndicator().is_bound()) return FALSE;
if(!single_value->field_routingIndicator.match(other_value.routingIndicator(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.SCCP_ASPfield_AddressIndicator.");
}
return FALSE;
}

boolean SCCP__ASPfield__AddressIndicator_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_pointCodeIndic.is_bound()
 || single_value->field_ssnIndicator.is_bound()
 || single_value->field_globalTitleIndic.is_bound()
 || single_value->field_routingIndicator.is_bound();
}

boolean SCCP__ASPfield__AddressIndicator_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_pointCodeIndic.is_value()
 && single_value->field_ssnIndicator.is_value()
 && single_value->field_globalTitleIndic.is_value()
 && single_value->field_routingIndicator.is_value();
}

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

SCCP__ASPfield__AddressIndicator SCCP__ASPfield__AddressIndicator_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_AddressIndicator.");
SCCP__ASPfield__AddressIndicator ret_val;
if (single_value->field_pointCodeIndic.is_bound()) {
ret_val.pointCodeIndic() = single_value->field_pointCodeIndic.valueof();
}
if (single_value->field_ssnIndicator.is_bound()) {
ret_val.ssnIndicator() = single_value->field_ssnIndicator.valueof();
}
if (single_value->field_globalTitleIndic.is_bound()) {
ret_val.globalTitleIndic() = single_value->field_globalTitleIndic.valueof();
}
if (single_value->field_routingIndicator.is_bound()) {
ret_val.routingIndicator() = single_value->field_routingIndicator.valueof();
}
return ret_val;
}

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

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

BITSTRING_template& SCCP__ASPfield__AddressIndicator_template::pointCodeIndic()
{
set_specific();
return single_value->field_pointCodeIndic;
}

const BITSTRING_template& SCCP__ASPfield__AddressIndicator_template::pointCodeIndic() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pointCodeIndic of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_AddressIndicator.");
return single_value->field_pointCodeIndic;
}

BITSTRING_template& SCCP__ASPfield__AddressIndicator_template::ssnIndicator()
{
set_specific();
return single_value->field_ssnIndicator;
}

const BITSTRING_template& SCCP__ASPfield__AddressIndicator_template::ssnIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ssnIndicator of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_AddressIndicator.");
return single_value->field_ssnIndicator;
}

BITSTRING_template& SCCP__ASPfield__AddressIndicator_template::globalTitleIndic()
{
set_specific();
return single_value->field_globalTitleIndic;
}

const BITSTRING_template& SCCP__ASPfield__AddressIndicator_template::globalTitleIndic() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field globalTitleIndic of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_AddressIndicator.");
return single_value->field_globalTitleIndic;
}

BITSTRING_template& SCCP__ASPfield__AddressIndicator_template::routingIndicator()
{
set_specific();
return single_value->field_routingIndicator;
}

const BITSTRING_template& SCCP__ASPfield__AddressIndicator_template::routingIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field routingIndicator of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_AddressIndicator.");
return single_value->field_routingIndicator;
}

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

void SCCP__ASPfield__AddressIndicator_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ pointCodeIndic := ");
single_value->field_pointCodeIndic.log();
TTCN_Logger::log_event_str(", ssnIndicator := ");
single_value->field_ssnIndicator.log();
TTCN_Logger::log_event_str(", globalTitleIndic := ");
single_value->field_globalTitleIndic.log();
TTCN_Logger::log_event_str(", routingIndicator := ");
single_value->field_routingIndicator.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void SCCP__ASPfield__AddressIndicator_template::log_match(const SCCP__ASPfield__AddressIndicator& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_pointCodeIndic.match(match_value.pointCodeIndic(), legacy)){
TTCN_Logger::log_logmatch_info(".pointCodeIndic");
single_value->field_pointCodeIndic.log_match(match_value.pointCodeIndic(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ssnIndicator.match(match_value.ssnIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".ssnIndicator");
single_value->field_ssnIndicator.log_match(match_value.ssnIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_globalTitleIndic.match(match_value.globalTitleIndic(), legacy)){
TTCN_Logger::log_logmatch_info(".globalTitleIndic");
single_value->field_globalTitleIndic.log_match(match_value.globalTitleIndic(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_routingIndicator.match(match_value.routingIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".routingIndicator");
single_value->field_routingIndicator.log_match(match_value.routingIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ pointCodeIndic := ");
single_value->field_pointCodeIndic.log_match(match_value.pointCodeIndic(), legacy);
TTCN_Logger::log_event_str(", ssnIndicator := ");
single_value->field_ssnIndicator.log_match(match_value.ssnIndicator(), legacy);
TTCN_Logger::log_event_str(", globalTitleIndic := ");
single_value->field_globalTitleIndic.log_match(match_value.globalTitleIndic(), legacy);
TTCN_Logger::log_event_str(", routingIndicator := ");
single_value->field_routingIndicator.log_match(match_value.routingIndicator(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

void SCCP__ASPfield__GlobalTitle::copy_value(const SCCP__ASPfield__GlobalTitle& other_value)
{
switch (other_value.union_selection) {
case ALT_gti0001:
field_gti0001 = new SCCP__ASPfield__GlobalTitle__NoA(*other_value.field_gti0001);
break;
case ALT_gti0010:
field_gti0010 = new SCCP__ASPfield__GlobalTitle__TT(*other_value.field_gti0010);
break;
case ALT_gti0011:
field_gti0011 = new SCCP__ASPfield__GlobalTitle__TT__NP__ES(*other_value.field_gti0011);
break;
case ALT_gti0100:
field_gti0100 = new SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA(*other_value.field_gti0100);
break;
default:
TTCN_error("Assignment of an unbound union value of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
}
union_selection = other_value.union_selection;
}

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

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

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

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

boolean SCCP__ASPfield__GlobalTitle::operator==(const SCCP__ASPfield__GlobalTitle& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_gti0001:
return *field_gti0001 == *other_value.field_gti0001;
case ALT_gti0010:
return *field_gti0010 == *other_value.field_gti0010;
case ALT_gti0011:
return *field_gti0011 == *other_value.field_gti0011;
case ALT_gti0100:
return *field_gti0100 == *other_value.field_gti0100;
default:
return FALSE;
}
}

SCCP__ASPfield__GlobalTitle__NoA& SCCP__ASPfield__GlobalTitle::gti0001()
{
if (union_selection != ALT_gti0001) {
clean_up();
field_gti0001 = new SCCP__ASPfield__GlobalTitle__NoA;
union_selection = ALT_gti0001;
}
return *field_gti0001;
}

const SCCP__ASPfield__GlobalTitle__NoA& SCCP__ASPfield__GlobalTitle::gti0001() const
{
if (union_selection != ALT_gti0001) TTCN_error("Using non-selected field gti0001 in a value of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
return *field_gti0001;
}

SCCP__ASPfield__GlobalTitle__TT& SCCP__ASPfield__GlobalTitle::gti0010()
{
if (union_selection != ALT_gti0010) {
clean_up();
field_gti0010 = new SCCP__ASPfield__GlobalTitle__TT;
union_selection = ALT_gti0010;
}
return *field_gti0010;
}

const SCCP__ASPfield__GlobalTitle__TT& SCCP__ASPfield__GlobalTitle::gti0010() const
{
if (union_selection != ALT_gti0010) TTCN_error("Using non-selected field gti0010 in a value of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
return *field_gti0010;
}

SCCP__ASPfield__GlobalTitle__TT__NP__ES& SCCP__ASPfield__GlobalTitle::gti0011()
{
if (union_selection != ALT_gti0011) {
clean_up();
field_gti0011 = new SCCP__ASPfield__GlobalTitle__TT__NP__ES;
union_selection = ALT_gti0011;
}
return *field_gti0011;
}

const SCCP__ASPfield__GlobalTitle__TT__NP__ES& SCCP__ASPfield__GlobalTitle::gti0011() const
{
if (union_selection != ALT_gti0011) TTCN_error("Using non-selected field gti0011 in a value of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
return *field_gti0011;
}

SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA& SCCP__ASPfield__GlobalTitle::gti0100()
{
if (union_selection != ALT_gti0100) {
clean_up();
field_gti0100 = new SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA;
union_selection = ALT_gti0100;
}
return *field_gti0100;
}

const SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA& SCCP__ASPfield__GlobalTitle::gti0100() const
{
if (union_selection != ALT_gti0100) TTCN_error("Using non-selected field gti0100 in a value of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
return *field_gti0100;
}

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

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

boolean SCCP__ASPfield__GlobalTitle::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_gti0001: return field_gti0001->is_value();
case ALT_gti0010: return field_gti0010->is_value();
case ALT_gti0011: return field_gti0011->is_value();
case ALT_gti0100: return field_gti0100->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void SCCP__ASPfield__GlobalTitle::clean_up()
{
switch (union_selection) {
case ALT_gti0001:
  delete field_gti0001;
  break;
case ALT_gti0010:
  delete field_gti0010;
  break;
case ALT_gti0011:
  delete field_gti0011;
  break;
case ALT_gti0100:
  delete field_gti0100;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void SCCP__ASPfield__GlobalTitle::log() const
{
switch (union_selection) {
case ALT_gti0001:
TTCN_Logger::log_event_str("{ gti0001 := ");
field_gti0001->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_gti0010:
TTCN_Logger::log_event_str("{ gti0010 := ");
field_gti0010->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_gti0011:
TTCN_Logger::log_event_str("{ gti0011 := ");
field_gti0011->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_gti0100:
TTCN_Logger::log_event_str("{ gti0100 := ");
field_gti0100->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

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

void SCCP__ASPfield__GlobalTitle::set_implicit_omit()
{
switch (union_selection) {
case ALT_gti0001:
field_gti0001->set_implicit_omit(); break;
case ALT_gti0010:
field_gti0010->set_implicit_omit(); break;
case ALT_gti0011:
field_gti0011->set_implicit_omit(); break;
case ALT_gti0100:
field_gti0100->set_implicit_omit(); break;
default: break;
}
}

void SCCP__ASPfield__GlobalTitle::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_gti0001:
field_gti0001->encode_text(text_buf);
break;
case ALT_gti0010:
field_gti0010->encode_text(text_buf);
break;
case ALT_gti0011:
field_gti0011->encode_text(text_buf);
break;
case ALT_gti0100:
field_gti0100->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
}
}

void SCCP__ASPfield__GlobalTitle::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_gti0001:
gti0001().decode_text(text_buf);
break;
case ALT_gti0010:
gti0010().decode_text(text_buf);
break;
case ALT_gti0011:
gti0011().decode_text(text_buf);
break;
case ALT_gti0100:
gti0100().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
}
}

void SCCP__ASPfield__GlobalTitle_template::copy_value(const SCCP__ASPfield__GlobalTitle& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case SCCP__ASPfield__GlobalTitle::ALT_gti0001:
single_value.field_gti0001 = new SCCP__ASPfield__GlobalTitle__NoA_template(other_value.gti0001());
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0010:
single_value.field_gti0010 = new SCCP__ASPfield__GlobalTitle__TT_template(other_value.gti0010());
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0011:
single_value.field_gti0011 = new SCCP__ASPfield__GlobalTitle__TT__NP__ES_template(other_value.gti0011());
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0100:
single_value.field_gti0100 = new SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template(other_value.gti0100());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
}
set_selection(SPECIFIC_VALUE);
}

void SCCP__ASPfield__GlobalTitle_template::copy_template(const SCCP__ASPfield__GlobalTitle_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value.union_selection = other_value.single_value.union_selection;
switch (single_value.union_selection) {
case SCCP__ASPfield__GlobalTitle::ALT_gti0001:
single_value.field_gti0001 = new SCCP__ASPfield__GlobalTitle__NoA_template(*other_value.single_value.field_gti0001);
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0010:
single_value.field_gti0010 = new SCCP__ASPfield__GlobalTitle__TT_template(*other_value.single_value.field_gti0010);
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0011:
single_value.field_gti0011 = new SCCP__ASPfield__GlobalTitle__TT__NP__ES_template(*other_value.single_value.field_gti0011);
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0100:
single_value.field_gti0100 = new SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template(*other_value.single_value.field_gti0100);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
}
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 SCCP__ASPfield__GlobalTitle_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 SCCP__ASPfield__GlobalTitle_template(*other_value.implication_.precondition);
implication_.implied_template = new SCCP__ASPfield__GlobalTitle_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
}
set_selection(other_value);
}

SCCP__ASPfield__GlobalTitle_template::SCCP__ASPfield__GlobalTitle_template()
{
}

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

SCCP__ASPfield__GlobalTitle_template::SCCP__ASPfield__GlobalTitle_template(const SCCP__ASPfield__GlobalTitle& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void SCCP__ASPfield__GlobalTitle_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case SCCP__ASPfield__GlobalTitle::ALT_gti0001:
delete single_value.field_gti0001;
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0010:
delete single_value.field_gti0010;
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0011:
delete single_value.field_gti0011;
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0100:
delete single_value.field_gti0100;
default:
break;
}
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

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

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

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

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

boolean SCCP__ASPfield__GlobalTitle_template::match(const SCCP__ASPfield__GlobalTitle& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
{
SCCP__ASPfield__GlobalTitle::union_selection_type value_selection = other_value.get_selection();
if (value_selection == SCCP__ASPfield__GlobalTitle::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case SCCP__ASPfield__GlobalTitle::ALT_gti0001:
return single_value.field_gti0001->match(other_value.gti0001(), legacy);
case SCCP__ASPfield__GlobalTitle::ALT_gti0010:
return single_value.field_gti0010->match(other_value.gti0010(), legacy);
case SCCP__ASPfield__GlobalTitle::ALT_gti0011:
return single_value.field_gti0011->match(other_value.gti0011(), legacy);
case SCCP__ASPfield__GlobalTitle::ALT_gti0100:
return single_value.field_gti0100->match(other_value.gti0100(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
}
}
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error ("Matching an uninitialized template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
}
return FALSE;
}

boolean SCCP__ASPfield__GlobalTitle_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case SCCP__ASPfield__GlobalTitle::ALT_gti0001:
return single_value.field_gti0001->is_value();
case SCCP__ASPfield__GlobalTitle::ALT_gti0010:
return single_value.field_gti0010->is_value();
case SCCP__ASPfield__GlobalTitle::ALT_gti0011:
return single_value.field_gti0011->is_value();
case SCCP__ASPfield__GlobalTitle::ALT_gti0100:
return single_value.field_gti0100->is_value();
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
}
}

SCCP__ASPfield__GlobalTitle SCCP__ASPfield__GlobalTitle_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
SCCP__ASPfield__GlobalTitle ret_val;
switch (single_value.union_selection) {
case SCCP__ASPfield__GlobalTitle::ALT_gti0001:
ret_val.gti0001() = single_value.field_gti0001->valueof();
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0010:
ret_val.gti0010() = single_value.field_gti0010->valueof();
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0011:
ret_val.gti0011() = single_value.field_gti0011->valueof();
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0100:
ret_val.gti0100() = single_value.field_gti0100->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
}
return ret_val;
}

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

SCCP__ASPfield__GlobalTitle__NoA_template& SCCP__ASPfield__GlobalTitle_template::gti0001()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != SCCP__ASPfield__GlobalTitle::ALT_gti0001) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_gti0001 = new SCCP__ASPfield__GlobalTitle__NoA_template(ANY_VALUE);
else single_value.field_gti0001 = new SCCP__ASPfield__GlobalTitle__NoA_template;
single_value.union_selection = SCCP__ASPfield__GlobalTitle::ALT_gti0001;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_gti0001;
}

const SCCP__ASPfield__GlobalTitle__NoA_template& SCCP__ASPfield__GlobalTitle_template::gti0001() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field gti0001 in a non-specific template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
if (single_value.union_selection != SCCP__ASPfield__GlobalTitle::ALT_gti0001) TTCN_error("Accessing non-selected field gti0001 in a template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
return *single_value.field_gti0001;
}

SCCP__ASPfield__GlobalTitle__TT_template& SCCP__ASPfield__GlobalTitle_template::gti0010()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != SCCP__ASPfield__GlobalTitle::ALT_gti0010) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_gti0010 = new SCCP__ASPfield__GlobalTitle__TT_template(ANY_VALUE);
else single_value.field_gti0010 = new SCCP__ASPfield__GlobalTitle__TT_template;
single_value.union_selection = SCCP__ASPfield__GlobalTitle::ALT_gti0010;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_gti0010;
}

const SCCP__ASPfield__GlobalTitle__TT_template& SCCP__ASPfield__GlobalTitle_template::gti0010() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field gti0010 in a non-specific template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
if (single_value.union_selection != SCCP__ASPfield__GlobalTitle::ALT_gti0010) TTCN_error("Accessing non-selected field gti0010 in a template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
return *single_value.field_gti0010;
}

SCCP__ASPfield__GlobalTitle__TT__NP__ES_template& SCCP__ASPfield__GlobalTitle_template::gti0011()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != SCCP__ASPfield__GlobalTitle::ALT_gti0011) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_gti0011 = new SCCP__ASPfield__GlobalTitle__TT__NP__ES_template(ANY_VALUE);
else single_value.field_gti0011 = new SCCP__ASPfield__GlobalTitle__TT__NP__ES_template;
single_value.union_selection = SCCP__ASPfield__GlobalTitle::ALT_gti0011;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_gti0011;
}

const SCCP__ASPfield__GlobalTitle__TT__NP__ES_template& SCCP__ASPfield__GlobalTitle_template::gti0011() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field gti0011 in a non-specific template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
if (single_value.union_selection != SCCP__ASPfield__GlobalTitle::ALT_gti0011) TTCN_error("Accessing non-selected field gti0011 in a template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
return *single_value.field_gti0011;
}

SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template& SCCP__ASPfield__GlobalTitle_template::gti0100()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != SCCP__ASPfield__GlobalTitle::ALT_gti0100) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_gti0100 = new SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template(ANY_VALUE);
else single_value.field_gti0100 = new SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template;
single_value.union_selection = SCCP__ASPfield__GlobalTitle::ALT_gti0100;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_gti0100;
}

const SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template& SCCP__ASPfield__GlobalTitle_template::gti0100() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field gti0100 in a non-specific template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
if (single_value.union_selection != SCCP__ASPfield__GlobalTitle::ALT_gti0100) TTCN_error("Accessing non-selected field gti0100 in a template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
return *single_value.field_gti0100;
}

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

void SCCP__ASPfield__GlobalTitle_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case SCCP__ASPfield__GlobalTitle::ALT_gti0001:
TTCN_Logger::log_event_str("{ gti0001 := ");
single_value.field_gti0001->log();
TTCN_Logger::log_event_str(" }");
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0010:
TTCN_Logger::log_event_str("{ gti0010 := ");
single_value.field_gti0010->log();
TTCN_Logger::log_event_str(" }");
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0011:
TTCN_Logger::log_event_str("{ gti0011 := ");
single_value.field_gti0011->log();
TTCN_Logger::log_event_str(" }");
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0100:
TTCN_Logger::log_event_str("{ gti0100 := ");
single_value.field_gti0100->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_str("<invalid selector>");
}
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void SCCP__ASPfield__GlobalTitle_template::log_match(const SCCP__ASPfield__GlobalTitle& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity() && match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
return;
}
if (template_selection == SPECIFIC_VALUE && single_value.union_selection == match_value.get_selection()) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
switch (single_value.union_selection) {
case SCCP__ASPfield__GlobalTitle::ALT_gti0001:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".gti0001");
single_value.field_gti0001->log_match(match_value.gti0001(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ gti0001 := ");
single_value.field_gti0001->log_match(match_value.gti0001(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0010:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".gti0010");
single_value.field_gti0010->log_match(match_value.gti0010(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ gti0010 := ");
single_value.field_gti0010->log_match(match_value.gti0010(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0011:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".gti0011");
single_value.field_gti0011->log_match(match_value.gti0011(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ gti0011 := ");
single_value.field_gti0011->log_match(match_value.gti0011(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0100:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".gti0100");
single_value.field_gti0100->log_match(match_value.gti0100(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ gti0100 := ");
single_value.field_gti0100->log_match(match_value.gti0100(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
default:
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str("<invalid selector>");
}
} else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void SCCP__ASPfield__GlobalTitle_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value.union_selection);
switch (single_value.union_selection) {
case SCCP__ASPfield__GlobalTitle::ALT_gti0001:
single_value.field_gti0001->encode_text(text_buf);
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0010:
single_value.field_gti0010->encode_text(text_buf);
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0011:
single_value.field_gti0011->encode_text(text_buf);
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0100:
single_value.field_gti0100->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
}
}

void SCCP__ASPfield__GlobalTitle_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
{
single_value.union_selection = SCCP__ASPfield__GlobalTitle::UNBOUND_VALUE;
SCCP__ASPfield__GlobalTitle::union_selection_type new_selection = (SCCP__ASPfield__GlobalTitle::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case SCCP__ASPfield__GlobalTitle::ALT_gti0001:
single_value.field_gti0001 = new SCCP__ASPfield__GlobalTitle__NoA_template;
single_value.field_gti0001->decode_text(text_buf);
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0010:
single_value.field_gti0010 = new SCCP__ASPfield__GlobalTitle__TT_template;
single_value.field_gti0010->decode_text(text_buf);
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0011:
single_value.field_gti0011 = new SCCP__ASPfield__GlobalTitle__TT__NP__ES_template;
single_value.field_gti0011->decode_text(text_buf);
break;
case SCCP__ASPfield__GlobalTitle::ALT_gti0100:
single_value.field_gti0100 = new SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template;
single_value.field_gti0100->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
}
single_value.union_selection = new_selection;
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new SCCP__ASPfield__GlobalTitle_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized selector was received in a template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
}
}

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

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

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

void SCCP__ASPfield__GlobalTitle_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
switch (single_value.union_selection) {
case SCCP__ASPfield__GlobalTitle::ALT_gti0001:
single_value.field_gti0001->check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle");
return;
case SCCP__ASPfield__GlobalTitle::ALT_gti0010:
single_value.field_gti0010->check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle");
return;
case SCCP__ASPfield__GlobalTitle::ALT_gti0011:
single_value.field_gti0011->check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle");
return;
case SCCP__ASPfield__GlobalTitle::ALT_gti0100:
single_value.field_gti0100->check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle");
return;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle.");
}
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 : "@SCCPasp_Types.SCCP_ASPfield_GlobalTitle");
}

SCCP__ASPfield__GlobalTitle__NoA::SCCP__ASPfield__GlobalTitle__NoA()
{
}

SCCP__ASPfield__GlobalTitle__NoA::SCCP__ASPfield__GlobalTitle__NoA(const BITSTRING& par_natureOfAddress,
    const BITSTRING& par_oddeven,
    const HEXSTRING& par_globalTitleAddress)
  :   field_natureOfAddress(par_natureOfAddress),
  field_oddeven(par_oddeven),
  field_globalTitleAddress(par_globalTitleAddress)
{
}

SCCP__ASPfield__GlobalTitle__NoA::SCCP__ASPfield__GlobalTitle__NoA(const SCCP__ASPfield__GlobalTitle__NoA& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_NoA.");
if (other_value.natureOfAddress().is_bound()) field_natureOfAddress = other_value.natureOfAddress();
else field_natureOfAddress.clean_up();
if (other_value.oddeven().is_bound()) field_oddeven = other_value.oddeven();
else field_oddeven.clean_up();
if (other_value.globalTitleAddress().is_bound()) field_globalTitleAddress = other_value.globalTitleAddress();
else field_globalTitleAddress.clean_up();
}

void SCCP__ASPfield__GlobalTitle__NoA::clean_up()
{
field_natureOfAddress.clean_up();
field_oddeven.clean_up();
field_globalTitleAddress.clean_up();
}

const TTCN_Typedescriptor_t* SCCP__ASPfield__GlobalTitle__NoA::get_descriptor() const { return &SCCP__ASPfield__GlobalTitle__NoA_descr_; }
SCCP__ASPfield__GlobalTitle__NoA& SCCP__ASPfield__GlobalTitle__NoA::operator=(const SCCP__ASPfield__GlobalTitle__NoA& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_NoA.");
  if (other_value.natureOfAddress().is_bound()) field_natureOfAddress = other_value.natureOfAddress();
  else field_natureOfAddress.clean_up();
  if (other_value.oddeven().is_bound()) field_oddeven = other_value.oddeven();
  else field_oddeven.clean_up();
  if (other_value.globalTitleAddress().is_bound()) field_globalTitleAddress = other_value.globalTitleAddress();
  else field_globalTitleAddress.clean_up();
}
return *this;
}

boolean SCCP__ASPfield__GlobalTitle__NoA::operator==(const SCCP__ASPfield__GlobalTitle__NoA& other_value) const
{
return field_natureOfAddress==other_value.field_natureOfAddress
  && field_oddeven==other_value.field_oddeven
  && field_globalTitleAddress==other_value.field_globalTitleAddress;
}

boolean SCCP__ASPfield__GlobalTitle__NoA::is_bound() const
{
return (field_natureOfAddress.is_bound())
  || (field_oddeven.is_bound())
  || (field_globalTitleAddress.is_bound());
}
boolean SCCP__ASPfield__GlobalTitle__NoA::is_value() const
{
return field_natureOfAddress.is_value()
  && field_oddeven.is_value()
  && field_globalTitleAddress.is_value();
}
void SCCP__ASPfield__GlobalTitle__NoA::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ natureOfAddress := ");
field_natureOfAddress.log();
TTCN_Logger::log_event_str(", oddeven := ");
field_oddeven.log();
TTCN_Logger::log_event_str(", globalTitleAddress := ");
field_globalTitleAddress.log();
TTCN_Logger::log_event_str(" }");
}

void SCCP__ASPfield__GlobalTitle__NoA::set_implicit_omit()
{
if (natureOfAddress().is_bound()) natureOfAddress().set_implicit_omit();
if (oddeven().is_bound()) oddeven().set_implicit_omit();
if (globalTitleAddress().is_bound()) globalTitleAddress().set_implicit_omit();
}

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

void SCCP__ASPfield__GlobalTitle__NoA::encode_text(Text_Buf& text_buf) const
{
field_natureOfAddress.encode_text(text_buf);
field_oddeven.encode_text(text_buf);
field_globalTitleAddress.encode_text(text_buf);
}

void SCCP__ASPfield__GlobalTitle__NoA::decode_text(Text_Buf& text_buf)
{
field_natureOfAddress.decode_text(text_buf);
field_oddeven.decode_text(text_buf);
field_globalTitleAddress.decode_text(text_buf);
}

struct SCCP__ASPfield__GlobalTitle__NoA_template::single_value_struct {
BITSTRING_template field_natureOfAddress;
BITSTRING_template field_oddeven;
HEXSTRING_template field_globalTitleAddress;
};

void SCCP__ASPfield__GlobalTitle__NoA_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_natureOfAddress = ANY_VALUE;
single_value->field_oddeven = ANY_VALUE;
single_value->field_globalTitleAddress = ANY_VALUE;
}
}
}

void SCCP__ASPfield__GlobalTitle__NoA_template::copy_value(const SCCP__ASPfield__GlobalTitle__NoA& other_value)
{
single_value = new single_value_struct;
if (other_value.natureOfAddress().is_bound()) {
  single_value->field_natureOfAddress = other_value.natureOfAddress();
} else {
  single_value->field_natureOfAddress.clean_up();
}
if (other_value.oddeven().is_bound()) {
  single_value->field_oddeven = other_value.oddeven();
} else {
  single_value->field_oddeven.clean_up();
}
if (other_value.globalTitleAddress().is_bound()) {
  single_value->field_globalTitleAddress = other_value.globalTitleAddress();
} else {
  single_value->field_globalTitleAddress.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void SCCP__ASPfield__GlobalTitle__NoA_template::copy_template(const SCCP__ASPfield__GlobalTitle__NoA_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.natureOfAddress().get_selection()) {
single_value->field_natureOfAddress = other_value.natureOfAddress();
} else {
single_value->field_natureOfAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.oddeven().get_selection()) {
single_value->field_oddeven = other_value.oddeven();
} else {
single_value->field_oddeven.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.globalTitleAddress().get_selection()) {
single_value->field_globalTitleAddress = other_value.globalTitleAddress();
} else {
single_value->field_globalTitleAddress.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new SCCP__ASPfield__GlobalTitle__NoA_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 SCCP__ASPfield__GlobalTitle__NoA_template(*other_value.implication_.precondition);
implication_.implied_template = new SCCP__ASPfield__GlobalTitle__NoA_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_NoA.");
break;
}
set_selection(other_value);
}

SCCP__ASPfield__GlobalTitle__NoA_template::SCCP__ASPfield__GlobalTitle__NoA_template()
{
}

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

SCCP__ASPfield__GlobalTitle__NoA_template::SCCP__ASPfield__GlobalTitle__NoA_template(const SCCP__ASPfield__GlobalTitle__NoA& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean SCCP__ASPfield__GlobalTitle__NoA_template::match(const SCCP__ASPfield__GlobalTitle__NoA& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.natureOfAddress().is_bound()) return FALSE;
if(!single_value->field_natureOfAddress.match(other_value.natureOfAddress(), legacy))return FALSE;
if(!other_value.oddeven().is_bound()) return FALSE;
if(!single_value->field_oddeven.match(other_value.oddeven(), legacy))return FALSE;
if(!other_value.globalTitleAddress().is_bound()) return FALSE;
if(!single_value->field_globalTitleAddress.match(other_value.globalTitleAddress(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_NoA.");
}
return FALSE;
}

boolean SCCP__ASPfield__GlobalTitle__NoA_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_natureOfAddress.is_bound()
 || single_value->field_oddeven.is_bound()
 || single_value->field_globalTitleAddress.is_bound();
}

boolean SCCP__ASPfield__GlobalTitle__NoA_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_natureOfAddress.is_value()
 && single_value->field_oddeven.is_value()
 && single_value->field_globalTitleAddress.is_value();
}

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

SCCP__ASPfield__GlobalTitle__NoA SCCP__ASPfield__GlobalTitle__NoA_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_NoA.");
SCCP__ASPfield__GlobalTitle__NoA ret_val;
if (single_value->field_natureOfAddress.is_bound()) {
ret_val.natureOfAddress() = single_value->field_natureOfAddress.valueof();
}
if (single_value->field_oddeven.is_bound()) {
ret_val.oddeven() = single_value->field_oddeven.valueof();
}
if (single_value->field_globalTitleAddress.is_bound()) {
ret_val.globalTitleAddress() = single_value->field_globalTitleAddress.valueof();
}
return ret_val;
}

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

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

BITSTRING_template& SCCP__ASPfield__GlobalTitle__NoA_template::natureOfAddress()
{
set_specific();
return single_value->field_natureOfAddress;
}

const BITSTRING_template& SCCP__ASPfield__GlobalTitle__NoA_template::natureOfAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field natureOfAddress of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_NoA.");
return single_value->field_natureOfAddress;
}

BITSTRING_template& SCCP__ASPfield__GlobalTitle__NoA_template::oddeven()
{
set_specific();
return single_value->field_oddeven;
}

const BITSTRING_template& SCCP__ASPfield__GlobalTitle__NoA_template::oddeven() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field oddeven of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_NoA.");
return single_value->field_oddeven;
}

HEXSTRING_template& SCCP__ASPfield__GlobalTitle__NoA_template::globalTitleAddress()
{
set_specific();
return single_value->field_globalTitleAddress;
}

const HEXSTRING_template& SCCP__ASPfield__GlobalTitle__NoA_template::globalTitleAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field globalTitleAddress of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_NoA.");
return single_value->field_globalTitleAddress;
}

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

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

void SCCP__ASPfield__GlobalTitle__NoA_template::log_match(const SCCP__ASPfield__GlobalTitle__NoA& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_natureOfAddress.match(match_value.natureOfAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".natureOfAddress");
single_value->field_natureOfAddress.log_match(match_value.natureOfAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_oddeven.match(match_value.oddeven(), legacy)){
TTCN_Logger::log_logmatch_info(".oddeven");
single_value->field_oddeven.log_match(match_value.oddeven(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_globalTitleAddress.match(match_value.globalTitleAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".globalTitleAddress");
single_value->field_globalTitleAddress.log_match(match_value.globalTitleAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ natureOfAddress := ");
single_value->field_natureOfAddress.log_match(match_value.natureOfAddress(), legacy);
TTCN_Logger::log_event_str(", oddeven := ");
single_value->field_oddeven.log_match(match_value.oddeven(), legacy);
TTCN_Logger::log_event_str(", globalTitleAddress := ");
single_value->field_globalTitleAddress.log_match(match_value.globalTitleAddress(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

SCCP__ASPfield__GlobalTitle__TT::SCCP__ASPfield__GlobalTitle__TT()
{
}

SCCP__ASPfield__GlobalTitle__TT::SCCP__ASPfield__GlobalTitle__TT(const OCTETSTRING& par_translationType,
    const HEXSTRING& par_globalTitleAddress)
  :   field_translationType(par_translationType),
  field_globalTitleAddress(par_globalTitleAddress)
{
}

SCCP__ASPfield__GlobalTitle__TT::SCCP__ASPfield__GlobalTitle__TT(const SCCP__ASPfield__GlobalTitle__TT& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT.");
if (other_value.translationType().is_bound()) field_translationType = other_value.translationType();
else field_translationType.clean_up();
if (other_value.globalTitleAddress().is_bound()) field_globalTitleAddress = other_value.globalTitleAddress();
else field_globalTitleAddress.clean_up();
}

void SCCP__ASPfield__GlobalTitle__TT::clean_up()
{
field_translationType.clean_up();
field_globalTitleAddress.clean_up();
}

const TTCN_Typedescriptor_t* SCCP__ASPfield__GlobalTitle__TT::get_descriptor() const { return &SCCP__ASPfield__GlobalTitle__TT_descr_; }
SCCP__ASPfield__GlobalTitle__TT& SCCP__ASPfield__GlobalTitle__TT::operator=(const SCCP__ASPfield__GlobalTitle__TT& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT.");
  if (other_value.translationType().is_bound()) field_translationType = other_value.translationType();
  else field_translationType.clean_up();
  if (other_value.globalTitleAddress().is_bound()) field_globalTitleAddress = other_value.globalTitleAddress();
  else field_globalTitleAddress.clean_up();
}
return *this;
}

boolean SCCP__ASPfield__GlobalTitle__TT::operator==(const SCCP__ASPfield__GlobalTitle__TT& other_value) const
{
return field_translationType==other_value.field_translationType
  && field_globalTitleAddress==other_value.field_globalTitleAddress;
}

boolean SCCP__ASPfield__GlobalTitle__TT::is_bound() const
{
return (field_translationType.is_bound())
  || (field_globalTitleAddress.is_bound());
}
boolean SCCP__ASPfield__GlobalTitle__TT::is_value() const
{
return field_translationType.is_value()
  && field_globalTitleAddress.is_value();
}
void SCCP__ASPfield__GlobalTitle__TT::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ translationType := ");
field_translationType.log();
TTCN_Logger::log_event_str(", globalTitleAddress := ");
field_globalTitleAddress.log();
TTCN_Logger::log_event_str(" }");
}

void SCCP__ASPfield__GlobalTitle__TT::set_implicit_omit()
{
if (translationType().is_bound()) translationType().set_implicit_omit();
if (globalTitleAddress().is_bound()) globalTitleAddress().set_implicit_omit();
}

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

void SCCP__ASPfield__GlobalTitle__TT::encode_text(Text_Buf& text_buf) const
{
field_translationType.encode_text(text_buf);
field_globalTitleAddress.encode_text(text_buf);
}

void SCCP__ASPfield__GlobalTitle__TT::decode_text(Text_Buf& text_buf)
{
field_translationType.decode_text(text_buf);
field_globalTitleAddress.decode_text(text_buf);
}

struct SCCP__ASPfield__GlobalTitle__TT_template::single_value_struct {
OCTETSTRING_template field_translationType;
HEXSTRING_template field_globalTitleAddress;
};

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

void SCCP__ASPfield__GlobalTitle__TT_template::copy_value(const SCCP__ASPfield__GlobalTitle__TT& other_value)
{
single_value = new single_value_struct;
if (other_value.translationType().is_bound()) {
  single_value->field_translationType = other_value.translationType();
} else {
  single_value->field_translationType.clean_up();
}
if (other_value.globalTitleAddress().is_bound()) {
  single_value->field_globalTitleAddress = other_value.globalTitleAddress();
} else {
  single_value->field_globalTitleAddress.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void SCCP__ASPfield__GlobalTitle__TT_template::copy_template(const SCCP__ASPfield__GlobalTitle__TT_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.translationType().get_selection()) {
single_value->field_translationType = other_value.translationType();
} else {
single_value->field_translationType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.globalTitleAddress().get_selection()) {
single_value->field_globalTitleAddress = other_value.globalTitleAddress();
} else {
single_value->field_globalTitleAddress.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new SCCP__ASPfield__GlobalTitle__TT_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 SCCP__ASPfield__GlobalTitle__TT_template(*other_value.implication_.precondition);
implication_.implied_template = new SCCP__ASPfield__GlobalTitle__TT_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT.");
break;
}
set_selection(other_value);
}

SCCP__ASPfield__GlobalTitle__TT_template::SCCP__ASPfield__GlobalTitle__TT_template()
{
}

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

SCCP__ASPfield__GlobalTitle__TT_template::SCCP__ASPfield__GlobalTitle__TT_template(const SCCP__ASPfield__GlobalTitle__TT& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

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

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

boolean SCCP__ASPfield__GlobalTitle__TT_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_translationType.is_value()
 && single_value->field_globalTitleAddress.is_value();
}

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

SCCP__ASPfield__GlobalTitle__TT SCCP__ASPfield__GlobalTitle__TT_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT.");
SCCP__ASPfield__GlobalTitle__TT ret_val;
if (single_value->field_translationType.is_bound()) {
ret_val.translationType() = single_value->field_translationType.valueof();
}
if (single_value->field_globalTitleAddress.is_bound()) {
ret_val.globalTitleAddress() = single_value->field_globalTitleAddress.valueof();
}
return ret_val;
}

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

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

OCTETSTRING_template& SCCP__ASPfield__GlobalTitle__TT_template::translationType()
{
set_specific();
return single_value->field_translationType;
}

const OCTETSTRING_template& SCCP__ASPfield__GlobalTitle__TT_template::translationType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field translationType of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT.");
return single_value->field_translationType;
}

HEXSTRING_template& SCCP__ASPfield__GlobalTitle__TT_template::globalTitleAddress()
{
set_specific();
return single_value->field_globalTitleAddress;
}

const HEXSTRING_template& SCCP__ASPfield__GlobalTitle__TT_template::globalTitleAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field globalTitleAddress of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT.");
return single_value->field_globalTitleAddress;
}

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

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

void SCCP__ASPfield__GlobalTitle__TT_template::log_match(const SCCP__ASPfield__GlobalTitle__TT& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_translationType.match(match_value.translationType(), legacy)){
TTCN_Logger::log_logmatch_info(".translationType");
single_value->field_translationType.log_match(match_value.translationType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_globalTitleAddress.match(match_value.globalTitleAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".globalTitleAddress");
single_value->field_globalTitleAddress.log_match(match_value.globalTitleAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ translationType := ");
single_value->field_translationType.log_match(match_value.translationType(), legacy);
TTCN_Logger::log_event_str(", globalTitleAddress := ");
single_value->field_globalTitleAddress.log_match(match_value.globalTitleAddress(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

SCCP__ASPfield__GlobalTitle__TT__NP__ES::SCCP__ASPfield__GlobalTitle__TT__NP__ES()
{
}

SCCP__ASPfield__GlobalTitle__TT__NP__ES::SCCP__ASPfield__GlobalTitle__TT__NP__ES(const OCTETSTRING& par_translationType,
    const BITSTRING& par_encodingScheme,
    const BITSTRING& par_numberingPlan,
    const HEXSTRING& par_globalTitleAddress)
  :   field_translationType(par_translationType),
  field_encodingScheme(par_encodingScheme),
  field_numberingPlan(par_numberingPlan),
  field_globalTitleAddress(par_globalTitleAddress)
{
}

SCCP__ASPfield__GlobalTitle__TT__NP__ES::SCCP__ASPfield__GlobalTitle__TT__NP__ES(const SCCP__ASPfield__GlobalTitle__TT__NP__ES& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT_NP_ES.");
if (other_value.translationType().is_bound()) field_translationType = other_value.translationType();
else field_translationType.clean_up();
if (other_value.encodingScheme().is_bound()) field_encodingScheme = other_value.encodingScheme();
else field_encodingScheme.clean_up();
if (other_value.numberingPlan().is_bound()) field_numberingPlan = other_value.numberingPlan();
else field_numberingPlan.clean_up();
if (other_value.globalTitleAddress().is_bound()) field_globalTitleAddress = other_value.globalTitleAddress();
else field_globalTitleAddress.clean_up();
}

void SCCP__ASPfield__GlobalTitle__TT__NP__ES::clean_up()
{
field_translationType.clean_up();
field_encodingScheme.clean_up();
field_numberingPlan.clean_up();
field_globalTitleAddress.clean_up();
}

const TTCN_Typedescriptor_t* SCCP__ASPfield__GlobalTitle__TT__NP__ES::get_descriptor() const { return &SCCP__ASPfield__GlobalTitle__TT__NP__ES_descr_; }
SCCP__ASPfield__GlobalTitle__TT__NP__ES& SCCP__ASPfield__GlobalTitle__TT__NP__ES::operator=(const SCCP__ASPfield__GlobalTitle__TT__NP__ES& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT_NP_ES.");
  if (other_value.translationType().is_bound()) field_translationType = other_value.translationType();
  else field_translationType.clean_up();
  if (other_value.encodingScheme().is_bound()) field_encodingScheme = other_value.encodingScheme();
  else field_encodingScheme.clean_up();
  if (other_value.numberingPlan().is_bound()) field_numberingPlan = other_value.numberingPlan();
  else field_numberingPlan.clean_up();
  if (other_value.globalTitleAddress().is_bound()) field_globalTitleAddress = other_value.globalTitleAddress();
  else field_globalTitleAddress.clean_up();
}
return *this;
}

boolean SCCP__ASPfield__GlobalTitle__TT__NP__ES::operator==(const SCCP__ASPfield__GlobalTitle__TT__NP__ES& other_value) const
{
return field_translationType==other_value.field_translationType
  && field_encodingScheme==other_value.field_encodingScheme
  && field_numberingPlan==other_value.field_numberingPlan
  && field_globalTitleAddress==other_value.field_globalTitleAddress;
}

boolean SCCP__ASPfield__GlobalTitle__TT__NP__ES::is_bound() const
{
return (field_translationType.is_bound())
  || (field_encodingScheme.is_bound())
  || (field_numberingPlan.is_bound())
  || (field_globalTitleAddress.is_bound());
}
boolean SCCP__ASPfield__GlobalTitle__TT__NP__ES::is_value() const
{
return field_translationType.is_value()
  && field_encodingScheme.is_value()
  && field_numberingPlan.is_value()
  && field_globalTitleAddress.is_value();
}
void SCCP__ASPfield__GlobalTitle__TT__NP__ES::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ translationType := ");
field_translationType.log();
TTCN_Logger::log_event_str(", encodingScheme := ");
field_encodingScheme.log();
TTCN_Logger::log_event_str(", numberingPlan := ");
field_numberingPlan.log();
TTCN_Logger::log_event_str(", globalTitleAddress := ");
field_globalTitleAddress.log();
TTCN_Logger::log_event_str(" }");
}

void SCCP__ASPfield__GlobalTitle__TT__NP__ES::set_implicit_omit()
{
if (translationType().is_bound()) translationType().set_implicit_omit();
if (encodingScheme().is_bound()) encodingScheme().set_implicit_omit();
if (numberingPlan().is_bound()) numberingPlan().set_implicit_omit();
if (globalTitleAddress().is_bound()) globalTitleAddress().set_implicit_omit();
}

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

void SCCP__ASPfield__GlobalTitle__TT__NP__ES::encode_text(Text_Buf& text_buf) const
{
field_translationType.encode_text(text_buf);
field_encodingScheme.encode_text(text_buf);
field_numberingPlan.encode_text(text_buf);
field_globalTitleAddress.encode_text(text_buf);
}

void SCCP__ASPfield__GlobalTitle__TT__NP__ES::decode_text(Text_Buf& text_buf)
{
field_translationType.decode_text(text_buf);
field_encodingScheme.decode_text(text_buf);
field_numberingPlan.decode_text(text_buf);
field_globalTitleAddress.decode_text(text_buf);
}

struct SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::single_value_struct {
OCTETSTRING_template field_translationType;
BITSTRING_template field_encodingScheme;
BITSTRING_template field_numberingPlan;
HEXSTRING_template field_globalTitleAddress;
};

void SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_translationType = ANY_VALUE;
single_value->field_encodingScheme = ANY_VALUE;
single_value->field_numberingPlan = ANY_VALUE;
single_value->field_globalTitleAddress = ANY_VALUE;
}
}
}

void SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::copy_value(const SCCP__ASPfield__GlobalTitle__TT__NP__ES& other_value)
{
single_value = new single_value_struct;
if (other_value.translationType().is_bound()) {
  single_value->field_translationType = other_value.translationType();
} else {
  single_value->field_translationType.clean_up();
}
if (other_value.encodingScheme().is_bound()) {
  single_value->field_encodingScheme = other_value.encodingScheme();
} else {
  single_value->field_encodingScheme.clean_up();
}
if (other_value.numberingPlan().is_bound()) {
  single_value->field_numberingPlan = other_value.numberingPlan();
} else {
  single_value->field_numberingPlan.clean_up();
}
if (other_value.globalTitleAddress().is_bound()) {
  single_value->field_globalTitleAddress = other_value.globalTitleAddress();
} else {
  single_value->field_globalTitleAddress.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::copy_template(const SCCP__ASPfield__GlobalTitle__TT__NP__ES_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.translationType().get_selection()) {
single_value->field_translationType = other_value.translationType();
} else {
single_value->field_translationType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.encodingScheme().get_selection()) {
single_value->field_encodingScheme = other_value.encodingScheme();
} else {
single_value->field_encodingScheme.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.numberingPlan().get_selection()) {
single_value->field_numberingPlan = other_value.numberingPlan();
} else {
single_value->field_numberingPlan.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.globalTitleAddress().get_selection()) {
single_value->field_globalTitleAddress = other_value.globalTitleAddress();
} else {
single_value->field_globalTitleAddress.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new SCCP__ASPfield__GlobalTitle__TT__NP__ES_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 SCCP__ASPfield__GlobalTitle__TT__NP__ES_template(*other_value.implication_.precondition);
implication_.implied_template = new SCCP__ASPfield__GlobalTitle__TT__NP__ES_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT_NP_ES.");
break;
}
set_selection(other_value);
}

SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::SCCP__ASPfield__GlobalTitle__TT__NP__ES_template()
{
}

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

SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::SCCP__ASPfield__GlobalTitle__TT__NP__ES_template(const SCCP__ASPfield__GlobalTitle__TT__NP__ES& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::match(const SCCP__ASPfield__GlobalTitle__TT__NP__ES& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.translationType().is_bound()) return FALSE;
if(!single_value->field_translationType.match(other_value.translationType(), legacy))return FALSE;
if(!other_value.encodingScheme().is_bound()) return FALSE;
if(!single_value->field_encodingScheme.match(other_value.encodingScheme(), legacy))return FALSE;
if(!other_value.numberingPlan().is_bound()) return FALSE;
if(!single_value->field_numberingPlan.match(other_value.numberingPlan(), legacy))return FALSE;
if(!other_value.globalTitleAddress().is_bound()) return FALSE;
if(!single_value->field_globalTitleAddress.match(other_value.globalTitleAddress(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT_NP_ES.");
}
return FALSE;
}

boolean SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_translationType.is_bound()
 || single_value->field_encodingScheme.is_bound()
 || single_value->field_numberingPlan.is_bound()
 || single_value->field_globalTitleAddress.is_bound();
}

boolean SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_translationType.is_value()
 && single_value->field_encodingScheme.is_value()
 && single_value->field_numberingPlan.is_value()
 && single_value->field_globalTitleAddress.is_value();
}

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

SCCP__ASPfield__GlobalTitle__TT__NP__ES SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT_NP_ES.");
SCCP__ASPfield__GlobalTitle__TT__NP__ES ret_val;
if (single_value->field_translationType.is_bound()) {
ret_val.translationType() = single_value->field_translationType.valueof();
}
if (single_value->field_encodingScheme.is_bound()) {
ret_val.encodingScheme() = single_value->field_encodingScheme.valueof();
}
if (single_value->field_numberingPlan.is_bound()) {
ret_val.numberingPlan() = single_value->field_numberingPlan.valueof();
}
if (single_value->field_globalTitleAddress.is_bound()) {
ret_val.globalTitleAddress() = single_value->field_globalTitleAddress.valueof();
}
return ret_val;
}

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

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

OCTETSTRING_template& SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::translationType()
{
set_specific();
return single_value->field_translationType;
}

const OCTETSTRING_template& SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::translationType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field translationType of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT_NP_ES.");
return single_value->field_translationType;
}

BITSTRING_template& SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::encodingScheme()
{
set_specific();
return single_value->field_encodingScheme;
}

const BITSTRING_template& SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::encodingScheme() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field encodingScheme of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT_NP_ES.");
return single_value->field_encodingScheme;
}

BITSTRING_template& SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::numberingPlan()
{
set_specific();
return single_value->field_numberingPlan;
}

const BITSTRING_template& SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::numberingPlan() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field numberingPlan of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT_NP_ES.");
return single_value->field_numberingPlan;
}

HEXSTRING_template& SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::globalTitleAddress()
{
set_specific();
return single_value->field_globalTitleAddress;
}

const HEXSTRING_template& SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::globalTitleAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field globalTitleAddress of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_GlobalTitle_TT_NP_ES.");
return single_value->field_globalTitleAddress;
}

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

void SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ translationType := ");
single_value->field_translationType.log();
TTCN_Logger::log_event_str(", encodingScheme := ");
single_value->field_encodingScheme.log();
TTCN_Logger::log_event_str(", numberingPlan := ");
single_value->field_numberingPlan.log();
TTCN_Logger::log_event_str(", globalTitleAddress := ");
single_value->field_globalTitleAddress.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void SCCP__ASPfield__GlobalTitle__TT__NP__ES_template::log_match(const SCCP__ASPfield__GlobalTitle__TT__NP__ES& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_translationType.match(match_value.translationType(), legacy)){
TTCN_Logger::log_logmatch_info(".translationType");
single_value->field_translationType.log_match(match_value.translationType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_encodingScheme.match(match_value.encodingScheme(), legacy)){
TTCN_Logger::log_logmatch_info(".encodingScheme");
single_value->field_encodingScheme.log_match(match_value.encodingScheme(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_numberingPlan.match(match_value.numberingPlan(), legacy)){
TTCN_Logger::log_logmatch_info(".numberingPlan");
single_value->field_numberingPlan.log_match(match_value.numberingPlan(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_globalTitleAddress.match(match_value.globalTitleAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".globalTitleAddress");
single_value->field_globalTitleAddress.log_match(match_value.globalTitleAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ translationType := ");
single_value->field_translationType.log_match(match_value.translationType(), legacy);
TTCN_Logger::log_event_str(", encodingScheme := ");
single_value->field_encodingScheme.log_match(match_value.encodingScheme(), legacy);
TTCN_Logger::log_event_str(", numberingPlan := ");
single_value->field_numberingPlan.log_match(match_value.numberingPlan(), legacy);
TTCN_Logger::log_event_str(", globalTitleAddress := ");
single_value->field_globalTitleAddress.log_match(match_value.globalTitleAddress(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA::SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA()
{
}

SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA::SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA(const OCTETSTRING& par_translationType,
    const BITSTRING& par_encodingScheme,
    const BITSTRING& par_numberingPlan,
    const BITSTRING& par_natureOfAddress,
    const HEXSTRING& par_globalTitleAddress)
  :   field_translationType(par_translationType),
  field_encodingScheme(par_encodingScheme),
  field_numberingPlan(par_numberingPlan),
  field_natureOfAddress(par_natureOfAddress),
  field_globalTitleAddress(par_globalTitleAddress)
{
}

SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA::SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA(const SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA.");
if (other_value.translationType().is_bound()) field_translationType = other_value.translationType();
else field_translationType.clean_up();
if (other_value.encodingScheme().is_bound()) field_encodingScheme = other_value.encodingScheme();
else field_encodingScheme.clean_up();
if (other_value.numberingPlan().is_bound()) field_numberingPlan = other_value.numberingPlan();
else field_numberingPlan.clean_up();
if (other_value.natureOfAddress().is_bound()) field_natureOfAddress = other_value.natureOfAddress();
else field_natureOfAddress.clean_up();
if (other_value.globalTitleAddress().is_bound()) field_globalTitleAddress = other_value.globalTitleAddress();
else field_globalTitleAddress.clean_up();
}

void SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA::clean_up()
{
field_translationType.clean_up();
field_encodingScheme.clean_up();
field_numberingPlan.clean_up();
field_natureOfAddress.clean_up();
field_globalTitleAddress.clean_up();
}

const TTCN_Typedescriptor_t* SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA::get_descriptor() const { return &SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_descr_; }
SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA& SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA::operator=(const SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA.");
  if (other_value.translationType().is_bound()) field_translationType = other_value.translationType();
  else field_translationType.clean_up();
  if (other_value.encodingScheme().is_bound()) field_encodingScheme = other_value.encodingScheme();
  else field_encodingScheme.clean_up();
  if (other_value.numberingPlan().is_bound()) field_numberingPlan = other_value.numberingPlan();
  else field_numberingPlan.clean_up();
  if (other_value.natureOfAddress().is_bound()) field_natureOfAddress = other_value.natureOfAddress();
  else field_natureOfAddress.clean_up();
  if (other_value.globalTitleAddress().is_bound()) field_globalTitleAddress = other_value.globalTitleAddress();
  else field_globalTitleAddress.clean_up();
}
return *this;
}

boolean SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA::operator==(const SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA& other_value) const
{
return field_translationType==other_value.field_translationType
  && field_encodingScheme==other_value.field_encodingScheme
  && field_numberingPlan==other_value.field_numberingPlan
  && field_natureOfAddress==other_value.field_natureOfAddress
  && field_globalTitleAddress==other_value.field_globalTitleAddress;
}

boolean SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA::is_bound() const
{
return (field_translationType.is_bound())
  || (field_encodingScheme.is_bound())
  || (field_numberingPlan.is_bound())
  || (field_natureOfAddress.is_bound())
  || (field_globalTitleAddress.is_bound());
}
boolean SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA::is_value() const
{
return field_translationType.is_value()
  && field_encodingScheme.is_value()
  && field_numberingPlan.is_value()
  && field_natureOfAddress.is_value()
  && field_globalTitleAddress.is_value();
}
void SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ translationType := ");
field_translationType.log();
TTCN_Logger::log_event_str(", encodingScheme := ");
field_encodingScheme.log();
TTCN_Logger::log_event_str(", numberingPlan := ");
field_numberingPlan.log();
TTCN_Logger::log_event_str(", natureOfAddress := ");
field_natureOfAddress.log();
TTCN_Logger::log_event_str(", globalTitleAddress := ");
field_globalTitleAddress.log();
TTCN_Logger::log_event_str(" }");
}

void SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA::set_implicit_omit()
{
if (translationType().is_bound()) translationType().set_implicit_omit();
if (encodingScheme().is_bound()) encodingScheme().set_implicit_omit();
if (numberingPlan().is_bound()) numberingPlan().set_implicit_omit();
if (natureOfAddress().is_bound()) natureOfAddress().set_implicit_omit();
if (globalTitleAddress().is_bound()) globalTitleAddress().set_implicit_omit();
}

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

void SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA::encode_text(Text_Buf& text_buf) const
{
field_translationType.encode_text(text_buf);
field_encodingScheme.encode_text(text_buf);
field_numberingPlan.encode_text(text_buf);
field_natureOfAddress.encode_text(text_buf);
field_globalTitleAddress.encode_text(text_buf);
}

void SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA::decode_text(Text_Buf& text_buf)
{
field_translationType.decode_text(text_buf);
field_encodingScheme.decode_text(text_buf);
field_numberingPlan.decode_text(text_buf);
field_natureOfAddress.decode_text(text_buf);
field_globalTitleAddress.decode_text(text_buf);
}

struct SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::single_value_struct {
OCTETSTRING_template field_translationType;
BITSTRING_template field_encodingScheme;
BITSTRING_template field_numberingPlan;
BITSTRING_template field_natureOfAddress;
HEXSTRING_template field_globalTitleAddress;
};

void SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_translationType = ANY_VALUE;
single_value->field_encodingScheme = ANY_VALUE;
single_value->field_numberingPlan = ANY_VALUE;
single_value->field_natureOfAddress = ANY_VALUE;
single_value->field_globalTitleAddress = ANY_VALUE;
}
}
}

void SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::copy_value(const SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA& other_value)
{
single_value = new single_value_struct;
if (other_value.translationType().is_bound()) {
  single_value->field_translationType = other_value.translationType();
} else {
  single_value->field_translationType.clean_up();
}
if (other_value.encodingScheme().is_bound()) {
  single_value->field_encodingScheme = other_value.encodingScheme();
} else {
  single_value->field_encodingScheme.clean_up();
}
if (other_value.numberingPlan().is_bound()) {
  single_value->field_numberingPlan = other_value.numberingPlan();
} else {
  single_value->field_numberingPlan.clean_up();
}
if (other_value.natureOfAddress().is_bound()) {
  single_value->field_natureOfAddress = other_value.natureOfAddress();
} else {
  single_value->field_natureOfAddress.clean_up();
}
if (other_value.globalTitleAddress().is_bound()) {
  single_value->field_globalTitleAddress = other_value.globalTitleAddress();
} else {
  single_value->field_globalTitleAddress.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::copy_template(const SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.translationType().get_selection()) {
single_value->field_translationType = other_value.translationType();
} else {
single_value->field_translationType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.encodingScheme().get_selection()) {
single_value->field_encodingScheme = other_value.encodingScheme();
} else {
single_value->field_encodingScheme.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.numberingPlan().get_selection()) {
single_value->field_numberingPlan = other_value.numberingPlan();
} else {
single_value->field_numberingPlan.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.natureOfAddress().get_selection()) {
single_value->field_natureOfAddress = other_value.natureOfAddress();
} else {
single_value->field_natureOfAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.globalTitleAddress().get_selection()) {
single_value->field_globalTitleAddress = other_value.globalTitleAddress();
} else {
single_value->field_globalTitleAddress.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_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 SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template(*other_value.implication_.precondition);
implication_.implied_template = new SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA.");
break;
}
set_selection(other_value);
}

SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template()
{
}

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

SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template(const SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::match(const SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.translationType().is_bound()) return FALSE;
if(!single_value->field_translationType.match(other_value.translationType(), legacy))return FALSE;
if(!other_value.encodingScheme().is_bound()) return FALSE;
if(!single_value->field_encodingScheme.match(other_value.encodingScheme(), legacy))return FALSE;
if(!other_value.numberingPlan().is_bound()) return FALSE;
if(!single_value->field_numberingPlan.match(other_value.numberingPlan(), legacy))return FALSE;
if(!other_value.natureOfAddress().is_bound()) return FALSE;
if(!single_value->field_natureOfAddress.match(other_value.natureOfAddress(), legacy))return FALSE;
if(!other_value.globalTitleAddress().is_bound()) return FALSE;
if(!single_value->field_globalTitleAddress.match(other_value.globalTitleAddress(), legacy))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA.");
}
return FALSE;
}

boolean SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_translationType.is_bound()
 || single_value->field_encodingScheme.is_bound()
 || single_value->field_numberingPlan.is_bound()
 || single_value->field_natureOfAddress.is_bound()
 || single_value->field_globalTitleAddress.is_bound();
}

boolean SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_translationType.is_value()
 && single_value->field_encodingScheme.is_value()
 && single_value->field_numberingPlan.is_value()
 && single_value->field_natureOfAddress.is_value()
 && single_value->field_globalTitleAddress.is_value();
}

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

SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA.");
SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA ret_val;
if (single_value->field_translationType.is_bound()) {
ret_val.translationType() = single_value->field_translationType.valueof();
}
if (single_value->field_encodingScheme.is_bound()) {
ret_val.encodingScheme() = single_value->field_encodingScheme.valueof();
}
if (single_value->field_numberingPlan.is_bound()) {
ret_val.numberingPlan() = single_value->field_numberingPlan.valueof();
}
if (single_value->field_natureOfAddress.is_bound()) {
ret_val.natureOfAddress() = single_value->field_natureOfAddress.valueof();
}
if (single_value->field_globalTitleAddress.is_bound()) {
ret_val.globalTitleAddress() = single_value->field_globalTitleAddress.valueof();
}
return ret_val;
}

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

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

OCTETSTRING_template& SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::translationType()
{
set_specific();
return single_value->field_translationType;
}

const OCTETSTRING_template& SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::translationType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field translationType of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA.");
return single_value->field_translationType;
}

BITSTRING_template& SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::encodingScheme()
{
set_specific();
return single_value->field_encodingScheme;
}

const BITSTRING_template& SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::encodingScheme() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field encodingScheme of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA.");
return single_value->field_encodingScheme;
}

BITSTRING_template& SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::numberingPlan()
{
set_specific();
return single_value->field_numberingPlan;
}

const BITSTRING_template& SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::numberingPlan() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field numberingPlan of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA.");
return single_value->field_numberingPlan;
}

BITSTRING_template& SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::natureOfAddress()
{
set_specific();
return single_value->field_natureOfAddress;
}

const BITSTRING_template& SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::natureOfAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field natureOfAddress of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA.");
return single_value->field_natureOfAddress;
}

HEXSTRING_template& SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::globalTitleAddress()
{
set_specific();
return single_value->field_globalTitleAddress;
}

const HEXSTRING_template& SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::globalTitleAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field globalTitleAddress of a non-specific template of type @SCCPasp_Types.SCCP_ASPfield_SignallingPointCode_TT_NP_ES_NoA.");
return single_value->field_globalTitleAddress;
}

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

void SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ translationType := ");
single_value->field_translationType.log();
TTCN_Logger::log_event_str(", encodingScheme := ");
single_value->field_encodingScheme.log();
TTCN_Logger::log_event_str(", numberingPlan := ");
single_value->field_numberingPlan.log();
TTCN_Logger::log_event_str(", natureOfAddress := ");
single_value->field_natureOfAddress.log();
TTCN_Logger::log_event_str(", globalTitleAddress := ");
single_value->field_globalTitleAddress.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA_template::log_match(const SCCP__ASPfield__SignallingPointCode__TT__NP__ES__NoA& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_translationType.match(match_value.translationType(), legacy)){
TTCN_Logger::log_logmatch_info(".translationType");
single_value->field_translationType.log_match(match_value.translationType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_encodingScheme.match(match_value.encodingScheme(), legacy)){
TTCN_Logger::log_logmatch_info(".encodingScheme");
single_value->field_encodingScheme.log_match(match_value.encodingScheme(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_numberingPlan.match(match_value.numberingPlan(), legacy)){
TTCN_Logger::log_logmatch_info(".numberingPlan");
single_value->field_numberingPlan.log_match(match_value.numberingPlan(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_natureOfAddress.match(match_value.natureOfAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".natureOfAddress");
single_value->field_natureOfAddress.log_match(match_value.natureOfAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_globalTitleAddress.match(match_value.globalTitleAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".globalTitleAddress");
single_value->field_globalTitleAddress.log_match(match_value.globalTitleAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ translationType := ");
single_value->field_translationType.log_match(match_value.translationType(), legacy);
TTCN_Logger::log_event_str(", encodingScheme := ");
single_value->field_encodingScheme.log_match(match_value.encodingScheme(), legacy);
TTCN_Logger::log_event_str(", numberingPlan := ");
single_value->field_numberingPlan.log_match(match_value.numberingPlan(), legacy);
TTCN_Logger::log_event_str(", natureOfAddress := ");
single_value->field_natureOfAddress.log_match(match_value.natureOfAddress(), legacy);
TTCN_Logger::log_event_str(", globalTitleAddress := ");
single_value->field_globalTitleAddress.log_match(match_value.globalTitleAddress(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

SCCP__PAR__Address::SCCP__PAR__Address()
{
}

SCCP__PAR__Address::SCCP__PAR__Address(const SCCP__ASPfield__AddressIndicator& par_addressIndicator,
    const OPTIONAL< BITSTRING >& par_signPointCode,
    const OPTIONAL< INTEGER >& par_subsystemNumber,
    const OPTIONAL< SCCP__ASPfield__GlobalTitle >& par_globalTitle)
  :   field_addressIndicator(par_addressIndicator),
  field_signPointCode(par_signPointCode),
  field_subsystemNumber(par_subsystemNumber),
  field_globalTitle(par_globalTitle)
{
}

SCCP__PAR__Address::SCCP__PAR__Address(const SCCP__PAR__Address& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.SCCP_PAR_Address.");
if (other_value.addressIndicator().is_bound()) field_addressIndicator = other_value.addressIndicator();
else field_addressIndicator.clean_up();
if (other_value.signPointCode().is_bound()) field_signPointCode = other_value.signPointCode();
else field_signPointCode.clean_up();
if (other_value.subsystemNumber().is_bound()) field_subsystemNumber = other_value.subsystemNumber();
else field_subsystemNumber.clean_up();
if (other_value.globalTitle().is_bound()) field_globalTitle = other_value.globalTitle();
else field_globalTitle.clean_up();
}

void SCCP__PAR__Address::clean_up()
{
field_addressIndicator.clean_up();
field_signPointCode.clean_up();
field_subsystemNumber.clean_up();
field_globalTitle.clean_up();
}

const TTCN_Typedescriptor_t* SCCP__PAR__Address::get_descriptor() const { return &SCCP__PAR__Address_descr_; }
SCCP__PAR__Address& SCCP__PAR__Address::operator=(const SCCP__PAR__Address& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.SCCP_PAR_Address.");
  if (other_value.addressIndicator().is_bound()) field_addressIndicator = other_value.addressIndicator();
  else field_addressIndicator.clean_up();
  if (other_value.signPointCode().is_bound()) field_signPointCode = other_value.signPointCode();
  else field_signPointCode.clean_up();
  if (other_value.subsystemNumber().is_bound()) field_subsystemNumber = other_value.subsystemNumber();
  else field_subsystemNumber.clean_up();
  if (other_value.globalTitle().is_bound()) field_globalTitle = other_value.globalTitle();
  else field_globalTitle.clean_up();
}
return *this;
}

boolean SCCP__PAR__Address::operator==(const SCCP__PAR__Address& other_value) const
{
return field_addressIndicator==other_value.field_addressIndicator
  && field_signPointCode==other_value.field_signPointCode
  && field_subsystemNumber==other_value.field_subsystemNumber
  && field_globalTitle==other_value.field_globalTitle;
}

boolean SCCP__PAR__Address::is_bound() const
{
return (field_addressIndicator.is_bound())
  || (OPTIONAL_OMIT == field_signPointCode.get_selection() || field_signPointCode.is_bound())
  || (OPTIONAL_OMIT == field_subsystemNumber.get_selection() || field_subsystemNumber.is_bound())
  || (OPTIONAL_OMIT == field_globalTitle.get_selection() || field_globalTitle.is_bound());
}
boolean SCCP__PAR__Address::is_value() const
{
return field_addressIndicator.is_value()
  && (OPTIONAL_OMIT == field_signPointCode.get_selection() || field_signPointCode.is_value())
  && (OPTIONAL_OMIT == field_subsystemNumber.get_selection() || field_subsystemNumber.is_value())
  && (OPTIONAL_OMIT == field_globalTitle.get_selection() || field_globalTitle.is_value());
}
int SCCP__PAR__Address::size_of() const
{
  int ret_val = 1;
  if (field_signPointCode.ispresent()) ret_val++;
  if (field_subsystemNumber.ispresent()) ret_val++;
  if (field_globalTitle.ispresent()) ret_val++;
  return ret_val;
}

void SCCP__PAR__Address::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ addressIndicator := ");
field_addressIndicator.log();
TTCN_Logger::log_event_str(", signPointCode := ");
field_signPointCode.log();
TTCN_Logger::log_event_str(", subsystemNumber := ");
field_subsystemNumber.log();
TTCN_Logger::log_event_str(", globalTitle := ");
field_globalTitle.log();
TTCN_Logger::log_event_str(" }");
}

void SCCP__PAR__Address::set_implicit_omit()
{
if (addressIndicator().is_bound()) addressIndicator().set_implicit_omit();
if (!signPointCode().is_bound()) signPointCode() = OMIT_VALUE;
else signPointCode().set_implicit_omit();
if (!subsystemNumber().is_bound()) subsystemNumber() = OMIT_VALUE;
else subsystemNumber().set_implicit_omit();
if (!globalTitle().is_bound()) globalTitle() = OMIT_VALUE;
else globalTitle().set_implicit_omit();
}

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

void SCCP__PAR__Address::encode_text(Text_Buf& text_buf) const
{
field_addressIndicator.encode_text(text_buf);
field_signPointCode.encode_text(text_buf);
field_subsystemNumber.encode_text(text_buf);
field_globalTitle.encode_text(text_buf);
}

void SCCP__PAR__Address::decode_text(Text_Buf& text_buf)
{
field_addressIndicator.decode_text(text_buf);
field_signPointCode.decode_text(text_buf);
field_subsystemNumber.decode_text(text_buf);
field_globalTitle.decode_text(text_buf);
}

struct SCCP__PAR__Address_template::single_value_struct {
SCCP__ASPfield__AddressIndicator_template field_addressIndicator;
BITSTRING_template field_signPointCode;
INTEGER_template field_subsystemNumber;
SCCP__ASPfield__GlobalTitle_template field_globalTitle;
};

void SCCP__PAR__Address_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_addressIndicator = ANY_VALUE;
single_value->field_signPointCode = ANY_OR_OMIT;
single_value->field_subsystemNumber = ANY_OR_OMIT;
single_value->field_globalTitle = ANY_OR_OMIT;
}
}
}

void SCCP__PAR__Address_template::copy_value(const SCCP__PAR__Address& other_value)
{
single_value = new single_value_struct;
if (other_value.addressIndicator().is_bound()) {
  single_value->field_addressIndicator = other_value.addressIndicator();
} else {
  single_value->field_addressIndicator.clean_up();
}
if (other_value.signPointCode().is_bound()) {
  if (other_value.signPointCode().ispresent()) single_value->field_signPointCode = other_value.signPointCode()();
  else single_value->field_signPointCode = OMIT_VALUE;
} else {
  single_value->field_signPointCode.clean_up();
}
if (other_value.subsystemNumber().is_bound()) {
  if (other_value.subsystemNumber().ispresent()) single_value->field_subsystemNumber = other_value.subsystemNumber()();
  else single_value->field_subsystemNumber = OMIT_VALUE;
} else {
  single_value->field_subsystemNumber.clean_up();
}
if (other_value.globalTitle().is_bound()) {
  if (other_value.globalTitle().ispresent()) single_value->field_globalTitle = other_value.globalTitle()();
  else single_value->field_globalTitle = OMIT_VALUE;
} else {
  single_value->field_globalTitle.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void SCCP__PAR__Address_template::copy_template(const SCCP__PAR__Address_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.addressIndicator().get_selection()) {
single_value->field_addressIndicator = other_value.addressIndicator();
} else {
single_value->field_addressIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.signPointCode().get_selection()) {
single_value->field_signPointCode = other_value.signPointCode();
} else {
single_value->field_signPointCode.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.subsystemNumber().get_selection()) {
single_value->field_subsystemNumber = other_value.subsystemNumber();
} else {
single_value->field_subsystemNumber.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.globalTitle().get_selection()) {
single_value->field_globalTitle = other_value.globalTitle();
} else {
single_value->field_globalTitle.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new SCCP__PAR__Address_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 SCCP__PAR__Address_template(*other_value.implication_.precondition);
implication_.implied_template = new SCCP__PAR__Address_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.SCCP_PAR_Address.");
break;
}
set_selection(other_value);
}

SCCP__PAR__Address_template::SCCP__PAR__Address_template()
{
}

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

SCCP__PAR__Address_template::SCCP__PAR__Address_template(const SCCP__PAR__Address& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean SCCP__PAR__Address_template::match(const SCCP__PAR__Address& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.addressIndicator().is_bound()) return FALSE;
if(!single_value->field_addressIndicator.match(other_value.addressIndicator(), legacy))return FALSE;
if(!other_value.signPointCode().is_bound()) return FALSE;
if((other_value.signPointCode().ispresent() ? !single_value->field_signPointCode.match((const BITSTRING&)other_value.signPointCode(), legacy) : !single_value->field_signPointCode.match_omit(legacy)))return FALSE;
if(!other_value.subsystemNumber().is_bound()) return FALSE;
if((other_value.subsystemNumber().ispresent() ? !single_value->field_subsystemNumber.match((const INTEGER&)other_value.subsystemNumber(), legacy) : !single_value->field_subsystemNumber.match_omit(legacy)))return FALSE;
if(!other_value.globalTitle().is_bound()) return FALSE;
if((other_value.globalTitle().ispresent() ? !single_value->field_globalTitle.match((const SCCP__ASPfield__GlobalTitle&)other_value.globalTitle(), legacy) : !single_value->field_globalTitle.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.SCCP_PAR_Address.");
}
return FALSE;
}

boolean SCCP__PAR__Address_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_addressIndicator.is_bound()
 || (single_value->field_signPointCode.is_omit() || single_value->field_signPointCode.is_bound())
 || (single_value->field_subsystemNumber.is_omit() || single_value->field_subsystemNumber.is_bound())
 || (single_value->field_globalTitle.is_omit() || single_value->field_globalTitle.is_bound());
}

boolean SCCP__PAR__Address_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_addressIndicator.is_value()
 && (single_value->field_signPointCode.is_omit() || single_value->field_signPointCode.is_value())
 && (single_value->field_subsystemNumber.is_omit() || single_value->field_subsystemNumber.is_value())
 && (single_value->field_globalTitle.is_omit() || single_value->field_globalTitle.is_value());
}

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

SCCP__PAR__Address SCCP__PAR__Address_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.SCCP_PAR_Address.");
SCCP__PAR__Address ret_val;
if (single_value->field_addressIndicator.is_bound()) {
ret_val.addressIndicator() = single_value->field_addressIndicator.valueof();
}
if (single_value->field_signPointCode.is_omit()) ret_val.signPointCode() = OMIT_VALUE;
else if (single_value->field_signPointCode.is_bound()) {
ret_val.signPointCode() = single_value->field_signPointCode.valueof();
}
if (single_value->field_subsystemNumber.is_omit()) ret_val.subsystemNumber() = OMIT_VALUE;
else if (single_value->field_subsystemNumber.is_bound()) {
ret_val.subsystemNumber() = single_value->field_subsystemNumber.valueof();
}
if (single_value->field_globalTitle.is_omit()) ret_val.globalTitle() = OMIT_VALUE;
else if (single_value->field_globalTitle.is_bound()) {
ret_val.globalTitle() = single_value->field_globalTitle.valueof();
}
return ret_val;
}

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

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

SCCP__ASPfield__AddressIndicator_template& SCCP__PAR__Address_template::addressIndicator()
{
set_specific();
return single_value->field_addressIndicator;
}

const SCCP__ASPfield__AddressIndicator_template& SCCP__PAR__Address_template::addressIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field addressIndicator of a non-specific template of type @SCCPasp_Types.SCCP_PAR_Address.");
return single_value->field_addressIndicator;
}

BITSTRING_template& SCCP__PAR__Address_template::signPointCode()
{
set_specific();
return single_value->field_signPointCode;
}

const BITSTRING_template& SCCP__PAR__Address_template::signPointCode() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field signPointCode of a non-specific template of type @SCCPasp_Types.SCCP_PAR_Address.");
return single_value->field_signPointCode;
}

INTEGER_template& SCCP__PAR__Address_template::subsystemNumber()
{
set_specific();
return single_value->field_subsystemNumber;
}

const INTEGER_template& SCCP__PAR__Address_template::subsystemNumber() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field subsystemNumber of a non-specific template of type @SCCPasp_Types.SCCP_PAR_Address.");
return single_value->field_subsystemNumber;
}

SCCP__ASPfield__GlobalTitle_template& SCCP__PAR__Address_template::globalTitle()
{
set_specific();
return single_value->field_globalTitle;
}

const SCCP__ASPfield__GlobalTitle_template& SCCP__PAR__Address_template::globalTitle() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field globalTitle of a non-specific template of type @SCCPasp_Types.SCCP_PAR_Address.");
return single_value->field_globalTitle;
}

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

void SCCP__PAR__Address_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ addressIndicator := ");
single_value->field_addressIndicator.log();
TTCN_Logger::log_event_str(", signPointCode := ");
single_value->field_signPointCode.log();
TTCN_Logger::log_event_str(", subsystemNumber := ");
single_value->field_subsystemNumber.log();
TTCN_Logger::log_event_str(", globalTitle := ");
single_value->field_globalTitle.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void SCCP__PAR__Address_template::log_match(const SCCP__PAR__Address& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_addressIndicator.match(match_value.addressIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".addressIndicator");
single_value->field_addressIndicator.log_match(match_value.addressIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.signPointCode().ispresent()){
if(!single_value->field_signPointCode.match(match_value.signPointCode(), legacy)){
TTCN_Logger::log_logmatch_info(".signPointCode");
single_value->field_signPointCode.log_match(match_value.signPointCode(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_signPointCode.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".signPointCode := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_signPointCode.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.subsystemNumber().ispresent()){
if(!single_value->field_subsystemNumber.match(match_value.subsystemNumber(), legacy)){
TTCN_Logger::log_logmatch_info(".subsystemNumber");
single_value->field_subsystemNumber.log_match(match_value.subsystemNumber(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_subsystemNumber.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".subsystemNumber := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_subsystemNumber.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.globalTitle().ispresent()){
if(!single_value->field_globalTitle.match(match_value.globalTitle(), legacy)){
TTCN_Logger::log_logmatch_info(".globalTitle");
single_value->field_globalTitle.log_match(match_value.globalTitle(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_globalTitle.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".globalTitle := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_globalTitle.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ addressIndicator := ");
single_value->field_addressIndicator.log_match(match_value.addressIndicator(), legacy);
TTCN_Logger::log_event_str(", signPointCode := ");
if (match_value.signPointCode().ispresent()) {
single_value->field_signPointCode.log_match(match_value.signPointCode(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_signPointCode.log();
if (single_value->field_signPointCode.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", subsystemNumber := ");
if (match_value.subsystemNumber().ispresent()) {
single_value->field_subsystemNumber.log_match(match_value.subsystemNumber(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_subsystemNumber.log();
if (single_value->field_subsystemNumber.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", globalTitle := ");
if (match_value.globalTitle().ispresent()) {
single_value->field_globalTitle.log_match(match_value.globalTitle(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_globalTitle.log();
if (single_value->field_globalTitle.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

ASP__SCCP__N__CONNECT__req::ASP__SCCP__N__CONNECT__req()
{
}

ASP__SCCP__N__CONNECT__req::ASP__SCCP__N__CONNECT__req(const SCCP__PAR__Address& par_calledAddress,
    const OPTIONAL< SCCP__PAR__Address >& par_callingAddress,
    const OPTIONAL< INTEGER >& par_expeditedDataSel,
    const OPTIONAL< INTEGER >& par_qualityOfService,
    const OPTIONAL< OCTETSTRING >& par_userData,
    const OPTIONAL< INTEGER >& par_connectionId,
    const OPTIONAL< INTEGER >& par_importance)
  :   field_calledAddress(par_calledAddress),
  field_callingAddress(par_callingAddress),
  field_expeditedDataSel(par_expeditedDataSel),
  field_qualityOfService(par_qualityOfService),
  field_userData(par_userData),
  field_connectionId(par_connectionId),
  field_importance(par_importance)
{
}

ASP__SCCP__N__CONNECT__req::ASP__SCCP__N__CONNECT__req(const ASP__SCCP__N__CONNECT__req& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.");
if (other_value.calledAddress().is_bound()) field_calledAddress = other_value.calledAddress();
else field_calledAddress.clean_up();
if (other_value.callingAddress().is_bound()) field_callingAddress = other_value.callingAddress();
else field_callingAddress.clean_up();
if (other_value.expeditedDataSel().is_bound()) field_expeditedDataSel = other_value.expeditedDataSel();
else field_expeditedDataSel.clean_up();
if (other_value.qualityOfService().is_bound()) field_qualityOfService = other_value.qualityOfService();
else field_qualityOfService.clean_up();
if (other_value.userData().is_bound()) field_userData = other_value.userData();
else field_userData.clean_up();
if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
else field_connectionId.clean_up();
if (other_value.importance().is_bound()) field_importance = other_value.importance();
else field_importance.clean_up();
}

void ASP__SCCP__N__CONNECT__req::clean_up()
{
field_calledAddress.clean_up();
field_callingAddress.clean_up();
field_expeditedDataSel.clean_up();
field_qualityOfService.clean_up();
field_userData.clean_up();
field_connectionId.clean_up();
field_importance.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__CONNECT__req::get_descriptor() const { return &ASP__SCCP__N__CONNECT__req_descr_; }
ASP__SCCP__N__CONNECT__req& ASP__SCCP__N__CONNECT__req::operator=(const ASP__SCCP__N__CONNECT__req& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.");
  if (other_value.calledAddress().is_bound()) field_calledAddress = other_value.calledAddress();
  else field_calledAddress.clean_up();
  if (other_value.callingAddress().is_bound()) field_callingAddress = other_value.callingAddress();
  else field_callingAddress.clean_up();
  if (other_value.expeditedDataSel().is_bound()) field_expeditedDataSel = other_value.expeditedDataSel();
  else field_expeditedDataSel.clean_up();
  if (other_value.qualityOfService().is_bound()) field_qualityOfService = other_value.qualityOfService();
  else field_qualityOfService.clean_up();
  if (other_value.userData().is_bound()) field_userData = other_value.userData();
  else field_userData.clean_up();
  if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
  else field_connectionId.clean_up();
  if (other_value.importance().is_bound()) field_importance = other_value.importance();
  else field_importance.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__CONNECT__req::operator==(const ASP__SCCP__N__CONNECT__req& other_value) const
{
return field_calledAddress==other_value.field_calledAddress
  && field_callingAddress==other_value.field_callingAddress
  && field_expeditedDataSel==other_value.field_expeditedDataSel
  && field_qualityOfService==other_value.field_qualityOfService
  && field_userData==other_value.field_userData
  && field_connectionId==other_value.field_connectionId
  && field_importance==other_value.field_importance;
}

boolean ASP__SCCP__N__CONNECT__req::is_bound() const
{
return (field_calledAddress.is_bound())
  || (OPTIONAL_OMIT == field_callingAddress.get_selection() || field_callingAddress.is_bound())
  || (OPTIONAL_OMIT == field_expeditedDataSel.get_selection() || field_expeditedDataSel.is_bound())
  || (OPTIONAL_OMIT == field_qualityOfService.get_selection() || field_qualityOfService.is_bound())
  || (OPTIONAL_OMIT == field_userData.get_selection() || field_userData.is_bound())
  || (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_bound())
  || (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_bound());
}
boolean ASP__SCCP__N__CONNECT__req::is_value() const
{
return field_calledAddress.is_value()
  && (OPTIONAL_OMIT == field_callingAddress.get_selection() || field_callingAddress.is_value())
  && (OPTIONAL_OMIT == field_expeditedDataSel.get_selection() || field_expeditedDataSel.is_value())
  && (OPTIONAL_OMIT == field_qualityOfService.get_selection() || field_qualityOfService.is_value())
  && (OPTIONAL_OMIT == field_userData.get_selection() || field_userData.is_value())
  && (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_value())
  && (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_value());
}
int ASP__SCCP__N__CONNECT__req::size_of() const
{
  int ret_val = 1;
  if (field_callingAddress.ispresent()) ret_val++;
  if (field_expeditedDataSel.ispresent()) ret_val++;
  if (field_qualityOfService.ispresent()) ret_val++;
  if (field_userData.ispresent()) ret_val++;
  if (field_connectionId.ispresent()) ret_val++;
  if (field_importance.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__CONNECT__req::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ calledAddress := ");
field_calledAddress.log();
TTCN_Logger::log_event_str(", callingAddress := ");
field_callingAddress.log();
TTCN_Logger::log_event_str(", expeditedDataSel := ");
field_expeditedDataSel.log();
TTCN_Logger::log_event_str(", qualityOfService := ");
field_qualityOfService.log();
TTCN_Logger::log_event_str(", userData := ");
field_userData.log();
TTCN_Logger::log_event_str(", connectionId := ");
field_connectionId.log();
TTCN_Logger::log_event_str(", importance := ");
field_importance.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__CONNECT__req::set_implicit_omit()
{
if (calledAddress().is_bound()) calledAddress().set_implicit_omit();
if (!callingAddress().is_bound()) callingAddress() = OMIT_VALUE;
else callingAddress().set_implicit_omit();
if (!expeditedDataSel().is_bound()) expeditedDataSel() = OMIT_VALUE;
else expeditedDataSel().set_implicit_omit();
if (!qualityOfService().is_bound()) qualityOfService() = OMIT_VALUE;
else qualityOfService().set_implicit_omit();
if (!userData().is_bound()) userData() = OMIT_VALUE;
else userData().set_implicit_omit();
if (!connectionId().is_bound()) connectionId() = OMIT_VALUE;
else connectionId().set_implicit_omit();
if (!importance().is_bound()) importance() = OMIT_VALUE;
else importance().set_implicit_omit();
}

void ASP__SCCP__N__CONNECT__req::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (7<param.get_size()) {
      param.error("record value of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_req has 7 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) calledAddress().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) callingAddress().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) expeditedDataSel().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) qualityOfService().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) userData().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) connectionId().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) importance().set_param(*param.get_elem(6));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "calledAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          calledAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "callingAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          callingAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "expeditedDataSel")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          expeditedDataSel().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "qualityOfService")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          qualityOfService().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "userData")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          userData().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "connectionId")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          connectionId().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "importance")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          importance().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @SCCPasp_Types.ASP_SCCP_N_CONNECT_req: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req");
  }
}

void ASP__SCCP__N__CONNECT__req::encode_text(Text_Buf& text_buf) const
{
field_calledAddress.encode_text(text_buf);
field_callingAddress.encode_text(text_buf);
field_expeditedDataSel.encode_text(text_buf);
field_qualityOfService.encode_text(text_buf);
field_userData.encode_text(text_buf);
field_connectionId.encode_text(text_buf);
field_importance.encode_text(text_buf);
}

void ASP__SCCP__N__CONNECT__req::decode_text(Text_Buf& text_buf)
{
field_calledAddress.decode_text(text_buf);
field_callingAddress.decode_text(text_buf);
field_expeditedDataSel.decode_text(text_buf);
field_qualityOfService.decode_text(text_buf);
field_userData.decode_text(text_buf);
field_connectionId.decode_text(text_buf);
field_importance.decode_text(text_buf);
}

struct ASP__SCCP__N__CONNECT__req_template::single_value_struct {
SCCP__PAR__Address_template field_calledAddress;
SCCP__PAR__Address_template field_callingAddress;
INTEGER_template field_expeditedDataSel;
INTEGER_template field_qualityOfService;
OCTETSTRING_template field_userData;
INTEGER_template field_connectionId;
INTEGER_template field_importance;
};

void ASP__SCCP__N__CONNECT__req_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_calledAddress = ANY_VALUE;
single_value->field_callingAddress = ANY_OR_OMIT;
single_value->field_expeditedDataSel = ANY_OR_OMIT;
single_value->field_qualityOfService = ANY_OR_OMIT;
single_value->field_userData = ANY_OR_OMIT;
single_value->field_connectionId = ANY_OR_OMIT;
single_value->field_importance = ANY_OR_OMIT;
}
}
}

void ASP__SCCP__N__CONNECT__req_template::copy_value(const ASP__SCCP__N__CONNECT__req& other_value)
{
single_value = new single_value_struct;
if (other_value.calledAddress().is_bound()) {
  single_value->field_calledAddress = other_value.calledAddress();
} else {
  single_value->field_calledAddress.clean_up();
}
if (other_value.callingAddress().is_bound()) {
  if (other_value.callingAddress().ispresent()) single_value->field_callingAddress = other_value.callingAddress()();
  else single_value->field_callingAddress = OMIT_VALUE;
} else {
  single_value->field_callingAddress.clean_up();
}
if (other_value.expeditedDataSel().is_bound()) {
  if (other_value.expeditedDataSel().ispresent()) single_value->field_expeditedDataSel = other_value.expeditedDataSel()();
  else single_value->field_expeditedDataSel = OMIT_VALUE;
} else {
  single_value->field_expeditedDataSel.clean_up();
}
if (other_value.qualityOfService().is_bound()) {
  if (other_value.qualityOfService().ispresent()) single_value->field_qualityOfService = other_value.qualityOfService()();
  else single_value->field_qualityOfService = OMIT_VALUE;
} else {
  single_value->field_qualityOfService.clean_up();
}
if (other_value.userData().is_bound()) {
  if (other_value.userData().ispresent()) single_value->field_userData = other_value.userData()();
  else single_value->field_userData = OMIT_VALUE;
} else {
  single_value->field_userData.clean_up();
}
if (other_value.connectionId().is_bound()) {
  if (other_value.connectionId().ispresent()) single_value->field_connectionId = other_value.connectionId()();
  else single_value->field_connectionId = OMIT_VALUE;
} else {
  single_value->field_connectionId.clean_up();
}
if (other_value.importance().is_bound()) {
  if (other_value.importance().ispresent()) single_value->field_importance = other_value.importance()();
  else single_value->field_importance = OMIT_VALUE;
} else {
  single_value->field_importance.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ASP__SCCP__N__CONNECT__req_template::copy_template(const ASP__SCCP__N__CONNECT__req_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.calledAddress().get_selection()) {
single_value->field_calledAddress = other_value.calledAddress();
} else {
single_value->field_calledAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.callingAddress().get_selection()) {
single_value->field_callingAddress = other_value.callingAddress();
} else {
single_value->field_callingAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.expeditedDataSel().get_selection()) {
single_value->field_expeditedDataSel = other_value.expeditedDataSel();
} else {
single_value->field_expeditedDataSel.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.qualityOfService().get_selection()) {
single_value->field_qualityOfService = other_value.qualityOfService();
} else {
single_value->field_qualityOfService.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.userData().get_selection()) {
single_value->field_userData = other_value.userData();
} else {
single_value->field_userData.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.connectionId().get_selection()) {
single_value->field_connectionId = other_value.connectionId();
} else {
single_value->field_connectionId.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.importance().get_selection()) {
single_value->field_importance = other_value.importance();
} else {
single_value->field_importance.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ASP__SCCP__N__CONNECT__req_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new ASP__SCCP__N__CONNECT__req_template(*other_value.implication_.precondition);
implication_.implied_template = new ASP__SCCP__N__CONNECT__req_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.");
break;
}
set_selection(other_value);
}

ASP__SCCP__N__CONNECT__req_template::ASP__SCCP__N__CONNECT__req_template()
{
}

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

ASP__SCCP__N__CONNECT__req_template::ASP__SCCP__N__CONNECT__req_template(const ASP__SCCP__N__CONNECT__req& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__CONNECT__req_template::match(const ASP__SCCP__N__CONNECT__req& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.calledAddress().is_bound()) return FALSE;
if(!single_value->field_calledAddress.match(other_value.calledAddress(), legacy))return FALSE;
if(!other_value.callingAddress().is_bound()) return FALSE;
if((other_value.callingAddress().ispresent() ? !single_value->field_callingAddress.match((const SCCP__PAR__Address&)other_value.callingAddress(), legacy) : !single_value->field_callingAddress.match_omit(legacy)))return FALSE;
if(!other_value.expeditedDataSel().is_bound()) return FALSE;
if((other_value.expeditedDataSel().ispresent() ? !single_value->field_expeditedDataSel.match((const INTEGER&)other_value.expeditedDataSel(), legacy) : !single_value->field_expeditedDataSel.match_omit(legacy)))return FALSE;
if(!other_value.qualityOfService().is_bound()) return FALSE;
if((other_value.qualityOfService().ispresent() ? !single_value->field_qualityOfService.match((const INTEGER&)other_value.qualityOfService(), legacy) : !single_value->field_qualityOfService.match_omit(legacy)))return FALSE;
if(!other_value.userData().is_bound()) return FALSE;
if((other_value.userData().ispresent() ? !single_value->field_userData.match((const OCTETSTRING&)other_value.userData(), legacy) : !single_value->field_userData.match_omit(legacy)))return FALSE;
if(!other_value.connectionId().is_bound()) return FALSE;
if((other_value.connectionId().ispresent() ? !single_value->field_connectionId.match((const INTEGER&)other_value.connectionId(), legacy) : !single_value->field_connectionId.match_omit(legacy)))return FALSE;
if(!other_value.importance().is_bound()) return FALSE;
if((other_value.importance().ispresent() ? !single_value->field_importance.match((const INTEGER&)other_value.importance(), legacy) : !single_value->field_importance.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.");
}
return FALSE;
}

boolean ASP__SCCP__N__CONNECT__req_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_calledAddress.is_bound()
 || (single_value->field_callingAddress.is_omit() || single_value->field_callingAddress.is_bound())
 || (single_value->field_expeditedDataSel.is_omit() || single_value->field_expeditedDataSel.is_bound())
 || (single_value->field_qualityOfService.is_omit() || single_value->field_qualityOfService.is_bound())
 || (single_value->field_userData.is_omit() || single_value->field_userData.is_bound())
 || (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_bound())
 || (single_value->field_importance.is_omit() || single_value->field_importance.is_bound());
}

boolean ASP__SCCP__N__CONNECT__req_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_calledAddress.is_value()
 && (single_value->field_callingAddress.is_omit() || single_value->field_callingAddress.is_value())
 && (single_value->field_expeditedDataSel.is_omit() || single_value->field_expeditedDataSel.is_value())
 && (single_value->field_qualityOfService.is_omit() || single_value->field_qualityOfService.is_value())
 && (single_value->field_userData.is_omit() || single_value->field_userData.is_value())
 && (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_value())
 && (single_value->field_importance.is_omit() || single_value->field_importance.is_value());
}

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

ASP__SCCP__N__CONNECT__req ASP__SCCP__N__CONNECT__req_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.");
ASP__SCCP__N__CONNECT__req ret_val;
if (single_value->field_calledAddress.is_bound()) {
ret_val.calledAddress() = single_value->field_calledAddress.valueof();
}
if (single_value->field_callingAddress.is_omit()) ret_val.callingAddress() = OMIT_VALUE;
else if (single_value->field_callingAddress.is_bound()) {
ret_val.callingAddress() = single_value->field_callingAddress.valueof();
}
if (single_value->field_expeditedDataSel.is_omit()) ret_val.expeditedDataSel() = OMIT_VALUE;
else if (single_value->field_expeditedDataSel.is_bound()) {
ret_val.expeditedDataSel() = single_value->field_expeditedDataSel.valueof();
}
if (single_value->field_qualityOfService.is_omit()) ret_val.qualityOfService() = OMIT_VALUE;
else if (single_value->field_qualityOfService.is_bound()) {
ret_val.qualityOfService() = single_value->field_qualityOfService.valueof();
}
if (single_value->field_userData.is_omit()) ret_val.userData() = OMIT_VALUE;
else if (single_value->field_userData.is_bound()) {
ret_val.userData() = single_value->field_userData.valueof();
}
if (single_value->field_connectionId.is_omit()) ret_val.connectionId() = OMIT_VALUE;
else if (single_value->field_connectionId.is_bound()) {
ret_val.connectionId() = single_value->field_connectionId.valueof();
}
if (single_value->field_importance.is_omit()) ret_val.importance() = OMIT_VALUE;
else if (single_value->field_importance.is_bound()) {
ret_val.importance() = single_value->field_importance.valueof();
}
return ret_val;
}

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

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

SCCP__PAR__Address_template& ASP__SCCP__N__CONNECT__req_template::calledAddress()
{
set_specific();
return single_value->field_calledAddress;
}

const SCCP__PAR__Address_template& ASP__SCCP__N__CONNECT__req_template::calledAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field calledAddress of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.");
return single_value->field_calledAddress;
}

SCCP__PAR__Address_template& ASP__SCCP__N__CONNECT__req_template::callingAddress()
{
set_specific();
return single_value->field_callingAddress;
}

const SCCP__PAR__Address_template& ASP__SCCP__N__CONNECT__req_template::callingAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field callingAddress of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.");
return single_value->field_callingAddress;
}

INTEGER_template& ASP__SCCP__N__CONNECT__req_template::expeditedDataSel()
{
set_specific();
return single_value->field_expeditedDataSel;
}

const INTEGER_template& ASP__SCCP__N__CONNECT__req_template::expeditedDataSel() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field expeditedDataSel of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.");
return single_value->field_expeditedDataSel;
}

INTEGER_template& ASP__SCCP__N__CONNECT__req_template::qualityOfService()
{
set_specific();
return single_value->field_qualityOfService;
}

const INTEGER_template& ASP__SCCP__N__CONNECT__req_template::qualityOfService() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field qualityOfService of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.");
return single_value->field_qualityOfService;
}

OCTETSTRING_template& ASP__SCCP__N__CONNECT__req_template::userData()
{
set_specific();
return single_value->field_userData;
}

const OCTETSTRING_template& ASP__SCCP__N__CONNECT__req_template::userData() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field userData of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.");
return single_value->field_userData;
}

INTEGER_template& ASP__SCCP__N__CONNECT__req_template::connectionId()
{
set_specific();
return single_value->field_connectionId;
}

const INTEGER_template& ASP__SCCP__N__CONNECT__req_template::connectionId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field connectionId of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.");
return single_value->field_connectionId;
}

INTEGER_template& ASP__SCCP__N__CONNECT__req_template::importance()
{
set_specific();
return single_value->field_importance;
}

const INTEGER_template& ASP__SCCP__N__CONNECT__req_template::importance() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field importance of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.");
return single_value->field_importance;
}

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

void ASP__SCCP__N__CONNECT__req_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ calledAddress := ");
single_value->field_calledAddress.log();
TTCN_Logger::log_event_str(", callingAddress := ");
single_value->field_callingAddress.log();
TTCN_Logger::log_event_str(", expeditedDataSel := ");
single_value->field_expeditedDataSel.log();
TTCN_Logger::log_event_str(", qualityOfService := ");
single_value->field_qualityOfService.log();
TTCN_Logger::log_event_str(", userData := ");
single_value->field_userData.log();
TTCN_Logger::log_event_str(", connectionId := ");
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(", importance := ");
single_value->field_importance.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void ASP__SCCP__N__CONNECT__req_template::log_match(const ASP__SCCP__N__CONNECT__req& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_calledAddress.match(match_value.calledAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".calledAddress");
single_value->field_calledAddress.log_match(match_value.calledAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.callingAddress().ispresent()){
if(!single_value->field_callingAddress.match(match_value.callingAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".callingAddress");
single_value->field_callingAddress.log_match(match_value.callingAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_callingAddress.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".callingAddress := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_callingAddress.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.expeditedDataSel().ispresent()){
if(!single_value->field_expeditedDataSel.match(match_value.expeditedDataSel(), legacy)){
TTCN_Logger::log_logmatch_info(".expeditedDataSel");
single_value->field_expeditedDataSel.log_match(match_value.expeditedDataSel(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_expeditedDataSel.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".expeditedDataSel := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_expeditedDataSel.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.qualityOfService().ispresent()){
if(!single_value->field_qualityOfService.match(match_value.qualityOfService(), legacy)){
TTCN_Logger::log_logmatch_info(".qualityOfService");
single_value->field_qualityOfService.log_match(match_value.qualityOfService(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_qualityOfService.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".qualityOfService := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_qualityOfService.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.userData().ispresent()){
if(!single_value->field_userData.match(match_value.userData(), legacy)){
TTCN_Logger::log_logmatch_info(".userData");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_userData.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".userData := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_userData.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.connectionId().ispresent()){
if(!single_value->field_connectionId.match(match_value.connectionId(), legacy)){
TTCN_Logger::log_logmatch_info(".connectionId");
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_connectionId.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".connectionId := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.importance().ispresent()){
if(!single_value->field_importance.match(match_value.importance(), legacy)){
TTCN_Logger::log_logmatch_info(".importance");
single_value->field_importance.log_match(match_value.importance(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_importance.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".importance := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_importance.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ calledAddress := ");
single_value->field_calledAddress.log_match(match_value.calledAddress(), legacy);
TTCN_Logger::log_event_str(", callingAddress := ");
if (match_value.callingAddress().ispresent()) {
single_value->field_callingAddress.log_match(match_value.callingAddress(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_callingAddress.log();
if (single_value->field_callingAddress.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", expeditedDataSel := ");
if (match_value.expeditedDataSel().ispresent()) {
single_value->field_expeditedDataSel.log_match(match_value.expeditedDataSel(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_expeditedDataSel.log();
if (single_value->field_expeditedDataSel.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", qualityOfService := ");
if (match_value.qualityOfService().ispresent()) {
single_value->field_qualityOfService.log_match(match_value.qualityOfService(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_qualityOfService.log();
if (single_value->field_qualityOfService.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", userData := ");
if (match_value.userData().ispresent()) {
single_value->field_userData.log_match(match_value.userData(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_userData.log();
if (single_value->field_userData.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", connectionId := ");
if (match_value.connectionId().ispresent()) {
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_connectionId.log();
if (single_value->field_connectionId.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", importance := ");
if (match_value.importance().ispresent()) {
single_value->field_importance.log_match(match_value.importance(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_importance.log();
if (single_value->field_importance.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void ASP__SCCP__N__CONNECT__req_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_calledAddress.encode_text(text_buf);
single_value->field_callingAddress.encode_text(text_buf);
single_value->field_expeditedDataSel.encode_text(text_buf);
single_value->field_qualityOfService.encode_text(text_buf);
single_value->field_userData.encode_text(text_buf);
single_value->field_connectionId.encode_text(text_buf);
single_value->field_importance.encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.");
}
}

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

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

void ASP__SCCP__N__CONNECT__req_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_calledAddress.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req");
single_value->field_callingAddress.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req");
single_value->field_expeditedDataSel.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req");
single_value->field_qualityOfService.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req");
single_value->field_userData.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req");
single_value->field_connectionId.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req");
single_value->field_importance.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req");
}

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

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

ASP__SCCP__N__CONNECT__ind::ASP__SCCP__N__CONNECT__ind()
{
}

ASP__SCCP__N__CONNECT__ind::ASP__SCCP__N__CONNECT__ind(const SCCP__PAR__Address& par_calledAddress,
    const OPTIONAL< SCCP__PAR__Address >& par_callingAddress,
    const OPTIONAL< INTEGER >& par_qualityOfService,
    const OPTIONAL< OCTETSTRING >& par_userData,
    const OPTIONAL< INTEGER >& par_connectionId,
    const OPTIONAL< INTEGER >& par_importance)
  :   field_calledAddress(par_calledAddress),
  field_callingAddress(par_callingAddress),
  field_qualityOfService(par_qualityOfService),
  field_userData(par_userData),
  field_connectionId(par_connectionId),
  field_importance(par_importance)
{
}

ASP__SCCP__N__CONNECT__ind::ASP__SCCP__N__CONNECT__ind(const ASP__SCCP__N__CONNECT__ind& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.");
if (other_value.calledAddress().is_bound()) field_calledAddress = other_value.calledAddress();
else field_calledAddress.clean_up();
if (other_value.callingAddress().is_bound()) field_callingAddress = other_value.callingAddress();
else field_callingAddress.clean_up();
if (other_value.qualityOfService().is_bound()) field_qualityOfService = other_value.qualityOfService();
else field_qualityOfService.clean_up();
if (other_value.userData().is_bound()) field_userData = other_value.userData();
else field_userData.clean_up();
if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
else field_connectionId.clean_up();
if (other_value.importance().is_bound()) field_importance = other_value.importance();
else field_importance.clean_up();
}

void ASP__SCCP__N__CONNECT__ind::clean_up()
{
field_calledAddress.clean_up();
field_callingAddress.clean_up();
field_qualityOfService.clean_up();
field_userData.clean_up();
field_connectionId.clean_up();
field_importance.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__CONNECT__ind::get_descriptor() const { return &ASP__SCCP__N__CONNECT__ind_descr_; }
ASP__SCCP__N__CONNECT__ind& ASP__SCCP__N__CONNECT__ind::operator=(const ASP__SCCP__N__CONNECT__ind& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.");
  if (other_value.calledAddress().is_bound()) field_calledAddress = other_value.calledAddress();
  else field_calledAddress.clean_up();
  if (other_value.callingAddress().is_bound()) field_callingAddress = other_value.callingAddress();
  else field_callingAddress.clean_up();
  if (other_value.qualityOfService().is_bound()) field_qualityOfService = other_value.qualityOfService();
  else field_qualityOfService.clean_up();
  if (other_value.userData().is_bound()) field_userData = other_value.userData();
  else field_userData.clean_up();
  if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
  else field_connectionId.clean_up();
  if (other_value.importance().is_bound()) field_importance = other_value.importance();
  else field_importance.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__CONNECT__ind::operator==(const ASP__SCCP__N__CONNECT__ind& other_value) const
{
return field_calledAddress==other_value.field_calledAddress
  && field_callingAddress==other_value.field_callingAddress
  && field_qualityOfService==other_value.field_qualityOfService
  && field_userData==other_value.field_userData
  && field_connectionId==other_value.field_connectionId
  && field_importance==other_value.field_importance;
}

boolean ASP__SCCP__N__CONNECT__ind::is_bound() const
{
return (field_calledAddress.is_bound())
  || (OPTIONAL_OMIT == field_callingAddress.get_selection() || field_callingAddress.is_bound())
  || (OPTIONAL_OMIT == field_qualityOfService.get_selection() || field_qualityOfService.is_bound())
  || (OPTIONAL_OMIT == field_userData.get_selection() || field_userData.is_bound())
  || (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_bound())
  || (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_bound());
}
boolean ASP__SCCP__N__CONNECT__ind::is_value() const
{
return field_calledAddress.is_value()
  && (OPTIONAL_OMIT == field_callingAddress.get_selection() || field_callingAddress.is_value())
  && (OPTIONAL_OMIT == field_qualityOfService.get_selection() || field_qualityOfService.is_value())
  && (OPTIONAL_OMIT == field_userData.get_selection() || field_userData.is_value())
  && (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_value())
  && (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_value());
}
int ASP__SCCP__N__CONNECT__ind::size_of() const
{
  int ret_val = 1;
  if (field_callingAddress.ispresent()) ret_val++;
  if (field_qualityOfService.ispresent()) ret_val++;
  if (field_userData.ispresent()) ret_val++;
  if (field_connectionId.ispresent()) ret_val++;
  if (field_importance.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__CONNECT__ind::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ calledAddress := ");
field_calledAddress.log();
TTCN_Logger::log_event_str(", callingAddress := ");
field_callingAddress.log();
TTCN_Logger::log_event_str(", qualityOfService := ");
field_qualityOfService.log();
TTCN_Logger::log_event_str(", userData := ");
field_userData.log();
TTCN_Logger::log_event_str(", connectionId := ");
field_connectionId.log();
TTCN_Logger::log_event_str(", importance := ");
field_importance.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__CONNECT__ind::set_implicit_omit()
{
if (calledAddress().is_bound()) calledAddress().set_implicit_omit();
if (!callingAddress().is_bound()) callingAddress() = OMIT_VALUE;
else callingAddress().set_implicit_omit();
if (!qualityOfService().is_bound()) qualityOfService() = OMIT_VALUE;
else qualityOfService().set_implicit_omit();
if (!userData().is_bound()) userData() = OMIT_VALUE;
else userData().set_implicit_omit();
if (!connectionId().is_bound()) connectionId() = OMIT_VALUE;
else connectionId().set_implicit_omit();
if (!importance().is_bound()) importance() = OMIT_VALUE;
else importance().set_implicit_omit();
}

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

void ASP__SCCP__N__CONNECT__ind::encode_text(Text_Buf& text_buf) const
{
field_calledAddress.encode_text(text_buf);
field_callingAddress.encode_text(text_buf);
field_qualityOfService.encode_text(text_buf);
field_userData.encode_text(text_buf);
field_connectionId.encode_text(text_buf);
field_importance.encode_text(text_buf);
}

void ASP__SCCP__N__CONNECT__ind::decode_text(Text_Buf& text_buf)
{
field_calledAddress.decode_text(text_buf);
field_callingAddress.decode_text(text_buf);
field_qualityOfService.decode_text(text_buf);
field_userData.decode_text(text_buf);
field_connectionId.decode_text(text_buf);
field_importance.decode_text(text_buf);
}

struct ASP__SCCP__N__CONNECT__ind_template::single_value_struct {
SCCP__PAR__Address_template field_calledAddress;
SCCP__PAR__Address_template field_callingAddress;
INTEGER_template field_qualityOfService;
OCTETSTRING_template field_userData;
INTEGER_template field_connectionId;
INTEGER_template field_importance;
};

void ASP__SCCP__N__CONNECT__ind_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_calledAddress = ANY_VALUE;
single_value->field_callingAddress = ANY_OR_OMIT;
single_value->field_qualityOfService = ANY_OR_OMIT;
single_value->field_userData = ANY_OR_OMIT;
single_value->field_connectionId = ANY_OR_OMIT;
single_value->field_importance = ANY_OR_OMIT;
}
}
}

void ASP__SCCP__N__CONNECT__ind_template::copy_value(const ASP__SCCP__N__CONNECT__ind& other_value)
{
single_value = new single_value_struct;
if (other_value.calledAddress().is_bound()) {
  single_value->field_calledAddress = other_value.calledAddress();
} else {
  single_value->field_calledAddress.clean_up();
}
if (other_value.callingAddress().is_bound()) {
  if (other_value.callingAddress().ispresent()) single_value->field_callingAddress = other_value.callingAddress()();
  else single_value->field_callingAddress = OMIT_VALUE;
} else {
  single_value->field_callingAddress.clean_up();
}
if (other_value.qualityOfService().is_bound()) {
  if (other_value.qualityOfService().ispresent()) single_value->field_qualityOfService = other_value.qualityOfService()();
  else single_value->field_qualityOfService = OMIT_VALUE;
} else {
  single_value->field_qualityOfService.clean_up();
}
if (other_value.userData().is_bound()) {
  if (other_value.userData().ispresent()) single_value->field_userData = other_value.userData()();
  else single_value->field_userData = OMIT_VALUE;
} else {
  single_value->field_userData.clean_up();
}
if (other_value.connectionId().is_bound()) {
  if (other_value.connectionId().ispresent()) single_value->field_connectionId = other_value.connectionId()();
  else single_value->field_connectionId = OMIT_VALUE;
} else {
  single_value->field_connectionId.clean_up();
}
if (other_value.importance().is_bound()) {
  if (other_value.importance().ispresent()) single_value->field_importance = other_value.importance()();
  else single_value->field_importance = OMIT_VALUE;
} else {
  single_value->field_importance.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ASP__SCCP__N__CONNECT__ind_template::copy_template(const ASP__SCCP__N__CONNECT__ind_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.calledAddress().get_selection()) {
single_value->field_calledAddress = other_value.calledAddress();
} else {
single_value->field_calledAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.callingAddress().get_selection()) {
single_value->field_callingAddress = other_value.callingAddress();
} else {
single_value->field_callingAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.qualityOfService().get_selection()) {
single_value->field_qualityOfService = other_value.qualityOfService();
} else {
single_value->field_qualityOfService.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.userData().get_selection()) {
single_value->field_userData = other_value.userData();
} else {
single_value->field_userData.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.connectionId().get_selection()) {
single_value->field_connectionId = other_value.connectionId();
} else {
single_value->field_connectionId.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.importance().get_selection()) {
single_value->field_importance = other_value.importance();
} else {
single_value->field_importance.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ASP__SCCP__N__CONNECT__ind_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new ASP__SCCP__N__CONNECT__ind_template(*other_value.implication_.precondition);
implication_.implied_template = new ASP__SCCP__N__CONNECT__ind_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.");
break;
}
set_selection(other_value);
}

ASP__SCCP__N__CONNECT__ind_template::ASP__SCCP__N__CONNECT__ind_template()
{
}

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

ASP__SCCP__N__CONNECT__ind_template::ASP__SCCP__N__CONNECT__ind_template(const ASP__SCCP__N__CONNECT__ind& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__CONNECT__ind_template::match(const ASP__SCCP__N__CONNECT__ind& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.calledAddress().is_bound()) return FALSE;
if(!single_value->field_calledAddress.match(other_value.calledAddress(), legacy))return FALSE;
if(!other_value.callingAddress().is_bound()) return FALSE;
if((other_value.callingAddress().ispresent() ? !single_value->field_callingAddress.match((const SCCP__PAR__Address&)other_value.callingAddress(), legacy) : !single_value->field_callingAddress.match_omit(legacy)))return FALSE;
if(!other_value.qualityOfService().is_bound()) return FALSE;
if((other_value.qualityOfService().ispresent() ? !single_value->field_qualityOfService.match((const INTEGER&)other_value.qualityOfService(), legacy) : !single_value->field_qualityOfService.match_omit(legacy)))return FALSE;
if(!other_value.userData().is_bound()) return FALSE;
if((other_value.userData().ispresent() ? !single_value->field_userData.match((const OCTETSTRING&)other_value.userData(), legacy) : !single_value->field_userData.match_omit(legacy)))return FALSE;
if(!other_value.connectionId().is_bound()) return FALSE;
if((other_value.connectionId().ispresent() ? !single_value->field_connectionId.match((const INTEGER&)other_value.connectionId(), legacy) : !single_value->field_connectionId.match_omit(legacy)))return FALSE;
if(!other_value.importance().is_bound()) return FALSE;
if((other_value.importance().ispresent() ? !single_value->field_importance.match((const INTEGER&)other_value.importance(), legacy) : !single_value->field_importance.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.");
}
return FALSE;
}

boolean ASP__SCCP__N__CONNECT__ind_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_calledAddress.is_bound()
 || (single_value->field_callingAddress.is_omit() || single_value->field_callingAddress.is_bound())
 || (single_value->field_qualityOfService.is_omit() || single_value->field_qualityOfService.is_bound())
 || (single_value->field_userData.is_omit() || single_value->field_userData.is_bound())
 || (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_bound())
 || (single_value->field_importance.is_omit() || single_value->field_importance.is_bound());
}

boolean ASP__SCCP__N__CONNECT__ind_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_calledAddress.is_value()
 && (single_value->field_callingAddress.is_omit() || single_value->field_callingAddress.is_value())
 && (single_value->field_qualityOfService.is_omit() || single_value->field_qualityOfService.is_value())
 && (single_value->field_userData.is_omit() || single_value->field_userData.is_value())
 && (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_value())
 && (single_value->field_importance.is_omit() || single_value->field_importance.is_value());
}

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

ASP__SCCP__N__CONNECT__ind ASP__SCCP__N__CONNECT__ind_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.");
ASP__SCCP__N__CONNECT__ind ret_val;
if (single_value->field_calledAddress.is_bound()) {
ret_val.calledAddress() = single_value->field_calledAddress.valueof();
}
if (single_value->field_callingAddress.is_omit()) ret_val.callingAddress() = OMIT_VALUE;
else if (single_value->field_callingAddress.is_bound()) {
ret_val.callingAddress() = single_value->field_callingAddress.valueof();
}
if (single_value->field_qualityOfService.is_omit()) ret_val.qualityOfService() = OMIT_VALUE;
else if (single_value->field_qualityOfService.is_bound()) {
ret_val.qualityOfService() = single_value->field_qualityOfService.valueof();
}
if (single_value->field_userData.is_omit()) ret_val.userData() = OMIT_VALUE;
else if (single_value->field_userData.is_bound()) {
ret_val.userData() = single_value->field_userData.valueof();
}
if (single_value->field_connectionId.is_omit()) ret_val.connectionId() = OMIT_VALUE;
else if (single_value->field_connectionId.is_bound()) {
ret_val.connectionId() = single_value->field_connectionId.valueof();
}
if (single_value->field_importance.is_omit()) ret_val.importance() = OMIT_VALUE;
else if (single_value->field_importance.is_bound()) {
ret_val.importance() = single_value->field_importance.valueof();
}
return ret_val;
}

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

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

SCCP__PAR__Address_template& ASP__SCCP__N__CONNECT__ind_template::calledAddress()
{
set_specific();
return single_value->field_calledAddress;
}

const SCCP__PAR__Address_template& ASP__SCCP__N__CONNECT__ind_template::calledAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field calledAddress of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.");
return single_value->field_calledAddress;
}

SCCP__PAR__Address_template& ASP__SCCP__N__CONNECT__ind_template::callingAddress()
{
set_specific();
return single_value->field_callingAddress;
}

const SCCP__PAR__Address_template& ASP__SCCP__N__CONNECT__ind_template::callingAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field callingAddress of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.");
return single_value->field_callingAddress;
}

INTEGER_template& ASP__SCCP__N__CONNECT__ind_template::qualityOfService()
{
set_specific();
return single_value->field_qualityOfService;
}

const INTEGER_template& ASP__SCCP__N__CONNECT__ind_template::qualityOfService() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field qualityOfService of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.");
return single_value->field_qualityOfService;
}

OCTETSTRING_template& ASP__SCCP__N__CONNECT__ind_template::userData()
{
set_specific();
return single_value->field_userData;
}

const OCTETSTRING_template& ASP__SCCP__N__CONNECT__ind_template::userData() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field userData of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.");
return single_value->field_userData;
}

INTEGER_template& ASP__SCCP__N__CONNECT__ind_template::connectionId()
{
set_specific();
return single_value->field_connectionId;
}

const INTEGER_template& ASP__SCCP__N__CONNECT__ind_template::connectionId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field connectionId of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.");
return single_value->field_connectionId;
}

INTEGER_template& ASP__SCCP__N__CONNECT__ind_template::importance()
{
set_specific();
return single_value->field_importance;
}

const INTEGER_template& ASP__SCCP__N__CONNECT__ind_template::importance() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field importance of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.");
return single_value->field_importance;
}

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

void ASP__SCCP__N__CONNECT__ind_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ calledAddress := ");
single_value->field_calledAddress.log();
TTCN_Logger::log_event_str(", callingAddress := ");
single_value->field_callingAddress.log();
TTCN_Logger::log_event_str(", qualityOfService := ");
single_value->field_qualityOfService.log();
TTCN_Logger::log_event_str(", userData := ");
single_value->field_userData.log();
TTCN_Logger::log_event_str(", connectionId := ");
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(", importance := ");
single_value->field_importance.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void ASP__SCCP__N__CONNECT__ind_template::log_match(const ASP__SCCP__N__CONNECT__ind& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_calledAddress.match(match_value.calledAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".calledAddress");
single_value->field_calledAddress.log_match(match_value.calledAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.callingAddress().ispresent()){
if(!single_value->field_callingAddress.match(match_value.callingAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".callingAddress");
single_value->field_callingAddress.log_match(match_value.callingAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_callingAddress.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".callingAddress := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_callingAddress.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.qualityOfService().ispresent()){
if(!single_value->field_qualityOfService.match(match_value.qualityOfService(), legacy)){
TTCN_Logger::log_logmatch_info(".qualityOfService");
single_value->field_qualityOfService.log_match(match_value.qualityOfService(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_qualityOfService.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".qualityOfService := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_qualityOfService.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.userData().ispresent()){
if(!single_value->field_userData.match(match_value.userData(), legacy)){
TTCN_Logger::log_logmatch_info(".userData");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_userData.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".userData := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_userData.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.connectionId().ispresent()){
if(!single_value->field_connectionId.match(match_value.connectionId(), legacy)){
TTCN_Logger::log_logmatch_info(".connectionId");
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_connectionId.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".connectionId := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.importance().ispresent()){
if(!single_value->field_importance.match(match_value.importance(), legacy)){
TTCN_Logger::log_logmatch_info(".importance");
single_value->field_importance.log_match(match_value.importance(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_importance.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".importance := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_importance.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ calledAddress := ");
single_value->field_calledAddress.log_match(match_value.calledAddress(), legacy);
TTCN_Logger::log_event_str(", callingAddress := ");
if (match_value.callingAddress().ispresent()) {
single_value->field_callingAddress.log_match(match_value.callingAddress(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_callingAddress.log();
if (single_value->field_callingAddress.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", qualityOfService := ");
if (match_value.qualityOfService().ispresent()) {
single_value->field_qualityOfService.log_match(match_value.qualityOfService(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_qualityOfService.log();
if (single_value->field_qualityOfService.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", userData := ");
if (match_value.userData().ispresent()) {
single_value->field_userData.log_match(match_value.userData(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_userData.log();
if (single_value->field_userData.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", connectionId := ");
if (match_value.connectionId().ispresent()) {
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_connectionId.log();
if (single_value->field_connectionId.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", importance := ");
if (match_value.importance().ispresent()) {
single_value->field_importance.log_match(match_value.importance(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_importance.log();
if (single_value->field_importance.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void ASP__SCCP__N__CONNECT__ind_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_calledAddress.encode_text(text_buf);
single_value->field_callingAddress.encode_text(text_buf);
single_value->field_qualityOfService.encode_text(text_buf);
single_value->field_userData.encode_text(text_buf);
single_value->field_connectionId.encode_text(text_buf);
single_value->field_importance.encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.");
}
}

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

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

void ASP__SCCP__N__CONNECT__ind_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_calledAddress.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_ind");
single_value->field_callingAddress.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_ind");
single_value->field_qualityOfService.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_ind");
single_value->field_userData.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_ind");
single_value->field_connectionId.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_ind");
single_value->field_importance.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_ind");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_ind");
}

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

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

ASP__SCCP__N__CONNECT__res::ASP__SCCP__N__CONNECT__res()
{
}

ASP__SCCP__N__CONNECT__res::ASP__SCCP__N__CONNECT__res(const OPTIONAL< SCCP__PAR__Address >& par_respondingAddress,
    const OPTIONAL< INTEGER >& par_expeditedDataSel,
    const OPTIONAL< INTEGER >& par_qualityOfService,
    const OPTIONAL< OCTETSTRING >& par_userData,
    const OPTIONAL< INTEGER >& par_connectionId,
    const OPTIONAL< INTEGER >& par_importance)
  :   field_respondingAddress(par_respondingAddress),
  field_expeditedDataSel(par_expeditedDataSel),
  field_qualityOfService(par_qualityOfService),
  field_userData(par_userData),
  field_connectionId(par_connectionId),
  field_importance(par_importance)
{
}

ASP__SCCP__N__CONNECT__res::ASP__SCCP__N__CONNECT__res(const ASP__SCCP__N__CONNECT__res& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_res.");
if (other_value.respondingAddress().is_bound()) field_respondingAddress = other_value.respondingAddress();
else field_respondingAddress.clean_up();
if (other_value.expeditedDataSel().is_bound()) field_expeditedDataSel = other_value.expeditedDataSel();
else field_expeditedDataSel.clean_up();
if (other_value.qualityOfService().is_bound()) field_qualityOfService = other_value.qualityOfService();
else field_qualityOfService.clean_up();
if (other_value.userData().is_bound()) field_userData = other_value.userData();
else field_userData.clean_up();
if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
else field_connectionId.clean_up();
if (other_value.importance().is_bound()) field_importance = other_value.importance();
else field_importance.clean_up();
}

void ASP__SCCP__N__CONNECT__res::clean_up()
{
field_respondingAddress.clean_up();
field_expeditedDataSel.clean_up();
field_qualityOfService.clean_up();
field_userData.clean_up();
field_connectionId.clean_up();
field_importance.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__CONNECT__res::get_descriptor() const { return &ASP__SCCP__N__CONNECT__res_descr_; }
ASP__SCCP__N__CONNECT__res& ASP__SCCP__N__CONNECT__res::operator=(const ASP__SCCP__N__CONNECT__res& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_res.");
  if (other_value.respondingAddress().is_bound()) field_respondingAddress = other_value.respondingAddress();
  else field_respondingAddress.clean_up();
  if (other_value.expeditedDataSel().is_bound()) field_expeditedDataSel = other_value.expeditedDataSel();
  else field_expeditedDataSel.clean_up();
  if (other_value.qualityOfService().is_bound()) field_qualityOfService = other_value.qualityOfService();
  else field_qualityOfService.clean_up();
  if (other_value.userData().is_bound()) field_userData = other_value.userData();
  else field_userData.clean_up();
  if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
  else field_connectionId.clean_up();
  if (other_value.importance().is_bound()) field_importance = other_value.importance();
  else field_importance.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__CONNECT__res::operator==(const ASP__SCCP__N__CONNECT__res& other_value) const
{
return field_respondingAddress==other_value.field_respondingAddress
  && field_expeditedDataSel==other_value.field_expeditedDataSel
  && field_qualityOfService==other_value.field_qualityOfService
  && field_userData==other_value.field_userData
  && field_connectionId==other_value.field_connectionId
  && field_importance==other_value.field_importance;
}

boolean ASP__SCCP__N__CONNECT__res::is_bound() const
{
return (OPTIONAL_OMIT == field_respondingAddress.get_selection() || field_respondingAddress.is_bound())
  || (OPTIONAL_OMIT == field_expeditedDataSel.get_selection() || field_expeditedDataSel.is_bound())
  || (OPTIONAL_OMIT == field_qualityOfService.get_selection() || field_qualityOfService.is_bound())
  || (OPTIONAL_OMIT == field_userData.get_selection() || field_userData.is_bound())
  || (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_bound())
  || (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_bound());
}
boolean ASP__SCCP__N__CONNECT__res::is_value() const
{
return (OPTIONAL_OMIT == field_respondingAddress.get_selection() || field_respondingAddress.is_value())
  && (OPTIONAL_OMIT == field_expeditedDataSel.get_selection() || field_expeditedDataSel.is_value())
  && (OPTIONAL_OMIT == field_qualityOfService.get_selection() || field_qualityOfService.is_value())
  && (OPTIONAL_OMIT == field_userData.get_selection() || field_userData.is_value())
  && (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_value())
  && (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_value());
}
int ASP__SCCP__N__CONNECT__res::size_of() const
{
  int ret_val = 0;
  if (field_respondingAddress.ispresent()) ret_val++;
  if (field_expeditedDataSel.ispresent()) ret_val++;
  if (field_qualityOfService.ispresent()) ret_val++;
  if (field_userData.ispresent()) ret_val++;
  if (field_connectionId.ispresent()) ret_val++;
  if (field_importance.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__CONNECT__res::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ respondingAddress := ");
field_respondingAddress.log();
TTCN_Logger::log_event_str(", expeditedDataSel := ");
field_expeditedDataSel.log();
TTCN_Logger::log_event_str(", qualityOfService := ");
field_qualityOfService.log();
TTCN_Logger::log_event_str(", userData := ");
field_userData.log();
TTCN_Logger::log_event_str(", connectionId := ");
field_connectionId.log();
TTCN_Logger::log_event_str(", importance := ");
field_importance.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__CONNECT__res::set_implicit_omit()
{
if (!respondingAddress().is_bound()) respondingAddress() = OMIT_VALUE;
else respondingAddress().set_implicit_omit();
if (!expeditedDataSel().is_bound()) expeditedDataSel() = OMIT_VALUE;
else expeditedDataSel().set_implicit_omit();
if (!qualityOfService().is_bound()) qualityOfService() = OMIT_VALUE;
else qualityOfService().set_implicit_omit();
if (!userData().is_bound()) userData() = OMIT_VALUE;
else userData().set_implicit_omit();
if (!connectionId().is_bound()) connectionId() = OMIT_VALUE;
else connectionId().set_implicit_omit();
if (!importance().is_bound()) importance() = OMIT_VALUE;
else importance().set_implicit_omit();
}

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

void ASP__SCCP__N__CONNECT__res::encode_text(Text_Buf& text_buf) const
{
field_respondingAddress.encode_text(text_buf);
field_expeditedDataSel.encode_text(text_buf);
field_qualityOfService.encode_text(text_buf);
field_userData.encode_text(text_buf);
field_connectionId.encode_text(text_buf);
field_importance.encode_text(text_buf);
}

void ASP__SCCP__N__CONNECT__res::decode_text(Text_Buf& text_buf)
{
field_respondingAddress.decode_text(text_buf);
field_expeditedDataSel.decode_text(text_buf);
field_qualityOfService.decode_text(text_buf);
field_userData.decode_text(text_buf);
field_connectionId.decode_text(text_buf);
field_importance.decode_text(text_buf);
}

struct ASP__SCCP__N__CONNECT__res_template::single_value_struct {
SCCP__PAR__Address_template field_respondingAddress;
INTEGER_template field_expeditedDataSel;
INTEGER_template field_qualityOfService;
OCTETSTRING_template field_userData;
INTEGER_template field_connectionId;
INTEGER_template field_importance;
};

void ASP__SCCP__N__CONNECT__res_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_respondingAddress = ANY_OR_OMIT;
single_value->field_expeditedDataSel = ANY_OR_OMIT;
single_value->field_qualityOfService = ANY_OR_OMIT;
single_value->field_userData = ANY_OR_OMIT;
single_value->field_connectionId = ANY_OR_OMIT;
single_value->field_importance = ANY_OR_OMIT;
}
}
}

void ASP__SCCP__N__CONNECT__res_template::copy_value(const ASP__SCCP__N__CONNECT__res& other_value)
{
single_value = new single_value_struct;
if (other_value.respondingAddress().is_bound()) {
  if (other_value.respondingAddress().ispresent()) single_value->field_respondingAddress = other_value.respondingAddress()();
  else single_value->field_respondingAddress = OMIT_VALUE;
} else {
  single_value->field_respondingAddress.clean_up();
}
if (other_value.expeditedDataSel().is_bound()) {
  if (other_value.expeditedDataSel().ispresent()) single_value->field_expeditedDataSel = other_value.expeditedDataSel()();
  else single_value->field_expeditedDataSel = OMIT_VALUE;
} else {
  single_value->field_expeditedDataSel.clean_up();
}
if (other_value.qualityOfService().is_bound()) {
  if (other_value.qualityOfService().ispresent()) single_value->field_qualityOfService = other_value.qualityOfService()();
  else single_value->field_qualityOfService = OMIT_VALUE;
} else {
  single_value->field_qualityOfService.clean_up();
}
if (other_value.userData().is_bound()) {
  if (other_value.userData().ispresent()) single_value->field_userData = other_value.userData()();
  else single_value->field_userData = OMIT_VALUE;
} else {
  single_value->field_userData.clean_up();
}
if (other_value.connectionId().is_bound()) {
  if (other_value.connectionId().ispresent()) single_value->field_connectionId = other_value.connectionId()();
  else single_value->field_connectionId = OMIT_VALUE;
} else {
  single_value->field_connectionId.clean_up();
}
if (other_value.importance().is_bound()) {
  if (other_value.importance().ispresent()) single_value->field_importance = other_value.importance()();
  else single_value->field_importance = OMIT_VALUE;
} else {
  single_value->field_importance.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ASP__SCCP__N__CONNECT__res_template::copy_template(const ASP__SCCP__N__CONNECT__res_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.respondingAddress().get_selection()) {
single_value->field_respondingAddress = other_value.respondingAddress();
} else {
single_value->field_respondingAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.expeditedDataSel().get_selection()) {
single_value->field_expeditedDataSel = other_value.expeditedDataSel();
} else {
single_value->field_expeditedDataSel.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.qualityOfService().get_selection()) {
single_value->field_qualityOfService = other_value.qualityOfService();
} else {
single_value->field_qualityOfService.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.userData().get_selection()) {
single_value->field_userData = other_value.userData();
} else {
single_value->field_userData.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.connectionId().get_selection()) {
single_value->field_connectionId = other_value.connectionId();
} else {
single_value->field_connectionId.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.importance().get_selection()) {
single_value->field_importance = other_value.importance();
} else {
single_value->field_importance.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ASP__SCCP__N__CONNECT__res_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 ASP__SCCP__N__CONNECT__res_template(*other_value.implication_.precondition);
implication_.implied_template = new ASP__SCCP__N__CONNECT__res_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_res.");
break;
}
set_selection(other_value);
}

ASP__SCCP__N__CONNECT__res_template::ASP__SCCP__N__CONNECT__res_template()
{
}

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

ASP__SCCP__N__CONNECT__res_template::ASP__SCCP__N__CONNECT__res_template(const ASP__SCCP__N__CONNECT__res& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__CONNECT__res_template::match(const ASP__SCCP__N__CONNECT__res& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.respondingAddress().is_bound()) return FALSE;
if((other_value.respondingAddress().ispresent() ? !single_value->field_respondingAddress.match((const SCCP__PAR__Address&)other_value.respondingAddress(), legacy) : !single_value->field_respondingAddress.match_omit(legacy)))return FALSE;
if(!other_value.expeditedDataSel().is_bound()) return FALSE;
if((other_value.expeditedDataSel().ispresent() ? !single_value->field_expeditedDataSel.match((const INTEGER&)other_value.expeditedDataSel(), legacy) : !single_value->field_expeditedDataSel.match_omit(legacy)))return FALSE;
if(!other_value.qualityOfService().is_bound()) return FALSE;
if((other_value.qualityOfService().ispresent() ? !single_value->field_qualityOfService.match((const INTEGER&)other_value.qualityOfService(), legacy) : !single_value->field_qualityOfService.match_omit(legacy)))return FALSE;
if(!other_value.userData().is_bound()) return FALSE;
if((other_value.userData().ispresent() ? !single_value->field_userData.match((const OCTETSTRING&)other_value.userData(), legacy) : !single_value->field_userData.match_omit(legacy)))return FALSE;
if(!other_value.connectionId().is_bound()) return FALSE;
if((other_value.connectionId().ispresent() ? !single_value->field_connectionId.match((const INTEGER&)other_value.connectionId(), legacy) : !single_value->field_connectionId.match_omit(legacy)))return FALSE;
if(!other_value.importance().is_bound()) return FALSE;
if((other_value.importance().ispresent() ? !single_value->field_importance.match((const INTEGER&)other_value.importance(), legacy) : !single_value->field_importance.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_res.");
}
return FALSE;
}

boolean ASP__SCCP__N__CONNECT__res_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return (single_value->field_respondingAddress.is_omit() || single_value->field_respondingAddress.is_bound())
 || (single_value->field_expeditedDataSel.is_omit() || single_value->field_expeditedDataSel.is_bound())
 || (single_value->field_qualityOfService.is_omit() || single_value->field_qualityOfService.is_bound())
 || (single_value->field_userData.is_omit() || single_value->field_userData.is_bound())
 || (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_bound())
 || (single_value->field_importance.is_omit() || single_value->field_importance.is_bound());
}

boolean ASP__SCCP__N__CONNECT__res_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return (single_value->field_respondingAddress.is_omit() || single_value->field_respondingAddress.is_value())
 && (single_value->field_expeditedDataSel.is_omit() || single_value->field_expeditedDataSel.is_value())
 && (single_value->field_qualityOfService.is_omit() || single_value->field_qualityOfService.is_value())
 && (single_value->field_userData.is_omit() || single_value->field_userData.is_value())
 && (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_value())
 && (single_value->field_importance.is_omit() || single_value->field_importance.is_value());
}

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

ASP__SCCP__N__CONNECT__res ASP__SCCP__N__CONNECT__res_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_res.");
ASP__SCCP__N__CONNECT__res ret_val;
if (single_value->field_respondingAddress.is_omit()) ret_val.respondingAddress() = OMIT_VALUE;
else if (single_value->field_respondingAddress.is_bound()) {
ret_val.respondingAddress() = single_value->field_respondingAddress.valueof();
}
if (single_value->field_expeditedDataSel.is_omit()) ret_val.expeditedDataSel() = OMIT_VALUE;
else if (single_value->field_expeditedDataSel.is_bound()) {
ret_val.expeditedDataSel() = single_value->field_expeditedDataSel.valueof();
}
if (single_value->field_qualityOfService.is_omit()) ret_val.qualityOfService() = OMIT_VALUE;
else if (single_value->field_qualityOfService.is_bound()) {
ret_val.qualityOfService() = single_value->field_qualityOfService.valueof();
}
if (single_value->field_userData.is_omit()) ret_val.userData() = OMIT_VALUE;
else if (single_value->field_userData.is_bound()) {
ret_val.userData() = single_value->field_userData.valueof();
}
if (single_value->field_connectionId.is_omit()) ret_val.connectionId() = OMIT_VALUE;
else if (single_value->field_connectionId.is_bound()) {
ret_val.connectionId() = single_value->field_connectionId.valueof();
}
if (single_value->field_importance.is_omit()) ret_val.importance() = OMIT_VALUE;
else if (single_value->field_importance.is_bound()) {
ret_val.importance() = single_value->field_importance.valueof();
}
return ret_val;
}

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

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

SCCP__PAR__Address_template& ASP__SCCP__N__CONNECT__res_template::respondingAddress()
{
set_specific();
return single_value->field_respondingAddress;
}

const SCCP__PAR__Address_template& ASP__SCCP__N__CONNECT__res_template::respondingAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field respondingAddress of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_res.");
return single_value->field_respondingAddress;
}

INTEGER_template& ASP__SCCP__N__CONNECT__res_template::expeditedDataSel()
{
set_specific();
return single_value->field_expeditedDataSel;
}

const INTEGER_template& ASP__SCCP__N__CONNECT__res_template::expeditedDataSel() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field expeditedDataSel of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_res.");
return single_value->field_expeditedDataSel;
}

INTEGER_template& ASP__SCCP__N__CONNECT__res_template::qualityOfService()
{
set_specific();
return single_value->field_qualityOfService;
}

const INTEGER_template& ASP__SCCP__N__CONNECT__res_template::qualityOfService() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field qualityOfService of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_res.");
return single_value->field_qualityOfService;
}

OCTETSTRING_template& ASP__SCCP__N__CONNECT__res_template::userData()
{
set_specific();
return single_value->field_userData;
}

const OCTETSTRING_template& ASP__SCCP__N__CONNECT__res_template::userData() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field userData of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_res.");
return single_value->field_userData;
}

INTEGER_template& ASP__SCCP__N__CONNECT__res_template::connectionId()
{
set_specific();
return single_value->field_connectionId;
}

const INTEGER_template& ASP__SCCP__N__CONNECT__res_template::connectionId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field connectionId of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_res.");
return single_value->field_connectionId;
}

INTEGER_template& ASP__SCCP__N__CONNECT__res_template::importance()
{
set_specific();
return single_value->field_importance;
}

const INTEGER_template& ASP__SCCP__N__CONNECT__res_template::importance() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field importance of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_res.");
return single_value->field_importance;
}

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

void ASP__SCCP__N__CONNECT__res_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ respondingAddress := ");
single_value->field_respondingAddress.log();
TTCN_Logger::log_event_str(", expeditedDataSel := ");
single_value->field_expeditedDataSel.log();
TTCN_Logger::log_event_str(", qualityOfService := ");
single_value->field_qualityOfService.log();
TTCN_Logger::log_event_str(", userData := ");
single_value->field_userData.log();
TTCN_Logger::log_event_str(", connectionId := ");
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(", importance := ");
single_value->field_importance.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void ASP__SCCP__N__CONNECT__res_template::log_match(const ASP__SCCP__N__CONNECT__res& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if (match_value.respondingAddress().ispresent()){
if(!single_value->field_respondingAddress.match(match_value.respondingAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".respondingAddress");
single_value->field_respondingAddress.log_match(match_value.respondingAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_respondingAddress.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".respondingAddress := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_respondingAddress.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.expeditedDataSel().ispresent()){
if(!single_value->field_expeditedDataSel.match(match_value.expeditedDataSel(), legacy)){
TTCN_Logger::log_logmatch_info(".expeditedDataSel");
single_value->field_expeditedDataSel.log_match(match_value.expeditedDataSel(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_expeditedDataSel.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".expeditedDataSel := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_expeditedDataSel.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.qualityOfService().ispresent()){
if(!single_value->field_qualityOfService.match(match_value.qualityOfService(), legacy)){
TTCN_Logger::log_logmatch_info(".qualityOfService");
single_value->field_qualityOfService.log_match(match_value.qualityOfService(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_qualityOfService.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".qualityOfService := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_qualityOfService.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.userData().ispresent()){
if(!single_value->field_userData.match(match_value.userData(), legacy)){
TTCN_Logger::log_logmatch_info(".userData");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_userData.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".userData := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_userData.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.connectionId().ispresent()){
if(!single_value->field_connectionId.match(match_value.connectionId(), legacy)){
TTCN_Logger::log_logmatch_info(".connectionId");
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_connectionId.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".connectionId := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.importance().ispresent()){
if(!single_value->field_importance.match(match_value.importance(), legacy)){
TTCN_Logger::log_logmatch_info(".importance");
single_value->field_importance.log_match(match_value.importance(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_importance.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".importance := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_importance.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ respondingAddress := ");
if (match_value.respondingAddress().ispresent()) {
single_value->field_respondingAddress.log_match(match_value.respondingAddress(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_respondingAddress.log();
if (single_value->field_respondingAddress.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", expeditedDataSel := ");
if (match_value.expeditedDataSel().ispresent()) {
single_value->field_expeditedDataSel.log_match(match_value.expeditedDataSel(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_expeditedDataSel.log();
if (single_value->field_expeditedDataSel.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", qualityOfService := ");
if (match_value.qualityOfService().ispresent()) {
single_value->field_qualityOfService.log_match(match_value.qualityOfService(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_qualityOfService.log();
if (single_value->field_qualityOfService.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", userData := ");
if (match_value.userData().ispresent()) {
single_value->field_userData.log_match(match_value.userData(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_userData.log();
if (single_value->field_userData.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", connectionId := ");
if (match_value.connectionId().ispresent()) {
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_connectionId.log();
if (single_value->field_connectionId.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", importance := ");
if (match_value.importance().ispresent()) {
single_value->field_importance.log_match(match_value.importance(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_importance.log();
if (single_value->field_importance.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void ASP__SCCP__N__CONNECT__res_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_respondingAddress.encode_text(text_buf);
single_value->field_expeditedDataSel.encode_text(text_buf);
single_value->field_qualityOfService.encode_text(text_buf);
single_value->field_userData.encode_text(text_buf);
single_value->field_connectionId.encode_text(text_buf);
single_value->field_importance.encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_res.");
}
}

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

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

void ASP__SCCP__N__CONNECT__res_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_respondingAddress.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_res");
single_value->field_expeditedDataSel.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_res");
single_value->field_qualityOfService.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_res");
single_value->field_userData.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_res");
single_value->field_connectionId.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_res");
single_value->field_importance.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_res");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_CONNECT_res");
}

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

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

ASP__SCCP__N__CONNECT__cfm::ASP__SCCP__N__CONNECT__cfm()
{
}

ASP__SCCP__N__CONNECT__cfm::ASP__SCCP__N__CONNECT__cfm(const OPTIONAL< SCCP__PAR__Address >& par_respondingAddress,
    const OPTIONAL< INTEGER >& par_qualityOfService,
    const OPTIONAL< OCTETSTRING >& par_userData,
    const OPTIONAL< INTEGER >& par_connectionId,
    const OPTIONAL< INTEGER >& par_importance)
  :   field_respondingAddress(par_respondingAddress),
  field_qualityOfService(par_qualityOfService),
  field_userData(par_userData),
  field_connectionId(par_connectionId),
  field_importance(par_importance)
{
}

ASP__SCCP__N__CONNECT__cfm::ASP__SCCP__N__CONNECT__cfm(const ASP__SCCP__N__CONNECT__cfm& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.");
if (other_value.respondingAddress().is_bound()) field_respondingAddress = other_value.respondingAddress();
else field_respondingAddress.clean_up();
if (other_value.qualityOfService().is_bound()) field_qualityOfService = other_value.qualityOfService();
else field_qualityOfService.clean_up();
if (other_value.userData().is_bound()) field_userData = other_value.userData();
else field_userData.clean_up();
if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
else field_connectionId.clean_up();
if (other_value.importance().is_bound()) field_importance = other_value.importance();
else field_importance.clean_up();
}

void ASP__SCCP__N__CONNECT__cfm::clean_up()
{
field_respondingAddress.clean_up();
field_qualityOfService.clean_up();
field_userData.clean_up();
field_connectionId.clean_up();
field_importance.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__CONNECT__cfm::get_descriptor() const { return &ASP__SCCP__N__CONNECT__cfm_descr_; }
ASP__SCCP__N__CONNECT__cfm& ASP__SCCP__N__CONNECT__cfm::operator=(const ASP__SCCP__N__CONNECT__cfm& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.");
  if (other_value.respondingAddress().is_bound()) field_respondingAddress = other_value.respondingAddress();
  else field_respondingAddress.clean_up();
  if (other_value.qualityOfService().is_bound()) field_qualityOfService = other_value.qualityOfService();
  else field_qualityOfService.clean_up();
  if (other_value.userData().is_bound()) field_userData = other_value.userData();
  else field_userData.clean_up();
  if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
  else field_connectionId.clean_up();
  if (other_value.importance().is_bound()) field_importance = other_value.importance();
  else field_importance.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__CONNECT__cfm::operator==(const ASP__SCCP__N__CONNECT__cfm& other_value) const
{
return field_respondingAddress==other_value.field_respondingAddress
  && field_qualityOfService==other_value.field_qualityOfService
  && field_userData==other_value.field_userData
  && field_connectionId==other_value.field_connectionId
  && field_importance==other_value.field_importance;
}

boolean ASP__SCCP__N__CONNECT__cfm::is_bound() const
{
return (OPTIONAL_OMIT == field_respondingAddress.get_selection() || field_respondingAddress.is_bound())
  || (OPTIONAL_OMIT == field_qualityOfService.get_selection() || field_qualityOfService.is_bound())
  || (OPTIONAL_OMIT == field_userData.get_selection() || field_userData.is_bound())
  || (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_bound())
  || (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_bound());
}
boolean ASP__SCCP__N__CONNECT__cfm::is_value() const
{
return (OPTIONAL_OMIT == field_respondingAddress.get_selection() || field_respondingAddress.is_value())
  && (OPTIONAL_OMIT == field_qualityOfService.get_selection() || field_qualityOfService.is_value())
  && (OPTIONAL_OMIT == field_userData.get_selection() || field_userData.is_value())
  && (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_value())
  && (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_value());
}
int ASP__SCCP__N__CONNECT__cfm::size_of() const
{
  int ret_val = 0;
  if (field_respondingAddress.ispresent()) ret_val++;
  if (field_qualityOfService.ispresent()) ret_val++;
  if (field_userData.ispresent()) ret_val++;
  if (field_connectionId.ispresent()) ret_val++;
  if (field_importance.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__CONNECT__cfm::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ respondingAddress := ");
field_respondingAddress.log();
TTCN_Logger::log_event_str(", qualityOfService := ");
field_qualityOfService.log();
TTCN_Logger::log_event_str(", userData := ");
field_userData.log();
TTCN_Logger::log_event_str(", connectionId := ");
field_connectionId.log();
TTCN_Logger::log_event_str(", importance := ");
field_importance.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__CONNECT__cfm::set_implicit_omit()
{
if (!respondingAddress().is_bound()) respondingAddress() = OMIT_VALUE;
else respondingAddress().set_implicit_omit();
if (!qualityOfService().is_bound()) qualityOfService() = OMIT_VALUE;
else qualityOfService().set_implicit_omit();
if (!userData().is_bound()) userData() = OMIT_VALUE;
else userData().set_implicit_omit();
if (!connectionId().is_bound()) connectionId() = OMIT_VALUE;
else connectionId().set_implicit_omit();
if (!importance().is_bound()) importance() = OMIT_VALUE;
else importance().set_implicit_omit();
}

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

void ASP__SCCP__N__CONNECT__cfm::encode_text(Text_Buf& text_buf) const
{
field_respondingAddress.encode_text(text_buf);
field_qualityOfService.encode_text(text_buf);
field_userData.encode_text(text_buf);
field_connectionId.encode_text(text_buf);
field_importance.encode_text(text_buf);
}

void ASP__SCCP__N__CONNECT__cfm::decode_text(Text_Buf& text_buf)
{
field_respondingAddress.decode_text(text_buf);
field_qualityOfService.decode_text(text_buf);
field_userData.decode_text(text_buf);
field_connectionId.decode_text(text_buf);
field_importance.decode_text(text_buf);
}

struct ASP__SCCP__N__CONNECT__cfm_template::single_value_struct {
SCCP__PAR__Address_template field_respondingAddress;
INTEGER_template field_qualityOfService;
OCTETSTRING_template field_userData;
INTEGER_template field_connectionId;
INTEGER_template field_importance;
};

void ASP__SCCP__N__CONNECT__cfm_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_respondingAddress = ANY_OR_OMIT;
single_value->field_qualityOfService = ANY_OR_OMIT;
single_value->field_userData = ANY_OR_OMIT;
single_value->field_connectionId = ANY_OR_OMIT;
single_value->field_importance = ANY_OR_OMIT;
}
}
}

void ASP__SCCP__N__CONNECT__cfm_template::copy_value(const ASP__SCCP__N__CONNECT__cfm& other_value)
{
single_value = new single_value_struct;
if (other_value.respondingAddress().is_bound()) {
  if (other_value.respondingAddress().ispresent()) single_value->field_respondingAddress = other_value.respondingAddress()();
  else single_value->field_respondingAddress = OMIT_VALUE;
} else {
  single_value->field_respondingAddress.clean_up();
}
if (other_value.qualityOfService().is_bound()) {
  if (other_value.qualityOfService().ispresent()) single_value->field_qualityOfService = other_value.qualityOfService()();
  else single_value->field_qualityOfService = OMIT_VALUE;
} else {
  single_value->field_qualityOfService.clean_up();
}
if (other_value.userData().is_bound()) {
  if (other_value.userData().ispresent()) single_value->field_userData = other_value.userData()();
  else single_value->field_userData = OMIT_VALUE;
} else {
  single_value->field_userData.clean_up();
}
if (other_value.connectionId().is_bound()) {
  if (other_value.connectionId().ispresent()) single_value->field_connectionId = other_value.connectionId()();
  else single_value->field_connectionId = OMIT_VALUE;
} else {
  single_value->field_connectionId.clean_up();
}
if (other_value.importance().is_bound()) {
  if (other_value.importance().ispresent()) single_value->field_importance = other_value.importance()();
  else single_value->field_importance = OMIT_VALUE;
} else {
  single_value->field_importance.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ASP__SCCP__N__CONNECT__cfm_template::copy_template(const ASP__SCCP__N__CONNECT__cfm_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.respondingAddress().get_selection()) {
single_value->field_respondingAddress = other_value.respondingAddress();
} else {
single_value->field_respondingAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.qualityOfService().get_selection()) {
single_value->field_qualityOfService = other_value.qualityOfService();
} else {
single_value->field_qualityOfService.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.userData().get_selection()) {
single_value->field_userData = other_value.userData();
} else {
single_value->field_userData.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.connectionId().get_selection()) {
single_value->field_connectionId = other_value.connectionId();
} else {
single_value->field_connectionId.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.importance().get_selection()) {
single_value->field_importance = other_value.importance();
} else {
single_value->field_importance.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ASP__SCCP__N__CONNECT__cfm_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 ASP__SCCP__N__CONNECT__cfm_template(*other_value.implication_.precondition);
implication_.implied_template = new ASP__SCCP__N__CONNECT__cfm_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.");
break;
}
set_selection(other_value);
}

ASP__SCCP__N__CONNECT__cfm_template::ASP__SCCP__N__CONNECT__cfm_template()
{
}

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

ASP__SCCP__N__CONNECT__cfm_template::ASP__SCCP__N__CONNECT__cfm_template(const ASP__SCCP__N__CONNECT__cfm& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__CONNECT__cfm_template::match(const ASP__SCCP__N__CONNECT__cfm& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.respondingAddress().is_bound()) return FALSE;
if((other_value.respondingAddress().ispresent() ? !single_value->field_respondingAddress.match((const SCCP__PAR__Address&)other_value.respondingAddress(), legacy) : !single_value->field_respondingAddress.match_omit(legacy)))return FALSE;
if(!other_value.qualityOfService().is_bound()) return FALSE;
if((other_value.qualityOfService().ispresent() ? !single_value->field_qualityOfService.match((const INTEGER&)other_value.qualityOfService(), legacy) : !single_value->field_qualityOfService.match_omit(legacy)))return FALSE;
if(!other_value.userData().is_bound()) return FALSE;
if((other_value.userData().ispresent() ? !single_value->field_userData.match((const OCTETSTRING&)other_value.userData(), legacy) : !single_value->field_userData.match_omit(legacy)))return FALSE;
if(!other_value.connectionId().is_bound()) return FALSE;
if((other_value.connectionId().ispresent() ? !single_value->field_connectionId.match((const INTEGER&)other_value.connectionId(), legacy) : !single_value->field_connectionId.match_omit(legacy)))return FALSE;
if(!other_value.importance().is_bound()) return FALSE;
if((other_value.importance().ispresent() ? !single_value->field_importance.match((const INTEGER&)other_value.importance(), legacy) : !single_value->field_importance.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.");
}
return FALSE;
}

boolean ASP__SCCP__N__CONNECT__cfm_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return (single_value->field_respondingAddress.is_omit() || single_value->field_respondingAddress.is_bound())
 || (single_value->field_qualityOfService.is_omit() || single_value->field_qualityOfService.is_bound())
 || (single_value->field_userData.is_omit() || single_value->field_userData.is_bound())
 || (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_bound())
 || (single_value->field_importance.is_omit() || single_value->field_importance.is_bound());
}

boolean ASP__SCCP__N__CONNECT__cfm_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return (single_value->field_respondingAddress.is_omit() || single_value->field_respondingAddress.is_value())
 && (single_value->field_qualityOfService.is_omit() || single_value->field_qualityOfService.is_value())
 && (single_value->field_userData.is_omit() || single_value->field_userData.is_value())
 && (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_value())
 && (single_value->field_importance.is_omit() || single_value->field_importance.is_value());
}

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

ASP__SCCP__N__CONNECT__cfm ASP__SCCP__N__CONNECT__cfm_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.");
ASP__SCCP__N__CONNECT__cfm ret_val;
if (single_value->field_respondingAddress.is_omit()) ret_val.respondingAddress() = OMIT_VALUE;
else if (single_value->field_respondingAddress.is_bound()) {
ret_val.respondingAddress() = single_value->field_respondingAddress.valueof();
}
if (single_value->field_qualityOfService.is_omit()) ret_val.qualityOfService() = OMIT_VALUE;
else if (single_value->field_qualityOfService.is_bound()) {
ret_val.qualityOfService() = single_value->field_qualityOfService.valueof();
}
if (single_value->field_userData.is_omit()) ret_val.userData() = OMIT_VALUE;
else if (single_value->field_userData.is_bound()) {
ret_val.userData() = single_value->field_userData.valueof();
}
if (single_value->field_connectionId.is_omit()) ret_val.connectionId() = OMIT_VALUE;
else if (single_value->field_connectionId.is_bound()) {
ret_val.connectionId() = single_value->field_connectionId.valueof();
}
if (single_value->field_importance.is_omit()) ret_val.importance() = OMIT_VALUE;
else if (single_value->field_importance.is_bound()) {
ret_val.importance() = single_value->field_importance.valueof();
}
return ret_val;
}

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

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

SCCP__PAR__Address_template& ASP__SCCP__N__CONNECT__cfm_template::respondingAddress()
{
set_specific();
return single_value->field_respondingAddress;
}

const SCCP__PAR__Address_template& ASP__SCCP__N__CONNECT__cfm_template::respondingAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field respondingAddress of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.");
return single_value->field_respondingAddress;
}

INTEGER_template& ASP__SCCP__N__CONNECT__cfm_template::qualityOfService()
{
set_specific();
return single_value->field_qualityOfService;
}

const INTEGER_template& ASP__SCCP__N__CONNECT__cfm_template::qualityOfService() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field qualityOfService of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.");
return single_value->field_qualityOfService;
}

OCTETSTRING_template& ASP__SCCP__N__CONNECT__cfm_template::userData()
{
set_specific();
return single_value->field_userData;
}

const OCTETSTRING_template& ASP__SCCP__N__CONNECT__cfm_template::userData() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field userData of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.");
return single_value->field_userData;
}

INTEGER_template& ASP__SCCP__N__CONNECT__cfm_template::connectionId()
{
set_specific();
return single_value->field_connectionId;
}

const INTEGER_template& ASP__SCCP__N__CONNECT__cfm_template::connectionId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field connectionId of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.");
return single_value->field_connectionId;
}

INTEGER_template& ASP__SCCP__N__CONNECT__cfm_template::importance()
{
set_specific();
return single_value->field_importance;
}

const INTEGER_template& ASP__SCCP__N__CONNECT__cfm_template::importance() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field importance of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.");
return single_value->field_importance;
}

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

void ASP__SCCP__N__CONNECT__cfm_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ respondingAddress := ");
single_value->field_respondingAddress.log();
TTCN_Logger::log_event_str(", qualityOfService := ");
single_value->field_qualityOfService.log();
TTCN_Logger::log_event_str(", userData := ");
single_value->field_userData.log();
TTCN_Logger::log_event_str(", connectionId := ");
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(", importance := ");
single_value->field_importance.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void ASP__SCCP__N__CONNECT__cfm_template::log_match(const ASP__SCCP__N__CONNECT__cfm& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if (match_value.respondingAddress().ispresent()){
if(!single_value->field_respondingAddress.match(match_value.respondingAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".respondingAddress");
single_value->field_respondingAddress.log_match(match_value.respondingAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_respondingAddress.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".respondingAddress := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_respondingAddress.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.qualityOfService().ispresent()){
if(!single_value->field_qualityOfService.match(match_value.qualityOfService(), legacy)){
TTCN_Logger::log_logmatch_info(".qualityOfService");
single_value->field_qualityOfService.log_match(match_value.qualityOfService(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_qualityOfService.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".qualityOfService := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_qualityOfService.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.userData().ispresent()){
if(!single_value->field_userData.match(match_value.userData(), legacy)){
TTCN_Logger::log_logmatch_info(".userData");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_userData.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".userData := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_userData.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.connectionId().ispresent()){
if(!single_value->field_connectionId.match(match_value.connectionId(), legacy)){
TTCN_Logger::log_logmatch_info(".connectionId");
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_connectionId.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".connectionId := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.importance().ispresent()){
if(!single_value->field_importance.match(match_value.importance(), legacy)){
TTCN_Logger::log_logmatch_info(".importance");
single_value->field_importance.log_match(match_value.importance(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_importance.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".importance := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_importance.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ respondingAddress := ");
if (match_value.respondingAddress().ispresent()) {
single_value->field_respondingAddress.log_match(match_value.respondingAddress(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_respondingAddress.log();
if (single_value->field_respondingAddress.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", qualityOfService := ");
if (match_value.qualityOfService().ispresent()) {
single_value->field_qualityOfService.log_match(match_value.qualityOfService(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_qualityOfService.log();
if (single_value->field_qualityOfService.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", userData := ");
if (match_value.userData().ispresent()) {
single_value->field_userData.log_match(match_value.userData(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_userData.log();
if (single_value->field_userData.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", connectionId := ");
if (match_value.connectionId().ispresent()) {
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_connectionId.log();
if (single_value->field_connectionId.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", importance := ");
if (match_value.importance().ispresent()) {
single_value->field_importance.log_match(match_value.importance(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_importance.log();
if (single_value->field_importance.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

ASP__SCCP__N__DATA__req::ASP__SCCP__N__DATA__req()
{
}

ASP__SCCP__N__DATA__req::ASP__SCCP__N__DATA__req(const OCTETSTRING& par_userData,
    const OPTIONAL< INTEGER >& par_connectionId,
    const OPTIONAL< INTEGER >& par_importance)
  :   field_userData(par_userData),
  field_connectionId(par_connectionId),
  field_importance(par_importance)
{
}

ASP__SCCP__N__DATA__req::ASP__SCCP__N__DATA__req(const ASP__SCCP__N__DATA__req& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_DATA_req.");
if (other_value.userData().is_bound()) field_userData = other_value.userData();
else field_userData.clean_up();
if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
else field_connectionId.clean_up();
if (other_value.importance().is_bound()) field_importance = other_value.importance();
else field_importance.clean_up();
}

void ASP__SCCP__N__DATA__req::clean_up()
{
field_userData.clean_up();
field_connectionId.clean_up();
field_importance.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__DATA__req::get_descriptor() const { return &ASP__SCCP__N__DATA__req_descr_; }
ASP__SCCP__N__DATA__req& ASP__SCCP__N__DATA__req::operator=(const ASP__SCCP__N__DATA__req& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_DATA_req.");
  if (other_value.userData().is_bound()) field_userData = other_value.userData();
  else field_userData.clean_up();
  if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
  else field_connectionId.clean_up();
  if (other_value.importance().is_bound()) field_importance = other_value.importance();
  else field_importance.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__DATA__req::operator==(const ASP__SCCP__N__DATA__req& other_value) const
{
return field_userData==other_value.field_userData
  && field_connectionId==other_value.field_connectionId
  && field_importance==other_value.field_importance;
}

boolean ASP__SCCP__N__DATA__req::is_bound() const
{
return (field_userData.is_bound())
  || (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_bound())
  || (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_bound());
}
boolean ASP__SCCP__N__DATA__req::is_value() const
{
return field_userData.is_value()
  && (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_value())
  && (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_value());
}
int ASP__SCCP__N__DATA__req::size_of() const
{
  int ret_val = 1;
  if (field_connectionId.ispresent()) ret_val++;
  if (field_importance.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__DATA__req::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ userData := ");
field_userData.log();
TTCN_Logger::log_event_str(", connectionId := ");
field_connectionId.log();
TTCN_Logger::log_event_str(", importance := ");
field_importance.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__DATA__req::set_implicit_omit()
{
if (userData().is_bound()) userData().set_implicit_omit();
if (!connectionId().is_bound()) connectionId() = OMIT_VALUE;
else connectionId().set_implicit_omit();
if (!importance().is_bound()) importance() = OMIT_VALUE;
else importance().set_implicit_omit();
}

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

void ASP__SCCP__N__DATA__req::encode_text(Text_Buf& text_buf) const
{
field_userData.encode_text(text_buf);
field_connectionId.encode_text(text_buf);
field_importance.encode_text(text_buf);
}

void ASP__SCCP__N__DATA__req::decode_text(Text_Buf& text_buf)
{
field_userData.decode_text(text_buf);
field_connectionId.decode_text(text_buf);
field_importance.decode_text(text_buf);
}

struct ASP__SCCP__N__DATA__req_template::single_value_struct {
OCTETSTRING_template field_userData;
INTEGER_template field_connectionId;
INTEGER_template field_importance;
};

void ASP__SCCP__N__DATA__req_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_userData = ANY_VALUE;
single_value->field_connectionId = ANY_OR_OMIT;
single_value->field_importance = ANY_OR_OMIT;
}
}
}

void ASP__SCCP__N__DATA__req_template::copy_value(const ASP__SCCP__N__DATA__req& other_value)
{
single_value = new single_value_struct;
if (other_value.userData().is_bound()) {
  single_value->field_userData = other_value.userData();
} else {
  single_value->field_userData.clean_up();
}
if (other_value.connectionId().is_bound()) {
  if (other_value.connectionId().ispresent()) single_value->field_connectionId = other_value.connectionId()();
  else single_value->field_connectionId = OMIT_VALUE;
} else {
  single_value->field_connectionId.clean_up();
}
if (other_value.importance().is_bound()) {
  if (other_value.importance().ispresent()) single_value->field_importance = other_value.importance()();
  else single_value->field_importance = OMIT_VALUE;
} else {
  single_value->field_importance.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

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

ASP__SCCP__N__DATA__req_template::ASP__SCCP__N__DATA__req_template()
{
}

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

ASP__SCCP__N__DATA__req_template::ASP__SCCP__N__DATA__req_template(const ASP__SCCP__N__DATA__req& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__DATA__req_template::match(const ASP__SCCP__N__DATA__req& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.userData().is_bound()) return FALSE;
if(!single_value->field_userData.match(other_value.userData(), legacy))return FALSE;
if(!other_value.connectionId().is_bound()) return FALSE;
if((other_value.connectionId().ispresent() ? !single_value->field_connectionId.match((const INTEGER&)other_value.connectionId(), legacy) : !single_value->field_connectionId.match_omit(legacy)))return FALSE;
if(!other_value.importance().is_bound()) return FALSE;
if((other_value.importance().ispresent() ? !single_value->field_importance.match((const INTEGER&)other_value.importance(), legacy) : !single_value->field_importance.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_DATA_req.");
}
return FALSE;
}

boolean ASP__SCCP__N__DATA__req_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_userData.is_bound()
 || (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_bound())
 || (single_value->field_importance.is_omit() || single_value->field_importance.is_bound());
}

boolean ASP__SCCP__N__DATA__req_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_userData.is_value()
 && (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_value())
 && (single_value->field_importance.is_omit() || single_value->field_importance.is_value());
}

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

ASP__SCCP__N__DATA__req ASP__SCCP__N__DATA__req_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DATA_req.");
ASP__SCCP__N__DATA__req ret_val;
if (single_value->field_userData.is_bound()) {
ret_val.userData() = single_value->field_userData.valueof();
}
if (single_value->field_connectionId.is_omit()) ret_val.connectionId() = OMIT_VALUE;
else if (single_value->field_connectionId.is_bound()) {
ret_val.connectionId() = single_value->field_connectionId.valueof();
}
if (single_value->field_importance.is_omit()) ret_val.importance() = OMIT_VALUE;
else if (single_value->field_importance.is_bound()) {
ret_val.importance() = single_value->field_importance.valueof();
}
return ret_val;
}

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

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

OCTETSTRING_template& ASP__SCCP__N__DATA__req_template::userData()
{
set_specific();
return single_value->field_userData;
}

const OCTETSTRING_template& ASP__SCCP__N__DATA__req_template::userData() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field userData of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DATA_req.");
return single_value->field_userData;
}

INTEGER_template& ASP__SCCP__N__DATA__req_template::connectionId()
{
set_specific();
return single_value->field_connectionId;
}

const INTEGER_template& ASP__SCCP__N__DATA__req_template::connectionId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field connectionId of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DATA_req.");
return single_value->field_connectionId;
}

INTEGER_template& ASP__SCCP__N__DATA__req_template::importance()
{
set_specific();
return single_value->field_importance;
}

const INTEGER_template& ASP__SCCP__N__DATA__req_template::importance() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field importance of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DATA_req.");
return single_value->field_importance;
}

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

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

void ASP__SCCP__N__DATA__req_template::log_match(const ASP__SCCP__N__DATA__req& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_userData.match(match_value.userData(), legacy)){
TTCN_Logger::log_logmatch_info(".userData");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.connectionId().ispresent()){
if(!single_value->field_connectionId.match(match_value.connectionId(), legacy)){
TTCN_Logger::log_logmatch_info(".connectionId");
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_connectionId.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".connectionId := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.importance().ispresent()){
if(!single_value->field_importance.match(match_value.importance(), legacy)){
TTCN_Logger::log_logmatch_info(".importance");
single_value->field_importance.log_match(match_value.importance(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_importance.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".importance := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_importance.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ userData := ");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::log_event_str(", connectionId := ");
if (match_value.connectionId().ispresent()) {
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_connectionId.log();
if (single_value->field_connectionId.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", importance := ");
if (match_value.importance().ispresent()) {
single_value->field_importance.log_match(match_value.importance(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_importance.log();
if (single_value->field_importance.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

ASP__SCCP__N__DATA__ind::ASP__SCCP__N__DATA__ind()
{
}

ASP__SCCP__N__DATA__ind::ASP__SCCP__N__DATA__ind(const OCTETSTRING& par_userData,
    const OPTIONAL< INTEGER >& par_connectionId,
    const OPTIONAL< INTEGER >& par_importance)
  :   field_userData(par_userData),
  field_connectionId(par_connectionId),
  field_importance(par_importance)
{
}

ASP__SCCP__N__DATA__ind::ASP__SCCP__N__DATA__ind(const ASP__SCCP__N__DATA__ind& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_DATA_ind.");
if (other_value.userData().is_bound()) field_userData = other_value.userData();
else field_userData.clean_up();
if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
else field_connectionId.clean_up();
if (other_value.importance().is_bound()) field_importance = other_value.importance();
else field_importance.clean_up();
}

void ASP__SCCP__N__DATA__ind::clean_up()
{
field_userData.clean_up();
field_connectionId.clean_up();
field_importance.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__DATA__ind::get_descriptor() const { return &ASP__SCCP__N__DATA__ind_descr_; }
ASP__SCCP__N__DATA__ind& ASP__SCCP__N__DATA__ind::operator=(const ASP__SCCP__N__DATA__ind& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_DATA_ind.");
  if (other_value.userData().is_bound()) field_userData = other_value.userData();
  else field_userData.clean_up();
  if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
  else field_connectionId.clean_up();
  if (other_value.importance().is_bound()) field_importance = other_value.importance();
  else field_importance.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__DATA__ind::operator==(const ASP__SCCP__N__DATA__ind& other_value) const
{
return field_userData==other_value.field_userData
  && field_connectionId==other_value.field_connectionId
  && field_importance==other_value.field_importance;
}

boolean ASP__SCCP__N__DATA__ind::is_bound() const
{
return (field_userData.is_bound())
  || (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_bound())
  || (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_bound());
}
boolean ASP__SCCP__N__DATA__ind::is_value() const
{
return field_userData.is_value()
  && (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_value())
  && (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_value());
}
int ASP__SCCP__N__DATA__ind::size_of() const
{
  int ret_val = 1;
  if (field_connectionId.ispresent()) ret_val++;
  if (field_importance.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__DATA__ind::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ userData := ");
field_userData.log();
TTCN_Logger::log_event_str(", connectionId := ");
field_connectionId.log();
TTCN_Logger::log_event_str(", importance := ");
field_importance.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__DATA__ind::set_implicit_omit()
{
if (userData().is_bound()) userData().set_implicit_omit();
if (!connectionId().is_bound()) connectionId() = OMIT_VALUE;
else connectionId().set_implicit_omit();
if (!importance().is_bound()) importance() = OMIT_VALUE;
else importance().set_implicit_omit();
}

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

void ASP__SCCP__N__DATA__ind::encode_text(Text_Buf& text_buf) const
{
field_userData.encode_text(text_buf);
field_connectionId.encode_text(text_buf);
field_importance.encode_text(text_buf);
}

void ASP__SCCP__N__DATA__ind::decode_text(Text_Buf& text_buf)
{
field_userData.decode_text(text_buf);
field_connectionId.decode_text(text_buf);
field_importance.decode_text(text_buf);
}

struct ASP__SCCP__N__DATA__ind_template::single_value_struct {
OCTETSTRING_template field_userData;
INTEGER_template field_connectionId;
INTEGER_template field_importance;
};

void ASP__SCCP__N__DATA__ind_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_userData = ANY_VALUE;
single_value->field_connectionId = ANY_OR_OMIT;
single_value->field_importance = ANY_OR_OMIT;
}
}
}

void ASP__SCCP__N__DATA__ind_template::copy_value(const ASP__SCCP__N__DATA__ind& other_value)
{
single_value = new single_value_struct;
if (other_value.userData().is_bound()) {
  single_value->field_userData = other_value.userData();
} else {
  single_value->field_userData.clean_up();
}
if (other_value.connectionId().is_bound()) {
  if (other_value.connectionId().ispresent()) single_value->field_connectionId = other_value.connectionId()();
  else single_value->field_connectionId = OMIT_VALUE;
} else {
  single_value->field_connectionId.clean_up();
}
if (other_value.importance().is_bound()) {
  if (other_value.importance().ispresent()) single_value->field_importance = other_value.importance()();
  else single_value->field_importance = OMIT_VALUE;
} else {
  single_value->field_importance.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

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

ASP__SCCP__N__DATA__ind_template::ASP__SCCP__N__DATA__ind_template()
{
}

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

ASP__SCCP__N__DATA__ind_template::ASP__SCCP__N__DATA__ind_template(const ASP__SCCP__N__DATA__ind& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__DATA__ind_template::match(const ASP__SCCP__N__DATA__ind& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.userData().is_bound()) return FALSE;
if(!single_value->field_userData.match(other_value.userData(), legacy))return FALSE;
if(!other_value.connectionId().is_bound()) return FALSE;
if((other_value.connectionId().ispresent() ? !single_value->field_connectionId.match((const INTEGER&)other_value.connectionId(), legacy) : !single_value->field_connectionId.match_omit(legacy)))return FALSE;
if(!other_value.importance().is_bound()) return FALSE;
if((other_value.importance().ispresent() ? !single_value->field_importance.match((const INTEGER&)other_value.importance(), legacy) : !single_value->field_importance.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_DATA_ind.");
}
return FALSE;
}

boolean ASP__SCCP__N__DATA__ind_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_userData.is_bound()
 || (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_bound())
 || (single_value->field_importance.is_omit() || single_value->field_importance.is_bound());
}

boolean ASP__SCCP__N__DATA__ind_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_userData.is_value()
 && (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_value())
 && (single_value->field_importance.is_omit() || single_value->field_importance.is_value());
}

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

ASP__SCCP__N__DATA__ind ASP__SCCP__N__DATA__ind_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DATA_ind.");
ASP__SCCP__N__DATA__ind ret_val;
if (single_value->field_userData.is_bound()) {
ret_val.userData() = single_value->field_userData.valueof();
}
if (single_value->field_connectionId.is_omit()) ret_val.connectionId() = OMIT_VALUE;
else if (single_value->field_connectionId.is_bound()) {
ret_val.connectionId() = single_value->field_connectionId.valueof();
}
if (single_value->field_importance.is_omit()) ret_val.importance() = OMIT_VALUE;
else if (single_value->field_importance.is_bound()) {
ret_val.importance() = single_value->field_importance.valueof();
}
return ret_val;
}

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

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

OCTETSTRING_template& ASP__SCCP__N__DATA__ind_template::userData()
{
set_specific();
return single_value->field_userData;
}

const OCTETSTRING_template& ASP__SCCP__N__DATA__ind_template::userData() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field userData of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DATA_ind.");
return single_value->field_userData;
}

INTEGER_template& ASP__SCCP__N__DATA__ind_template::connectionId()
{
set_specific();
return single_value->field_connectionId;
}

const INTEGER_template& ASP__SCCP__N__DATA__ind_template::connectionId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field connectionId of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DATA_ind.");
return single_value->field_connectionId;
}

INTEGER_template& ASP__SCCP__N__DATA__ind_template::importance()
{
set_specific();
return single_value->field_importance;
}

const INTEGER_template& ASP__SCCP__N__DATA__ind_template::importance() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field importance of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DATA_ind.");
return single_value->field_importance;
}

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

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

void ASP__SCCP__N__DATA__ind_template::log_match(const ASP__SCCP__N__DATA__ind& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_userData.match(match_value.userData(), legacy)){
TTCN_Logger::log_logmatch_info(".userData");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.connectionId().ispresent()){
if(!single_value->field_connectionId.match(match_value.connectionId(), legacy)){
TTCN_Logger::log_logmatch_info(".connectionId");
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_connectionId.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".connectionId := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.importance().ispresent()){
if(!single_value->field_importance.match(match_value.importance(), legacy)){
TTCN_Logger::log_logmatch_info(".importance");
single_value->field_importance.log_match(match_value.importance(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_importance.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".importance := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_importance.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ userData := ");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::log_event_str(", connectionId := ");
if (match_value.connectionId().ispresent()) {
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_connectionId.log();
if (single_value->field_connectionId.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", importance := ");
if (match_value.importance().ispresent()) {
single_value->field_importance.log_match(match_value.importance(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_importance.log();
if (single_value->field_importance.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

ASP__SCCP__N__DISCONNECT__req::ASP__SCCP__N__DISCONNECT__req()
{
}

ASP__SCCP__N__DISCONNECT__req::ASP__SCCP__N__DISCONNECT__req(const OPTIONAL< SCCP__PAR__Address >& par_respondingAddress,
    const INTEGER& par_reason,
    const OPTIONAL< OCTETSTRING >& par_userData,
    const OPTIONAL< INTEGER >& par_connectionId,
    const OPTIONAL< INTEGER >& par_importance)
  :   field_respondingAddress(par_respondingAddress),
  field_reason(par_reason),
  field_userData(par_userData),
  field_connectionId(par_connectionId),
  field_importance(par_importance)
{
}

ASP__SCCP__N__DISCONNECT__req::ASP__SCCP__N__DISCONNECT__req(const ASP__SCCP__N__DISCONNECT__req& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.");
if (other_value.respondingAddress().is_bound()) field_respondingAddress = other_value.respondingAddress();
else field_respondingAddress.clean_up();
if (other_value.reason().is_bound()) field_reason = other_value.reason();
else field_reason.clean_up();
if (other_value.userData().is_bound()) field_userData = other_value.userData();
else field_userData.clean_up();
if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
else field_connectionId.clean_up();
if (other_value.importance().is_bound()) field_importance = other_value.importance();
else field_importance.clean_up();
}

void ASP__SCCP__N__DISCONNECT__req::clean_up()
{
field_respondingAddress.clean_up();
field_reason.clean_up();
field_userData.clean_up();
field_connectionId.clean_up();
field_importance.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__DISCONNECT__req::get_descriptor() const { return &ASP__SCCP__N__DISCONNECT__req_descr_; }
ASP__SCCP__N__DISCONNECT__req& ASP__SCCP__N__DISCONNECT__req::operator=(const ASP__SCCP__N__DISCONNECT__req& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.");
  if (other_value.respondingAddress().is_bound()) field_respondingAddress = other_value.respondingAddress();
  else field_respondingAddress.clean_up();
  if (other_value.reason().is_bound()) field_reason = other_value.reason();
  else field_reason.clean_up();
  if (other_value.userData().is_bound()) field_userData = other_value.userData();
  else field_userData.clean_up();
  if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
  else field_connectionId.clean_up();
  if (other_value.importance().is_bound()) field_importance = other_value.importance();
  else field_importance.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__DISCONNECT__req::operator==(const ASP__SCCP__N__DISCONNECT__req& other_value) const
{
return field_respondingAddress==other_value.field_respondingAddress
  && field_reason==other_value.field_reason
  && field_userData==other_value.field_userData
  && field_connectionId==other_value.field_connectionId
  && field_importance==other_value.field_importance;
}

boolean ASP__SCCP__N__DISCONNECT__req::is_bound() const
{
return (OPTIONAL_OMIT == field_respondingAddress.get_selection() || field_respondingAddress.is_bound())
  || (field_reason.is_bound())
  || (OPTIONAL_OMIT == field_userData.get_selection() || field_userData.is_bound())
  || (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_bound())
  || (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_bound());
}
boolean ASP__SCCP__N__DISCONNECT__req::is_value() const
{
return (OPTIONAL_OMIT == field_respondingAddress.get_selection() || field_respondingAddress.is_value())
  && field_reason.is_value()
  && (OPTIONAL_OMIT == field_userData.get_selection() || field_userData.is_value())
  && (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_value())
  && (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_value());
}
int ASP__SCCP__N__DISCONNECT__req::size_of() const
{
  int ret_val = 1;
  if (field_respondingAddress.ispresent()) ret_val++;
  if (field_userData.ispresent()) ret_val++;
  if (field_connectionId.ispresent()) ret_val++;
  if (field_importance.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__DISCONNECT__req::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ respondingAddress := ");
field_respondingAddress.log();
TTCN_Logger::log_event_str(", reason := ");
field_reason.log();
TTCN_Logger::log_event_str(", userData := ");
field_userData.log();
TTCN_Logger::log_event_str(", connectionId := ");
field_connectionId.log();
TTCN_Logger::log_event_str(", importance := ");
field_importance.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__DISCONNECT__req::set_implicit_omit()
{
if (!respondingAddress().is_bound()) respondingAddress() = OMIT_VALUE;
else respondingAddress().set_implicit_omit();
if (reason().is_bound()) reason().set_implicit_omit();
if (!userData().is_bound()) userData() = OMIT_VALUE;
else userData().set_implicit_omit();
if (!connectionId().is_bound()) connectionId() = OMIT_VALUE;
else connectionId().set_implicit_omit();
if (!importance().is_bound()) importance() = OMIT_VALUE;
else importance().set_implicit_omit();
}

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

void ASP__SCCP__N__DISCONNECT__req::encode_text(Text_Buf& text_buf) const
{
field_respondingAddress.encode_text(text_buf);
field_reason.encode_text(text_buf);
field_userData.encode_text(text_buf);
field_connectionId.encode_text(text_buf);
field_importance.encode_text(text_buf);
}

void ASP__SCCP__N__DISCONNECT__req::decode_text(Text_Buf& text_buf)
{
field_respondingAddress.decode_text(text_buf);
field_reason.decode_text(text_buf);
field_userData.decode_text(text_buf);
field_connectionId.decode_text(text_buf);
field_importance.decode_text(text_buf);
}

struct ASP__SCCP__N__DISCONNECT__req_template::single_value_struct {
SCCP__PAR__Address_template field_respondingAddress;
INTEGER_template field_reason;
OCTETSTRING_template field_userData;
INTEGER_template field_connectionId;
INTEGER_template field_importance;
};

void ASP__SCCP__N__DISCONNECT__req_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_respondingAddress = ANY_OR_OMIT;
single_value->field_reason = ANY_VALUE;
single_value->field_userData = ANY_OR_OMIT;
single_value->field_connectionId = ANY_OR_OMIT;
single_value->field_importance = ANY_OR_OMIT;
}
}
}

void ASP__SCCP__N__DISCONNECT__req_template::copy_value(const ASP__SCCP__N__DISCONNECT__req& other_value)
{
single_value = new single_value_struct;
if (other_value.respondingAddress().is_bound()) {
  if (other_value.respondingAddress().ispresent()) single_value->field_respondingAddress = other_value.respondingAddress()();
  else single_value->field_respondingAddress = OMIT_VALUE;
} else {
  single_value->field_respondingAddress.clean_up();
}
if (other_value.reason().is_bound()) {
  single_value->field_reason = other_value.reason();
} else {
  single_value->field_reason.clean_up();
}
if (other_value.userData().is_bound()) {
  if (other_value.userData().ispresent()) single_value->field_userData = other_value.userData()();
  else single_value->field_userData = OMIT_VALUE;
} else {
  single_value->field_userData.clean_up();
}
if (other_value.connectionId().is_bound()) {
  if (other_value.connectionId().ispresent()) single_value->field_connectionId = other_value.connectionId()();
  else single_value->field_connectionId = OMIT_VALUE;
} else {
  single_value->field_connectionId.clean_up();
}
if (other_value.importance().is_bound()) {
  if (other_value.importance().ispresent()) single_value->field_importance = other_value.importance()();
  else single_value->field_importance = OMIT_VALUE;
} else {
  single_value->field_importance.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ASP__SCCP__N__DISCONNECT__req_template::copy_template(const ASP__SCCP__N__DISCONNECT__req_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.respondingAddress().get_selection()) {
single_value->field_respondingAddress = other_value.respondingAddress();
} else {
single_value->field_respondingAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.reason().get_selection()) {
single_value->field_reason = other_value.reason();
} else {
single_value->field_reason.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.userData().get_selection()) {
single_value->field_userData = other_value.userData();
} else {
single_value->field_userData.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.connectionId().get_selection()) {
single_value->field_connectionId = other_value.connectionId();
} else {
single_value->field_connectionId.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.importance().get_selection()) {
single_value->field_importance = other_value.importance();
} else {
single_value->field_importance.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ASP__SCCP__N__DISCONNECT__req_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new ASP__SCCP__N__DISCONNECT__req_template(*other_value.implication_.precondition);
implication_.implied_template = new ASP__SCCP__N__DISCONNECT__req_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.");
break;
}
set_selection(other_value);
}

ASP__SCCP__N__DISCONNECT__req_template::ASP__SCCP__N__DISCONNECT__req_template()
{
}

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

ASP__SCCP__N__DISCONNECT__req_template::ASP__SCCP__N__DISCONNECT__req_template(const ASP__SCCP__N__DISCONNECT__req& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__DISCONNECT__req_template::match(const ASP__SCCP__N__DISCONNECT__req& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.respondingAddress().is_bound()) return FALSE;
if((other_value.respondingAddress().ispresent() ? !single_value->field_respondingAddress.match((const SCCP__PAR__Address&)other_value.respondingAddress(), legacy) : !single_value->field_respondingAddress.match_omit(legacy)))return FALSE;
if(!other_value.reason().is_bound()) return FALSE;
if(!single_value->field_reason.match(other_value.reason(), legacy))return FALSE;
if(!other_value.userData().is_bound()) return FALSE;
if((other_value.userData().ispresent() ? !single_value->field_userData.match((const OCTETSTRING&)other_value.userData(), legacy) : !single_value->field_userData.match_omit(legacy)))return FALSE;
if(!other_value.connectionId().is_bound()) return FALSE;
if((other_value.connectionId().ispresent() ? !single_value->field_connectionId.match((const INTEGER&)other_value.connectionId(), legacy) : !single_value->field_connectionId.match_omit(legacy)))return FALSE;
if(!other_value.importance().is_bound()) return FALSE;
if((other_value.importance().ispresent() ? !single_value->field_importance.match((const INTEGER&)other_value.importance(), legacy) : !single_value->field_importance.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.");
}
return FALSE;
}

boolean ASP__SCCP__N__DISCONNECT__req_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return (single_value->field_respondingAddress.is_omit() || single_value->field_respondingAddress.is_bound())
 || single_value->field_reason.is_bound()
 || (single_value->field_userData.is_omit() || single_value->field_userData.is_bound())
 || (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_bound())
 || (single_value->field_importance.is_omit() || single_value->field_importance.is_bound());
}

boolean ASP__SCCP__N__DISCONNECT__req_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return (single_value->field_respondingAddress.is_omit() || single_value->field_respondingAddress.is_value())
 && single_value->field_reason.is_value()
 && (single_value->field_userData.is_omit() || single_value->field_userData.is_value())
 && (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_value())
 && (single_value->field_importance.is_omit() || single_value->field_importance.is_value());
}

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

ASP__SCCP__N__DISCONNECT__req ASP__SCCP__N__DISCONNECT__req_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.");
ASP__SCCP__N__DISCONNECT__req ret_val;
if (single_value->field_respondingAddress.is_omit()) ret_val.respondingAddress() = OMIT_VALUE;
else if (single_value->field_respondingAddress.is_bound()) {
ret_val.respondingAddress() = single_value->field_respondingAddress.valueof();
}
if (single_value->field_reason.is_bound()) {
ret_val.reason() = single_value->field_reason.valueof();
}
if (single_value->field_userData.is_omit()) ret_val.userData() = OMIT_VALUE;
else if (single_value->field_userData.is_bound()) {
ret_val.userData() = single_value->field_userData.valueof();
}
if (single_value->field_connectionId.is_omit()) ret_val.connectionId() = OMIT_VALUE;
else if (single_value->field_connectionId.is_bound()) {
ret_val.connectionId() = single_value->field_connectionId.valueof();
}
if (single_value->field_importance.is_omit()) ret_val.importance() = OMIT_VALUE;
else if (single_value->field_importance.is_bound()) {
ret_val.importance() = single_value->field_importance.valueof();
}
return ret_val;
}

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

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

SCCP__PAR__Address_template& ASP__SCCP__N__DISCONNECT__req_template::respondingAddress()
{
set_specific();
return single_value->field_respondingAddress;
}

const SCCP__PAR__Address_template& ASP__SCCP__N__DISCONNECT__req_template::respondingAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field respondingAddress of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.");
return single_value->field_respondingAddress;
}

INTEGER_template& ASP__SCCP__N__DISCONNECT__req_template::reason()
{
set_specific();
return single_value->field_reason;
}

const INTEGER_template& ASP__SCCP__N__DISCONNECT__req_template::reason() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field reason of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.");
return single_value->field_reason;
}

OCTETSTRING_template& ASP__SCCP__N__DISCONNECT__req_template::userData()
{
set_specific();
return single_value->field_userData;
}

const OCTETSTRING_template& ASP__SCCP__N__DISCONNECT__req_template::userData() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field userData of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.");
return single_value->field_userData;
}

INTEGER_template& ASP__SCCP__N__DISCONNECT__req_template::connectionId()
{
set_specific();
return single_value->field_connectionId;
}

const INTEGER_template& ASP__SCCP__N__DISCONNECT__req_template::connectionId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field connectionId of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.");
return single_value->field_connectionId;
}

INTEGER_template& ASP__SCCP__N__DISCONNECT__req_template::importance()
{
set_specific();
return single_value->field_importance;
}

const INTEGER_template& ASP__SCCP__N__DISCONNECT__req_template::importance() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field importance of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.");
return single_value->field_importance;
}

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

void ASP__SCCP__N__DISCONNECT__req_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ respondingAddress := ");
single_value->field_respondingAddress.log();
TTCN_Logger::log_event_str(", reason := ");
single_value->field_reason.log();
TTCN_Logger::log_event_str(", userData := ");
single_value->field_userData.log();
TTCN_Logger::log_event_str(", connectionId := ");
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(", importance := ");
single_value->field_importance.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void ASP__SCCP__N__DISCONNECT__req_template::log_match(const ASP__SCCP__N__DISCONNECT__req& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if (match_value.respondingAddress().ispresent()){
if(!single_value->field_respondingAddress.match(match_value.respondingAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".respondingAddress");
single_value->field_respondingAddress.log_match(match_value.respondingAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_respondingAddress.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".respondingAddress := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_respondingAddress.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_reason.match(match_value.reason(), legacy)){
TTCN_Logger::log_logmatch_info(".reason");
single_value->field_reason.log_match(match_value.reason(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.userData().ispresent()){
if(!single_value->field_userData.match(match_value.userData(), legacy)){
TTCN_Logger::log_logmatch_info(".userData");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_userData.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".userData := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_userData.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.connectionId().ispresent()){
if(!single_value->field_connectionId.match(match_value.connectionId(), legacy)){
TTCN_Logger::log_logmatch_info(".connectionId");
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_connectionId.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".connectionId := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.importance().ispresent()){
if(!single_value->field_importance.match(match_value.importance(), legacy)){
TTCN_Logger::log_logmatch_info(".importance");
single_value->field_importance.log_match(match_value.importance(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_importance.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".importance := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_importance.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ respondingAddress := ");
if (match_value.respondingAddress().ispresent()) {
single_value->field_respondingAddress.log_match(match_value.respondingAddress(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_respondingAddress.log();
if (single_value->field_respondingAddress.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", reason := ");
single_value->field_reason.log_match(match_value.reason(), legacy);
TTCN_Logger::log_event_str(", userData := ");
if (match_value.userData().ispresent()) {
single_value->field_userData.log_match(match_value.userData(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_userData.log();
if (single_value->field_userData.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", connectionId := ");
if (match_value.connectionId().ispresent()) {
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_connectionId.log();
if (single_value->field_connectionId.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", importance := ");
if (match_value.importance().ispresent()) {
single_value->field_importance.log_match(match_value.importance(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_importance.log();
if (single_value->field_importance.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

ASP__SCCP__N__DISCONNECT__ind::ASP__SCCP__N__DISCONNECT__ind()
{
}

ASP__SCCP__N__DISCONNECT__ind::ASP__SCCP__N__DISCONNECT__ind(const INTEGER& par_originator,
    const OPTIONAL< SCCP__PAR__Address >& par_respondingAddress,
    const INTEGER& par_reason,
    const OPTIONAL< OCTETSTRING >& par_userData,
    const OPTIONAL< INTEGER >& par_connectionId,
    const OPTIONAL< INTEGER >& par_importance)
  :   field_originator(par_originator),
  field_respondingAddress(par_respondingAddress),
  field_reason(par_reason),
  field_userData(par_userData),
  field_connectionId(par_connectionId),
  field_importance(par_importance)
{
}

ASP__SCCP__N__DISCONNECT__ind::ASP__SCCP__N__DISCONNECT__ind(const ASP__SCCP__N__DISCONNECT__ind& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.");
if (other_value.originator().is_bound()) field_originator = other_value.originator();
else field_originator.clean_up();
if (other_value.respondingAddress().is_bound()) field_respondingAddress = other_value.respondingAddress();
else field_respondingAddress.clean_up();
if (other_value.reason().is_bound()) field_reason = other_value.reason();
else field_reason.clean_up();
if (other_value.userData().is_bound()) field_userData = other_value.userData();
else field_userData.clean_up();
if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
else field_connectionId.clean_up();
if (other_value.importance().is_bound()) field_importance = other_value.importance();
else field_importance.clean_up();
}

void ASP__SCCP__N__DISCONNECT__ind::clean_up()
{
field_originator.clean_up();
field_respondingAddress.clean_up();
field_reason.clean_up();
field_userData.clean_up();
field_connectionId.clean_up();
field_importance.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__DISCONNECT__ind::get_descriptor() const { return &ASP__SCCP__N__DISCONNECT__ind_descr_; }
ASP__SCCP__N__DISCONNECT__ind& ASP__SCCP__N__DISCONNECT__ind::operator=(const ASP__SCCP__N__DISCONNECT__ind& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.");
  if (other_value.originator().is_bound()) field_originator = other_value.originator();
  else field_originator.clean_up();
  if (other_value.respondingAddress().is_bound()) field_respondingAddress = other_value.respondingAddress();
  else field_respondingAddress.clean_up();
  if (other_value.reason().is_bound()) field_reason = other_value.reason();
  else field_reason.clean_up();
  if (other_value.userData().is_bound()) field_userData = other_value.userData();
  else field_userData.clean_up();
  if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
  else field_connectionId.clean_up();
  if (other_value.importance().is_bound()) field_importance = other_value.importance();
  else field_importance.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__DISCONNECT__ind::operator==(const ASP__SCCP__N__DISCONNECT__ind& other_value) const
{
return field_originator==other_value.field_originator
  && field_respondingAddress==other_value.field_respondingAddress
  && field_reason==other_value.field_reason
  && field_userData==other_value.field_userData
  && field_connectionId==other_value.field_connectionId
  && field_importance==other_value.field_importance;
}

boolean ASP__SCCP__N__DISCONNECT__ind::is_bound() const
{
return (field_originator.is_bound())
  || (OPTIONAL_OMIT == field_respondingAddress.get_selection() || field_respondingAddress.is_bound())
  || (field_reason.is_bound())
  || (OPTIONAL_OMIT == field_userData.get_selection() || field_userData.is_bound())
  || (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_bound())
  || (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_bound());
}
boolean ASP__SCCP__N__DISCONNECT__ind::is_value() const
{
return field_originator.is_value()
  && (OPTIONAL_OMIT == field_respondingAddress.get_selection() || field_respondingAddress.is_value())
  && field_reason.is_value()
  && (OPTIONAL_OMIT == field_userData.get_selection() || field_userData.is_value())
  && (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_value())
  && (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_value());
}
int ASP__SCCP__N__DISCONNECT__ind::size_of() const
{
  int ret_val = 2;
  if (field_respondingAddress.ispresent()) ret_val++;
  if (field_userData.ispresent()) ret_val++;
  if (field_connectionId.ispresent()) ret_val++;
  if (field_importance.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__DISCONNECT__ind::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ originator := ");
field_originator.log();
TTCN_Logger::log_event_str(", respondingAddress := ");
field_respondingAddress.log();
TTCN_Logger::log_event_str(", reason := ");
field_reason.log();
TTCN_Logger::log_event_str(", userData := ");
field_userData.log();
TTCN_Logger::log_event_str(", connectionId := ");
field_connectionId.log();
TTCN_Logger::log_event_str(", importance := ");
field_importance.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__DISCONNECT__ind::set_implicit_omit()
{
if (originator().is_bound()) originator().set_implicit_omit();
if (!respondingAddress().is_bound()) respondingAddress() = OMIT_VALUE;
else respondingAddress().set_implicit_omit();
if (reason().is_bound()) reason().set_implicit_omit();
if (!userData().is_bound()) userData() = OMIT_VALUE;
else userData().set_implicit_omit();
if (!connectionId().is_bound()) connectionId() = OMIT_VALUE;
else connectionId().set_implicit_omit();
if (!importance().is_bound()) importance() = OMIT_VALUE;
else importance().set_implicit_omit();
}

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

void ASP__SCCP__N__DISCONNECT__ind::encode_text(Text_Buf& text_buf) const
{
field_originator.encode_text(text_buf);
field_respondingAddress.encode_text(text_buf);
field_reason.encode_text(text_buf);
field_userData.encode_text(text_buf);
field_connectionId.encode_text(text_buf);
field_importance.encode_text(text_buf);
}

void ASP__SCCP__N__DISCONNECT__ind::decode_text(Text_Buf& text_buf)
{
field_originator.decode_text(text_buf);
field_respondingAddress.decode_text(text_buf);
field_reason.decode_text(text_buf);
field_userData.decode_text(text_buf);
field_connectionId.decode_text(text_buf);
field_importance.decode_text(text_buf);
}

struct ASP__SCCP__N__DISCONNECT__ind_template::single_value_struct {
INTEGER_template field_originator;
SCCP__PAR__Address_template field_respondingAddress;
INTEGER_template field_reason;
OCTETSTRING_template field_userData;
INTEGER_template field_connectionId;
INTEGER_template field_importance;
};

void ASP__SCCP__N__DISCONNECT__ind_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_originator = ANY_VALUE;
single_value->field_respondingAddress = ANY_OR_OMIT;
single_value->field_reason = ANY_VALUE;
single_value->field_userData = ANY_OR_OMIT;
single_value->field_connectionId = ANY_OR_OMIT;
single_value->field_importance = ANY_OR_OMIT;
}
}
}

void ASP__SCCP__N__DISCONNECT__ind_template::copy_value(const ASP__SCCP__N__DISCONNECT__ind& other_value)
{
single_value = new single_value_struct;
if (other_value.originator().is_bound()) {
  single_value->field_originator = other_value.originator();
} else {
  single_value->field_originator.clean_up();
}
if (other_value.respondingAddress().is_bound()) {
  if (other_value.respondingAddress().ispresent()) single_value->field_respondingAddress = other_value.respondingAddress()();
  else single_value->field_respondingAddress = OMIT_VALUE;
} else {
  single_value->field_respondingAddress.clean_up();
}
if (other_value.reason().is_bound()) {
  single_value->field_reason = other_value.reason();
} else {
  single_value->field_reason.clean_up();
}
if (other_value.userData().is_bound()) {
  if (other_value.userData().ispresent()) single_value->field_userData = other_value.userData()();
  else single_value->field_userData = OMIT_VALUE;
} else {
  single_value->field_userData.clean_up();
}
if (other_value.connectionId().is_bound()) {
  if (other_value.connectionId().ispresent()) single_value->field_connectionId = other_value.connectionId()();
  else single_value->field_connectionId = OMIT_VALUE;
} else {
  single_value->field_connectionId.clean_up();
}
if (other_value.importance().is_bound()) {
  if (other_value.importance().ispresent()) single_value->field_importance = other_value.importance()();
  else single_value->field_importance = OMIT_VALUE;
} else {
  single_value->field_importance.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ASP__SCCP__N__DISCONNECT__ind_template::copy_template(const ASP__SCCP__N__DISCONNECT__ind_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.originator().get_selection()) {
single_value->field_originator = other_value.originator();
} else {
single_value->field_originator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.respondingAddress().get_selection()) {
single_value->field_respondingAddress = other_value.respondingAddress();
} else {
single_value->field_respondingAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.reason().get_selection()) {
single_value->field_reason = other_value.reason();
} else {
single_value->field_reason.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.userData().get_selection()) {
single_value->field_userData = other_value.userData();
} else {
single_value->field_userData.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.connectionId().get_selection()) {
single_value->field_connectionId = other_value.connectionId();
} else {
single_value->field_connectionId.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.importance().get_selection()) {
single_value->field_importance = other_value.importance();
} else {
single_value->field_importance.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ASP__SCCP__N__DISCONNECT__ind_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new ASP__SCCP__N__DISCONNECT__ind_template(*other_value.implication_.precondition);
implication_.implied_template = new ASP__SCCP__N__DISCONNECT__ind_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.");
break;
}
set_selection(other_value);
}

ASP__SCCP__N__DISCONNECT__ind_template::ASP__SCCP__N__DISCONNECT__ind_template()
{
}

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

ASP__SCCP__N__DISCONNECT__ind_template::ASP__SCCP__N__DISCONNECT__ind_template(const ASP__SCCP__N__DISCONNECT__ind& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__DISCONNECT__ind_template::match(const ASP__SCCP__N__DISCONNECT__ind& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.originator().is_bound()) return FALSE;
if(!single_value->field_originator.match(other_value.originator(), legacy))return FALSE;
if(!other_value.respondingAddress().is_bound()) return FALSE;
if((other_value.respondingAddress().ispresent() ? !single_value->field_respondingAddress.match((const SCCP__PAR__Address&)other_value.respondingAddress(), legacy) : !single_value->field_respondingAddress.match_omit(legacy)))return FALSE;
if(!other_value.reason().is_bound()) return FALSE;
if(!single_value->field_reason.match(other_value.reason(), legacy))return FALSE;
if(!other_value.userData().is_bound()) return FALSE;
if((other_value.userData().ispresent() ? !single_value->field_userData.match((const OCTETSTRING&)other_value.userData(), legacy) : !single_value->field_userData.match_omit(legacy)))return FALSE;
if(!other_value.connectionId().is_bound()) return FALSE;
if((other_value.connectionId().ispresent() ? !single_value->field_connectionId.match((const INTEGER&)other_value.connectionId(), legacy) : !single_value->field_connectionId.match_omit(legacy)))return FALSE;
if(!other_value.importance().is_bound()) return FALSE;
if((other_value.importance().ispresent() ? !single_value->field_importance.match((const INTEGER&)other_value.importance(), legacy) : !single_value->field_importance.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.");
}
return FALSE;
}

boolean ASP__SCCP__N__DISCONNECT__ind_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_originator.is_bound()
 || (single_value->field_respondingAddress.is_omit() || single_value->field_respondingAddress.is_bound())
 || single_value->field_reason.is_bound()
 || (single_value->field_userData.is_omit() || single_value->field_userData.is_bound())
 || (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_bound())
 || (single_value->field_importance.is_omit() || single_value->field_importance.is_bound());
}

boolean ASP__SCCP__N__DISCONNECT__ind_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_originator.is_value()
 && (single_value->field_respondingAddress.is_omit() || single_value->field_respondingAddress.is_value())
 && single_value->field_reason.is_value()
 && (single_value->field_userData.is_omit() || single_value->field_userData.is_value())
 && (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_value())
 && (single_value->field_importance.is_omit() || single_value->field_importance.is_value());
}

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

ASP__SCCP__N__DISCONNECT__ind ASP__SCCP__N__DISCONNECT__ind_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.");
ASP__SCCP__N__DISCONNECT__ind ret_val;
if (single_value->field_originator.is_bound()) {
ret_val.originator() = single_value->field_originator.valueof();
}
if (single_value->field_respondingAddress.is_omit()) ret_val.respondingAddress() = OMIT_VALUE;
else if (single_value->field_respondingAddress.is_bound()) {
ret_val.respondingAddress() = single_value->field_respondingAddress.valueof();
}
if (single_value->field_reason.is_bound()) {
ret_val.reason() = single_value->field_reason.valueof();
}
if (single_value->field_userData.is_omit()) ret_val.userData() = OMIT_VALUE;
else if (single_value->field_userData.is_bound()) {
ret_val.userData() = single_value->field_userData.valueof();
}
if (single_value->field_connectionId.is_omit()) ret_val.connectionId() = OMIT_VALUE;
else if (single_value->field_connectionId.is_bound()) {
ret_val.connectionId() = single_value->field_connectionId.valueof();
}
if (single_value->field_importance.is_omit()) ret_val.importance() = OMIT_VALUE;
else if (single_value->field_importance.is_bound()) {
ret_val.importance() = single_value->field_importance.valueof();
}
return ret_val;
}

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

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

INTEGER_template& ASP__SCCP__N__DISCONNECT__ind_template::originator()
{
set_specific();
return single_value->field_originator;
}

const INTEGER_template& ASP__SCCP__N__DISCONNECT__ind_template::originator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field originator of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.");
return single_value->field_originator;
}

SCCP__PAR__Address_template& ASP__SCCP__N__DISCONNECT__ind_template::respondingAddress()
{
set_specific();
return single_value->field_respondingAddress;
}

const SCCP__PAR__Address_template& ASP__SCCP__N__DISCONNECT__ind_template::respondingAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field respondingAddress of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.");
return single_value->field_respondingAddress;
}

INTEGER_template& ASP__SCCP__N__DISCONNECT__ind_template::reason()
{
set_specific();
return single_value->field_reason;
}

const INTEGER_template& ASP__SCCP__N__DISCONNECT__ind_template::reason() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field reason of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.");
return single_value->field_reason;
}

OCTETSTRING_template& ASP__SCCP__N__DISCONNECT__ind_template::userData()
{
set_specific();
return single_value->field_userData;
}

const OCTETSTRING_template& ASP__SCCP__N__DISCONNECT__ind_template::userData() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field userData of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.");
return single_value->field_userData;
}

INTEGER_template& ASP__SCCP__N__DISCONNECT__ind_template::connectionId()
{
set_specific();
return single_value->field_connectionId;
}

const INTEGER_template& ASP__SCCP__N__DISCONNECT__ind_template::connectionId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field connectionId of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.");
return single_value->field_connectionId;
}

INTEGER_template& ASP__SCCP__N__DISCONNECT__ind_template::importance()
{
set_specific();
return single_value->field_importance;
}

const INTEGER_template& ASP__SCCP__N__DISCONNECT__ind_template::importance() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field importance of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.");
return single_value->field_importance;
}

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

void ASP__SCCP__N__DISCONNECT__ind_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ originator := ");
single_value->field_originator.log();
TTCN_Logger::log_event_str(", respondingAddress := ");
single_value->field_respondingAddress.log();
TTCN_Logger::log_event_str(", reason := ");
single_value->field_reason.log();
TTCN_Logger::log_event_str(", userData := ");
single_value->field_userData.log();
TTCN_Logger::log_event_str(", connectionId := ");
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(", importance := ");
single_value->field_importance.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void ASP__SCCP__N__DISCONNECT__ind_template::log_match(const ASP__SCCP__N__DISCONNECT__ind& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_originator.match(match_value.originator(), legacy)){
TTCN_Logger::log_logmatch_info(".originator");
single_value->field_originator.log_match(match_value.originator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.respondingAddress().ispresent()){
if(!single_value->field_respondingAddress.match(match_value.respondingAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".respondingAddress");
single_value->field_respondingAddress.log_match(match_value.respondingAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_respondingAddress.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".respondingAddress := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_respondingAddress.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_reason.match(match_value.reason(), legacy)){
TTCN_Logger::log_logmatch_info(".reason");
single_value->field_reason.log_match(match_value.reason(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.userData().ispresent()){
if(!single_value->field_userData.match(match_value.userData(), legacy)){
TTCN_Logger::log_logmatch_info(".userData");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_userData.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".userData := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_userData.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.connectionId().ispresent()){
if(!single_value->field_connectionId.match(match_value.connectionId(), legacy)){
TTCN_Logger::log_logmatch_info(".connectionId");
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_connectionId.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".connectionId := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.importance().ispresent()){
if(!single_value->field_importance.match(match_value.importance(), legacy)){
TTCN_Logger::log_logmatch_info(".importance");
single_value->field_importance.log_match(match_value.importance(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_importance.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".importance := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_importance.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ originator := ");
single_value->field_originator.log_match(match_value.originator(), legacy);
TTCN_Logger::log_event_str(", respondingAddress := ");
if (match_value.respondingAddress().ispresent()) {
single_value->field_respondingAddress.log_match(match_value.respondingAddress(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_respondingAddress.log();
if (single_value->field_respondingAddress.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", reason := ");
single_value->field_reason.log_match(match_value.reason(), legacy);
TTCN_Logger::log_event_str(", userData := ");
if (match_value.userData().ispresent()) {
single_value->field_userData.log_match(match_value.userData(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_userData.log();
if (single_value->field_userData.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", connectionId := ");
if (match_value.connectionId().ispresent()) {
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_connectionId.log();
if (single_value->field_connectionId.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", importance := ");
if (match_value.importance().ispresent()) {
single_value->field_importance.log_match(match_value.importance(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_importance.log();
if (single_value->field_importance.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void ASP__SCCP__N__DISCONNECT__ind_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_originator.encode_text(text_buf);
single_value->field_respondingAddress.encode_text(text_buf);
single_value->field_reason.encode_text(text_buf);
single_value->field_userData.encode_text(text_buf);
single_value->field_connectionId.encode_text(text_buf);
single_value->field_importance.encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.");
}
}

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

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

void ASP__SCCP__N__DISCONNECT__ind_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_originator.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind");
single_value->field_respondingAddress.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind");
single_value->field_reason.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind");
single_value->field_userData.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind");
single_value->field_connectionId.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind");
single_value->field_importance.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind");
}

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

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

ASP__SCCP__N__UNITDATA__req::ASP__SCCP__N__UNITDATA__req()
{
}

ASP__SCCP__N__UNITDATA__req::ASP__SCCP__N__UNITDATA__req(const SCCP__PAR__Address& par_calledAddress,
    const SCCP__PAR__Address& par_callingAddress,
    const OPTIONAL< BITSTRING >& par_sequenceControl,
    const OPTIONAL< BITSTRING >& par_returnOption,
    const OCTETSTRING& par_userData,
    const OPTIONAL< INTEGER >& par_importance)
  :   field_calledAddress(par_calledAddress),
  field_callingAddress(par_callingAddress),
  field_sequenceControl(par_sequenceControl),
  field_returnOption(par_returnOption),
  field_userData(par_userData),
  field_importance(par_importance)
{
}

ASP__SCCP__N__UNITDATA__req::ASP__SCCP__N__UNITDATA__req(const ASP__SCCP__N__UNITDATA__req& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.");
if (other_value.calledAddress().is_bound()) field_calledAddress = other_value.calledAddress();
else field_calledAddress.clean_up();
if (other_value.callingAddress().is_bound()) field_callingAddress = other_value.callingAddress();
else field_callingAddress.clean_up();
if (other_value.sequenceControl().is_bound()) field_sequenceControl = other_value.sequenceControl();
else field_sequenceControl.clean_up();
if (other_value.returnOption().is_bound()) field_returnOption = other_value.returnOption();
else field_returnOption.clean_up();
if (other_value.userData().is_bound()) field_userData = other_value.userData();
else field_userData.clean_up();
if (other_value.importance().is_bound()) field_importance = other_value.importance();
else field_importance.clean_up();
}

void ASP__SCCP__N__UNITDATA__req::clean_up()
{
field_calledAddress.clean_up();
field_callingAddress.clean_up();
field_sequenceControl.clean_up();
field_returnOption.clean_up();
field_userData.clean_up();
field_importance.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__UNITDATA__req::get_descriptor() const { return &ASP__SCCP__N__UNITDATA__req_descr_; }
ASP__SCCP__N__UNITDATA__req& ASP__SCCP__N__UNITDATA__req::operator=(const ASP__SCCP__N__UNITDATA__req& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.");
  if (other_value.calledAddress().is_bound()) field_calledAddress = other_value.calledAddress();
  else field_calledAddress.clean_up();
  if (other_value.callingAddress().is_bound()) field_callingAddress = other_value.callingAddress();
  else field_callingAddress.clean_up();
  if (other_value.sequenceControl().is_bound()) field_sequenceControl = other_value.sequenceControl();
  else field_sequenceControl.clean_up();
  if (other_value.returnOption().is_bound()) field_returnOption = other_value.returnOption();
  else field_returnOption.clean_up();
  if (other_value.userData().is_bound()) field_userData = other_value.userData();
  else field_userData.clean_up();
  if (other_value.importance().is_bound()) field_importance = other_value.importance();
  else field_importance.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__UNITDATA__req::operator==(const ASP__SCCP__N__UNITDATA__req& other_value) const
{
return field_calledAddress==other_value.field_calledAddress
  && field_callingAddress==other_value.field_callingAddress
  && field_sequenceControl==other_value.field_sequenceControl
  && field_returnOption==other_value.field_returnOption
  && field_userData==other_value.field_userData
  && field_importance==other_value.field_importance;
}

boolean ASP__SCCP__N__UNITDATA__req::is_bound() const
{
return (field_calledAddress.is_bound())
  || (field_callingAddress.is_bound())
  || (OPTIONAL_OMIT == field_sequenceControl.get_selection() || field_sequenceControl.is_bound())
  || (OPTIONAL_OMIT == field_returnOption.get_selection() || field_returnOption.is_bound())
  || (field_userData.is_bound())
  || (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_bound());
}
boolean ASP__SCCP__N__UNITDATA__req::is_value() const
{
return field_calledAddress.is_value()
  && field_callingAddress.is_value()
  && (OPTIONAL_OMIT == field_sequenceControl.get_selection() || field_sequenceControl.is_value())
  && (OPTIONAL_OMIT == field_returnOption.get_selection() || field_returnOption.is_value())
  && field_userData.is_value()
  && (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_value());
}
int ASP__SCCP__N__UNITDATA__req::size_of() const
{
  int ret_val = 3;
  if (field_sequenceControl.ispresent()) ret_val++;
  if (field_returnOption.ispresent()) ret_val++;
  if (field_importance.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__UNITDATA__req::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ calledAddress := ");
field_calledAddress.log();
TTCN_Logger::log_event_str(", callingAddress := ");
field_callingAddress.log();
TTCN_Logger::log_event_str(", sequenceControl := ");
field_sequenceControl.log();
TTCN_Logger::log_event_str(", returnOption := ");
field_returnOption.log();
TTCN_Logger::log_event_str(", userData := ");
field_userData.log();
TTCN_Logger::log_event_str(", importance := ");
field_importance.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__UNITDATA__req::set_implicit_omit()
{
if (calledAddress().is_bound()) calledAddress().set_implicit_omit();
if (callingAddress().is_bound()) callingAddress().set_implicit_omit();
if (!sequenceControl().is_bound()) sequenceControl() = OMIT_VALUE;
else sequenceControl().set_implicit_omit();
if (!returnOption().is_bound()) returnOption() = OMIT_VALUE;
else returnOption().set_implicit_omit();
if (userData().is_bound()) userData().set_implicit_omit();
if (!importance().is_bound()) importance() = OMIT_VALUE;
else importance().set_implicit_omit();
}

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

void ASP__SCCP__N__UNITDATA__req::encode_text(Text_Buf& text_buf) const
{
field_calledAddress.encode_text(text_buf);
field_callingAddress.encode_text(text_buf);
field_sequenceControl.encode_text(text_buf);
field_returnOption.encode_text(text_buf);
field_userData.encode_text(text_buf);
field_importance.encode_text(text_buf);
}

void ASP__SCCP__N__UNITDATA__req::decode_text(Text_Buf& text_buf)
{
field_calledAddress.decode_text(text_buf);
field_callingAddress.decode_text(text_buf);
field_sequenceControl.decode_text(text_buf);
field_returnOption.decode_text(text_buf);
field_userData.decode_text(text_buf);
field_importance.decode_text(text_buf);
}

struct ASP__SCCP__N__UNITDATA__req_template::single_value_struct {
SCCP__PAR__Address_template field_calledAddress;
SCCP__PAR__Address_template field_callingAddress;
BITSTRING_template field_sequenceControl;
BITSTRING_template field_returnOption;
OCTETSTRING_template field_userData;
INTEGER_template field_importance;
};

void ASP__SCCP__N__UNITDATA__req_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_calledAddress = ANY_VALUE;
single_value->field_callingAddress = ANY_VALUE;
single_value->field_sequenceControl = ANY_OR_OMIT;
single_value->field_returnOption = ANY_OR_OMIT;
single_value->field_userData = ANY_VALUE;
single_value->field_importance = ANY_OR_OMIT;
}
}
}

void ASP__SCCP__N__UNITDATA__req_template::copy_value(const ASP__SCCP__N__UNITDATA__req& other_value)
{
single_value = new single_value_struct;
if (other_value.calledAddress().is_bound()) {
  single_value->field_calledAddress = other_value.calledAddress();
} else {
  single_value->field_calledAddress.clean_up();
}
if (other_value.callingAddress().is_bound()) {
  single_value->field_callingAddress = other_value.callingAddress();
} else {
  single_value->field_callingAddress.clean_up();
}
if (other_value.sequenceControl().is_bound()) {
  if (other_value.sequenceControl().ispresent()) single_value->field_sequenceControl = other_value.sequenceControl()();
  else single_value->field_sequenceControl = OMIT_VALUE;
} else {
  single_value->field_sequenceControl.clean_up();
}
if (other_value.returnOption().is_bound()) {
  if (other_value.returnOption().ispresent()) single_value->field_returnOption = other_value.returnOption()();
  else single_value->field_returnOption = OMIT_VALUE;
} else {
  single_value->field_returnOption.clean_up();
}
if (other_value.userData().is_bound()) {
  single_value->field_userData = other_value.userData();
} else {
  single_value->field_userData.clean_up();
}
if (other_value.importance().is_bound()) {
  if (other_value.importance().ispresent()) single_value->field_importance = other_value.importance()();
  else single_value->field_importance = OMIT_VALUE;
} else {
  single_value->field_importance.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ASP__SCCP__N__UNITDATA__req_template::copy_template(const ASP__SCCP__N__UNITDATA__req_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.calledAddress().get_selection()) {
single_value->field_calledAddress = other_value.calledAddress();
} else {
single_value->field_calledAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.callingAddress().get_selection()) {
single_value->field_callingAddress = other_value.callingAddress();
} else {
single_value->field_callingAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.sequenceControl().get_selection()) {
single_value->field_sequenceControl = other_value.sequenceControl();
} else {
single_value->field_sequenceControl.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.returnOption().get_selection()) {
single_value->field_returnOption = other_value.returnOption();
} else {
single_value->field_returnOption.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.userData().get_selection()) {
single_value->field_userData = other_value.userData();
} else {
single_value->field_userData.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.importance().get_selection()) {
single_value->field_importance = other_value.importance();
} else {
single_value->field_importance.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ASP__SCCP__N__UNITDATA__req_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new ASP__SCCP__N__UNITDATA__req_template(*other_value.implication_.precondition);
implication_.implied_template = new ASP__SCCP__N__UNITDATA__req_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.");
break;
}
set_selection(other_value);
}

ASP__SCCP__N__UNITDATA__req_template::ASP__SCCP__N__UNITDATA__req_template()
{
}

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

ASP__SCCP__N__UNITDATA__req_template::ASP__SCCP__N__UNITDATA__req_template(const ASP__SCCP__N__UNITDATA__req& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__UNITDATA__req_template::match(const ASP__SCCP__N__UNITDATA__req& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.calledAddress().is_bound()) return FALSE;
if(!single_value->field_calledAddress.match(other_value.calledAddress(), legacy))return FALSE;
if(!other_value.callingAddress().is_bound()) return FALSE;
if(!single_value->field_callingAddress.match(other_value.callingAddress(), legacy))return FALSE;
if(!other_value.sequenceControl().is_bound()) return FALSE;
if((other_value.sequenceControl().ispresent() ? !single_value->field_sequenceControl.match((const BITSTRING&)other_value.sequenceControl(), legacy) : !single_value->field_sequenceControl.match_omit(legacy)))return FALSE;
if(!other_value.returnOption().is_bound()) return FALSE;
if((other_value.returnOption().ispresent() ? !single_value->field_returnOption.match((const BITSTRING&)other_value.returnOption(), legacy) : !single_value->field_returnOption.match_omit(legacy)))return FALSE;
if(!other_value.userData().is_bound()) return FALSE;
if(!single_value->field_userData.match(other_value.userData(), legacy))return FALSE;
if(!other_value.importance().is_bound()) return FALSE;
if((other_value.importance().ispresent() ? !single_value->field_importance.match((const INTEGER&)other_value.importance(), legacy) : !single_value->field_importance.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.");
}
return FALSE;
}

boolean ASP__SCCP__N__UNITDATA__req_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_calledAddress.is_bound()
 || single_value->field_callingAddress.is_bound()
 || (single_value->field_sequenceControl.is_omit() || single_value->field_sequenceControl.is_bound())
 || (single_value->field_returnOption.is_omit() || single_value->field_returnOption.is_bound())
 || single_value->field_userData.is_bound()
 || (single_value->field_importance.is_omit() || single_value->field_importance.is_bound());
}

boolean ASP__SCCP__N__UNITDATA__req_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_calledAddress.is_value()
 && single_value->field_callingAddress.is_value()
 && (single_value->field_sequenceControl.is_omit() || single_value->field_sequenceControl.is_value())
 && (single_value->field_returnOption.is_omit() || single_value->field_returnOption.is_value())
 && single_value->field_userData.is_value()
 && (single_value->field_importance.is_omit() || single_value->field_importance.is_value());
}

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

ASP__SCCP__N__UNITDATA__req ASP__SCCP__N__UNITDATA__req_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.");
ASP__SCCP__N__UNITDATA__req ret_val;
if (single_value->field_calledAddress.is_bound()) {
ret_val.calledAddress() = single_value->field_calledAddress.valueof();
}
if (single_value->field_callingAddress.is_bound()) {
ret_val.callingAddress() = single_value->field_callingAddress.valueof();
}
if (single_value->field_sequenceControl.is_omit()) ret_val.sequenceControl() = OMIT_VALUE;
else if (single_value->field_sequenceControl.is_bound()) {
ret_val.sequenceControl() = single_value->field_sequenceControl.valueof();
}
if (single_value->field_returnOption.is_omit()) ret_val.returnOption() = OMIT_VALUE;
else if (single_value->field_returnOption.is_bound()) {
ret_val.returnOption() = single_value->field_returnOption.valueof();
}
if (single_value->field_userData.is_bound()) {
ret_val.userData() = single_value->field_userData.valueof();
}
if (single_value->field_importance.is_omit()) ret_val.importance() = OMIT_VALUE;
else if (single_value->field_importance.is_bound()) {
ret_val.importance() = single_value->field_importance.valueof();
}
return ret_val;
}

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

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

SCCP__PAR__Address_template& ASP__SCCP__N__UNITDATA__req_template::calledAddress()
{
set_specific();
return single_value->field_calledAddress;
}

const SCCP__PAR__Address_template& ASP__SCCP__N__UNITDATA__req_template::calledAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field calledAddress of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.");
return single_value->field_calledAddress;
}

SCCP__PAR__Address_template& ASP__SCCP__N__UNITDATA__req_template::callingAddress()
{
set_specific();
return single_value->field_callingAddress;
}

const SCCP__PAR__Address_template& ASP__SCCP__N__UNITDATA__req_template::callingAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field callingAddress of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.");
return single_value->field_callingAddress;
}

BITSTRING_template& ASP__SCCP__N__UNITDATA__req_template::sequenceControl()
{
set_specific();
return single_value->field_sequenceControl;
}

const BITSTRING_template& ASP__SCCP__N__UNITDATA__req_template::sequenceControl() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field sequenceControl of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.");
return single_value->field_sequenceControl;
}

BITSTRING_template& ASP__SCCP__N__UNITDATA__req_template::returnOption()
{
set_specific();
return single_value->field_returnOption;
}

const BITSTRING_template& ASP__SCCP__N__UNITDATA__req_template::returnOption() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field returnOption of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.");
return single_value->field_returnOption;
}

OCTETSTRING_template& ASP__SCCP__N__UNITDATA__req_template::userData()
{
set_specific();
return single_value->field_userData;
}

const OCTETSTRING_template& ASP__SCCP__N__UNITDATA__req_template::userData() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field userData of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.");
return single_value->field_userData;
}

INTEGER_template& ASP__SCCP__N__UNITDATA__req_template::importance()
{
set_specific();
return single_value->field_importance;
}

const INTEGER_template& ASP__SCCP__N__UNITDATA__req_template::importance() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field importance of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.");
return single_value->field_importance;
}

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

void ASP__SCCP__N__UNITDATA__req_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ calledAddress := ");
single_value->field_calledAddress.log();
TTCN_Logger::log_event_str(", callingAddress := ");
single_value->field_callingAddress.log();
TTCN_Logger::log_event_str(", sequenceControl := ");
single_value->field_sequenceControl.log();
TTCN_Logger::log_event_str(", returnOption := ");
single_value->field_returnOption.log();
TTCN_Logger::log_event_str(", userData := ");
single_value->field_userData.log();
TTCN_Logger::log_event_str(", importance := ");
single_value->field_importance.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void ASP__SCCP__N__UNITDATA__req_template::log_match(const ASP__SCCP__N__UNITDATA__req& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_calledAddress.match(match_value.calledAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".calledAddress");
single_value->field_calledAddress.log_match(match_value.calledAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_callingAddress.match(match_value.callingAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".callingAddress");
single_value->field_callingAddress.log_match(match_value.callingAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.sequenceControl().ispresent()){
if(!single_value->field_sequenceControl.match(match_value.sequenceControl(), legacy)){
TTCN_Logger::log_logmatch_info(".sequenceControl");
single_value->field_sequenceControl.log_match(match_value.sequenceControl(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_sequenceControl.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".sequenceControl := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_sequenceControl.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.returnOption().ispresent()){
if(!single_value->field_returnOption.match(match_value.returnOption(), legacy)){
TTCN_Logger::log_logmatch_info(".returnOption");
single_value->field_returnOption.log_match(match_value.returnOption(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_returnOption.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".returnOption := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_returnOption.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_userData.match(match_value.userData(), legacy)){
TTCN_Logger::log_logmatch_info(".userData");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.importance().ispresent()){
if(!single_value->field_importance.match(match_value.importance(), legacy)){
TTCN_Logger::log_logmatch_info(".importance");
single_value->field_importance.log_match(match_value.importance(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_importance.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".importance := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_importance.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ calledAddress := ");
single_value->field_calledAddress.log_match(match_value.calledAddress(), legacy);
TTCN_Logger::log_event_str(", callingAddress := ");
single_value->field_callingAddress.log_match(match_value.callingAddress(), legacy);
TTCN_Logger::log_event_str(", sequenceControl := ");
if (match_value.sequenceControl().ispresent()) {
single_value->field_sequenceControl.log_match(match_value.sequenceControl(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_sequenceControl.log();
if (single_value->field_sequenceControl.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", returnOption := ");
if (match_value.returnOption().ispresent()) {
single_value->field_returnOption.log_match(match_value.returnOption(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_returnOption.log();
if (single_value->field_returnOption.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", userData := ");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::log_event_str(", importance := ");
if (match_value.importance().ispresent()) {
single_value->field_importance.log_match(match_value.importance(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_importance.log();
if (single_value->field_importance.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void ASP__SCCP__N__UNITDATA__req_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_calledAddress.encode_text(text_buf);
single_value->field_callingAddress.encode_text(text_buf);
single_value->field_sequenceControl.encode_text(text_buf);
single_value->field_returnOption.encode_text(text_buf);
single_value->field_userData.encode_text(text_buf);
single_value->field_importance.encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.");
}
}

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

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

void ASP__SCCP__N__UNITDATA__req_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_calledAddress.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_req");
single_value->field_callingAddress.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_req");
single_value->field_sequenceControl.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_req");
single_value->field_returnOption.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_req");
single_value->field_userData.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_req");
single_value->field_importance.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_req");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_req");
}

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

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

ASP__SCCP__N__UNITDATA__ind::ASP__SCCP__N__UNITDATA__ind()
{
}

ASP__SCCP__N__UNITDATA__ind::ASP__SCCP__N__UNITDATA__ind(const SCCP__PAR__Address& par_calledAddress,
    const SCCP__PAR__Address& par_callingAddress,
    const OPTIONAL< BITSTRING >& par_sequenceControl,
    const OPTIONAL< BITSTRING >& par_returnOption,
    const OCTETSTRING& par_userData,
    const OPTIONAL< INTEGER >& par_importance)
  :   field_calledAddress(par_calledAddress),
  field_callingAddress(par_callingAddress),
  field_sequenceControl(par_sequenceControl),
  field_returnOption(par_returnOption),
  field_userData(par_userData),
  field_importance(par_importance)
{
}

ASP__SCCP__N__UNITDATA__ind::ASP__SCCP__N__UNITDATA__ind(const ASP__SCCP__N__UNITDATA__ind& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.");
if (other_value.calledAddress().is_bound()) field_calledAddress = other_value.calledAddress();
else field_calledAddress.clean_up();
if (other_value.callingAddress().is_bound()) field_callingAddress = other_value.callingAddress();
else field_callingAddress.clean_up();
if (other_value.sequenceControl().is_bound()) field_sequenceControl = other_value.sequenceControl();
else field_sequenceControl.clean_up();
if (other_value.returnOption().is_bound()) field_returnOption = other_value.returnOption();
else field_returnOption.clean_up();
if (other_value.userData().is_bound()) field_userData = other_value.userData();
else field_userData.clean_up();
if (other_value.importance().is_bound()) field_importance = other_value.importance();
else field_importance.clean_up();
}

void ASP__SCCP__N__UNITDATA__ind::clean_up()
{
field_calledAddress.clean_up();
field_callingAddress.clean_up();
field_sequenceControl.clean_up();
field_returnOption.clean_up();
field_userData.clean_up();
field_importance.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__UNITDATA__ind::get_descriptor() const { return &ASP__SCCP__N__UNITDATA__ind_descr_; }
ASP__SCCP__N__UNITDATA__ind& ASP__SCCP__N__UNITDATA__ind::operator=(const ASP__SCCP__N__UNITDATA__ind& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.");
  if (other_value.calledAddress().is_bound()) field_calledAddress = other_value.calledAddress();
  else field_calledAddress.clean_up();
  if (other_value.callingAddress().is_bound()) field_callingAddress = other_value.callingAddress();
  else field_callingAddress.clean_up();
  if (other_value.sequenceControl().is_bound()) field_sequenceControl = other_value.sequenceControl();
  else field_sequenceControl.clean_up();
  if (other_value.returnOption().is_bound()) field_returnOption = other_value.returnOption();
  else field_returnOption.clean_up();
  if (other_value.userData().is_bound()) field_userData = other_value.userData();
  else field_userData.clean_up();
  if (other_value.importance().is_bound()) field_importance = other_value.importance();
  else field_importance.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__UNITDATA__ind::operator==(const ASP__SCCP__N__UNITDATA__ind& other_value) const
{
return field_calledAddress==other_value.field_calledAddress
  && field_callingAddress==other_value.field_callingAddress
  && field_sequenceControl==other_value.field_sequenceControl
  && field_returnOption==other_value.field_returnOption
  && field_userData==other_value.field_userData
  && field_importance==other_value.field_importance;
}

boolean ASP__SCCP__N__UNITDATA__ind::is_bound() const
{
return (field_calledAddress.is_bound())
  || (field_callingAddress.is_bound())
  || (OPTIONAL_OMIT == field_sequenceControl.get_selection() || field_sequenceControl.is_bound())
  || (OPTIONAL_OMIT == field_returnOption.get_selection() || field_returnOption.is_bound())
  || (field_userData.is_bound())
  || (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_bound());
}
boolean ASP__SCCP__N__UNITDATA__ind::is_value() const
{
return field_calledAddress.is_value()
  && field_callingAddress.is_value()
  && (OPTIONAL_OMIT == field_sequenceControl.get_selection() || field_sequenceControl.is_value())
  && (OPTIONAL_OMIT == field_returnOption.get_selection() || field_returnOption.is_value())
  && field_userData.is_value()
  && (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_value());
}
int ASP__SCCP__N__UNITDATA__ind::size_of() const
{
  int ret_val = 3;
  if (field_sequenceControl.ispresent()) ret_val++;
  if (field_returnOption.ispresent()) ret_val++;
  if (field_importance.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__UNITDATA__ind::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ calledAddress := ");
field_calledAddress.log();
TTCN_Logger::log_event_str(", callingAddress := ");
field_callingAddress.log();
TTCN_Logger::log_event_str(", sequenceControl := ");
field_sequenceControl.log();
TTCN_Logger::log_event_str(", returnOption := ");
field_returnOption.log();
TTCN_Logger::log_event_str(", userData := ");
field_userData.log();
TTCN_Logger::log_event_str(", importance := ");
field_importance.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__UNITDATA__ind::set_implicit_omit()
{
if (calledAddress().is_bound()) calledAddress().set_implicit_omit();
if (callingAddress().is_bound()) callingAddress().set_implicit_omit();
if (!sequenceControl().is_bound()) sequenceControl() = OMIT_VALUE;
else sequenceControl().set_implicit_omit();
if (!returnOption().is_bound()) returnOption() = OMIT_VALUE;
else returnOption().set_implicit_omit();
if (userData().is_bound()) userData().set_implicit_omit();
if (!importance().is_bound()) importance() = OMIT_VALUE;
else importance().set_implicit_omit();
}

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

void ASP__SCCP__N__UNITDATA__ind::encode_text(Text_Buf& text_buf) const
{
field_calledAddress.encode_text(text_buf);
field_callingAddress.encode_text(text_buf);
field_sequenceControl.encode_text(text_buf);
field_returnOption.encode_text(text_buf);
field_userData.encode_text(text_buf);
field_importance.encode_text(text_buf);
}

void ASP__SCCP__N__UNITDATA__ind::decode_text(Text_Buf& text_buf)
{
field_calledAddress.decode_text(text_buf);
field_callingAddress.decode_text(text_buf);
field_sequenceControl.decode_text(text_buf);
field_returnOption.decode_text(text_buf);
field_userData.decode_text(text_buf);
field_importance.decode_text(text_buf);
}

struct ASP__SCCP__N__UNITDATA__ind_template::single_value_struct {
SCCP__PAR__Address_template field_calledAddress;
SCCP__PAR__Address_template field_callingAddress;
BITSTRING_template field_sequenceControl;
BITSTRING_template field_returnOption;
OCTETSTRING_template field_userData;
INTEGER_template field_importance;
};

void ASP__SCCP__N__UNITDATA__ind_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_calledAddress = ANY_VALUE;
single_value->field_callingAddress = ANY_VALUE;
single_value->field_sequenceControl = ANY_OR_OMIT;
single_value->field_returnOption = ANY_OR_OMIT;
single_value->field_userData = ANY_VALUE;
single_value->field_importance = ANY_OR_OMIT;
}
}
}

void ASP__SCCP__N__UNITDATA__ind_template::copy_value(const ASP__SCCP__N__UNITDATA__ind& other_value)
{
single_value = new single_value_struct;
if (other_value.calledAddress().is_bound()) {
  single_value->field_calledAddress = other_value.calledAddress();
} else {
  single_value->field_calledAddress.clean_up();
}
if (other_value.callingAddress().is_bound()) {
  single_value->field_callingAddress = other_value.callingAddress();
} else {
  single_value->field_callingAddress.clean_up();
}
if (other_value.sequenceControl().is_bound()) {
  if (other_value.sequenceControl().ispresent()) single_value->field_sequenceControl = other_value.sequenceControl()();
  else single_value->field_sequenceControl = OMIT_VALUE;
} else {
  single_value->field_sequenceControl.clean_up();
}
if (other_value.returnOption().is_bound()) {
  if (other_value.returnOption().ispresent()) single_value->field_returnOption = other_value.returnOption()();
  else single_value->field_returnOption = OMIT_VALUE;
} else {
  single_value->field_returnOption.clean_up();
}
if (other_value.userData().is_bound()) {
  single_value->field_userData = other_value.userData();
} else {
  single_value->field_userData.clean_up();
}
if (other_value.importance().is_bound()) {
  if (other_value.importance().ispresent()) single_value->field_importance = other_value.importance()();
  else single_value->field_importance = OMIT_VALUE;
} else {
  single_value->field_importance.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ASP__SCCP__N__UNITDATA__ind_template::copy_template(const ASP__SCCP__N__UNITDATA__ind_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.calledAddress().get_selection()) {
single_value->field_calledAddress = other_value.calledAddress();
} else {
single_value->field_calledAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.callingAddress().get_selection()) {
single_value->field_callingAddress = other_value.callingAddress();
} else {
single_value->field_callingAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.sequenceControl().get_selection()) {
single_value->field_sequenceControl = other_value.sequenceControl();
} else {
single_value->field_sequenceControl.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.returnOption().get_selection()) {
single_value->field_returnOption = other_value.returnOption();
} else {
single_value->field_returnOption.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.userData().get_selection()) {
single_value->field_userData = other_value.userData();
} else {
single_value->field_userData.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.importance().get_selection()) {
single_value->field_importance = other_value.importance();
} else {
single_value->field_importance.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ASP__SCCP__N__UNITDATA__ind_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new ASP__SCCP__N__UNITDATA__ind_template(*other_value.implication_.precondition);
implication_.implied_template = new ASP__SCCP__N__UNITDATA__ind_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.");
break;
}
set_selection(other_value);
}

ASP__SCCP__N__UNITDATA__ind_template::ASP__SCCP__N__UNITDATA__ind_template()
{
}

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

ASP__SCCP__N__UNITDATA__ind_template::ASP__SCCP__N__UNITDATA__ind_template(const ASP__SCCP__N__UNITDATA__ind& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__UNITDATA__ind_template::match(const ASP__SCCP__N__UNITDATA__ind& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.calledAddress().is_bound()) return FALSE;
if(!single_value->field_calledAddress.match(other_value.calledAddress(), legacy))return FALSE;
if(!other_value.callingAddress().is_bound()) return FALSE;
if(!single_value->field_callingAddress.match(other_value.callingAddress(), legacy))return FALSE;
if(!other_value.sequenceControl().is_bound()) return FALSE;
if((other_value.sequenceControl().ispresent() ? !single_value->field_sequenceControl.match((const BITSTRING&)other_value.sequenceControl(), legacy) : !single_value->field_sequenceControl.match_omit(legacy)))return FALSE;
if(!other_value.returnOption().is_bound()) return FALSE;
if((other_value.returnOption().ispresent() ? !single_value->field_returnOption.match((const BITSTRING&)other_value.returnOption(), legacy) : !single_value->field_returnOption.match_omit(legacy)))return FALSE;
if(!other_value.userData().is_bound()) return FALSE;
if(!single_value->field_userData.match(other_value.userData(), legacy))return FALSE;
if(!other_value.importance().is_bound()) return FALSE;
if((other_value.importance().ispresent() ? !single_value->field_importance.match((const INTEGER&)other_value.importance(), legacy) : !single_value->field_importance.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.");
}
return FALSE;
}

boolean ASP__SCCP__N__UNITDATA__ind_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_calledAddress.is_bound()
 || single_value->field_callingAddress.is_bound()
 || (single_value->field_sequenceControl.is_omit() || single_value->field_sequenceControl.is_bound())
 || (single_value->field_returnOption.is_omit() || single_value->field_returnOption.is_bound())
 || single_value->field_userData.is_bound()
 || (single_value->field_importance.is_omit() || single_value->field_importance.is_bound());
}

boolean ASP__SCCP__N__UNITDATA__ind_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_calledAddress.is_value()
 && single_value->field_callingAddress.is_value()
 && (single_value->field_sequenceControl.is_omit() || single_value->field_sequenceControl.is_value())
 && (single_value->field_returnOption.is_omit() || single_value->field_returnOption.is_value())
 && single_value->field_userData.is_value()
 && (single_value->field_importance.is_omit() || single_value->field_importance.is_value());
}

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

ASP__SCCP__N__UNITDATA__ind ASP__SCCP__N__UNITDATA__ind_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.");
ASP__SCCP__N__UNITDATA__ind ret_val;
if (single_value->field_calledAddress.is_bound()) {
ret_val.calledAddress() = single_value->field_calledAddress.valueof();
}
if (single_value->field_callingAddress.is_bound()) {
ret_val.callingAddress() = single_value->field_callingAddress.valueof();
}
if (single_value->field_sequenceControl.is_omit()) ret_val.sequenceControl() = OMIT_VALUE;
else if (single_value->field_sequenceControl.is_bound()) {
ret_val.sequenceControl() = single_value->field_sequenceControl.valueof();
}
if (single_value->field_returnOption.is_omit()) ret_val.returnOption() = OMIT_VALUE;
else if (single_value->field_returnOption.is_bound()) {
ret_val.returnOption() = single_value->field_returnOption.valueof();
}
if (single_value->field_userData.is_bound()) {
ret_val.userData() = single_value->field_userData.valueof();
}
if (single_value->field_importance.is_omit()) ret_val.importance() = OMIT_VALUE;
else if (single_value->field_importance.is_bound()) {
ret_val.importance() = single_value->field_importance.valueof();
}
return ret_val;
}

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

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

SCCP__PAR__Address_template& ASP__SCCP__N__UNITDATA__ind_template::calledAddress()
{
set_specific();
return single_value->field_calledAddress;
}

const SCCP__PAR__Address_template& ASP__SCCP__N__UNITDATA__ind_template::calledAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field calledAddress of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.");
return single_value->field_calledAddress;
}

SCCP__PAR__Address_template& ASP__SCCP__N__UNITDATA__ind_template::callingAddress()
{
set_specific();
return single_value->field_callingAddress;
}

const SCCP__PAR__Address_template& ASP__SCCP__N__UNITDATA__ind_template::callingAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field callingAddress of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.");
return single_value->field_callingAddress;
}

BITSTRING_template& ASP__SCCP__N__UNITDATA__ind_template::sequenceControl()
{
set_specific();
return single_value->field_sequenceControl;
}

const BITSTRING_template& ASP__SCCP__N__UNITDATA__ind_template::sequenceControl() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field sequenceControl of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.");
return single_value->field_sequenceControl;
}

BITSTRING_template& ASP__SCCP__N__UNITDATA__ind_template::returnOption()
{
set_specific();
return single_value->field_returnOption;
}

const BITSTRING_template& ASP__SCCP__N__UNITDATA__ind_template::returnOption() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field returnOption of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.");
return single_value->field_returnOption;
}

OCTETSTRING_template& ASP__SCCP__N__UNITDATA__ind_template::userData()
{
set_specific();
return single_value->field_userData;
}

const OCTETSTRING_template& ASP__SCCP__N__UNITDATA__ind_template::userData() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field userData of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.");
return single_value->field_userData;
}

INTEGER_template& ASP__SCCP__N__UNITDATA__ind_template::importance()
{
set_specific();
return single_value->field_importance;
}

const INTEGER_template& ASP__SCCP__N__UNITDATA__ind_template::importance() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field importance of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.");
return single_value->field_importance;
}

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

void ASP__SCCP__N__UNITDATA__ind_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ calledAddress := ");
single_value->field_calledAddress.log();
TTCN_Logger::log_event_str(", callingAddress := ");
single_value->field_callingAddress.log();
TTCN_Logger::log_event_str(", sequenceControl := ");
single_value->field_sequenceControl.log();
TTCN_Logger::log_event_str(", returnOption := ");
single_value->field_returnOption.log();
TTCN_Logger::log_event_str(", userData := ");
single_value->field_userData.log();
TTCN_Logger::log_event_str(", importance := ");
single_value->field_importance.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void ASP__SCCP__N__UNITDATA__ind_template::log_match(const ASP__SCCP__N__UNITDATA__ind& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_calledAddress.match(match_value.calledAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".calledAddress");
single_value->field_calledAddress.log_match(match_value.calledAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_callingAddress.match(match_value.callingAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".callingAddress");
single_value->field_callingAddress.log_match(match_value.callingAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.sequenceControl().ispresent()){
if(!single_value->field_sequenceControl.match(match_value.sequenceControl(), legacy)){
TTCN_Logger::log_logmatch_info(".sequenceControl");
single_value->field_sequenceControl.log_match(match_value.sequenceControl(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_sequenceControl.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".sequenceControl := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_sequenceControl.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.returnOption().ispresent()){
if(!single_value->field_returnOption.match(match_value.returnOption(), legacy)){
TTCN_Logger::log_logmatch_info(".returnOption");
single_value->field_returnOption.log_match(match_value.returnOption(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_returnOption.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".returnOption := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_returnOption.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_userData.match(match_value.userData(), legacy)){
TTCN_Logger::log_logmatch_info(".userData");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.importance().ispresent()){
if(!single_value->field_importance.match(match_value.importance(), legacy)){
TTCN_Logger::log_logmatch_info(".importance");
single_value->field_importance.log_match(match_value.importance(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_importance.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".importance := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_importance.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ calledAddress := ");
single_value->field_calledAddress.log_match(match_value.calledAddress(), legacy);
TTCN_Logger::log_event_str(", callingAddress := ");
single_value->field_callingAddress.log_match(match_value.callingAddress(), legacy);
TTCN_Logger::log_event_str(", sequenceControl := ");
if (match_value.sequenceControl().ispresent()) {
single_value->field_sequenceControl.log_match(match_value.sequenceControl(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_sequenceControl.log();
if (single_value->field_sequenceControl.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", returnOption := ");
if (match_value.returnOption().ispresent()) {
single_value->field_returnOption.log_match(match_value.returnOption(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_returnOption.log();
if (single_value->field_returnOption.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", userData := ");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::log_event_str(", importance := ");
if (match_value.importance().ispresent()) {
single_value->field_importance.log_match(match_value.importance(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_importance.log();
if (single_value->field_importance.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void ASP__SCCP__N__UNITDATA__ind_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_calledAddress.encode_text(text_buf);
single_value->field_callingAddress.encode_text(text_buf);
single_value->field_sequenceControl.encode_text(text_buf);
single_value->field_returnOption.encode_text(text_buf);
single_value->field_userData.encode_text(text_buf);
single_value->field_importance.encode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.");
}
}

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

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

void ASP__SCCP__N__UNITDATA__ind_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
single_value->field_calledAddress.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind");
single_value->field_callingAddress.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind");
single_value->field_sequenceControl.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind");
single_value->field_returnOption.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind");
single_value->field_userData.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind");
single_value->field_importance.check_restriction(t_res, t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind");
return;
case TR_PRESENT:
if (!match_omit(legacy)) return;
break;
default:
return;
}
TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind");
}

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

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

ASP__SCCP__N__NOTICE__ind::ASP__SCCP__N__NOTICE__ind()
{
}

ASP__SCCP__N__NOTICE__ind::ASP__SCCP__N__NOTICE__ind(const SCCP__PAR__Address& par_calledAddress,
    const SCCP__PAR__Address& par_callingAddress,
    const INTEGER& par_reasonForReturn,
    const OCTETSTRING& par_userData,
    const OPTIONAL< INTEGER >& par_importance)
  :   field_calledAddress(par_calledAddress),
  field_callingAddress(par_callingAddress),
  field_reasonForReturn(par_reasonForReturn),
  field_userData(par_userData),
  field_importance(par_importance)
{
}

ASP__SCCP__N__NOTICE__ind::ASP__SCCP__N__NOTICE__ind(const ASP__SCCP__N__NOTICE__ind& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.");
if (other_value.calledAddress().is_bound()) field_calledAddress = other_value.calledAddress();
else field_calledAddress.clean_up();
if (other_value.callingAddress().is_bound()) field_callingAddress = other_value.callingAddress();
else field_callingAddress.clean_up();
if (other_value.reasonForReturn().is_bound()) field_reasonForReturn = other_value.reasonForReturn();
else field_reasonForReturn.clean_up();
if (other_value.userData().is_bound()) field_userData = other_value.userData();
else field_userData.clean_up();
if (other_value.importance().is_bound()) field_importance = other_value.importance();
else field_importance.clean_up();
}

void ASP__SCCP__N__NOTICE__ind::clean_up()
{
field_calledAddress.clean_up();
field_callingAddress.clean_up();
field_reasonForReturn.clean_up();
field_userData.clean_up();
field_importance.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__NOTICE__ind::get_descriptor() const { return &ASP__SCCP__N__NOTICE__ind_descr_; }
ASP__SCCP__N__NOTICE__ind& ASP__SCCP__N__NOTICE__ind::operator=(const ASP__SCCP__N__NOTICE__ind& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.");
  if (other_value.calledAddress().is_bound()) field_calledAddress = other_value.calledAddress();
  else field_calledAddress.clean_up();
  if (other_value.callingAddress().is_bound()) field_callingAddress = other_value.callingAddress();
  else field_callingAddress.clean_up();
  if (other_value.reasonForReturn().is_bound()) field_reasonForReturn = other_value.reasonForReturn();
  else field_reasonForReturn.clean_up();
  if (other_value.userData().is_bound()) field_userData = other_value.userData();
  else field_userData.clean_up();
  if (other_value.importance().is_bound()) field_importance = other_value.importance();
  else field_importance.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__NOTICE__ind::operator==(const ASP__SCCP__N__NOTICE__ind& other_value) const
{
return field_calledAddress==other_value.field_calledAddress
  && field_callingAddress==other_value.field_callingAddress
  && field_reasonForReturn==other_value.field_reasonForReturn
  && field_userData==other_value.field_userData
  && field_importance==other_value.field_importance;
}

boolean ASP__SCCP__N__NOTICE__ind::is_bound() const
{
return (field_calledAddress.is_bound())
  || (field_callingAddress.is_bound())
  || (field_reasonForReturn.is_bound())
  || (field_userData.is_bound())
  || (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_bound());
}
boolean ASP__SCCP__N__NOTICE__ind::is_value() const
{
return field_calledAddress.is_value()
  && field_callingAddress.is_value()
  && field_reasonForReturn.is_value()
  && field_userData.is_value()
  && (OPTIONAL_OMIT == field_importance.get_selection() || field_importance.is_value());
}
int ASP__SCCP__N__NOTICE__ind::size_of() const
{
  int ret_val = 4;
  if (field_importance.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__NOTICE__ind::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ calledAddress := ");
field_calledAddress.log();
TTCN_Logger::log_event_str(", callingAddress := ");
field_callingAddress.log();
TTCN_Logger::log_event_str(", reasonForReturn := ");
field_reasonForReturn.log();
TTCN_Logger::log_event_str(", userData := ");
field_userData.log();
TTCN_Logger::log_event_str(", importance := ");
field_importance.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__NOTICE__ind::set_implicit_omit()
{
if (calledAddress().is_bound()) calledAddress().set_implicit_omit();
if (callingAddress().is_bound()) callingAddress().set_implicit_omit();
if (reasonForReturn().is_bound()) reasonForReturn().set_implicit_omit();
if (userData().is_bound()) userData().set_implicit_omit();
if (!importance().is_bound()) importance() = OMIT_VALUE;
else importance().set_implicit_omit();
}

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

void ASP__SCCP__N__NOTICE__ind::encode_text(Text_Buf& text_buf) const
{
field_calledAddress.encode_text(text_buf);
field_callingAddress.encode_text(text_buf);
field_reasonForReturn.encode_text(text_buf);
field_userData.encode_text(text_buf);
field_importance.encode_text(text_buf);
}

void ASP__SCCP__N__NOTICE__ind::decode_text(Text_Buf& text_buf)
{
field_calledAddress.decode_text(text_buf);
field_callingAddress.decode_text(text_buf);
field_reasonForReturn.decode_text(text_buf);
field_userData.decode_text(text_buf);
field_importance.decode_text(text_buf);
}

struct ASP__SCCP__N__NOTICE__ind_template::single_value_struct {
SCCP__PAR__Address_template field_calledAddress;
SCCP__PAR__Address_template field_callingAddress;
INTEGER_template field_reasonForReturn;
OCTETSTRING_template field_userData;
INTEGER_template field_importance;
};

void ASP__SCCP__N__NOTICE__ind_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_calledAddress = ANY_VALUE;
single_value->field_callingAddress = ANY_VALUE;
single_value->field_reasonForReturn = ANY_VALUE;
single_value->field_userData = ANY_VALUE;
single_value->field_importance = ANY_OR_OMIT;
}
}
}

void ASP__SCCP__N__NOTICE__ind_template::copy_value(const ASP__SCCP__N__NOTICE__ind& other_value)
{
single_value = new single_value_struct;
if (other_value.calledAddress().is_bound()) {
  single_value->field_calledAddress = other_value.calledAddress();
} else {
  single_value->field_calledAddress.clean_up();
}
if (other_value.callingAddress().is_bound()) {
  single_value->field_callingAddress = other_value.callingAddress();
} else {
  single_value->field_callingAddress.clean_up();
}
if (other_value.reasonForReturn().is_bound()) {
  single_value->field_reasonForReturn = other_value.reasonForReturn();
} else {
  single_value->field_reasonForReturn.clean_up();
}
if (other_value.userData().is_bound()) {
  single_value->field_userData = other_value.userData();
} else {
  single_value->field_userData.clean_up();
}
if (other_value.importance().is_bound()) {
  if (other_value.importance().ispresent()) single_value->field_importance = other_value.importance()();
  else single_value->field_importance = OMIT_VALUE;
} else {
  single_value->field_importance.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ASP__SCCP__N__NOTICE__ind_template::copy_template(const ASP__SCCP__N__NOTICE__ind_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.calledAddress().get_selection()) {
single_value->field_calledAddress = other_value.calledAddress();
} else {
single_value->field_calledAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.callingAddress().get_selection()) {
single_value->field_callingAddress = other_value.callingAddress();
} else {
single_value->field_callingAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.reasonForReturn().get_selection()) {
single_value->field_reasonForReturn = other_value.reasonForReturn();
} else {
single_value->field_reasonForReturn.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.userData().get_selection()) {
single_value->field_userData = other_value.userData();
} else {
single_value->field_userData.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.importance().get_selection()) {
single_value->field_importance = other_value.importance();
} else {
single_value->field_importance.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ASP__SCCP__N__NOTICE__ind_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]);
break;
case IMPLICATION_MATCH:
implication_.precondition = new ASP__SCCP__N__NOTICE__ind_template(*other_value.implication_.precondition);
implication_.implied_template = new ASP__SCCP__N__NOTICE__ind_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.");
break;
}
set_selection(other_value);
}

ASP__SCCP__N__NOTICE__ind_template::ASP__SCCP__N__NOTICE__ind_template()
{
}

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

ASP__SCCP__N__NOTICE__ind_template::ASP__SCCP__N__NOTICE__ind_template(const ASP__SCCP__N__NOTICE__ind& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__NOTICE__ind_template::match(const ASP__SCCP__N__NOTICE__ind& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.calledAddress().is_bound()) return FALSE;
if(!single_value->field_calledAddress.match(other_value.calledAddress(), legacy))return FALSE;
if(!other_value.callingAddress().is_bound()) return FALSE;
if(!single_value->field_callingAddress.match(other_value.callingAddress(), legacy))return FALSE;
if(!other_value.reasonForReturn().is_bound()) return FALSE;
if(!single_value->field_reasonForReturn.match(other_value.reasonForReturn(), legacy))return FALSE;
if(!other_value.userData().is_bound()) return FALSE;
if(!single_value->field_userData.match(other_value.userData(), legacy))return FALSE;
if(!other_value.importance().is_bound()) return FALSE;
if((other_value.importance().ispresent() ? !single_value->field_importance.match((const INTEGER&)other_value.importance(), legacy) : !single_value->field_importance.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.");
}
return FALSE;
}

boolean ASP__SCCP__N__NOTICE__ind_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_calledAddress.is_bound()
 || single_value->field_callingAddress.is_bound()
 || single_value->field_reasonForReturn.is_bound()
 || single_value->field_userData.is_bound()
 || (single_value->field_importance.is_omit() || single_value->field_importance.is_bound());
}

boolean ASP__SCCP__N__NOTICE__ind_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_calledAddress.is_value()
 && single_value->field_callingAddress.is_value()
 && single_value->field_reasonForReturn.is_value()
 && single_value->field_userData.is_value()
 && (single_value->field_importance.is_omit() || single_value->field_importance.is_value());
}

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

ASP__SCCP__N__NOTICE__ind ASP__SCCP__N__NOTICE__ind_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.");
ASP__SCCP__N__NOTICE__ind ret_val;
if (single_value->field_calledAddress.is_bound()) {
ret_val.calledAddress() = single_value->field_calledAddress.valueof();
}
if (single_value->field_callingAddress.is_bound()) {
ret_val.callingAddress() = single_value->field_callingAddress.valueof();
}
if (single_value->field_reasonForReturn.is_bound()) {
ret_val.reasonForReturn() = single_value->field_reasonForReturn.valueof();
}
if (single_value->field_userData.is_bound()) {
ret_val.userData() = single_value->field_userData.valueof();
}
if (single_value->field_importance.is_omit()) ret_val.importance() = OMIT_VALUE;
else if (single_value->field_importance.is_bound()) {
ret_val.importance() = single_value->field_importance.valueof();
}
return ret_val;
}

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

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

SCCP__PAR__Address_template& ASP__SCCP__N__NOTICE__ind_template::calledAddress()
{
set_specific();
return single_value->field_calledAddress;
}

const SCCP__PAR__Address_template& ASP__SCCP__N__NOTICE__ind_template::calledAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field calledAddress of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.");
return single_value->field_calledAddress;
}

SCCP__PAR__Address_template& ASP__SCCP__N__NOTICE__ind_template::callingAddress()
{
set_specific();
return single_value->field_callingAddress;
}

const SCCP__PAR__Address_template& ASP__SCCP__N__NOTICE__ind_template::callingAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field callingAddress of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.");
return single_value->field_callingAddress;
}

INTEGER_template& ASP__SCCP__N__NOTICE__ind_template::reasonForReturn()
{
set_specific();
return single_value->field_reasonForReturn;
}

const INTEGER_template& ASP__SCCP__N__NOTICE__ind_template::reasonForReturn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field reasonForReturn of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.");
return single_value->field_reasonForReturn;
}

OCTETSTRING_template& ASP__SCCP__N__NOTICE__ind_template::userData()
{
set_specific();
return single_value->field_userData;
}

const OCTETSTRING_template& ASP__SCCP__N__NOTICE__ind_template::userData() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field userData of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.");
return single_value->field_userData;
}

INTEGER_template& ASP__SCCP__N__NOTICE__ind_template::importance()
{
set_specific();
return single_value->field_importance;
}

const INTEGER_template& ASP__SCCP__N__NOTICE__ind_template::importance() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field importance of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.");
return single_value->field_importance;
}

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

void ASP__SCCP__N__NOTICE__ind_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ calledAddress := ");
single_value->field_calledAddress.log();
TTCN_Logger::log_event_str(", callingAddress := ");
single_value->field_callingAddress.log();
TTCN_Logger::log_event_str(", reasonForReturn := ");
single_value->field_reasonForReturn.log();
TTCN_Logger::log_event_str(", userData := ");
single_value->field_userData.log();
TTCN_Logger::log_event_str(", importance := ");
single_value->field_importance.log();
TTCN_Logger::log_event_str(" }");
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void ASP__SCCP__N__NOTICE__ind_template::log_match(const ASP__SCCP__N__NOTICE__ind& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_calledAddress.match(match_value.calledAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".calledAddress");
single_value->field_calledAddress.log_match(match_value.calledAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_callingAddress.match(match_value.callingAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".callingAddress");
single_value->field_callingAddress.log_match(match_value.callingAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_reasonForReturn.match(match_value.reasonForReturn(), legacy)){
TTCN_Logger::log_logmatch_info(".reasonForReturn");
single_value->field_reasonForReturn.log_match(match_value.reasonForReturn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_userData.match(match_value.userData(), legacy)){
TTCN_Logger::log_logmatch_info(".userData");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.importance().ispresent()){
if(!single_value->field_importance.match(match_value.importance(), legacy)){
TTCN_Logger::log_logmatch_info(".importance");
single_value->field_importance.log_match(match_value.importance(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_importance.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".importance := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_importance.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ calledAddress := ");
single_value->field_calledAddress.log_match(match_value.calledAddress(), legacy);
TTCN_Logger::log_event_str(", callingAddress := ");
single_value->field_callingAddress.log_match(match_value.callingAddress(), legacy);
TTCN_Logger::log_event_str(", reasonForReturn := ");
single_value->field_reasonForReturn.log_match(match_value.reasonForReturn(), legacy);
TTCN_Logger::log_event_str(", userData := ");
single_value->field_userData.log_match(match_value.userData(), legacy);
TTCN_Logger::log_event_str(", importance := ");
if (match_value.importance().ispresent()) {
single_value->field_importance.log_match(match_value.importance(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_importance.log();
if (single_value->field_importance.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

ASP__SCCP__N__STATE__ind::ASP__SCCP__N__STATE__ind()
{
}

ASP__SCCP__N__STATE__ind::ASP__SCCP__N__STATE__ind(const INTEGER& par_affectedSubSystem,
    const INTEGER& par_userStatus,
    const OPTIONAL< INTEGER >& par_subsystmultiindicator)
  :   field_affectedSubSystem(par_affectedSubSystem),
  field_userStatus(par_userStatus),
  field_subsystmultiindicator(par_subsystmultiindicator)
{
}

ASP__SCCP__N__STATE__ind::ASP__SCCP__N__STATE__ind(const ASP__SCCP__N__STATE__ind& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_STATE_ind.");
if (other_value.affectedSubSystem().is_bound()) field_affectedSubSystem = other_value.affectedSubSystem();
else field_affectedSubSystem.clean_up();
if (other_value.userStatus().is_bound()) field_userStatus = other_value.userStatus();
else field_userStatus.clean_up();
if (other_value.subsystmultiindicator().is_bound()) field_subsystmultiindicator = other_value.subsystmultiindicator();
else field_subsystmultiindicator.clean_up();
}

void ASP__SCCP__N__STATE__ind::clean_up()
{
field_affectedSubSystem.clean_up();
field_userStatus.clean_up();
field_subsystmultiindicator.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__STATE__ind::get_descriptor() const { return &ASP__SCCP__N__STATE__ind_descr_; }
ASP__SCCP__N__STATE__ind& ASP__SCCP__N__STATE__ind::operator=(const ASP__SCCP__N__STATE__ind& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_STATE_ind.");
  if (other_value.affectedSubSystem().is_bound()) field_affectedSubSystem = other_value.affectedSubSystem();
  else field_affectedSubSystem.clean_up();
  if (other_value.userStatus().is_bound()) field_userStatus = other_value.userStatus();
  else field_userStatus.clean_up();
  if (other_value.subsystmultiindicator().is_bound()) field_subsystmultiindicator = other_value.subsystmultiindicator();
  else field_subsystmultiindicator.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__STATE__ind::operator==(const ASP__SCCP__N__STATE__ind& other_value) const
{
return field_affectedSubSystem==other_value.field_affectedSubSystem
  && field_userStatus==other_value.field_userStatus
  && field_subsystmultiindicator==other_value.field_subsystmultiindicator;
}

boolean ASP__SCCP__N__STATE__ind::is_bound() const
{
return (field_affectedSubSystem.is_bound())
  || (field_userStatus.is_bound())
  || (OPTIONAL_OMIT == field_subsystmultiindicator.get_selection() || field_subsystmultiindicator.is_bound());
}
boolean ASP__SCCP__N__STATE__ind::is_value() const
{
return field_affectedSubSystem.is_value()
  && field_userStatus.is_value()
  && (OPTIONAL_OMIT == field_subsystmultiindicator.get_selection() || field_subsystmultiindicator.is_value());
}
int ASP__SCCP__N__STATE__ind::size_of() const
{
  int ret_val = 2;
  if (field_subsystmultiindicator.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__STATE__ind::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ affectedSubSystem := ");
field_affectedSubSystem.log();
TTCN_Logger::log_event_str(", userStatus := ");
field_userStatus.log();
TTCN_Logger::log_event_str(", subsystmultiindicator := ");
field_subsystmultiindicator.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__STATE__ind::set_implicit_omit()
{
if (affectedSubSystem().is_bound()) affectedSubSystem().set_implicit_omit();
if (userStatus().is_bound()) userStatus().set_implicit_omit();
if (!subsystmultiindicator().is_bound()) subsystmultiindicator() = OMIT_VALUE;
else subsystmultiindicator().set_implicit_omit();
}

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

void ASP__SCCP__N__STATE__ind::encode_text(Text_Buf& text_buf) const
{
field_affectedSubSystem.encode_text(text_buf);
field_userStatus.encode_text(text_buf);
field_subsystmultiindicator.encode_text(text_buf);
}

void ASP__SCCP__N__STATE__ind::decode_text(Text_Buf& text_buf)
{
field_affectedSubSystem.decode_text(text_buf);
field_userStatus.decode_text(text_buf);
field_subsystmultiindicator.decode_text(text_buf);
}

struct ASP__SCCP__N__STATE__ind_template::single_value_struct {
INTEGER_template field_affectedSubSystem;
INTEGER_template field_userStatus;
INTEGER_template field_subsystmultiindicator;
};

void ASP__SCCP__N__STATE__ind_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_affectedSubSystem = ANY_VALUE;
single_value->field_userStatus = ANY_VALUE;
single_value->field_subsystmultiindicator = ANY_OR_OMIT;
}
}
}

void ASP__SCCP__N__STATE__ind_template::copy_value(const ASP__SCCP__N__STATE__ind& other_value)
{
single_value = new single_value_struct;
if (other_value.affectedSubSystem().is_bound()) {
  single_value->field_affectedSubSystem = other_value.affectedSubSystem();
} else {
  single_value->field_affectedSubSystem.clean_up();
}
if (other_value.userStatus().is_bound()) {
  single_value->field_userStatus = other_value.userStatus();
} else {
  single_value->field_userStatus.clean_up();
}
if (other_value.subsystmultiindicator().is_bound()) {
  if (other_value.subsystmultiindicator().ispresent()) single_value->field_subsystmultiindicator = other_value.subsystmultiindicator()();
  else single_value->field_subsystmultiindicator = OMIT_VALUE;
} else {
  single_value->field_subsystmultiindicator.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

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

ASP__SCCP__N__STATE__ind_template::ASP__SCCP__N__STATE__ind_template()
{
}

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

ASP__SCCP__N__STATE__ind_template::ASP__SCCP__N__STATE__ind_template(const ASP__SCCP__N__STATE__ind& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__STATE__ind_template::match(const ASP__SCCP__N__STATE__ind& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.affectedSubSystem().is_bound()) return FALSE;
if(!single_value->field_affectedSubSystem.match(other_value.affectedSubSystem(), legacy))return FALSE;
if(!other_value.userStatus().is_bound()) return FALSE;
if(!single_value->field_userStatus.match(other_value.userStatus(), legacy))return FALSE;
if(!other_value.subsystmultiindicator().is_bound()) return FALSE;
if((other_value.subsystmultiindicator().ispresent() ? !single_value->field_subsystmultiindicator.match((const INTEGER&)other_value.subsystmultiindicator(), legacy) : !single_value->field_subsystmultiindicator.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_STATE_ind.");
}
return FALSE;
}

boolean ASP__SCCP__N__STATE__ind_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_affectedSubSystem.is_bound()
 || single_value->field_userStatus.is_bound()
 || (single_value->field_subsystmultiindicator.is_omit() || single_value->field_subsystmultiindicator.is_bound());
}

boolean ASP__SCCP__N__STATE__ind_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_affectedSubSystem.is_value()
 && single_value->field_userStatus.is_value()
 && (single_value->field_subsystmultiindicator.is_omit() || single_value->field_subsystmultiindicator.is_value());
}

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

ASP__SCCP__N__STATE__ind ASP__SCCP__N__STATE__ind_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_STATE_ind.");
ASP__SCCP__N__STATE__ind ret_val;
if (single_value->field_affectedSubSystem.is_bound()) {
ret_val.affectedSubSystem() = single_value->field_affectedSubSystem.valueof();
}
if (single_value->field_userStatus.is_bound()) {
ret_val.userStatus() = single_value->field_userStatus.valueof();
}
if (single_value->field_subsystmultiindicator.is_omit()) ret_val.subsystmultiindicator() = OMIT_VALUE;
else if (single_value->field_subsystmultiindicator.is_bound()) {
ret_val.subsystmultiindicator() = single_value->field_subsystmultiindicator.valueof();
}
return ret_val;
}

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

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

INTEGER_template& ASP__SCCP__N__STATE__ind_template::affectedSubSystem()
{
set_specific();
return single_value->field_affectedSubSystem;
}

const INTEGER_template& ASP__SCCP__N__STATE__ind_template::affectedSubSystem() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field affectedSubSystem of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_STATE_ind.");
return single_value->field_affectedSubSystem;
}

INTEGER_template& ASP__SCCP__N__STATE__ind_template::userStatus()
{
set_specific();
return single_value->field_userStatus;
}

const INTEGER_template& ASP__SCCP__N__STATE__ind_template::userStatus() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field userStatus of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_STATE_ind.");
return single_value->field_userStatus;
}

INTEGER_template& ASP__SCCP__N__STATE__ind_template::subsystmultiindicator()
{
set_specific();
return single_value->field_subsystmultiindicator;
}

const INTEGER_template& ASP__SCCP__N__STATE__ind_template::subsystmultiindicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field subsystmultiindicator of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_STATE_ind.");
return single_value->field_subsystmultiindicator;
}

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

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

void ASP__SCCP__N__STATE__ind_template::log_match(const ASP__SCCP__N__STATE__ind& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_affectedSubSystem.match(match_value.affectedSubSystem(), legacy)){
TTCN_Logger::log_logmatch_info(".affectedSubSystem");
single_value->field_affectedSubSystem.log_match(match_value.affectedSubSystem(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_userStatus.match(match_value.userStatus(), legacy)){
TTCN_Logger::log_logmatch_info(".userStatus");
single_value->field_userStatus.log_match(match_value.userStatus(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.subsystmultiindicator().ispresent()){
if(!single_value->field_subsystmultiindicator.match(match_value.subsystmultiindicator(), legacy)){
TTCN_Logger::log_logmatch_info(".subsystmultiindicator");
single_value->field_subsystmultiindicator.log_match(match_value.subsystmultiindicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_subsystmultiindicator.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".subsystmultiindicator := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_subsystmultiindicator.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ affectedSubSystem := ");
single_value->field_affectedSubSystem.log_match(match_value.affectedSubSystem(), legacy);
TTCN_Logger::log_event_str(", userStatus := ");
single_value->field_userStatus.log_match(match_value.userStatus(), legacy);
TTCN_Logger::log_event_str(", subsystmultiindicator := ");
if (match_value.subsystmultiindicator().ispresent()) {
single_value->field_subsystmultiindicator.log_match(match_value.subsystmultiindicator(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_subsystmultiindicator.log();
if (single_value->field_subsystmultiindicator.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

ASP__SCCP__N__RESET__req::ASP__SCCP__N__RESET__req()
{
}

ASP__SCCP__N__RESET__req::ASP__SCCP__N__RESET__req(const INTEGER& par_originator,
    const INTEGER& par_reason,
    const OPTIONAL< INTEGER >& par_connectionId)
  :   field_originator(par_originator),
  field_reason(par_reason),
  field_connectionId(par_connectionId)
{
}

ASP__SCCP__N__RESET__req::ASP__SCCP__N__RESET__req(const ASP__SCCP__N__RESET__req& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_RESET_req.");
if (other_value.originator().is_bound()) field_originator = other_value.originator();
else field_originator.clean_up();
if (other_value.reason().is_bound()) field_reason = other_value.reason();
else field_reason.clean_up();
if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
else field_connectionId.clean_up();
}

void ASP__SCCP__N__RESET__req::clean_up()
{
field_originator.clean_up();
field_reason.clean_up();
field_connectionId.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__RESET__req::get_descriptor() const { return &ASP__SCCP__N__RESET__req_descr_; }
ASP__SCCP__N__RESET__req& ASP__SCCP__N__RESET__req::operator=(const ASP__SCCP__N__RESET__req& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_RESET_req.");
  if (other_value.originator().is_bound()) field_originator = other_value.originator();
  else field_originator.clean_up();
  if (other_value.reason().is_bound()) field_reason = other_value.reason();
  else field_reason.clean_up();
  if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
  else field_connectionId.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__RESET__req::operator==(const ASP__SCCP__N__RESET__req& other_value) const
{
return field_originator==other_value.field_originator
  && field_reason==other_value.field_reason
  && field_connectionId==other_value.field_connectionId;
}

boolean ASP__SCCP__N__RESET__req::is_bound() const
{
return (field_originator.is_bound())
  || (field_reason.is_bound())
  || (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_bound());
}
boolean ASP__SCCP__N__RESET__req::is_value() const
{
return field_originator.is_value()
  && field_reason.is_value()
  && (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_value());
}
int ASP__SCCP__N__RESET__req::size_of() const
{
  int ret_val = 2;
  if (field_connectionId.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__RESET__req::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ originator := ");
field_originator.log();
TTCN_Logger::log_event_str(", reason := ");
field_reason.log();
TTCN_Logger::log_event_str(", connectionId := ");
field_connectionId.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__RESET__req::set_implicit_omit()
{
if (originator().is_bound()) originator().set_implicit_omit();
if (reason().is_bound()) reason().set_implicit_omit();
if (!connectionId().is_bound()) connectionId() = OMIT_VALUE;
else connectionId().set_implicit_omit();
}

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

void ASP__SCCP__N__RESET__req::encode_text(Text_Buf& text_buf) const
{
field_originator.encode_text(text_buf);
field_reason.encode_text(text_buf);
field_connectionId.encode_text(text_buf);
}

void ASP__SCCP__N__RESET__req::decode_text(Text_Buf& text_buf)
{
field_originator.decode_text(text_buf);
field_reason.decode_text(text_buf);
field_connectionId.decode_text(text_buf);
}

struct ASP__SCCP__N__RESET__req_template::single_value_struct {
INTEGER_template field_originator;
INTEGER_template field_reason;
INTEGER_template field_connectionId;
};

void ASP__SCCP__N__RESET__req_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_originator = ANY_VALUE;
single_value->field_reason = ANY_VALUE;
single_value->field_connectionId = ANY_OR_OMIT;
}
}
}

void ASP__SCCP__N__RESET__req_template::copy_value(const ASP__SCCP__N__RESET__req& other_value)
{
single_value = new single_value_struct;
if (other_value.originator().is_bound()) {
  single_value->field_originator = other_value.originator();
} else {
  single_value->field_originator.clean_up();
}
if (other_value.reason().is_bound()) {
  single_value->field_reason = other_value.reason();
} else {
  single_value->field_reason.clean_up();
}
if (other_value.connectionId().is_bound()) {
  if (other_value.connectionId().ispresent()) single_value->field_connectionId = other_value.connectionId()();
  else single_value->field_connectionId = OMIT_VALUE;
} else {
  single_value->field_connectionId.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

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

ASP__SCCP__N__RESET__req_template::ASP__SCCP__N__RESET__req_template()
{
}

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

ASP__SCCP__N__RESET__req_template::ASP__SCCP__N__RESET__req_template(const ASP__SCCP__N__RESET__req& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__RESET__req_template::match(const ASP__SCCP__N__RESET__req& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.originator().is_bound()) return FALSE;
if(!single_value->field_originator.match(other_value.originator(), legacy))return FALSE;
if(!other_value.reason().is_bound()) return FALSE;
if(!single_value->field_reason.match(other_value.reason(), legacy))return FALSE;
if(!other_value.connectionId().is_bound()) return FALSE;
if((other_value.connectionId().ispresent() ? !single_value->field_connectionId.match((const INTEGER&)other_value.connectionId(), legacy) : !single_value->field_connectionId.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_RESET_req.");
}
return FALSE;
}

boolean ASP__SCCP__N__RESET__req_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_originator.is_bound()
 || single_value->field_reason.is_bound()
 || (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_bound());
}

boolean ASP__SCCP__N__RESET__req_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_originator.is_value()
 && single_value->field_reason.is_value()
 && (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_value());
}

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

ASP__SCCP__N__RESET__req ASP__SCCP__N__RESET__req_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_RESET_req.");
ASP__SCCP__N__RESET__req ret_val;
if (single_value->field_originator.is_bound()) {
ret_val.originator() = single_value->field_originator.valueof();
}
if (single_value->field_reason.is_bound()) {
ret_val.reason() = single_value->field_reason.valueof();
}
if (single_value->field_connectionId.is_omit()) ret_val.connectionId() = OMIT_VALUE;
else if (single_value->field_connectionId.is_bound()) {
ret_val.connectionId() = single_value->field_connectionId.valueof();
}
return ret_val;
}

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

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

INTEGER_template& ASP__SCCP__N__RESET__req_template::originator()
{
set_specific();
return single_value->field_originator;
}

const INTEGER_template& ASP__SCCP__N__RESET__req_template::originator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field originator of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_RESET_req.");
return single_value->field_originator;
}

INTEGER_template& ASP__SCCP__N__RESET__req_template::reason()
{
set_specific();
return single_value->field_reason;
}

const INTEGER_template& ASP__SCCP__N__RESET__req_template::reason() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field reason of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_RESET_req.");
return single_value->field_reason;
}

INTEGER_template& ASP__SCCP__N__RESET__req_template::connectionId()
{
set_specific();
return single_value->field_connectionId;
}

const INTEGER_template& ASP__SCCP__N__RESET__req_template::connectionId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field connectionId of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_RESET_req.");
return single_value->field_connectionId;
}

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

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

void ASP__SCCP__N__RESET__req_template::log_match(const ASP__SCCP__N__RESET__req& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_originator.match(match_value.originator(), legacy)){
TTCN_Logger::log_logmatch_info(".originator");
single_value->field_originator.log_match(match_value.originator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_reason.match(match_value.reason(), legacy)){
TTCN_Logger::log_logmatch_info(".reason");
single_value->field_reason.log_match(match_value.reason(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.connectionId().ispresent()){
if(!single_value->field_connectionId.match(match_value.connectionId(), legacy)){
TTCN_Logger::log_logmatch_info(".connectionId");
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_connectionId.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".connectionId := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ originator := ");
single_value->field_originator.log_match(match_value.originator(), legacy);
TTCN_Logger::log_event_str(", reason := ");
single_value->field_reason.log_match(match_value.reason(), legacy);
TTCN_Logger::log_event_str(", connectionId := ");
if (match_value.connectionId().ispresent()) {
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_connectionId.log();
if (single_value->field_connectionId.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

ASP__SCCP__N__RESET__ind::ASP__SCCP__N__RESET__ind()
{
}

ASP__SCCP__N__RESET__ind::ASP__SCCP__N__RESET__ind(const INTEGER& par_originator,
    const INTEGER& par_reason,
    const OPTIONAL< INTEGER >& par_connectionId)
  :   field_originator(par_originator),
  field_reason(par_reason),
  field_connectionId(par_connectionId)
{
}

ASP__SCCP__N__RESET__ind::ASP__SCCP__N__RESET__ind(const ASP__SCCP__N__RESET__ind& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_RESET_ind.");
if (other_value.originator().is_bound()) field_originator = other_value.originator();
else field_originator.clean_up();
if (other_value.reason().is_bound()) field_reason = other_value.reason();
else field_reason.clean_up();
if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
else field_connectionId.clean_up();
}

void ASP__SCCP__N__RESET__ind::clean_up()
{
field_originator.clean_up();
field_reason.clean_up();
field_connectionId.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__RESET__ind::get_descriptor() const { return &ASP__SCCP__N__RESET__ind_descr_; }
ASP__SCCP__N__RESET__ind& ASP__SCCP__N__RESET__ind::operator=(const ASP__SCCP__N__RESET__ind& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_RESET_ind.");
  if (other_value.originator().is_bound()) field_originator = other_value.originator();
  else field_originator.clean_up();
  if (other_value.reason().is_bound()) field_reason = other_value.reason();
  else field_reason.clean_up();
  if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
  else field_connectionId.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__RESET__ind::operator==(const ASP__SCCP__N__RESET__ind& other_value) const
{
return field_originator==other_value.field_originator
  && field_reason==other_value.field_reason
  && field_connectionId==other_value.field_connectionId;
}

boolean ASP__SCCP__N__RESET__ind::is_bound() const
{
return (field_originator.is_bound())
  || (field_reason.is_bound())
  || (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_bound());
}
boolean ASP__SCCP__N__RESET__ind::is_value() const
{
return field_originator.is_value()
  && field_reason.is_value()
  && (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_value());
}
int ASP__SCCP__N__RESET__ind::size_of() const
{
  int ret_val = 2;
  if (field_connectionId.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__RESET__ind::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ originator := ");
field_originator.log();
TTCN_Logger::log_event_str(", reason := ");
field_reason.log();
TTCN_Logger::log_event_str(", connectionId := ");
field_connectionId.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__RESET__ind::set_implicit_omit()
{
if (originator().is_bound()) originator().set_implicit_omit();
if (reason().is_bound()) reason().set_implicit_omit();
if (!connectionId().is_bound()) connectionId() = OMIT_VALUE;
else connectionId().set_implicit_omit();
}

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

void ASP__SCCP__N__RESET__ind::encode_text(Text_Buf& text_buf) const
{
field_originator.encode_text(text_buf);
field_reason.encode_text(text_buf);
field_connectionId.encode_text(text_buf);
}

void ASP__SCCP__N__RESET__ind::decode_text(Text_Buf& text_buf)
{
field_originator.decode_text(text_buf);
field_reason.decode_text(text_buf);
field_connectionId.decode_text(text_buf);
}

struct ASP__SCCP__N__RESET__ind_template::single_value_struct {
INTEGER_template field_originator;
INTEGER_template field_reason;
INTEGER_template field_connectionId;
};

void ASP__SCCP__N__RESET__ind_template::set_specific()
{
if (template_selection != SPECIFIC_VALUE) {
template_sel old_selection = template_selection;
clean_up();
single_value = new single_value_struct;
set_selection(SPECIFIC_VALUE);
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) {
single_value->field_originator = ANY_VALUE;
single_value->field_reason = ANY_VALUE;
single_value->field_connectionId = ANY_OR_OMIT;
}
}
}

void ASP__SCCP__N__RESET__ind_template::copy_value(const ASP__SCCP__N__RESET__ind& other_value)
{
single_value = new single_value_struct;
if (other_value.originator().is_bound()) {
  single_value->field_originator = other_value.originator();
} else {
  single_value->field_originator.clean_up();
}
if (other_value.reason().is_bound()) {
  single_value->field_reason = other_value.reason();
} else {
  single_value->field_reason.clean_up();
}
if (other_value.connectionId().is_bound()) {
  if (other_value.connectionId().ispresent()) single_value->field_connectionId = other_value.connectionId()();
  else single_value->field_connectionId = OMIT_VALUE;
} else {
  single_value->field_connectionId.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

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

ASP__SCCP__N__RESET__ind_template::ASP__SCCP__N__RESET__ind_template()
{
}

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

ASP__SCCP__N__RESET__ind_template::ASP__SCCP__N__RESET__ind_template(const ASP__SCCP__N__RESET__ind& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__RESET__ind_template::match(const ASP__SCCP__N__RESET__ind& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.originator().is_bound()) return FALSE;
if(!single_value->field_originator.match(other_value.originator(), legacy))return FALSE;
if(!other_value.reason().is_bound()) return FALSE;
if(!single_value->field_reason.match(other_value.reason(), legacy))return FALSE;
if(!other_value.connectionId().is_bound()) return FALSE;
if((other_value.connectionId().ispresent() ? !single_value->field_connectionId.match((const INTEGER&)other_value.connectionId(), legacy) : !single_value->field_connectionId.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_RESET_ind.");
}
return FALSE;
}

boolean ASP__SCCP__N__RESET__ind_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_originator.is_bound()
 || single_value->field_reason.is_bound()
 || (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_bound());
}

boolean ASP__SCCP__N__RESET__ind_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_originator.is_value()
 && single_value->field_reason.is_value()
 && (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_value());
}

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

ASP__SCCP__N__RESET__ind ASP__SCCP__N__RESET__ind_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_RESET_ind.");
ASP__SCCP__N__RESET__ind ret_val;
if (single_value->field_originator.is_bound()) {
ret_val.originator() = single_value->field_originator.valueof();
}
if (single_value->field_reason.is_bound()) {
ret_val.reason() = single_value->field_reason.valueof();
}
if (single_value->field_connectionId.is_omit()) ret_val.connectionId() = OMIT_VALUE;
else if (single_value->field_connectionId.is_bound()) {
ret_val.connectionId() = single_value->field_connectionId.valueof();
}
return ret_val;
}

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

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

INTEGER_template& ASP__SCCP__N__RESET__ind_template::originator()
{
set_specific();
return single_value->field_originator;
}

const INTEGER_template& ASP__SCCP__N__RESET__ind_template::originator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field originator of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_RESET_ind.");
return single_value->field_originator;
}

INTEGER_template& ASP__SCCP__N__RESET__ind_template::reason()
{
set_specific();
return single_value->field_reason;
}

const INTEGER_template& ASP__SCCP__N__RESET__ind_template::reason() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field reason of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_RESET_ind.");
return single_value->field_reason;
}

INTEGER_template& ASP__SCCP__N__RESET__ind_template::connectionId()
{
set_specific();
return single_value->field_connectionId;
}

const INTEGER_template& ASP__SCCP__N__RESET__ind_template::connectionId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field connectionId of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_RESET_ind.");
return single_value->field_connectionId;
}

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

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

void ASP__SCCP__N__RESET__ind_template::log_match(const ASP__SCCP__N__RESET__ind& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_originator.match(match_value.originator(), legacy)){
TTCN_Logger::log_logmatch_info(".originator");
single_value->field_originator.log_match(match_value.originator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_reason.match(match_value.reason(), legacy)){
TTCN_Logger::log_logmatch_info(".reason");
single_value->field_reason.log_match(match_value.reason(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.connectionId().ispresent()){
if(!single_value->field_connectionId.match(match_value.connectionId(), legacy)){
TTCN_Logger::log_logmatch_info(".connectionId");
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_connectionId.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".connectionId := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ originator := ");
single_value->field_originator.log_match(match_value.originator(), legacy);
TTCN_Logger::log_event_str(", reason := ");
single_value->field_reason.log_match(match_value.reason(), legacy);
TTCN_Logger::log_event_str(", connectionId := ");
if (match_value.connectionId().ispresent()) {
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_connectionId.log();
if (single_value->field_connectionId.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

ASP__SCCP__N__RESET__resp::ASP__SCCP__N__RESET__resp()
{
}

ASP__SCCP__N__RESET__resp::ASP__SCCP__N__RESET__resp(const OPTIONAL< INTEGER >& par_connectionId)
  :   field_connectionId(par_connectionId)
{
}

ASP__SCCP__N__RESET__resp::ASP__SCCP__N__RESET__resp(const ASP__SCCP__N__RESET__resp& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_RESET_resp.");
if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
else field_connectionId.clean_up();
}

void ASP__SCCP__N__RESET__resp::clean_up()
{
field_connectionId.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__RESET__resp::get_descriptor() const { return &ASP__SCCP__N__RESET__resp_descr_; }
ASP__SCCP__N__RESET__resp& ASP__SCCP__N__RESET__resp::operator=(const ASP__SCCP__N__RESET__resp& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_RESET_resp.");
  if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
  else field_connectionId.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__RESET__resp::operator==(const ASP__SCCP__N__RESET__resp& other_value) const
{
return field_connectionId==other_value.field_connectionId;
}

boolean ASP__SCCP__N__RESET__resp::is_bound() const
{
return (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_bound());
}
boolean ASP__SCCP__N__RESET__resp::is_value() const
{
return (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_value());
}
int ASP__SCCP__N__RESET__resp::size_of() const
{
  int ret_val = 0;
  if (field_connectionId.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__RESET__resp::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ connectionId := ");
field_connectionId.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__RESET__resp::set_implicit_omit()
{
if (!connectionId().is_bound()) connectionId() = OMIT_VALUE;
else connectionId().set_implicit_omit();
}

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

void ASP__SCCP__N__RESET__resp::encode_text(Text_Buf& text_buf) const
{
field_connectionId.encode_text(text_buf);
}

void ASP__SCCP__N__RESET__resp::decode_text(Text_Buf& text_buf)
{
field_connectionId.decode_text(text_buf);
}

struct ASP__SCCP__N__RESET__resp_template::single_value_struct {
INTEGER_template field_connectionId;
};

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

void ASP__SCCP__N__RESET__resp_template::copy_value(const ASP__SCCP__N__RESET__resp& other_value)
{
single_value = new single_value_struct;
if (other_value.connectionId().is_bound()) {
  if (other_value.connectionId().ispresent()) single_value->field_connectionId = other_value.connectionId()();
  else single_value->field_connectionId = OMIT_VALUE;
} else {
  single_value->field_connectionId.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ASP__SCCP__N__RESET__resp_template::copy_template(const ASP__SCCP__N__RESET__resp_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.connectionId().get_selection()) {
single_value->field_connectionId = other_value.connectionId();
} else {
single_value->field_connectionId.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ASP__SCCP__N__RESET__resp_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 ASP__SCCP__N__RESET__resp_template(*other_value.implication_.precondition);
implication_.implied_template = new ASP__SCCP__N__RESET__resp_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_RESET_resp.");
break;
}
set_selection(other_value);
}

ASP__SCCP__N__RESET__resp_template::ASP__SCCP__N__RESET__resp_template()
{
}

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

ASP__SCCP__N__RESET__resp_template::ASP__SCCP__N__RESET__resp_template(const ASP__SCCP__N__RESET__resp& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__RESET__resp_template::match(const ASP__SCCP__N__RESET__resp& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.connectionId().is_bound()) return FALSE;
if((other_value.connectionId().ispresent() ? !single_value->field_connectionId.match((const INTEGER&)other_value.connectionId(), legacy) : !single_value->field_connectionId.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_RESET_resp.");
}
return FALSE;
}

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

boolean ASP__SCCP__N__RESET__resp_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_value());
}

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

ASP__SCCP__N__RESET__resp ASP__SCCP__N__RESET__resp_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_RESET_resp.");
ASP__SCCP__N__RESET__resp ret_val;
if (single_value->field_connectionId.is_omit()) ret_val.connectionId() = OMIT_VALUE;
else if (single_value->field_connectionId.is_bound()) {
ret_val.connectionId() = single_value->field_connectionId.valueof();
}
return ret_val;
}

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

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

INTEGER_template& ASP__SCCP__N__RESET__resp_template::connectionId()
{
set_specific();
return single_value->field_connectionId;
}

const INTEGER_template& ASP__SCCP__N__RESET__resp_template::connectionId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field connectionId of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_RESET_resp.");
return single_value->field_connectionId;
}

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

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

void ASP__SCCP__N__RESET__resp_template::log_match(const ASP__SCCP__N__RESET__resp& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if (match_value.connectionId().ispresent()){
if(!single_value->field_connectionId.match(match_value.connectionId(), legacy)){
TTCN_Logger::log_logmatch_info(".connectionId");
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_connectionId.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".connectionId := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ connectionId := ");
if (match_value.connectionId().ispresent()) {
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_connectionId.log();
if (single_value->field_connectionId.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

ASP__SCCP__N__RESET__cfm::ASP__SCCP__N__RESET__cfm()
{
}

ASP__SCCP__N__RESET__cfm::ASP__SCCP__N__RESET__cfm(const OPTIONAL< INTEGER >& par_connectionId)
  :   field_connectionId(par_connectionId)
{
}

ASP__SCCP__N__RESET__cfm::ASP__SCCP__N__RESET__cfm(const ASP__SCCP__N__RESET__cfm& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @SCCPasp_Types.ASP_SCCP_N_RESET_cfm.");
if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
else field_connectionId.clean_up();
}

void ASP__SCCP__N__RESET__cfm::clean_up()
{
field_connectionId.clean_up();
}

const TTCN_Typedescriptor_t* ASP__SCCP__N__RESET__cfm::get_descriptor() const { return &ASP__SCCP__N__RESET__cfm_descr_; }
ASP__SCCP__N__RESET__cfm& ASP__SCCP__N__RESET__cfm::operator=(const ASP__SCCP__N__RESET__cfm& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @SCCPasp_Types.ASP_SCCP_N_RESET_cfm.");
  if (other_value.connectionId().is_bound()) field_connectionId = other_value.connectionId();
  else field_connectionId.clean_up();
}
return *this;
}

boolean ASP__SCCP__N__RESET__cfm::operator==(const ASP__SCCP__N__RESET__cfm& other_value) const
{
return field_connectionId==other_value.field_connectionId;
}

boolean ASP__SCCP__N__RESET__cfm::is_bound() const
{
return (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_bound());
}
boolean ASP__SCCP__N__RESET__cfm::is_value() const
{
return (OPTIONAL_OMIT == field_connectionId.get_selection() || field_connectionId.is_value());
}
int ASP__SCCP__N__RESET__cfm::size_of() const
{
  int ret_val = 0;
  if (field_connectionId.ispresent()) ret_val++;
  return ret_val;
}

void ASP__SCCP__N__RESET__cfm::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ connectionId := ");
field_connectionId.log();
TTCN_Logger::log_event_str(" }");
}

void ASP__SCCP__N__RESET__cfm::set_implicit_omit()
{
if (!connectionId().is_bound()) connectionId() = OMIT_VALUE;
else connectionId().set_implicit_omit();
}

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

void ASP__SCCP__N__RESET__cfm::encode_text(Text_Buf& text_buf) const
{
field_connectionId.encode_text(text_buf);
}

void ASP__SCCP__N__RESET__cfm::decode_text(Text_Buf& text_buf)
{
field_connectionId.decode_text(text_buf);
}

struct ASP__SCCP__N__RESET__cfm_template::single_value_struct {
INTEGER_template field_connectionId;
};

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

void ASP__SCCP__N__RESET__cfm_template::copy_value(const ASP__SCCP__N__RESET__cfm& other_value)
{
single_value = new single_value_struct;
if (other_value.connectionId().is_bound()) {
  if (other_value.connectionId().ispresent()) single_value->field_connectionId = other_value.connectionId()();
  else single_value->field_connectionId = OMIT_VALUE;
} else {
  single_value->field_connectionId.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ASP__SCCP__N__RESET__cfm_template::copy_template(const ASP__SCCP__N__RESET__cfm_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.connectionId().get_selection()) {
single_value->field_connectionId = other_value.connectionId();
} else {
single_value->field_connectionId.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new ASP__SCCP__N__RESET__cfm_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 ASP__SCCP__N__RESET__cfm_template(*other_value.implication_.precondition);
implication_.implied_template = new ASP__SCCP__N__RESET__cfm_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_RESET_cfm.");
break;
}
set_selection(other_value);
}

ASP__SCCP__N__RESET__cfm_template::ASP__SCCP__N__RESET__cfm_template()
{
}

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

ASP__SCCP__N__RESET__cfm_template::ASP__SCCP__N__RESET__cfm_template(const ASP__SCCP__N__RESET__cfm& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ASP__SCCP__N__RESET__cfm_template::match(const ASP__SCCP__N__RESET__cfm& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
if(!other_value.connectionId().is_bound()) return FALSE;
if((other_value.connectionId().ispresent() ? !single_value->field_connectionId.match((const INTEGER&)other_value.connectionId(), legacy) : !single_value->field_connectionId.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @SCCPasp_Types.ASP_SCCP_N_RESET_cfm.");
}
return FALSE;
}

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

boolean ASP__SCCP__N__RESET__cfm_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return (single_value->field_connectionId.is_omit() || single_value->field_connectionId.is_value());
}

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

ASP__SCCP__N__RESET__cfm ASP__SCCP__N__RESET__cfm_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_RESET_cfm.");
ASP__SCCP__N__RESET__cfm ret_val;
if (single_value->field_connectionId.is_omit()) ret_val.connectionId() = OMIT_VALUE;
else if (single_value->field_connectionId.is_bound()) {
ret_val.connectionId() = single_value->field_connectionId.valueof();
}
return ret_val;
}

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

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

INTEGER_template& ASP__SCCP__N__RESET__cfm_template::connectionId()
{
set_specific();
return single_value->field_connectionId;
}

const INTEGER_template& ASP__SCCP__N__RESET__cfm_template::connectionId() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field connectionId of a non-specific template of type @SCCPasp_Types.ASP_SCCP_N_RESET_cfm.");
return single_value->field_connectionId;
}

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

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

void ASP__SCCP__N__RESET__cfm_template::log_match(const ASP__SCCP__N__RESET__cfm& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if (match_value.connectionId().ispresent()){
if(!single_value->field_connectionId.match(match_value.connectionId(), legacy)){
TTCN_Logger::log_logmatch_info(".connectionId");
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_connectionId.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".connectionId := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_connectionId.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ connectionId := ");
if (match_value.connectionId().ispresent()) {
single_value->field_connectionId.log_match(match_value.connectionId(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_connectionId.log();
if (single_value->field_connectionId.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

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

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

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

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

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

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

void SCCPasp__SP__PT::remove_msg_queue_head()
{
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
switch (my_head->item_selection) {
case MESSAGE_0:
delete (my_head)->message_0;
break;
case MESSAGE_1:
delete (my_head)->message_1;
break;
case MESSAGE_2:
delete (my_head)->message_2;
break;
case MESSAGE_3:
delete (my_head)->message_3;
break;
case MESSAGE_4:
delete (my_head)->message_4;
break;
case MESSAGE_5:
delete (my_head)->message_5;
break;
case MESSAGE_6:
delete (my_head)->message_6;
break;
default:
TTCN_error("Internal error: Invalid message selector in the queue of port %s.", port_name);
}
msg_queue_item_base *next_item = msg_queue_head->next_item;
delete (msg_queue_item*)msg_queue_head;
msg_queue_head = next_item;
if (next_item == NULL) msg_queue_tail = NULL;
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::extract__msg, port_name, 0, ++msg_head_count, CHARSTRING(0,NULL), CHARSTRING(0,NULL));}

void SCCPasp__SP__PT::clear_queue()
{
while (msg_queue_head != NULL) remove_msg_queue_head();
}

SCCPasp__SP__PT::SCCPasp__SP__PT(const char *par_port_name)
 : PORT(par_port_name)
{
msg_queue_head = NULL;
msg_queue_tail = NULL;
}

SCCPasp__SP__PT::~SCCPasp__SP__PT()
{
clear_queue();
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__CONNECT__ind& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_CONNECT_ind");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__CONNECT__ind& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__CONNECT__ind_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__CONNECT__ind& send_par_value = ASP__SCCP__N__CONNECT__ind(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__CONNECT__ind_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__CONNECT__ind& send_par_value = ASP__SCCP__N__CONNECT__ind(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__CONNECT__cfm& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__CONNECT__cfm& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__CONNECT__cfm_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__CONNECT__cfm& send_par_value = ASP__SCCP__N__CONNECT__cfm(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__CONNECT__cfm_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__CONNECT__cfm& send_par_value = ASP__SCCP__N__CONNECT__cfm(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__DATA__ind& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_DATA_ind : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_DATA_ind");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__DATA__ind& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__DATA__ind_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__DATA__ind& send_par_value = ASP__SCCP__N__DATA__ind(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__DATA__ind_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__DATA__ind& send_par_value = ASP__SCCP__N__DATA__ind(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__DISCONNECT__ind& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__DISCONNECT__ind& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__DISCONNECT__ind_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__DISCONNECT__ind& send_par_value = ASP__SCCP__N__DISCONNECT__ind(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__DISCONNECT__ind_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__DISCONNECT__ind& send_par_value = ASP__SCCP__N__DISCONNECT__ind(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__UNITDATA__ind& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__UNITDATA__ind& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__UNITDATA__ind_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__UNITDATA__ind& send_par_value = ASP__SCCP__N__UNITDATA__ind(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__UNITDATA__ind_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__UNITDATA__ind& send_par_value = ASP__SCCP__N__UNITDATA__ind(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__NOTICE__ind& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_NOTICE_ind");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__NOTICE__ind& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__NOTICE__ind_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__NOTICE__ind& send_par_value = ASP__SCCP__N__NOTICE__ind(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__NOTICE__ind_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__NOTICE__ind& send_par_value = ASP__SCCP__N__NOTICE__ind(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__STATE__ind& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_STATE_ind : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_STATE_ind");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__STATE__ind& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__STATE__ind_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__STATE__ind& send_par_value = ASP__SCCP__N__STATE__ind(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__STATE__ind_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__STATE__ind& send_par_value = ASP__SCCP__N__STATE__ind(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__RESET__ind& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_RESET_ind : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_RESET_ind");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__RESET__ind& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__RESET__ind_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__RESET__ind& send_par_value = ASP__SCCP__N__RESET__ind(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__RESET__ind_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__RESET__ind& send_par_value = ASP__SCCP__N__RESET__ind(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__RESET__cfm& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_RESET_cfm : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_RESET_cfm");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__RESET__cfm& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__RESET__cfm_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__RESET__cfm& send_par_value = ASP__SCCP__N__RESET__cfm(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__SP__PT::send(const ASP__SCCP__N__RESET__cfm_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__RESET__cfm& send_par_value = ASP__SCCP__N__RESET__cfm(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

alt_status SCCPasp__SP__PT::receive(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else {
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS, "Matching on port %s succeeded.", port_name);
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
switch (my_head->item_selection) {
case MESSAGE_0:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_req: "),
my_head->message_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_1:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_res: "),
my_head->message_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_2:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DATA_req: "),
my_head->message_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_3:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req: "),
my_head->message_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_4:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req: "),
my_head->message_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_5:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_req: "),
my_head->message_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_6:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_resp: "),
my_head->message_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
default:
TTCN_error("Internal error: unknown message");
}
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::check_receive(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else {
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS, "Matching on port %s succeeded.", port_name);
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
switch (my_head->item_selection) {
case MESSAGE_0:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_req: "),
my_head->message_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_1:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_res: "),
my_head->message_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_2:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DATA_req: "),
my_head->message_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_3:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req: "),
my_head->message_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_4:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req: "),
my_head->message_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_5:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_req: "),
my_head->message_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_6:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_resp: "),
my_head->message_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
default:
TTCN_error("Internal error: unknown message");
}
}
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::trigger(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS, "Matching on port %s succeeded.", port_name);
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
switch (my_head->item_selection) {
case MESSAGE_0:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_req: "),
my_head->message_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_1:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_res: "),
my_head->message_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_2:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DATA_req: "),
my_head->message_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_3:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req: "),
my_head->message_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_4:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req: "),
my_head->message_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_5:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_req: "),
my_head->message_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_6:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_resp: "),
my_head->message_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
default:
TTCN_error("Internal error: unknown message");
}
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::receive(const ASP__SCCP__N__CONNECT__req_template& value_template, ASP__SCCP__N__CONNECT__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_0) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_0)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_0;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_req : "),
my_head->message_0->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::check_receive(const ASP__SCCP__N__CONNECT__req_template& value_template, ASP__SCCP__N__CONNECT__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_0) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_0)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_0;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_req : "),
my_head->message_0->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::trigger(const ASP__SCCP__N__CONNECT__req_template& value_template, ASP__SCCP__N__CONNECT__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_0) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_CONNECT_req.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_0)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_0;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_req : "),
my_head->message_0->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::receive(const ASP__SCCP__N__CONNECT__res_template& value_template, ASP__SCCP__N__CONNECT__res *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_1) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_CONNECT_res.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_1)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_1;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_res : "),
my_head->message_1->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::check_receive(const ASP__SCCP__N__CONNECT__res_template& value_template, ASP__SCCP__N__CONNECT__res *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_1) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_CONNECT_res.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_1)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_1;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_res : "),
my_head->message_1->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::trigger(const ASP__SCCP__N__CONNECT__res_template& value_template, ASP__SCCP__N__CONNECT__res *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_1) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_CONNECT_res.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_1)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_1;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_res : "),
my_head->message_1->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::receive(const ASP__SCCP__N__DATA__req_template& value_template, ASP__SCCP__N__DATA__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_2) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_DATA_req.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_2)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_2;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DATA_req : "),
my_head->message_2->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::check_receive(const ASP__SCCP__N__DATA__req_template& value_template, ASP__SCCP__N__DATA__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_2) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_DATA_req.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_2)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_2;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DATA_req : "),
my_head->message_2->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::trigger(const ASP__SCCP__N__DATA__req_template& value_template, ASP__SCCP__N__DATA__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_2) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_DATA_req.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_2)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_2;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DATA_req : "),
my_head->message_2->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::receive(const ASP__SCCP__N__DISCONNECT__req_template& value_template, ASP__SCCP__N__DISCONNECT__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_3) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_3)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_3;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req : "),
my_head->message_3->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::check_receive(const ASP__SCCP__N__DISCONNECT__req_template& value_template, ASP__SCCP__N__DISCONNECT__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_3) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_3)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_3;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req : "),
my_head->message_3->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::trigger(const ASP__SCCP__N__DISCONNECT__req_template& value_template, ASP__SCCP__N__DISCONNECT__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_3) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_3)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_3;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req : "),
my_head->message_3->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::receive(const ASP__SCCP__N__UNITDATA__req_template& value_template, ASP__SCCP__N__UNITDATA__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_4) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_4)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_4;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req : "),
my_head->message_4->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::check_receive(const ASP__SCCP__N__UNITDATA__req_template& value_template, ASP__SCCP__N__UNITDATA__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_4) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_4)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_4;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req : "),
my_head->message_4->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::trigger(const ASP__SCCP__N__UNITDATA__req_template& value_template, ASP__SCCP__N__UNITDATA__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_4) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_4)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_4;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req : "),
my_head->message_4->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::receive(const ASP__SCCP__N__RESET__req_template& value_template, ASP__SCCP__N__RESET__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_5) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_RESET_req.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_5)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_5;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_req : "),
my_head->message_5->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::check_receive(const ASP__SCCP__N__RESET__req_template& value_template, ASP__SCCP__N__RESET__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_5) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_RESET_req.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_5)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_5;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_req : "),
my_head->message_5->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::trigger(const ASP__SCCP__N__RESET__req_template& value_template, ASP__SCCP__N__RESET__req *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_5) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_RESET_req.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_5)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_5;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_req : "),
my_head->message_5->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::receive(const ASP__SCCP__N__RESET__resp_template& value_template, ASP__SCCP__N__RESET__resp *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_6) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_RESET_resp.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_6)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_6;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_resp : "),
my_head->message_6->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::check_receive(const ASP__SCCP__N__RESET__resp_template& value_template, ASP__SCCP__N__RESET__resp *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_6) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_RESET_resp.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_6)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_6;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_resp : "),
my_head->message_6->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__SP__PT::trigger(const ASP__SCCP__N__RESET__resp_template& value_template, ASP__SCCP__N__RESET__resp *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_6) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_RESET_resp.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_6)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_6;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_resp : "),
my_head->message_6->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

void SCCPasp__SP__PT::incoming_message(const ASP__SCCP__N__CONNECT__req& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_CONNECT_req : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_0;
new_item->message_0 = new ASP__SCCP__N__CONNECT__req(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

void SCCPasp__SP__PT::incoming_message(const ASP__SCCP__N__CONNECT__res& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_CONNECT_res : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_1;
new_item->message_1 = new ASP__SCCP__N__CONNECT__res(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

void SCCPasp__SP__PT::incoming_message(const ASP__SCCP__N__DATA__req& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_DATA_req : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_2;
new_item->message_2 = new ASP__SCCP__N__DATA__req(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

void SCCPasp__SP__PT::incoming_message(const ASP__SCCP__N__DISCONNECT__req& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_3;
new_item->message_3 = new ASP__SCCP__N__DISCONNECT__req(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

void SCCPasp__SP__PT::incoming_message(const ASP__SCCP__N__UNITDATA__req& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_4;
new_item->message_4 = new ASP__SCCP__N__UNITDATA__req(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

void SCCPasp__SP__PT::incoming_message(const ASP__SCCP__N__RESET__req& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_RESET_req : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_5;
new_item->message_5 = new ASP__SCCP__N__RESET__req(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

void SCCPasp__SP__PT::incoming_message(const ASP__SCCP__N__RESET__resp& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_RESET_resp : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_6;
new_item->message_6 = new ASP__SCCP__N__RESET__resp(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

boolean SCCPasp__SP__PT::process_message(const char *message_type, Text_Buf& incoming_buf, component sender_component, OCTETSTRING&)
{
if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req")) {
ASP__SCCP__N__CONNECT__req incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_CONNECT_res")) {
ASP__SCCP__N__CONNECT__res incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_DATA_req")) {
ASP__SCCP__N__DATA__req incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req")) {
ASP__SCCP__N__DISCONNECT__req incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_req")) {
ASP__SCCP__N__UNITDATA__req incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_RESET_req")) {
ASP__SCCP__N__RESET__req incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_RESET_resp")) {
ASP__SCCP__N__RESET__resp incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else return FALSE;
}

void SCCPasp__PT::remove_msg_queue_head()
{
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
switch (my_head->item_selection) {
case MESSAGE_0:
delete (my_head)->message_0;
break;
case MESSAGE_1:
delete (my_head)->message_1;
break;
case MESSAGE_2:
delete (my_head)->message_2;
break;
case MESSAGE_3:
delete (my_head)->message_3;
break;
case MESSAGE_4:
delete (my_head)->message_4;
break;
case MESSAGE_5:
delete (my_head)->message_5;
break;
case MESSAGE_6:
delete (my_head)->message_6;
break;
case MESSAGE_7:
delete (my_head)->message_7;
break;
case MESSAGE_8:
delete (my_head)->message_8;
break;
default:
TTCN_error("Internal error: Invalid message selector in the queue of port %s.", port_name);
}
msg_queue_item_base *next_item = msg_queue_head->next_item;
delete (msg_queue_item*)msg_queue_head;
msg_queue_head = next_item;
if (next_item == NULL) msg_queue_tail = NULL;
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::extract__msg, port_name, 0, ++msg_head_count, CHARSTRING(0,NULL), CHARSTRING(0,NULL));}

void SCCPasp__PT::clear_queue()
{
while (msg_queue_head != NULL) remove_msg_queue_head();
}

SCCPasp__PT::SCCPasp__PT(const char *par_port_name)
 : PORT(par_port_name)
{
msg_queue_head = NULL;
msg_queue_tail = NULL;
}

SCCPasp__PT::~SCCPasp__PT()
{
clear_queue();
}

void SCCPasp__PT::send(const ASP__SCCP__N__CONNECT__req& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_CONNECT_req : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_CONNECT_req");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__PT::send(const ASP__SCCP__N__CONNECT__req& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__CONNECT__req_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__CONNECT__req& send_par_value = ASP__SCCP__N__CONNECT__req(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__CONNECT__req_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__CONNECT__req& send_par_value = ASP__SCCP__N__CONNECT__req(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__CONNECT__res& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_CONNECT_res : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_CONNECT_res");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__PT::send(const ASP__SCCP__N__CONNECT__res& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__CONNECT__res_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__CONNECT__res& send_par_value = ASP__SCCP__N__CONNECT__res(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__CONNECT__res_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__CONNECT__res& send_par_value = ASP__SCCP__N__CONNECT__res(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__DATA__req& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_DATA_req : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_DATA_req");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__PT::send(const ASP__SCCP__N__DATA__req& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__DATA__req_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__DATA__req& send_par_value = ASP__SCCP__N__DATA__req(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__DATA__req_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__DATA__req& send_par_value = ASP__SCCP__N__DATA__req(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__DISCONNECT__req& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_req");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__PT::send(const ASP__SCCP__N__DISCONNECT__req& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__DISCONNECT__req_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__DISCONNECT__req& send_par_value = ASP__SCCP__N__DISCONNECT__req(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__DISCONNECT__req_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__DISCONNECT__req& send_par_value = ASP__SCCP__N__DISCONNECT__req(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__UNITDATA__req& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_UNITDATA_req : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_req");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__PT::send(const ASP__SCCP__N__UNITDATA__req& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__UNITDATA__req_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__UNITDATA__req& send_par_value = ASP__SCCP__N__UNITDATA__req(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__UNITDATA__req_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__UNITDATA__req& send_par_value = ASP__SCCP__N__UNITDATA__req(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__RESET__req& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_RESET_req : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_RESET_req");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__PT::send(const ASP__SCCP__N__RESET__req& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__RESET__req_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__RESET__req& send_par_value = ASP__SCCP__N__RESET__req(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__RESET__req_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__RESET__req& send_par_value = ASP__SCCP__N__RESET__req(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__RESET__resp& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
if (!is_started) TTCN_error("Sending a message on port %s, which is not started.", port_name);
if (!destination_component.is_bound()) TTCN_error("Unbound component reference in the to clause of send operation.");
const TTCN_Logger::Severity log_sev = destination_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMSEND:TTCN_Logger::PORTEVENT_MCSEND;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_send(port_name, destination_component,
(TTCN_Logger::begin_event(log_sev, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_RESET_resp : "),
send_par.log(), TTCN_Logger::end_event_log2str()));
}
if (destination_component == SYSTEM_COMPREF) TTCN_error("Message cannot be sent to system on internal port %s.", port_name);
else {
Text_Buf text_buf;
prepare_message(text_buf, "@SCCPasp_Types.ASP_SCCP_N_RESET_resp");
send_par.encode_text(text_buf);
send_data(text_buf, destination_component);
}
}

void SCCPasp__PT::send(const ASP__SCCP__N__RESET__resp& send_par, FLOAT* timestamp_redirect)
{
send(send_par, COMPONENT(get_default_destination()), timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__RESET__resp_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__RESET__resp& send_par_value = ASP__SCCP__N__RESET__resp(send_par.valueof());
send(send_par_value, destination_component, timestamp_redirect);
}

void SCCPasp__PT::send(const ASP__SCCP__N__RESET__resp_template& send_par, FLOAT* timestamp_redirect)
{
const ASP__SCCP__N__RESET__resp& send_par_value = ASP__SCCP__N__RESET__resp(send_par.valueof());
send(send_par_value, COMPONENT(get_default_destination()), timestamp_redirect);
}

alt_status SCCPasp__PT::receive(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else {
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS, "Matching on port %s succeeded.", port_name);
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
switch (my_head->item_selection) {
case MESSAGE_0:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind: "),
my_head->message_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_1:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm: "),
my_head->message_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_2:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DATA_ind: "),
my_head->message_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_3:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind: "),
my_head->message_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_4:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind: "),
my_head->message_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_5:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind: "),
my_head->message_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_6:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_STATE_ind: "),
my_head->message_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_7:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_ind: "),
my_head->message_7->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_8:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_cfm: "),
my_head->message_8->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
default:
TTCN_error("Internal error: unknown message");
}
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::check_receive(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else {
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS, "Matching on port %s succeeded.", port_name);
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
switch (my_head->item_selection) {
case MESSAGE_0:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind: "),
my_head->message_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_1:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm: "),
my_head->message_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_2:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DATA_ind: "),
my_head->message_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_3:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind: "),
my_head->message_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_4:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind: "),
my_head->message_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_5:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind: "),
my_head->message_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_6:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_STATE_ind: "),
my_head->message_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_7:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_ind: "),
my_head->message_7->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_8:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_cfm: "),
my_head->message_8->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
default:
TTCN_error("Internal error: unknown message");
}
}
return ALT_YES;
}
}

alt_status SCCPasp__PT::trigger(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS, "Matching on port %s succeeded.", port_name);
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
switch (my_head->item_selection) {
case MESSAGE_0:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind: "),
my_head->message_0->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_1:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm: "),
my_head->message_1->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_2:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DATA_ind: "),
my_head->message_2->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_3:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind: "),
my_head->message_3->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_4:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind: "),
my_head->message_4->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_5:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind: "),
my_head->message_5->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_6:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_STATE_ind: "),
my_head->message_6->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_7:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_ind: "),
my_head->message_7->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
case MESSAGE_8:
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_cfm: "),
my_head->message_8->log(), TTCN_Logger::end_event_log2str()), msg_head_count+1);
break;
default:
TTCN_error("Internal error: unknown message");
}
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::receive(const ASP__SCCP__N__CONNECT__ind_template& value_template, ASP__SCCP__N__CONNECT__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_0) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_0)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_0;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind : "),
my_head->message_0->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::check_receive(const ASP__SCCP__N__CONNECT__ind_template& value_template, ASP__SCCP__N__CONNECT__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_0) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_0)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_0;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind : "),
my_head->message_0->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__PT::trigger(const ASP__SCCP__N__CONNECT__ind_template& value_template, ASP__SCCP__N__CONNECT__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_0) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_0)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_0;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_0),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind : "),
my_head->message_0->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::receive(const ASP__SCCP__N__CONNECT__cfm_template& value_template, ASP__SCCP__N__CONNECT__cfm *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_1) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_1)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_1;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm : "),
my_head->message_1->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::check_receive(const ASP__SCCP__N__CONNECT__cfm_template& value_template, ASP__SCCP__N__CONNECT__cfm *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_1) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_1)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_1;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm : "),
my_head->message_1->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__PT::trigger(const ASP__SCCP__N__CONNECT__cfm_template& value_template, ASP__SCCP__N__CONNECT__cfm *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_1) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_1)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_1;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_1),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm : "),
my_head->message_1->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::receive(const ASP__SCCP__N__DATA__ind_template& value_template, ASP__SCCP__N__DATA__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_2) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_DATA_ind.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_2)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_2;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DATA_ind : "),
my_head->message_2->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::check_receive(const ASP__SCCP__N__DATA__ind_template& value_template, ASP__SCCP__N__DATA__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_2) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_DATA_ind.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_2)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_2;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DATA_ind : "),
my_head->message_2->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__PT::trigger(const ASP__SCCP__N__DATA__ind_template& value_template, ASP__SCCP__N__DATA__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_2) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_DATA_ind.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_2)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_2;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_2),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DATA_ind : "),
my_head->message_2->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::receive(const ASP__SCCP__N__DISCONNECT__ind_template& value_template, ASP__SCCP__N__DISCONNECT__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_3) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_3)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_3;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind : "),
my_head->message_3->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::check_receive(const ASP__SCCP__N__DISCONNECT__ind_template& value_template, ASP__SCCP__N__DISCONNECT__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_3) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_3)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_3;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind : "),
my_head->message_3->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__PT::trigger(const ASP__SCCP__N__DISCONNECT__ind_template& value_template, ASP__SCCP__N__DISCONNECT__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_3) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_3)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_3;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_3),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind : "),
my_head->message_3->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::receive(const ASP__SCCP__N__UNITDATA__ind_template& value_template, ASP__SCCP__N__UNITDATA__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_4) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_4)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_4;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind : "),
my_head->message_4->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::check_receive(const ASP__SCCP__N__UNITDATA__ind_template& value_template, ASP__SCCP__N__UNITDATA__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_4) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_4)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_4;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind : "),
my_head->message_4->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__PT::trigger(const ASP__SCCP__N__UNITDATA__ind_template& value_template, ASP__SCCP__N__UNITDATA__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_4) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_4)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_4;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_4),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind : "),
my_head->message_4->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::receive(const ASP__SCCP__N__NOTICE__ind_template& value_template, ASP__SCCP__N__NOTICE__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_5) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_5)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_5;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind : "),
my_head->message_5->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::check_receive(const ASP__SCCP__N__NOTICE__ind_template& value_template, ASP__SCCP__N__NOTICE__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_5) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_5)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_5;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind : "),
my_head->message_5->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__PT::trigger(const ASP__SCCP__N__NOTICE__ind_template& value_template, ASP__SCCP__N__NOTICE__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_5) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_5)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_5;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_5),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind : "),
my_head->message_5->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::receive(const ASP__SCCP__N__STATE__ind_template& value_template, ASP__SCCP__N__STATE__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_6) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_STATE_ind.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_6)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_6;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_STATE_ind : "),
my_head->message_6->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::check_receive(const ASP__SCCP__N__STATE__ind_template& value_template, ASP__SCCP__N__STATE__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_6) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_STATE_ind.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_6)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_6;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_STATE_ind : "),
my_head->message_6->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__PT::trigger(const ASP__SCCP__N__STATE__ind_template& value_template, ASP__SCCP__N__STATE__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_6) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_STATE_ind.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_6)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_6;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_6),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_STATE_ind : "),
my_head->message_6->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::receive(const ASP__SCCP__N__RESET__ind_template& value_template, ASP__SCCP__N__RESET__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_7) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_RESET_ind.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_7)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_7),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_7;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_7),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_ind : "),
my_head->message_7->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::check_receive(const ASP__SCCP__N__RESET__ind_template& value_template, ASP__SCCP__N__RESET__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_7) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_RESET_ind.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_7)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_7),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_7;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_7),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_ind : "),
my_head->message_7->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__PT::trigger(const ASP__SCCP__N__RESET__ind_template& value_template, ASP__SCCP__N__RESET__ind *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_7) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_RESET_ind.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_7)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_7),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_7;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_7),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_ind : "),
my_head->message_7->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::receive(const ASP__SCCP__N__RESET__cfm_template& value_template, ASP__SCCP__N__RESET__cfm *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_8) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_RESET_cfm.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_8)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_8),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_8;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_8),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_cfm : "),
my_head->message_8->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

alt_status SCCPasp__PT::check_receive(const ASP__SCCP__N__RESET__cfm_template& value_template, ASP__SCCP__N__RESET__cfm *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Check-receive operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s failed: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
return ALT_NO;
} else if (my_head->item_selection != MESSAGE_8) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s failed: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_RESET_cfm.", port_name);
return ALT_NO;
} else if (!value_template.match(*my_head->message_8)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_8),
 TTCN_Logger::end_event_log2str()));
}
return ALT_NO;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_8;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_8),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::check__receive__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_cfm : "),
my_head->message_8->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
return ALT_YES;
}
}

alt_status SCCPasp__PT::trigger(const ASP__SCCP__N__RESET__cfm_template& value_template, ASP__SCCP__N__RESET__cfm *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*)
{
if (value_template.get_selection() == ANY_OR_OMIT) TTCN_error("Trigger operation using '*' as matching template");
msg_queue_item *my_head = (msg_queue_item*)msg_queue_head;
if (msg_queue_head == NULL) {
if (is_started) return ALT_MAYBE;
else {
TTCN_Logger::log(TTCN_Logger::MATCHING_PROBLEM, "Matching on port %s failed: Port is not started and the queue is empty.", port_name);
return ALT_NO;
}
} else if (!sender_template.match(my_head->sender_component)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::begin_event(log_sev);
TTCN_Logger::log_event("Matching on port %s will drop a message: Sender of the first message in the queue does not match the from clause: ", port_name);
sender_template.log_match(my_head->sender_component);
TTCN_Logger::end_event();
}
remove_msg_queue_head();
return ALT_REPEAT;
} else if (my_head->item_selection != MESSAGE_8) {
TTCN_Logger::log(my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMUNSUCC:TTCN_Logger::MATCHING_MCUNSUCC, "Matching on port %s will drop a message: Type of the first message in the queue is not @SCCPasp_Types.ASP_SCCP_N_RESET_cfm.", port_name);
remove_msg_queue_head();
return ALT_REPEAT;
} else if (!value_template.match(*my_head->message_8)) {
const TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF ? TTCN_Logger::MATCHING_MMUNSUCC : TTCN_Logger::MATCHING_MCUNSUCC;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_failure(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
TitanLoggerApiSimple::MatchingFailureType_reason::message__does__not__match__template,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_8),
 TTCN_Logger::end_event_log2str()));
}
remove_msg_queue_head();
return ALT_REPEAT;
} else {
if (value_redirect != NULL) {
*value_redirect = *my_head->message_8;
}
if (sender_ptr != NULL) *sender_ptr = my_head->sender_component;
TTCN_Logger::Severity log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::MATCHING_MMSUCCESS:TTCN_Logger::MATCHING_MCSUCCESS;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_matching_success(TitanLoggerApiSimple::PortType::message__,
port_name, my_head->sender_component,
(TTCN_Logger::begin_event(log_sev, TRUE), value_template.log_match(*my_head->message_8),
 TTCN_Logger::end_event_log2str()));
}
log_sev = my_head->sender_component==SYSTEM_COMPREF?TTCN_Logger::PORTEVENT_MMRECV:TTCN_Logger::PORTEVENT_MCRECV;
if (TTCN_Logger::log_this_event(log_sev)) {
TTCN_Logger::log_msgport_recv(port_name, TitanLoggerApiSimple::Msg__port__recv_operation::trigger__op,
my_head->sender_component, CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(log_sev,TRUE), TTCN_Logger::log_event_str(": @SCCPasp_Types.ASP_SCCP_N_RESET_cfm : "),
my_head->message_8->log(), TTCN_Logger::end_event_log2str()),
msg_head_count+1);
}
remove_msg_queue_head();
return ALT_YES;
}
}

void SCCPasp__PT::incoming_message(const ASP__SCCP__N__CONNECT__ind& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_CONNECT_ind : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_0;
new_item->message_0 = new ASP__SCCP__N__CONNECT__ind(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

void SCCPasp__PT::incoming_message(const ASP__SCCP__N__CONNECT__cfm& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_1;
new_item->message_1 = new ASP__SCCP__N__CONNECT__cfm(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

void SCCPasp__PT::incoming_message(const ASP__SCCP__N__DATA__ind& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_DATA_ind : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_2;
new_item->message_2 = new ASP__SCCP__N__DATA__ind(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

void SCCPasp__PT::incoming_message(const ASP__SCCP__N__DISCONNECT__ind& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_3;
new_item->message_3 = new ASP__SCCP__N__DISCONNECT__ind(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

void SCCPasp__PT::incoming_message(const ASP__SCCP__N__UNITDATA__ind& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_4;
new_item->message_4 = new ASP__SCCP__N__UNITDATA__ind(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

void SCCPasp__PT::incoming_message(const ASP__SCCP__N__NOTICE__ind& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_NOTICE_ind : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_5;
new_item->message_5 = new ASP__SCCP__N__NOTICE__ind(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

void SCCPasp__PT::incoming_message(const ASP__SCCP__N__STATE__ind& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_STATE_ind : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_6;
new_item->message_6 = new ASP__SCCP__N__STATE__ind(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

void SCCPasp__PT::incoming_message(const ASP__SCCP__N__RESET__ind& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_RESET_ind : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_7;
new_item->message_7 = new ASP__SCCP__N__RESET__ind(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

void SCCPasp__PT::incoming_message(const ASP__SCCP__N__RESET__cfm& incoming_par, component sender_component)
{
if (!is_started) {
if (is_halted) {
TTCN_warning("A message that arrived on port %s has been discarded, because the port is not started.", port_name);
return;
}
else {
TTCN_error("Port %s is not started but a message has arrived on it.", port_name);
}
}
msg_tail_count++;
if (TTCN_Logger::log_this_event(TTCN_Logger::PORTEVENT_MQUEUE)) {
TTCN_Logger::log_port_queue(TitanLoggerApiSimple::Port__Queue_operation::enqueue__msg, port_name, sender_component, msg_tail_count,
CHARSTRING(0, NULL),
(TTCN_Logger::begin_event(TTCN_Logger::PORTEVENT_MQUEUE, TRUE), TTCN_Logger::log_event_str(" @SCCPasp_Types.ASP_SCCP_N_RESET_cfm : "), incoming_par.log(), TTCN_Logger::end_event_log2str()));
}
msg_queue_item *new_item = new msg_queue_item;
new_item->item_selection = MESSAGE_8;
new_item->message_8 = new ASP__SCCP__N__RESET__cfm(incoming_par);
new_item->sender_component = sender_component;
append_to_msg_queue(new_item);
}

boolean SCCPasp__PT::process_message(const char *message_type, Text_Buf& incoming_buf, component sender_component, OCTETSTRING&)
{
if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_CONNECT_ind")) {
ASP__SCCP__N__CONNECT__ind incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_CONNECT_cfm")) {
ASP__SCCP__N__CONNECT__cfm incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_DATA_ind")) {
ASP__SCCP__N__DATA__ind incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_DISCONNECT_ind")) {
ASP__SCCP__N__DISCONNECT__ind incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_UNITDATA_ind")) {
ASP__SCCP__N__UNITDATA__ind incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_NOTICE_ind")) {
ASP__SCCP__N__NOTICE__ind incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_STATE_ind")) {
ASP__SCCP__N__STATE__ind incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_RESET_ind")) {
ASP__SCCP__N__RESET__ind incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else if (!strcmp(message_type, "@SCCPasp_Types.ASP_SCCP_N_RESET_cfm")) {
ASP__SCCP__N__RESET__cfm incoming_par;
incoming_par.decode_text(incoming_buf);
incoming_message(incoming_par, sender_component);
return TRUE;
} else return FALSE;
}


/* Bodies of functions, altsteps and testcases */

ASP__SCCP__N__CONNECT__req_template t__ASP__N__CONNECT__req(const SCCP__PAR__Address_template& PAR__CalledAddress, const SCCP__PAR__Address_template& PAR__CallingAddress, const INTEGER_template& PAR__ExpDataSel, const INTEGER_template& PAR__QoS, const OCTETSTRING_template& PAR__UserData, const INTEGER_template& PAR__ConnID, const INTEGER_template& PAR__Imp)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 474, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_CONNECT_req");
ASP__SCCP__N__CONNECT__req_template ret_val;
ret_val.calledAddress() = PAR__CalledAddress;
ret_val.callingAddress() = PAR__CallingAddress;
ret_val.expeditedDataSel() = PAR__ExpDataSel;
ret_val.qualityOfService() = PAR__QoS;
ret_val.userData() = PAR__UserData;
ret_val.connectionId() = PAR__ConnID;
ret_val.importance() = PAR__Imp;
return ret_val;
}

ASP__SCCP__N__CONNECT__ind_template t__ASP__N__CONNECT__ind(const SCCP__PAR__Address_template& PAR__CalledAddress, const SCCP__PAR__Address_template& PAR__CallingAddress, const INTEGER_template& PAR__QoS, const OCTETSTRING_template& PAR__UserData, const INTEGER_template& PAR__ConnID, const INTEGER_template& PAR__Imp)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 496, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_CONNECT_ind");
ASP__SCCP__N__CONNECT__ind_template ret_val;
ret_val.calledAddress() = PAR__CalledAddress;
ret_val.callingAddress() = PAR__CallingAddress;
ret_val.qualityOfService() = PAR__QoS;
ret_val.userData() = PAR__UserData;
ret_val.connectionId() = PAR__ConnID;
ret_val.importance() = PAR__Imp;
return ret_val;
}

ASP__SCCP__N__CONNECT__res_template t__ASP__N__CONNECT__res(const SCCP__PAR__Address_template& PAR__RespondingAddress, const INTEGER_template& PAR__ExpDataSel, const INTEGER_template& PAR__QoS, const OCTETSTRING_template& PAR__UserData, const INTEGER_template& PAR__ConnID, const INTEGER_template& PAR__Imp)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 515, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_CONNECT_res");
ASP__SCCP__N__CONNECT__res_template ret_val;
ret_val.respondingAddress() = PAR__RespondingAddress;
ret_val.expeditedDataSel() = PAR__ExpDataSel;
ret_val.qualityOfService() = PAR__QoS;
ret_val.userData() = PAR__UserData;
ret_val.connectionId() = PAR__ConnID;
ret_val.importance() = PAR__Imp;
return ret_val;
}

ASP__SCCP__N__CONNECT__cfm_template t__ASP__N__CONNECT__cfm(const SCCP__PAR__Address_template& PAR__RespondingAddress, const INTEGER_template& PAR__QoS, const OCTETSTRING_template& PAR__UserData, const INTEGER_template& PAR__ConnID, const INTEGER_template& PAR__Imp)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 536, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_CONNECT_cfm");
ASP__SCCP__N__CONNECT__cfm_template ret_val;
ret_val.respondingAddress() = PAR__RespondingAddress;
ret_val.qualityOfService() = PAR__QoS;
ret_val.userData() = PAR__UserData;
ret_val.connectionId() = PAR__ConnID;
ret_val.importance() = PAR__Imp;
return ret_val;
}

ASP__SCCP__N__DATA__req_template t__ASP__N__DATA__req(const OCTETSTRING_template& PAR__UserData, const INTEGER_template& PAR__ConnID, const INTEGER_template& PAR__Imp)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 553, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_DATA_req");
ASP__SCCP__N__DATA__req_template ret_val;
ret_val.userData() = PAR__UserData;
ret_val.connectionId() = PAR__ConnID;
ret_val.importance() = PAR__Imp;
return ret_val;
}

ASP__SCCP__N__DATA__ind_template t__ASP__N__DATA__ind(const OCTETSTRING_template& PAR__UserData, const INTEGER_template& PAR__ConnID, const INTEGER_template& PAR__Imp)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 566, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_DATA_ind");
ASP__SCCP__N__DATA__ind_template ret_val;
ret_val.userData() = PAR__UserData;
ret_val.connectionId() = PAR__ConnID;
ret_val.importance() = PAR__Imp;
return ret_val;
}

ASP__SCCP__N__DISCONNECT__req_template t__ASP__N__DISCONNECT__req(const SCCP__PAR__Address_template& PAR__RespondingAddress, const INTEGER_template& PAR__Reason, const OCTETSTRING_template& PAR__UserData, const INTEGER_template& PAR__ConnID, const INTEGER_template& PAR__Imp)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 579, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_DISCONNECT_req");
ASP__SCCP__N__DISCONNECT__req_template ret_val;
ret_val.respondingAddress() = PAR__RespondingAddress;
ret_val.reason() = PAR__Reason;
ret_val.userData() = PAR__UserData;
ret_val.connectionId() = PAR__ConnID;
ret_val.importance() = PAR__Imp;
return ret_val;
}

ASP__SCCP__N__DISCONNECT__ind_template t__ASP__N__DISCONNECT__ind(const INTEGER_template& PAR__Originator, const SCCP__PAR__Address_template& PAR__RespondingAddress, const INTEGER_template& PAR__Reason, const OCTETSTRING_template& PAR__UserData, const INTEGER_template& PAR__ConnID, const INTEGER_template& PAR__Imp)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 596, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_DISCONNECT_ind");
ASP__SCCP__N__DISCONNECT__ind_template ret_val;
ret_val.originator() = PAR__Originator;
ret_val.respondingAddress() = PAR__RespondingAddress;
ret_val.reason() = PAR__Reason;
ret_val.userData() = PAR__UserData;
ret_val.connectionId() = PAR__ConnID;
ret_val.importance() = PAR__Imp;
return ret_val;
}

ASP__SCCP__N__UNITDATA__req_template t__ASP__N__UNITDATA__req(const SCCP__PAR__Address_template& PAR__CalledAddress, const SCCP__PAR__Address_template& PAR__CallingAddress, const BITSTRING_template& PAR__SeqCtrl, const BITSTRING_template& PAR__RetOpt, const OCTETSTRING_template& PAR__UserData, const INTEGER_template& PAR__Imp)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 618, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_UNITDATA_req");
ASP__SCCP__N__UNITDATA__req_template ret_val;
ret_val.calledAddress() = PAR__CalledAddress;
ret_val.callingAddress() = PAR__CallingAddress;
ret_val.sequenceControl() = PAR__SeqCtrl;
ret_val.returnOption() = PAR__RetOpt;
ret_val.userData() = PAR__UserData;
ret_val.importance() = PAR__Imp;
return ret_val;
}

ASP__SCCP__N__UNITDATA__ind_template t__ASP__N__UNITDATA__ind(const SCCP__PAR__Address_template& PAR__CalledAddress, const SCCP__PAR__Address_template& PAR__CallingAddress, const BITSTRING_template& PAR__SeqCtrl, const BITSTRING_template& PAR__RetOpt, const OCTETSTRING_template& PAR__UserData, const INTEGER_template& PAR__Imp)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 638, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_UNITDATA_ind");
ASP__SCCP__N__UNITDATA__ind_template ret_val;
ret_val.calledAddress() = PAR__CalledAddress;
ret_val.callingAddress() = PAR__CallingAddress;
ret_val.sequenceControl() = PAR__SeqCtrl;
ret_val.returnOption() = PAR__RetOpt;
ret_val.userData() = PAR__UserData;
ret_val.importance() = PAR__Imp;
return ret_val;
}

ASP__SCCP__N__NOTICE__ind_template t__ASP__N__NOTICE__ind(const SCCP__PAR__Address_template& PAR__CalledAddress, const SCCP__PAR__Address_template& PAR__CallingAddress, const INTEGER_template& PAR__ReasForRet, const OCTETSTRING_template& PAR__UserData, const INTEGER_template& PAR__Imp)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 657, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_NOTICE_ind");
ASP__SCCP__N__NOTICE__ind_template ret_val;
ret_val.calledAddress() = PAR__CalledAddress;
ret_val.callingAddress() = PAR__CallingAddress;
ret_val.reasonForReturn() = PAR__ReasForRet;
ret_val.userData() = PAR__UserData;
ret_val.importance() = PAR__Imp;
return ret_val;
}

ASP__SCCP__N__STATE__ind_template t__ASP__N__STATE__ind(const INTEGER_template& PAR__SSN, const INTEGER_template& PAR__UserStatus, const INTEGER_template& PAR__Smi)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 674, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_STATE_ind");
ASP__SCCP__N__STATE__ind_template ret_val;
ret_val.affectedSubSystem() = PAR__SSN;
ret_val.userStatus() = PAR__UserStatus;
ret_val.subsystmultiindicator() = PAR__Smi;
return ret_val;
}

ASP__SCCP__N__RESET__req_template t__ASP__N__RESET__req(const INTEGER_template& PAR__Originator, const INTEGER_template& PAR__Reason, const INTEGER_template& PAR__Connection__Id)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 686, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_RESET_req");
ASP__SCCP__N__RESET__req_template ret_val;
ret_val.originator() = PAR__Originator;
ret_val.reason() = PAR__Reason;
ret_val.connectionId() = PAR__Connection__Id;
return ret_val;
}

ASP__SCCP__N__RESET__ind_template t__ASP__N__RESET__ind(const INTEGER_template& PAR__Originator, const INTEGER_template& PAR__Reason, const INTEGER_template& PAR__Connection__Id)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 699, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_RESET_ind");
ASP__SCCP__N__RESET__ind_template ret_val;
ret_val.originator() = PAR__Originator;
ret_val.reason() = PAR__Reason;
ret_val.connectionId() = PAR__Connection__Id;
return ret_val;
}

ASP__SCCP__N__RESET__resp_template t__ASP__N__RESET__resp(const INTEGER_template& PAR__Connection__Id)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 711, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_RESET_resp");
ASP__SCCP__N__RESET__resp_template ret_val;
ret_val.connectionId() = PAR__Connection__Id;
return ret_val;
}

ASP__SCCP__N__RESET__cfm_template t__ASP__N__RESET__cfm(const INTEGER_template& PAR__Connection__Id)
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 719, TTCN_Location::LOCATION_TEMPLATE, "t_ASP_N_RESET_cfm");
ASP__SCCP__N__RESET__cfm_template ret_val;
ret_val.connectionId() = PAR__Connection__Id;
return ret_val;
}


/* Bodies of static functions */

void pre_init_module()
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "SCCPasp_Types");
General__Types::module_object.pre_init_module();
}

void post_init_module()
{
TTCN_Location current_location("SCCPasp_Types.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "SCCPasp_Types");
General__Types::module_object.post_init_module();
current_location.update_lineno(739);
/* SCCPasp_Types.ttcn, line 739 */
template_tr__ASP__N__CONNECT__req.calledAddress() = ANY_VALUE;
template_tr__ASP__N__CONNECT__req.callingAddress() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__req.expeditedDataSel() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__req.qualityOfService() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__req.userData() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__req.connectionId() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__req.importance() = ANY_OR_OMIT;
current_location.update_lineno(751);
/* SCCPasp_Types.ttcn, line 751 */
template_tr__ASP__N__CONNECT__ind.calledAddress() = ANY_VALUE;
template_tr__ASP__N__CONNECT__ind.callingAddress() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__ind.qualityOfService() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__ind.userData() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__ind.connectionId() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__ind.importance() = ANY_OR_OMIT;
current_location.update_lineno(762);
/* SCCPasp_Types.ttcn, line 762 */
template_tr__ASP__N__CONNECT__res.respondingAddress() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__res.expeditedDataSel() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__res.qualityOfService() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__res.userData() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__res.connectionId() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__res.importance() = ANY_OR_OMIT;
current_location.update_lineno(773);
/* SCCPasp_Types.ttcn, line 773 */
template_tr__ASP__N__CONNECT__cfm.respondingAddress() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__cfm.qualityOfService() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__cfm.userData() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__cfm.connectionId() = ANY_OR_OMIT;
template_tr__ASP__N__CONNECT__cfm.importance() = ANY_OR_OMIT;
current_location.update_lineno(783);
/* SCCPasp_Types.ttcn, line 783 */
template_tr__ASP__N__DATA__req.userData() = ANY_VALUE;
template_tr__ASP__N__DATA__req.connectionId() = ANY_OR_OMIT;
template_tr__ASP__N__DATA__req.importance() = ANY_OR_OMIT;
current_location.update_lineno(791);
/* SCCPasp_Types.ttcn, line 791 */
template_tr__ASP__N__DATA__ind.userData() = ANY_VALUE;
template_tr__ASP__N__DATA__ind.connectionId() = ANY_OR_OMIT;
template_tr__ASP__N__DATA__ind.importance() = ANY_OR_OMIT;
current_location.update_lineno(799);
/* SCCPasp_Types.ttcn, line 799 */
template_tr__ASP__N__DISCONNECT__req.respondingAddress() = ANY_OR_OMIT;
template_tr__ASP__N__DISCONNECT__req.reason() = ANY_VALUE;
template_tr__ASP__N__DISCONNECT__req.userData() = ANY_OR_OMIT;
template_tr__ASP__N__DISCONNECT__req.connectionId() = ANY_OR_OMIT;
template_tr__ASP__N__DISCONNECT__req.importance() = ANY_OR_OMIT;
current_location.update_lineno(809);
/* SCCPasp_Types.ttcn, line 809 */
template_tr__ASP__N__DISCONNECT__ind.originator() = ANY_VALUE;
template_tr__ASP__N__DISCONNECT__ind.respondingAddress() = ANY_OR_OMIT;
template_tr__ASP__N__DISCONNECT__ind.reason() = ANY_VALUE;
template_tr__ASP__N__DISCONNECT__ind.userData() = ANY_OR_OMIT;
template_tr__ASP__N__DISCONNECT__ind.connectionId() = ANY_OR_OMIT;
template_tr__ASP__N__DISCONNECT__ind.importance() = ANY_OR_OMIT;
current_location.update_lineno(822);
/* SCCPasp_Types.ttcn, line 822 */
template_tr__ASP__N__UNITDATA__req.calledAddress() = ANY_VALUE;
template_tr__ASP__N__UNITDATA__req.callingAddress() = ANY_VALUE;
template_tr__ASP__N__UNITDATA__req.sequenceControl() = ANY_OR_OMIT;
template_tr__ASP__N__UNITDATA__req.returnOption() = ANY_OR_OMIT;
template_tr__ASP__N__UNITDATA__req.userData() = ANY_VALUE;
template_tr__ASP__N__UNITDATA__req.importance() = ANY_OR_OMIT;
current_location.update_lineno(833);
/* SCCPasp_Types.ttcn, line 833 */
template_tr__ASP__N__UNITDATA__ind.calledAddress() = ANY_VALUE;
template_tr__ASP__N__UNITDATA__ind.callingAddress() = ANY_VALUE;
template_tr__ASP__N__UNITDATA__ind.sequenceControl() = ANY_OR_OMIT;
template_tr__ASP__N__UNITDATA__ind.returnOption() = ANY_OR_OMIT;
template_tr__ASP__N__UNITDATA__ind.userData() = ANY_VALUE;
template_tr__ASP__N__UNITDATA__ind.importance() = ANY_OR_OMIT;
current_location.update_lineno(844);
/* SCCPasp_Types.ttcn, line 844 */
template_tr__ASP__N__NOTICE__ind.calledAddress() = ANY_VALUE;
template_tr__ASP__N__NOTICE__ind.callingAddress() = ANY_VALUE;
template_tr__ASP__N__NOTICE__ind.reasonForReturn() = ANY_VALUE;
template_tr__ASP__N__NOTICE__ind.userData() = ANY_VALUE;
template_tr__ASP__N__NOTICE__ind.importance() = ANY_OR_OMIT;
current_location.update_lineno(854);
/* SCCPasp_Types.ttcn, line 854 */
template_tr__ASP__N__STATE__ind.affectedSubSystem() = ANY_VALUE;
template_tr__ASP__N__STATE__ind.userStatus() = ANY_VALUE;
template_tr__ASP__N__STATE__ind.subsystmultiindicator() = ANY_OR_OMIT;
current_location.update_lineno(861);
/* SCCPasp_Types.ttcn, line 861 */
template_tr__ASP__N__RESET__req.originator() = ANY_VALUE;
template_tr__ASP__N__RESET__req.reason() = ANY_VALUE;
template_tr__ASP__N__RESET__req.connectionId() = ANY_OR_OMIT;
current_location.update_lineno(869);
/* SCCPasp_Types.ttcn, line 869 */
template_tr__ASP__N__RESET__ind.originator() = ANY_VALUE;
template_tr__ASP__N__RESET__ind.reason() = ANY_VALUE;
template_tr__ASP__N__RESET__ind.connectionId() = ANY_OR_OMIT;
current_location.update_lineno(876);
/* SCCPasp_Types.ttcn, line 876 */
template_tr__ASP__N__RESET__resp.connectionId() = ANY_OR_OMIT;
current_location.update_lineno(881);
/* SCCPasp_Types.ttcn, line 881 */
template_tr__ASP__N__RESET__cfm.connectionId() = ANY_OR_OMIT;
}


} /* end of namespace */
