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

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

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

/* Including header files */

#include "HSS_Tests.hh"

namespace HSS__Tests {

/* Literal string constants */

const unsigned char hs_0_nibbles[] = { 0, 1, 1, 0, 0, 0, 0, 0 },
hs_1_nibbles[] = { 0, 1, 1, 0, 0, 0, 0, 1 };
extern const HEXSTRING hs_0(15, hs_0_nibbles),
hs_1(15, hs_1_nibbles);
const unsigned char os_1_octets[] = { 17, 31, 17 },
os_0_octets[] = { 102, 111, 111, 98, 97, 114 };
extern const OCTETSTRING os_1(3, os_1_octets),
os_0(6, os_0_octets);
extern const CHARSTRING cs_2(9, "127.0.0.1"),
cs_0(9, "127.0.0.4"),
cs_1(9, "127.0.0.5"),
cs_6(14, "HSS_Tests.ttcn"),
cs_5(15, "hss.localdomain"),
cs_3(11, "localdomain"),
cs_4(15, "mme.localdomain"),
cs_7(10, "s6a_rx_ulr"),
cs_8(10, "s6a_tx_ula");
const unsigned char module_checksum[] = { 0x6a, 0xd7, 0x26, 0x90, 0xa5, 0xb5, 0x55, 0xaf, 0xa2, 0xd9, 0xfa, 0xc2, 0x2e, 0x09, 0xe8, 0x00 };

/* Global variable definitions */

// No XER for HSS__Impl
const TTCN_Typedescriptor_t HSS__Impl_descr_ = { "@HSS_Tests.HSS_Impl", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for SubscriberConfigs
const TTCN_Typedescriptor_t SubscriberConfigs_descr_ = { "@HSS_Tests.SubscriberConfigs", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &HEXSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SubscriberConfigs_0_xer_ = { {"HEXSTRING>\n", "HEXSTRING>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SubscriberConfigs_0_descr_ = { "@HSS_Tests.SubscriberConfigs.<oftype>", NULL, &HEXSTRING_raw_, NULL, &SubscriberConfigs_0_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
CHARSTRING modulepar_mp__hss__hostname;
const CHARSTRING& mp__hss__hostname = modulepar_mp__hss__hostname;
INTEGER modulepar_mp__hss__port;
const INTEGER& mp__hss__port = modulepar_mp__hss__port;
CHARSTRING modulepar_mp__hss__prometheus__hostname;
const CHARSTRING& mp__hss__prometheus__hostname = modulepar_mp__hss__prometheus__hostname;
INTEGER modulepar_mp__hss__prometheus__port;
const INTEGER& mp__hss__prometheus__port = modulepar_mp__hss__prometheus__port;
CHARSTRING modulepar_mp__diam__local__hostname;
const CHARSTRING& mp__diam__local__hostname = modulepar_mp__diam__local__hostname;
INTEGER modulepar_mp__diam__local__port;
const INTEGER& mp__diam__local__port = modulepar_mp__diam__local__port;
CHARSTRING modulepar_mp__diam__orig__realm;
const CHARSTRING& mp__diam__orig__realm = modulepar_mp__diam__orig__realm;
CHARSTRING modulepar_mp__diam__orig__host;
const CHARSTRING& mp__diam__orig__host = modulepar_mp__diam__orig__host;
CHARSTRING modulepar_mp__diam__dest__realm;
const CHARSTRING& mp__diam__dest__realm = modulepar_mp__diam__dest__realm;
CHARSTRING modulepar_mp__diam__dest__host;
const CHARSTRING& mp__diam__dest__host = modulepar_mp__diam__dest__host;
SubscriberConfigs modulepar_subscribers;
const SubscriberConfigs& subscribers = modulepar_subscribers;
HSS__Impl modulepar_mp__hss__impl;
const HSS__Impl& mp__hss__impl = modulepar_mp__hss__impl;
const TTCN_Typedescriptor_t& MTC__CT_descr_ = COMPONENT_descr_;
COMPONENT MTC__CT_component_vc__S6a;
DIAMETER__Emulation::DIAMETER__PT MTC__CT_component_S6a__UNIT("S6a_UNIT");
DIAMETER__Emulation::DIAMETEREM__PROC__PT MTC__CT_component_S6a__PROC("S6a_PROC");
TIMER MTC__CT_component_T__guard("T_guard");
const TTCN_Typedescriptor_t& DIAMETER__ConnHdlr__CT_descr_ = COMPONENT_descr_;
DIAMETER__Emulation::DIAMETER__Conn__PT DIAMETER__ConnHdlr__CT_component_DIAMETER__CLIENT("DIAMETER_CLIENT");
DIAMETER__Emulation::DIAMETEREM__PROC__PT DIAMETER__ConnHdlr__CT_component_DIAMETER__PROC__CLIENT("DIAMETER_PROC_CLIENT");
const TTCN_Typedescriptor_t& Cli__Session__CT_descr_ = COMPONENT_descr_;
const XERdescriptor_t       SessionPars_imsi_xer_ = { {"imsi>\n", "imsi>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t SessionPars_imsi_descr_ = { "@HSS_Tests.SessionPars.imsi", NULL, &HEXSTRING_raw_, NULL, &SessionPars_imsi_xer_, &HEXSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       SessionPars_s6a__next__hbh__id_xer_ = { {"s6a_next_hbh_id>\n", "s6a_next_hbh_id>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SessionPars_s6a__next__hbh__id_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SessionPars_s6a__next__hbh__id_descr_ = { "@HSS_Tests.SessionPars.s6a_next_hbh_id", &INTEGER_ber_, &Osmocom__Types::uint32__t_raw_, &INTEGER_text_, &SessionPars_s6a__next__hbh__id_xer_, &INTEGER_json_, &SessionPars_s6a__next__hbh__id_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SessionPars_s6a__next__hbh__id_default_coding("RAW");
const XERdescriptor_t       SessionPars_s6a__next__ete__id_xer_ = { {"s6a_next_ete_id>\n", "s6a_next_ete_id>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_OERdescriptor_t SessionPars_s6a__next__ete__id_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL };
const TTCN_Typedescriptor_t SessionPars_s6a__next__ete__id_descr_ = { "@HSS_Tests.SessionPars.s6a_next_ete_id", &INTEGER_ber_, &Osmocom__Types::uint32__t_raw_, &INTEGER_text_, &SessionPars_s6a__next__ete__id_xer_, &INTEGER_json_, &SessionPars_s6a__next__ete__id_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING SessionPars_s6a__next__ete__id_default_coding("RAW");
// No XER for SessionPars
const TTCN_Typedescriptor_t SessionPars_descr_ = { "@HSS_Tests.SessionPars", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
SessionPars Cli__Session__CT_component_g__pars;
DIAMETER__Emulation::DIAMETER__Conn__PT Cli__Session__CT_component_S6a("S6a");
DIAMETER__Emulation::DIAMETEREM__PROC__PT Cli__Session__CT_component_S6a__PROC("S6a_PROC");
INTEGER const_t__SessionPars_s6a__next__hbh__id_defval;
const INTEGER& t__SessionPars_s6a__next__hbh__id_defval = const_t__SessionPars_s6a__next__hbh__id_defval;
INTEGER const_t__SessionPars_s6a__next__ete__id_defval;
const INTEGER& t__SessionPars_s6a__next__ete__id_defval = const_t__SessionPars_s6a__next__ete__id_defval;
// No XER for void__fn
const TTCN_Typedescriptor_t void__fn_descr_ = { "@HSS_Tests.void_fn", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
FLOAT const_f__init_guard__timeout_defval;
const FLOAT& f__init_guard__timeout_defval = const_f__init_guard__timeout_defval;
SessionPars_template template_f__start__handler_pars__tmpl_defval;
const SessionPars_template& f__start__handler_pars__tmpl_defval = template_f__start__handler_pars__tmpl_defval;
TTCN_Module module_object("HSS_Tests", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, set_module_param, NULL, log_module_param, init_comp_type, init_system_port, start_ptc_function, module_control_part);

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

/* Member functions of C++ classes */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

const char *HSS__Impl::enum_to_str(enum_type enum_par)
{
switch (enum_par) {
case HSS__IMPL__OPEN5GS: return "HSS_IMPL_OPEN5GS";
case HSS__IMPL__PYHSS: return "HSS_IMPL_PYHSS";
default:
return "<unknown>";
}
}

HSS__Impl::enum_type HSS__Impl::str_to_enum(const char *str_par, const int* int_par, const int* int_par2)
{
if (int_par == NULL && int_par2 == NULL) {
if (!strcmp(str_par, "HSS_IMPL_OPEN5GS")) return HSS__IMPL__OPEN5GS;
if (!strcmp(str_par, "HSS_IMPL_PYHSS")) return HSS__IMPL__PYHSS;
}
return UNKNOWN_VALUE;
}

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

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

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

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

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

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

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

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

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

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

HSS__Impl_template::HSS__Impl_template()
{
}

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

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

HSS__Impl_template::HSS__Impl_template(HSS__Impl::enum_type other_value)
 : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

as__Tguard_Default::as__Tguard_Default()
 : Default_Base("as_Tguard")
{
}

alt_status as__Tguard_Default::call_altstep(boolean first_alt_run)
{
return as__Tguard_instance(first_alt_run);
}

SessionPars::SessionPars()
{
}

SessionPars::SessionPars(const HEXSTRING& par_imsi,
    const INTEGER& par_s6a__next__hbh__id,
    const INTEGER& par_s6a__next__ete__id)
  :   field_imsi(par_imsi),
  field_s6a__next__hbh__id(par_s6a__next__hbh__id),
  field_s6a__next__ete__id(par_s6a__next__ete__id)
{
}

SessionPars::SessionPars(const SessionPars& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @HSS_Tests.SessionPars.");
if (other_value.imsi().is_bound()) field_imsi = other_value.imsi();
else field_imsi.clean_up();
if (other_value.s6a__next__hbh__id().is_bound()) field_s6a__next__hbh__id = other_value.s6a__next__hbh__id();
else field_s6a__next__hbh__id.clean_up();
if (other_value.s6a__next__ete__id().is_bound()) field_s6a__next__ete__id = other_value.s6a__next__ete__id();
else field_s6a__next__ete__id.clean_up();
}

void SessionPars::clean_up()
{
field_imsi.clean_up();
field_s6a__next__hbh__id.clean_up();
field_s6a__next__ete__id.clean_up();
}

const TTCN_Typedescriptor_t* SessionPars::get_descriptor() const { return &SessionPars_descr_; }
SessionPars& SessionPars::operator=(const SessionPars& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @HSS_Tests.SessionPars.");
  if (other_value.imsi().is_bound()) field_imsi = other_value.imsi();
  else field_imsi.clean_up();
  if (other_value.s6a__next__hbh__id().is_bound()) field_s6a__next__hbh__id = other_value.s6a__next__hbh__id();
  else field_s6a__next__hbh__id.clean_up();
  if (other_value.s6a__next__ete__id().is_bound()) field_s6a__next__ete__id = other_value.s6a__next__ete__id();
  else field_s6a__next__ete__id.clean_up();
}
return *this;
}

boolean SessionPars::operator==(const SessionPars& other_value) const
{
return field_imsi==other_value.field_imsi
  && field_s6a__next__hbh__id==other_value.field_s6a__next__hbh__id
  && field_s6a__next__ete__id==other_value.field_s6a__next__ete__id;
}

boolean SessionPars::is_bound() const
{
return (field_imsi.is_bound())
  || (field_s6a__next__hbh__id.is_bound())
  || (field_s6a__next__ete__id.is_bound());
}
boolean SessionPars::is_value() const
{
return field_imsi.is_value()
  && field_s6a__next__hbh__id.is_value()
  && field_s6a__next__ete__id.is_value();
}
void SessionPars::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ imsi := ");
field_imsi.log();
TTCN_Logger::log_event_str(", s6a_next_hbh_id := ");
field_s6a__next__hbh__id.log();
TTCN_Logger::log_event_str(", s6a_next_ete_id := ");
field_s6a__next__ete__id.log();
TTCN_Logger::log_event_str(" }");
}

void SessionPars::set_implicit_omit()
{
if (imsi().is_bound()) imsi().set_implicit_omit();
if (s6a__next__hbh__id().is_bound()) s6a__next__hbh__id().set_implicit_omit();
if (s6a__next__ete__id().is_bound()) s6a__next__ete__id().set_implicit_omit();
}

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

void SessionPars::encode_text(Text_Buf& text_buf) const
{
field_imsi.encode_text(text_buf);
field_s6a__next__hbh__id.encode_text(text_buf);
field_s6a__next__ete__id.encode_text(text_buf);
}

void SessionPars::decode_text(Text_Buf& text_buf)
{
field_imsi.decode_text(text_buf);
field_s6a__next__hbh__id.decode_text(text_buf);
field_s6a__next__ete__id.decode_text(text_buf);
}

struct SessionPars_template::single_value_struct {
HEXSTRING_template field_imsi;
INTEGER_template field_s6a__next__hbh__id;
INTEGER_template field_s6a__next__ete__id;
};

void SessionPars_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_imsi = ANY_VALUE;
single_value->field_s6a__next__hbh__id = ANY_VALUE;
single_value->field_s6a__next__ete__id = ANY_VALUE;
}
}
}

void SessionPars_template::copy_value(const SessionPars& other_value)
{
single_value = new single_value_struct;
if (other_value.imsi().is_bound()) {
  single_value->field_imsi = other_value.imsi();
} else {
  single_value->field_imsi.clean_up();
}
if (other_value.s6a__next__hbh__id().is_bound()) {
  single_value->field_s6a__next__hbh__id = other_value.s6a__next__hbh__id();
} else {
  single_value->field_s6a__next__hbh__id.clean_up();
}
if (other_value.s6a__next__ete__id().is_bound()) {
  single_value->field_s6a__next__ete__id = other_value.s6a__next__ete__id();
} else {
  single_value->field_s6a__next__ete__id.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void SessionPars_template::copy_template(const SessionPars_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.imsi().get_selection()) {
single_value->field_imsi = other_value.imsi();
} else {
single_value->field_imsi.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.s6a__next__hbh__id().get_selection()) {
single_value->field_s6a__next__hbh__id = other_value.s6a__next__hbh__id();
} else {
single_value->field_s6a__next__hbh__id.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.s6a__next__ete__id().get_selection()) {
single_value->field_s6a__next__ete__id = other_value.s6a__next__ete__id();
} else {
single_value->field_s6a__next__ete__id.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 SessionPars_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 SessionPars_template(*other_value.implication_.precondition);
implication_.implied_template = new SessionPars_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 @HSS_Tests.SessionPars.");
break;
}
set_selection(other_value);
}

SessionPars_template::SessionPars_template()
{
}

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

SessionPars_template::SessionPars_template(const SessionPars& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean SessionPars_template::match(const SessionPars& 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.imsi().is_bound()) return FALSE;
if(!single_value->field_imsi.match(other_value.imsi(), legacy))return FALSE;
if(!other_value.s6a__next__hbh__id().is_bound()) return FALSE;
if(!single_value->field_s6a__next__hbh__id.match(other_value.s6a__next__hbh__id(), legacy))return FALSE;
if(!other_value.s6a__next__ete__id().is_bound()) return FALSE;
if(!single_value->field_s6a__next__ete__id.match(other_value.s6a__next__ete__id(), 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 @HSS_Tests.SessionPars.");
}
return FALSE;
}

boolean SessionPars_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_imsi.is_bound()
 || single_value->field_s6a__next__hbh__id.is_bound()
 || single_value->field_s6a__next__ete__id.is_bound();
}

boolean SessionPars_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_imsi.is_value()
 && single_value->field_s6a__next__hbh__id.is_value()
 && single_value->field_s6a__next__ete__id.is_value();
}

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

SessionPars SessionPars_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 @HSS_Tests.SessionPars.");
SessionPars ret_val;
if (single_value->field_imsi.is_bound()) {
ret_val.imsi() = single_value->field_imsi.valueof();
}
if (single_value->field_s6a__next__hbh__id.is_bound()) {
ret_val.s6a__next__hbh__id() = single_value->field_s6a__next__hbh__id.valueof();
}
if (single_value->field_s6a__next__ete__id.is_bound()) {
ret_val.s6a__next__ete__id() = single_value->field_s6a__next__ete__id.valueof();
}
return ret_val;
}

void SessionPars_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 @HSS_Tests.SessionPars.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new SessionPars_template[list_length];
}

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

HEXSTRING_template& SessionPars_template::imsi()
{
set_specific();
return single_value->field_imsi;
}

const HEXSTRING_template& SessionPars_template::imsi() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field imsi of a non-specific template of type @HSS_Tests.SessionPars.");
return single_value->field_imsi;
}

INTEGER_template& SessionPars_template::s6a__next__hbh__id()
{
set_specific();
return single_value->field_s6a__next__hbh__id;
}

const INTEGER_template& SessionPars_template::s6a__next__hbh__id() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field s6a_next_hbh_id of a non-specific template of type @HSS_Tests.SessionPars.");
return single_value->field_s6a__next__hbh__id;
}

INTEGER_template& SessionPars_template::s6a__next__ete__id()
{
set_specific();
return single_value->field_s6a__next__ete__id;
}

const INTEGER_template& SessionPars_template::s6a__next__ete__id() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field s6a_next_ete_id of a non-specific template of type @HSS_Tests.SessionPars.");
return single_value->field_s6a__next__ete__id;
}

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

void SessionPars_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ imsi := ");
single_value->field_imsi.log();
TTCN_Logger::log_event_str(", s6a_next_hbh_id := ");
single_value->field_s6a__next__hbh__id.log();
TTCN_Logger::log_event_str(", s6a_next_ete_id := ");
single_value->field_s6a__next__ete__id.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 SessionPars_template::log_match(const SessionPars& 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_imsi.match(match_value.imsi(), legacy)){
TTCN_Logger::log_logmatch_info(".imsi");
single_value->field_imsi.log_match(match_value.imsi(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_s6a__next__hbh__id.match(match_value.s6a__next__hbh__id(), legacy)){
TTCN_Logger::log_logmatch_info(".s6a_next_hbh_id");
single_value->field_s6a__next__hbh__id.log_match(match_value.s6a__next__hbh__id(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_s6a__next__ete__id.match(match_value.s6a__next__ete__id(), legacy)){
TTCN_Logger::log_logmatch_info(".s6a_next_ete_id");
single_value->field_s6a__next__ete__id.log_match(match_value.s6a__next__ete__id(), 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("{ imsi := ");
single_value->field_imsi.log_match(match_value.imsi(), legacy);
TTCN_Logger::log_event_str(", s6a_next_hbh_id := ");
single_value->field_s6a__next__hbh__id.log_match(match_value.s6a__next__hbh__id(), legacy);
TTCN_Logger::log_event_str(", s6a_next_ete_id := ");
single_value->field_s6a__next__ete__id.log_match(match_value.s6a__next__ete__id(), 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 SessionPars_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (imsi().is_bound()) imsi().set_implicit_omit();
if (s6a__next__hbh__id().is_bound()) s6a__next__hbh__id().set_implicit_omit();
if (s6a__next__ete__id().is_bound()) s6a__next__ete__id().set_implicit_omit();
}

void SessionPars_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_imsi.encode_text(text_buf);
single_value->field_s6a__next__hbh__id.encode_text(text_buf);
single_value->field_s6a__next__ete__id.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 @HSS_Tests.SessionPars.");
}
}

void SessionPars_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_imsi.decode_text(text_buf);
single_value->field_s6a__next__hbh__id.decode_text(text_buf);
single_value->field_s6a__next__ete__id.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 SessionPars_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 @HSS_Tests.SessionPars.");
}
}

void SessionPars_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: {
    SessionPars_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 @HSS_Tests.SessionPars 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) imsi().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) s6a__next__hbh__id().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) s6a__next__ete__id().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(), "imsi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          imsi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "s6a_next_hbh_id")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          s6a__next__hbh__id().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "s6a_next_ete_id")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          s6a__next__ete__id().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 @HSS_Tests.SessionPars: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    SessionPars_template* precondition = new SessionPars_template;
    precondition->set_param(*param.get_elem(0));
    SessionPars_template* implied_template = new SessionPars_template;
    implied_template->set_param(*param.get_elem(1));
    *this = SessionPars_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@HSS_Tests.SessionPars");
  }
  is_ifpresent = param.get_ifpresent();
}

void SessionPars_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_imsi.check_restriction(t_res, t_name ? t_name : "@HSS_Tests.SessionPars");
single_value->field_s6a__next__hbh__id.check_restriction(t_res, t_name ? t_name : "@HSS_Tests.SessionPars");
single_value->field_s6a__next__ete__id.check_restriction(t_res, t_name ? t_name : "@HSS_Tests.SessionPars");
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 : "@HSS_Tests.SessionPars");
}

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

boolean SessionPars_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__fn::void__fn()
{
referred_function = NULL;
}

void__fn::void__fn(function_pointer other_value)
{
referred_function = other_value;
}

void__fn::void__fn(const void__fn& other_value)
: Base_Type(){
other_value.must_bound("Copying an unbound @HSS_Tests.void_fn value.");
referred_function = other_value.referred_function;
}

void__fn& void__fn::operator=(function_pointer other_value)
{
referred_function = other_value;
return *this;
}

void__fn& void__fn::operator=(const void__fn& other_value)
{
other_value.must_bound("Assignment of an unbound value.");
referred_function = other_value.referred_function;
return *this;
}

boolean void__fn::operator==(function_pointer other_value) const
{
must_bound("Unbound left operand of @HSS_Tests.void_fn comparison.");
return referred_function == other_value;
}

boolean void__fn::operator==(const void__fn& other_value) const
{
must_bound("Unbound left operand of @HSS_Tests.void_fn comparison.");
other_value.must_bound("Unbound right operand of @HSS_Tests.void_fn comparison.");
return referred_function == other_value.referred_function;
}

void void__fn::invoke() const
{
must_bound("Call of unbound function.");
if(referred_function == (void__fn::function_pointer)Module_List::get_fat_null())
TTCN_error("null reference cannot be invoked.");
referred_function();
}

void void__fn::start(const COMPONENT& component_reference) const
{
((void__fn::start_pointer)Module_List::lookup_start_by_function_address((genericfunc_t)referred_function))(component_reference);
}

void void__fn::log() const
{
Module_List::log_function((genericfunc_t)referred_function);
}

void void__fn::set_param(Module_Param& param)
{
  param.error("Not supported.");
}

void void__fn::encode_text(Text_Buf& text_buf) const
{
Module_List::encode_function(text_buf,(genericfunc_t)referred_function);
}

void void__fn::decode_text(Text_Buf& text_buf)
{
Module_List::decode_function(text_buf,(genericfunc_t*)&referred_function);
}

boolean operator==(void__fn::function_pointer value, const void__fn& other_value)
{
other_value.must_bound("Unbound right operand of @HSS_Tests.void_fn comparison.");
return value == other_value.referred_function;
}

void void__fn_template::copy_template(const void__fn_template& other_value)
{
switch(other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = other_value.single_value;
break;
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new void__fn_template[value_list.n_values];
for(unsigned int i = 0; i < value_list.n_values; i++)
value_list.list_value[i] = other_value.value_list.list_value[i];
break;
default:
TTCN_error("Copying an unitialized/unsupported @HSS_Tests.void_fn template.");
}
set_selection(other_value);
}

void__fn_template::void__fn_template()
{
}

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

void__fn_template::void__fn_template(void__fn::function_pointer other_value)
  : Base_Template(SPECIFIC_VALUE)
{
single_value = other_value;
}

void__fn_template::void__fn_template(const void__fn& other_value)
  :Base_Template(SPECIFIC_VALUE)
{
other_value.must_bound("Creating a template from an unbound @HSS_Tests.void_fn value.");
single_value = other_value.referred_function;
}

void__fn_template::void__fn_template(const OPTIONAL<void__fn>& other_value)
{
if(other_value.ispresent()) {
set_selection(SPECIFIC_VALUE);
single_value = ((const void__fn&)other_value()).referred_function;
} else set_selection(OMIT_VALUE);
}

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

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

void void__fn_template::clean_up(){
if(template_selection == VALUE_LIST ||
template_selection == COMPLEMENTED_LIST)
delete[] value_list.list_value;
template_selection = UNINITIALIZED_TEMPLATE;
}

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

void__fn_template& void__fn_template::operator=(void__fn::function_pointer other_value)
{
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value;
return *this;}

void__fn_template& void__fn_template::operator=(const void__fn& other_value)
{
other_value.must_bound("Assignment of an unbound @HSS_Tests.void_fn value to a template.");
clean_up();
set_selection(SPECIFIC_VALUE);
single_value = other_value.referred_function;
return *this;
}

void__fn_template& void__fn_template::operator=(const OPTIONAL<void__fn>& other_value)
{
clean_up();
if(other_value.ispresent()) { 
set_selection(SPECIFIC_VALUE);
single_value = ((const void__fn&)other_value()).referred_function;
} else set_selection(OMIT_VALUE);
return *this;}

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

boolean void__fn_template::match(void__fn::function_pointer other_value, boolean) const
{
switch(template_selection) {
case SPECIFIC_VALUE:
return single_value == other_value;
case OMIT_VALUE:
return FALSE;
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for(unsigned int i = 0; i < value_list.n_values; i++)
if(value_list.list_value[i].match(other_value))
return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
default:
TTCN_error("Matching with an unitialized/unsupported @HSS_Tests.void_fn template.");
};
return FALSE;
}

boolean void__fn_template::match(const void__fn& other_value, boolean) const
{
  if (!other_value.is_bound()) return FALSE;
return match(other_value.referred_function);
}

void__fn void__fn_template::valueof() const
{
if(template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific @HSS_Tests.void_fn template.");
return single_value;
}

void void__fn_template::set_type(template_sel template_type, unsigned int list_length)
{
if(template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST)
TTCN_error("Setting an invalid type for an @HSS_Tests.void_fn template.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new void__fn_template[list_length];
}

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

void void__fn_template::log() const
{
switch(template_selection) {
case SPECIFIC_VALUE:
Module_List::log_function((genericfunc_t)single_value);
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case VALUE_LIST:
TTCN_Logger::log_char('(');
for(unsigned int i = 0; i < value_list.n_values; i++) {
if(i > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[i].log();
}
TTCN_Logger::log_char(')');
break;
default:
log_generic();
}
log_ifpresent();
}

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

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

void void__fn_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch(template_selection) {
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case SPECIFIC_VALUE:
Module_List::decode_function(text_buf,(genericfunc_t*)&single_value);
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new void__fn_template[value_list.n_values];
for(unsigned int i = 0; i < value_list.n_values; i++)
value_list.list_value[i].decode_text(text_buf);
default:
TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @HSS_Tests.void_fn.");
}
}

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

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

void void__fn_template::set_param(Module_Param& param)
{
  param.error("Not supported.");
}

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


/* Bodies of functions, altsteps and testcases */

alt_status as__Tguard_instance(boolean first_alt_run)
{
TTCN_Location current_location("HSS_Tests.ttcn", 54, TTCN_Location::LOCATION_ALTSTEP, "as_Tguard");
alt_status ret_val = ALT_NO;
current_location.update_lineno(55);
/* HSS_Tests.ttcn, line 55 */
switch (MTC__CT_component_T__guard.timeout(NULL)) {
case ALT_YES:
{
current_location.update_lineno(56);
/* HSS_Tests.ttcn, line 56 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout of T_guard"),TTCN_Logger::end_event_log2str()));
current_location.update_lineno(57);
/* HSS_Tests.ttcn, line 57 */
TTCN_Runtime::stop_component(MTC_COMPREF);
}
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
return ret_val;
}

void as__Tguard(boolean nodefault_modifier)
{
altstep_begin:
boolean block_flag = FALSE;
alt_status altstep_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
for ( ; ; ) {
TTCN_Snapshot::take_new(block_flag);
if (altstep_flag != ALT_NO) {
altstep_flag = as__Tguard_instance(!block_flag);
if (altstep_flag == ALT_YES || altstep_flag == ALT_BREAK) return;
else if (altstep_flag == ALT_REPEAT) goto altstep_begin;
}
if (!nodefault_modifier && default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps(!block_flag);
if (default_flag == ALT_YES || default_flag == ALT_BREAK) return;
else if (default_flag == ALT_REPEAT) goto altstep_begin;
}
if (altstep_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in altstep as_Tguard.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__Tguard()
{
return new as__Tguard_Default();
}

void f__diam__connhldr__ct__main(const HEXSTRING& imsi)
{
TTCN_Location current_location("HSS_Tests.ttcn", 66, TTCN_Location::LOCATION_FUNCTION, "f_diam_connhldr_ct_main");
current_location.update_lineno(67);
/* HSS_Tests.ttcn, line 67 */
COMPONENT vc__conn__unused;
current_location.update_lineno(68);
/* HSS_Tests.ttcn, line 68 */
DIAMETER__Types::PDU__DIAMETER msg;
current_location.update_lineno(69);
/* HSS_Tests.ttcn, line 69 */
OCTETSTRING ete__id;
current_location.update_lineno(71);
/* HSS_Tests.ttcn, line 71 */
DIAMETER__Emulation::f__diameter__expect__imsi(imsi);
for ( ; ; ) {
current_location.update_lineno(74);
/* HSS_Tests.ttcn, line 74 */
{
tmp_0:
alt_status tmp_0_alt_flag_0 = ALT_MAYBE;
alt_status tmp_0_alt_flag_1 = ALT_MAYBE;
alt_status tmp_0_alt_flag_2 = ALT_MAYBE;
alt_status tmp_0_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_0_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(75);
/* HSS_Tests.ttcn, line 75 */
tmp_0_alt_flag_0 = DIAMETER__ConnHdlr__CT_component_DIAMETER__CLIENT.receive(DIAMETER__Types::PDU__DIAMETER_template(ANY_VALUE), &(msg), any_compref, NULL, NULL, NULL);
if (tmp_0_alt_flag_0 == ALT_YES) {
current_location.update_lineno(76);
/* HSS_Tests.ttcn, line 76 */
DIAMETER__Emulation::DIAMETER__ConnHdlr_component_DIAMETER.send(msg, FALSE, NULL);
break;
}
}
if (tmp_0_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(78);
/* HSS_Tests.ttcn, line 78 */
tmp_0_alt_flag_1 = DIAMETER__Emulation::DIAMETER__ConnHdlr_component_DIAMETER.receive(DIAMETER__Types::PDU__DIAMETER_template(ANY_VALUE), &(msg), any_compref, NULL, NULL, NULL);
if (tmp_0_alt_flag_1 == ALT_YES) {
current_location.update_lineno(79);
/* HSS_Tests.ttcn, line 79 */
DIAMETER__ConnHdlr__CT_component_DIAMETER__CLIENT.send(msg, FALSE, NULL);
break;
}
}
if (tmp_0_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(81);
/* HSS_Tests.ttcn, line 81 */
{
DIAMETER__Emulation::DIAMETEREM__register__eteid_template tmp_1;
tmp_1.ete__id() = ANY_VALUE;
tmp_1.hdlr() = ANY_VALUE;
tmp_0_alt_flag_2 = DIAMETER__ConnHdlr__CT_component_DIAMETER__PROC__CLIENT.getcall(tmp_1, any_compref, DIAMETER__Emulation::DIAMETEREM__register__eteid_call_redirect(&(ete__id), &(vc__conn__unused)), NULL, NULL, NULL);
}
if (tmp_0_alt_flag_2 == ALT_YES) {
current_location.update_lineno(82);
/* HSS_Tests.ttcn, line 82 */
{
DIAMETER__Emulation::DIAMETEREM__register__eteid_template tmp_2;
tmp_2.ete__id() = ete__id;
tmp_2.hdlr() = self;
DIAMETER__Emulation::DIAMETER__ConnHdlr_component_DIAMETER__PROC.call(tmp_2, FALSE, NULL);
}
{
alt_status tmp_3_alt_flag_0 = ALT_MAYBE;
current_location.update_lineno(82);
/* HSS_Tests.ttcn, line 82 */
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_3_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(83);
/* HSS_Tests.ttcn, line 83 */
{
DIAMETER__Emulation::DIAMETEREM__register__eteid_template tmp_4;
tmp_4.ete__id() = ANY_VALUE;
tmp_4.hdlr() = ANY_VALUE;
tmp_3_alt_flag_0 = DIAMETER__Emulation::DIAMETER__ConnHdlr_component_DIAMETER__PROC.getreply(tmp_4, any_compref, DIAMETER__Emulation::DIAMETEREM__register__eteid_reply_redirect(), NULL, NULL, NULL);
}
if (tmp_3_alt_flag_0 == ALT_YES) break;
}
current_location.update_lineno(82);
/* HSS_Tests.ttcn, line 82 */
if (tmp_3_alt_flag_0 == ALT_NO) TTCN_error("None of the branches can be chosen in the response and exception handling part of call statement in file HSS_Tests.ttcn between lines 82 and 84.");
TTCN_Snapshot::take_new(TRUE);
}
}
current_location.update_lineno(85);
/* HSS_Tests.ttcn, line 85 */
{
DIAMETER__Emulation::DIAMETEREM__register__eteid_template tmp_5;
tmp_5.ete__id() = ete__id;
tmp_5.hdlr() = vc__conn__unused;
DIAMETER__ConnHdlr__CT_component_DIAMETER__PROC__CLIENT.reply(tmp_5, FALSE, NULL);
}
break;
}
}
if (tmp_0_default_flag == ALT_MAYBE) {
tmp_0_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_0_default_flag == ALT_YES || tmp_0_default_flag == ALT_BREAK) break;
else if (tmp_0_default_flag == ALT_REPEAT) goto tmp_0;
}
current_location.update_lineno(74);
/* HSS_Tests.ttcn, line 74 */
if (tmp_0_alt_flag_0 == ALT_NO && tmp_0_alt_flag_1 == ALT_NO && tmp_0_alt_flag_2 == ALT_NO && tmp_0_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file HSS_Tests.ttcn between lines 74 and 87.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
}
}

void start_f__diam__connhldr__ct__main(const COMPONENT& component_reference, const HEXSTRING& imsi)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_diam_connhldr_ct_main(");
imsi.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "HSS_Tests", "f_diam_connhldr_ct_main", text_buf);
imsi.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__diam__connhldr__expect__eteid(const OCTETSTRING& ete__id)
{
TTCN_Location current_location("HSS_Tests.ttcn", 99, TTCN_Location::LOCATION_FUNCTION, "f_diam_connhldr_expect_eteid");
current_location.update_lineno(100);
/* HSS_Tests.ttcn, line 100 */
{
DIAMETER__Emulation::DIAMETEREM__register__eteid_template tmp_6;
tmp_6.ete__id() = ete__id;
tmp_6.hdlr() = NULL_COMPREF;
Cli__Session__CT_component_S6a__PROC.call(tmp_6, FALSE, NULL);
}
{
alt_status tmp_7_alt_flag_0 = ALT_MAYBE;
current_location.update_lineno(100);
/* HSS_Tests.ttcn, line 100 */
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_7_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(101);
/* HSS_Tests.ttcn, line 101 */
{
DIAMETER__Emulation::DIAMETEREM__register__eteid_template tmp_8;
tmp_8.ete__id() = ANY_VALUE;
tmp_8.hdlr() = ANY_VALUE;
tmp_7_alt_flag_0 = Cli__Session__CT_component_S6a__PROC.getreply(tmp_8, any_compref, DIAMETER__Emulation::DIAMETEREM__register__eteid_reply_redirect(), NULL, NULL, NULL);
}
if (tmp_7_alt_flag_0 == ALT_YES) break;
}
current_location.update_lineno(100);
/* HSS_Tests.ttcn, line 100 */
if (tmp_7_alt_flag_0 == ALT_NO) TTCN_error("None of the branches can be chosen in the response and exception handling part of call statement in file HSS_Tests.ttcn between lines 100 and 102.");
TTCN_Snapshot::take_new(TRUE);
}
}
}

void start_f__diam__connhldr__expect__eteid(const COMPONENT& component_reference, const OCTETSTRING& ete__id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_diam_connhldr_expect_eteid(");
ete__id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "HSS_Tests", "f_diam_connhldr_expect_eteid", text_buf);
ete__id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

SessionPars_template t__SessionPars(const HEXSTRING& imsi, const INTEGER& s6a__next__hbh__id, const INTEGER& s6a__next__ete__id)
{
TTCN_Location current_location("HSS_Tests.ttcn", 112, TTCN_Location::LOCATION_TEMPLATE, "t_SessionPars");
SessionPars_template ret_val;
ret_val.imsi() = imsi;
ret_val.s6a__next__hbh__id() = s6a__next__hbh__id;
ret_val.s6a__next__ete__id() = s6a__next__ete__id;
return ret_val;
}

DIAMETER__Types::PDU__DIAMETER_template DiameterForwardUnitdataCallback(const DIAMETER__Types::PDU__DIAMETER& msg)
{
TTCN_Location current_location("HSS_Tests.ttcn", 121, TTCN_Location::LOCATION_FUNCTION, "DiameterForwardUnitdataCallback");
current_location.update_lineno(123);
/* HSS_Tests.ttcn, line 123 */
DIAMETER__Emulation::DIAMETER__Emulation__CT_component_DIAMETER__UNIT.send(msg, FALSE, NULL);
current_location.update_lineno(124);
/* HSS_Tests.ttcn, line 124 */
return DIAMETER__Types::PDU__DIAMETER_template(OMIT_VALUE);
}

void start_DiameterForwardUnitdataCallback(const COMPONENT& component_reference, const DIAMETER__Types::PDU__DIAMETER& msg)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function DiameterForwardUnitdataCallback(");
msg.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "HSS_Tests", "DiameterForwardUnitdataCallback", text_buf);
msg.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__init__diameter(const CHARSTRING& id)
{
TTCN_Location current_location("HSS_Tests.ttcn", 127, TTCN_Location::LOCATION_FUNCTION, "f_init_diameter");
current_location.update_lineno(128);
/* HSS_Tests.ttcn, line 128 */
DIAMETER__Emulation::DIAMETEROps ops;
ops.create__cb() = &DIAMETER__Emulation::ExpectedCreateCallback;
ops.unitdata__cb() = &DiameterForwardUnitdataCallback;
ops.raw() = FALSE;
current_location.update_lineno(133);
/* HSS_Tests.ttcn, line 133 */
DIAMETER__Emulation::DIAMETER__conn__parameters pars;
current_location.update_lineno(136);
/* HSS_Tests.ttcn, line 136 */
pars.remote__ip() = mp__hss__hostname;
pars.remote__sctp__port() = mp__hss__port;
pars.local__ip() = mp__diam__local__hostname;
pars.local__sctp__port() = mp__diam__local__port;
pars.origin__host() = mp__diam__orig__host;
pars.origin__realm() = mp__diam__orig__realm;
pars.auth__app__id() = OMIT_VALUE;
pars.vendor__app__id() = DIAMETER__ts29__272__Templates::c__DIAMETER__3GPP__S6__AID;
current_location.update_lineno(146);
/* HSS_Tests.ttcn, line 146 */
MTC__CT_component_vc__S6a = TTCN_Runtime::create_component("DIAMETER_Emulation", "DIAMETER_Emulation_CT", id, NULL, FALSE);
current_location.update_lineno(147);
/* HSS_Tests.ttcn, line 147 */
{
Map_Params tmp_11(0);
TTCN_Runtime::map_port(MTC__CT_component_vc__S6a, DIAMETER__Emulation::DIAMETER__Emulation__CT_component_DIAMETER.get_name(), SYSTEM_COMPREF, "DIAMETER_CODEC_PT", tmp_11);
}
current_location.update_lineno(148);
/* HSS_Tests.ttcn, line 148 */
TTCN_Runtime::connect_port(MTC__CT_component_vc__S6a, DIAMETER__Emulation::DIAMETER__Emulation__CT_component_DIAMETER__UNIT.get_name(), self, MTC__CT_component_S6a__UNIT.get_name());
current_location.update_lineno(149);
/* HSS_Tests.ttcn, line 149 */
TTCN_Runtime::connect_port(MTC__CT_component_vc__S6a, DIAMETER__Emulation::DIAMETER__Emulation__CT_component_DIAMETER__PROC.get_name(), self, MTC__CT_component_S6a__PROC.get_name());
current_location.update_lineno(150);
/* HSS_Tests.ttcn, line 150 */
DIAMETER__Emulation::start_main_(MTC__CT_component_vc__S6a, ops, pars, id);
current_location.update_lineno(152);
/* HSS_Tests.ttcn, line 152 */
DIAMETER__Emulation::f__diameter__wait__capability(MTC__CT_component_S6a__UNIT);
current_location.update_lineno(158);
/* HSS_Tests.ttcn, line 158 */
Osmocom__Types::f__sleep(1.0);
}

void start_f__init__diameter(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_init_diameter(");
id.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "HSS_Tests", "f_init_diameter", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__init(const FLOAT& guard__timeout)
{
TTCN_Location current_location("HSS_Tests.ttcn", 161, TTCN_Location::LOCATION_FUNCTION, "f_init");
current_location.update_lineno(162);
/* HSS_Tests.ttcn, line 162 */
MTC__CT_component_T__guard.start(guard__timeout);
current_location.update_lineno(163);
/* HSS_Tests.ttcn, line 163 */
activate_as__Tguard();
current_location.update_lineno(164);
/* HSS_Tests.ttcn, line 164 */
f__init__diameter(TTCN_Runtime::get_testcasename());
}

void start_f__init(const COMPONENT& component_reference, const FLOAT& guard__timeout)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_init(");
guard__timeout.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "HSS_Tests", "f_init", text_buf);
guard__timeout.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

COMPONENT f__start__handler(const void__fn& fn, const SessionPars_template& pars__tmpl)
{
TTCN_Location current_location("HSS_Tests.ttcn", 167, TTCN_Location::LOCATION_FUNCTION, "f_start_handler");
current_location.update_lineno(169);
/* HSS_Tests.ttcn, line 169 */
CHARSTRING id(TTCN_Runtime::get_testcasename());
current_location.update_lineno(170);
/* HSS_Tests.ttcn, line 170 */
COMPONENT vc__conn__s6a;
current_location.update_lineno(171);
/* HSS_Tests.ttcn, line 171 */
COMPONENT vc__conn;
current_location.update_lineno(172);
/* HSS_Tests.ttcn, line 172 */
SessionPars pars;
current_location.update_lineno(174);
/* HSS_Tests.ttcn, line 174 */
if (pars__tmpl.is_value()) {
current_location.update_lineno(175);
/* HSS_Tests.ttcn, line 175 */
pars = pars__tmpl.valueof();
}
else {
}
current_location.update_lineno(180);
/* HSS_Tests.ttcn, line 180 */
vc__conn = TTCN_Runtime::create_component("HSS_Tests", "Cli_Session_CT", id, NULL, FALSE);
current_location.update_lineno(182);
/* HSS_Tests.ttcn, line 182 */
vc__conn__s6a = TTCN_Runtime::create_component("HSS_Tests", "DIAMETER_ConnHdlr_CT", id, NULL, FALSE);
current_location.update_lineno(183);
/* HSS_Tests.ttcn, line 183 */
TTCN_Runtime::connect_port(vc__conn__s6a, DIAMETER__Emulation::DIAMETER__ConnHdlr_component_DIAMETER.get_name(), MTC__CT_component_vc__S6a, DIAMETER__Emulation::DIAMETER__Emulation__CT_component_DIAMETER__CLIENT.get_name());
current_location.update_lineno(184);
/* HSS_Tests.ttcn, line 184 */
TTCN_Runtime::connect_port(vc__conn__s6a, DIAMETER__Emulation::DIAMETER__ConnHdlr_component_DIAMETER__PROC.get_name(), MTC__CT_component_vc__S6a, DIAMETER__Emulation::DIAMETER__Emulation__CT_component_DIAMETER__PROC.get_name());
current_location.update_lineno(185);
/* HSS_Tests.ttcn, line 185 */
TTCN_Runtime::connect_port(vc__conn, Cli__Session__CT_component_S6a.get_name(), vc__conn__s6a, DIAMETER__ConnHdlr__CT_component_DIAMETER__CLIENT.get_name());
current_location.update_lineno(186);
/* HSS_Tests.ttcn, line 186 */
TTCN_Runtime::connect_port(vc__conn, Cli__Session__CT_component_S6a__PROC.get_name(), vc__conn__s6a, DIAMETER__ConnHdlr__CT_component_DIAMETER__PROC__CLIENT.get_name());
current_location.update_lineno(187);
/* HSS_Tests.ttcn, line 187 */
start_f__diam__connhldr__ct__main(vc__conn__s6a, const_cast< const SessionPars&>(pars).imsi());
current_location.update_lineno(189);
/* HSS_Tests.ttcn, line 189 */
start_f__handler__init(vc__conn, fn, pars);
current_location.update_lineno(190);
/* HSS_Tests.ttcn, line 190 */
return vc__conn;
}

void start_f__start__handler(const COMPONENT& component_reference, const void__fn& fn, const SessionPars_template& pars__tmpl)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_start_handler(");
fn.log();
TTCN_Logger::log_event_str(", ");
pars__tmpl.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "HSS_Tests", "f_start_handler", text_buf);
fn.encode_text(text_buf);
pars__tmpl.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__handler__init(const void__fn& fn, const SessionPars& pars)
{
TTCN_Location current_location("HSS_Tests.ttcn", 193, TTCN_Location::LOCATION_FUNCTION, "f_handler_init");
current_location.update_lineno(195);
/* HSS_Tests.ttcn, line 195 */
Cli__Session__CT_component_g__pars = pars;
current_location.update_lineno(196);
/* HSS_Tests.ttcn, line 196 */
Prometheus__Checker::f__prometheus__init(mp__hss__prometheus__hostname, mp__hss__prometheus__port);
current_location.update_lineno(197);
/* HSS_Tests.ttcn, line 197 */
fn.invoke();
}

void start_f__handler__init(const COMPONENT& component_reference, const void__fn& fn, const SessionPars& pars)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_handler_init(");
fn.log();
TTCN_Logger::log_event_str(", ");
pars.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "HSS_Tests", "f_handler_init", text_buf);
fn.encode_text(text_buf);
pars.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__dia__ulr__ula(const DIAMETER__Types::AVP__list_template& ula__sub__data)
{
TTCN_Location current_location("HSS_Tests.ttcn", 201, TTCN_Location::LOCATION_FUNCTION, "f_dia_ulr_ula");
current_location.update_lineno(202);
/* HSS_Tests.ttcn, line 202 */
OCTETSTRING sess__id(os_0);
current_location.update_lineno(203);
/* HSS_Tests.ttcn, line 203 */
DIAMETER__Types::PDU__DIAMETER rx__dia;
current_location.update_lineno(204);
/* HSS_Tests.ttcn, line 204 */
OCTETSTRING hbh__id(int2oct(const_cast< const SessionPars&>(Cli__Session__CT_component_g__pars).s6a__next__hbh__id(), 4));
current_location.update_lineno(205);
/* HSS_Tests.ttcn, line 205 */
OCTETSTRING ete__id(int2oct(const_cast< const SessionPars&>(Cli__Session__CT_component_g__pars).s6a__next__ete__id(), 4));
current_location.update_lineno(210);
/* HSS_Tests.ttcn, line 210 */
f__diam__connhldr__expect__eteid(ete__id);
current_location.update_lineno(213);
/* HSS_Tests.ttcn, line 213 */
Cli__Session__CT_component_S6a.send(DIAMETER__ts29__272__Templates::ts__DIA__ULR(const_cast< const SessionPars&>(Cli__Session__CT_component_g__pars).imsi(), OCTETSTRING_template(os_1), OCTETSTRING_template(sess__id), CHARSTRING_template(mp__diam__orig__host), CHARSTRING_template(mp__diam__orig__realm), CHARSTRING_template(mp__diam__dest__realm), OCTETSTRING_template(hbh__id), OCTETSTRING_template(ete__id)), FALSE, NULL);
current_location.update_lineno(216);
/* HSS_Tests.ttcn, line 216 */
{
INTEGER tmp_16;
tmp_16 = (const_cast< const SessionPars&>(Cli__Session__CT_component_g__pars).s6a__next__hbh__id() + 1);
Cli__Session__CT_component_g__pars.s6a__next__hbh__id() = tmp_16;
}
current_location.update_lineno(217);
/* HSS_Tests.ttcn, line 217 */
{
INTEGER tmp_17;
tmp_17 = (const_cast< const SessionPars&>(Cli__Session__CT_component_g__pars).s6a__next__ete__id() + 1);
Cli__Session__CT_component_g__pars.s6a__next__ete__id() = tmp_17;
}
current_location.update_lineno(219);
/* HSS_Tests.ttcn, line 219 */
{
tmp_18:
alt_status tmp_18_alt_flag_0 = ALT_MAYBE;
alt_status tmp_18_alt_flag_1 = ALT_MAYBE;
alt_status tmp_18_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_18_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(220);
/* HSS_Tests.ttcn, line 220 */
tmp_18_alt_flag_0 = Cli__Session__CT_component_S6a.receive(DIAMETER__ts29__272__Templates::tr__DIA__ULA(ula__sub__data, OCTETSTRING_template(sess__id), CHARSTRING_template(ANY_VALUE), CHARSTRING_template(ANY_VALUE), OCTETSTRING_template(hbh__id), OCTETSTRING_template(ete__id)), &(rx__dia), any_compref, NULL, NULL, NULL);
if (tmp_18_alt_flag_0 == ALT_YES) {
current_location.update_lineno(221);
/* HSS_Tests.ttcn, line 221 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_18_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(223);
/* HSS_Tests.ttcn, line 223 */
tmp_18_alt_flag_1 = Cli__Session__CT_component_S6a.receive(DIAMETER__Types::PDU__DIAMETER_template(ANY_VALUE), &(rx__dia), any_compref, NULL, NULL, NULL);
if (tmp_18_alt_flag_1 == ALT_YES) {
current_location.update_lineno(224);
/* HSS_Tests.ttcn, line 224 */
Misc__Helpers::f__shutdown(cs_6, 224, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received unexpected DIAMETER "),rx__dia.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_18_default_flag == ALT_MAYBE) {
tmp_18_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_18_default_flag == ALT_YES || tmp_18_default_flag == ALT_BREAK) break;
else if (tmp_18_default_flag == ALT_REPEAT) goto tmp_18;
}
current_location.update_lineno(219);
/* HSS_Tests.ttcn, line 219 */
if (tmp_18_alt_flag_0 == ALT_NO && tmp_18_alt_flag_1 == ALT_NO && tmp_18_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file HSS_Tests.ttcn between lines 219 and 227.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
}

void start_f__dia__ulr__ula(const COMPONENT& component_reference, const DIAMETER__Types::AVP__list_template& ula__sub__data)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_dia_ulr_ula(");
ula__sub__data.log();
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "HSS_Tests", "f_dia_ulr_ula", text_buf);
ula__sub__data.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__ulr__ula()
{
TTCN_Location current_location("HSS_Tests.ttcn", 231, TTCN_Location::LOCATION_FUNCTION, "f_TC_ulr_ula");
current_location.update_lineno(232);
/* HSS_Tests.ttcn, line 232 */
Prometheus__Checker::PrometheusExpects expects;
current_location.update_lineno(233);
/* HSS_Tests.ttcn, line 233 */
Prometheus__Checker::PrometheusMetrics prom__snapshot;
current_location.update_lineno(237);
/* HSS_Tests.ttcn, line 237 */
if ((mp__hss__impl == HSS__Impl::HSS__IMPL__OPEN5GS)) {
current_location.update_lineno(238);
/* HSS_Tests.ttcn, line 238 */
{
Prometheus__Checker::PrometheusExpects_template tmp_20;
tmp_20.set_size(2);
tmp_20[0] = Prometheus__Checker::ts__PrometheusExpect(CHARSTRING_template(cs_7), Prometheus__Checker::PrometheusMetricType_template(Prometheus__Checker::PrometheusMetricType::COUNTER), INTEGER_template(1), INTEGER_template(1));
tmp_20[1] = Prometheus__Checker::ts__PrometheusExpect(CHARSTRING_template(cs_8), Prometheus__Checker::PrometheusMetricType_template(Prometheus__Checker::PrometheusMetricType::COUNTER), INTEGER_template(1), INTEGER_template(1));
expects = tmp_20.valueof();
}
current_location.update_lineno(242);
/* HSS_Tests.ttcn, line 242 */
prom__snapshot = Prometheus__Checker::f__prometheus__snapshot(Prometheus__Checker::f__prometheus__keys__from__expect(expects), Prometheus__Checker::f__prometheus__snapshot_time__out_defval);
}
current_location.update_lineno(245);
/* HSS_Tests.ttcn, line 245 */
DIAMETER__Types::AVP__list_template sub__data;
sub__data.set_type(SUPERSET_MATCH, 4);
sub__data.set_item(0) = DIAMETER__ts29__272__Templates::tr__AVP__3GPP__SubscriberStatus(DIAMETER__Types::AAA__3GPP__Subscriber__Status_template(DIAMETER__Types::AAA__3GPP__Subscriber__Status::SERVICE__GRANTED));
sub__data.set_item(1) = DIAMETER__Templates::tr__AVP__3GPP__SubscrRauTauTmr(INTEGER_template(ANY_VALUE));
sub__data.set_item(2) = DIAMETER__ts29__272__Templates::tr__AVP__3GPP__AMBR(INTEGER_template(ANY_VALUE), INTEGER_template(ANY_VALUE));
{
DIAMETER__Types::AVP__list_template tmp_22;
tmp_22.set_type(SUPERSET_MATCH, 3);
tmp_22.set_item(0) = DIAMETER__ts29__272__Templates::tr__AVP__3GPP__ContextId(INTEGER_template(ANY_VALUE));
tmp_22.set_item(1) = DIAMETER__ts29__272__Templates::tr__AVP__3GPP__AllApnConfigsIncl(DIAMETER__ts29__272__Templates::tr__AVP__3GPP__AllApnConfigsIncl_ind_defval);
tmp_22.set_item(2) = DIAMETER__ts29__272__Templates::tr__AVP__3GPP__ApnConfig(INTEGER_template(ANY_VALUE), DIAMETER__Types::AAA__3GPP__PDN__Type_template(ANY_VALUE), CHARSTRING_template(ANY_VALUE));
sub__data.set_item(3) = DIAMETER__ts29__272__Templates::tr__AVP__3GPP__ApnConfigProfile(tmp_22);
}
current_location.update_lineno(255);
/* HSS_Tests.ttcn, line 255 */
f__dia__ulr__ula(sub__data);
current_location.update_lineno(257);
/* HSS_Tests.ttcn, line 257 */
if ((mp__hss__impl == HSS__Impl::HSS__IMPL__OPEN5GS)) {
current_location.update_lineno(258);
/* HSS_Tests.ttcn, line 258 */
Prometheus__Checker::f__prometheus__expect__from__snapshot(expects, TRUE, prom__snapshot, Prometheus__Checker::f__prometheus__expect__from__snapshot_time__out_defval);
}
current_location.update_lineno(260);
/* HSS_Tests.ttcn, line 260 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__ulr__ula(const COMPONENT& component_reference)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_ulr_ula(");
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "HSS_Tests", "f_TC_ulr_ula", text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__ulr__ula(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("HSS_Tests.ttcn", 262, TTCN_Location::LOCATION_TESTCASE, "TC_ulr_ula");
try {
TTCN_Runtime::begin_testcase("HSS_Tests", "TC_ulr_ula", "HSS_Tests", "MTC_CT", "HSS_Tests", "MTC_CT", has_timer, timer_value);
current_location.update_lineno(263);
/* HSS_Tests.ttcn, line 263 */
COMPONENT vc__conn;
current_location.update_lineno(264);
/* HSS_Tests.ttcn, line 264 */
SessionPars pars(t__SessionPars(const_cast< const SubscriberConfigs&>(subscribers)[0], t__SessionPars_s6a__next__hbh__id_defval, t__SessionPars_s6a__next__ete__id_defval).valueof());
current_location.update_lineno(265);
/* HSS_Tests.ttcn, line 265 */
f__init(f__init_guard__timeout_defval);
current_location.update_lineno(266);
/* HSS_Tests.ttcn, line 266 */
vc__conn = f__start__handler(&f__TC__ulr__ula, SessionPars_template(pars));
current_location.update_lineno(267);
/* HSS_Tests.ttcn, line 267 */
{
tmp_24:
alt_status alt_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (alt_flag != ALT_NO) {
alt_flag = vc__conn.done(NULL, NULL);
if (alt_flag == ALT_YES) break;
else if (alt_flag == ALT_REPEAT) goto tmp_24;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps(first_run);
if (default_flag == ALT_YES || default_flag == ALT_BREAK) break;
else if (default_flag == ALT_REPEAT) goto tmp_24;
}
current_location.update_lineno(267);
/* HSS_Tests.ttcn, line 267 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone done statement failed in file HSS_Tests.ttcn, line 267.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_ulr_ula was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__ulr__ula__subscr__op__det__barring__7()
{
TTCN_Location current_location("HSS_Tests.ttcn", 273, TTCN_Location::LOCATION_FUNCTION, "f_TC_ulr_ula_subscr_op_det_barring_7");
current_location.update_lineno(274);
/* HSS_Tests.ttcn, line 274 */
Prometheus__Checker::PrometheusExpects expects;
{
Prometheus__Checker::PrometheusExpects_template tmp_25;
tmp_25.set_size(2);
tmp_25[0] = Prometheus__Checker::ts__PrometheusExpect(CHARSTRING_template(cs_7), Prometheus__Checker::PrometheusMetricType_template(Prometheus__Checker::PrometheusMetricType::COUNTER), INTEGER_template(1), INTEGER_template(1));
tmp_25[1] = Prometheus__Checker::ts__PrometheusExpect(CHARSTRING_template(cs_8), Prometheus__Checker::PrometheusMetricType_template(Prometheus__Checker::PrometheusMetricType::COUNTER), INTEGER_template(1), INTEGER_template(1));
expects = tmp_25.valueof();
}
current_location.update_lineno(278);
/* HSS_Tests.ttcn, line 278 */
Prometheus__Checker::PrometheusMetrics prom__snapshot(Prometheus__Checker::f__prometheus__snapshot(Prometheus__Checker::f__prometheus__keys__from__expect(expects), Prometheus__Checker::f__prometheus__snapshot_time__out_defval));
current_location.update_lineno(280);
/* HSS_Tests.ttcn, line 280 */
DIAMETER__Types::AVP__list_template sub__data;
sub__data.set_type(SUPERSET_MATCH, 5);
sub__data.set_item(0) = DIAMETER__ts29__272__Templates::tr__AVP__3GPP__SubscriberStatus(DIAMETER__Types::AAA__3GPP__Subscriber__Status_template(DIAMETER__Types::AAA__3GPP__Subscriber__Status::OPERATOR__DETERMINED__BARRING));
sub__data.set_item(1) = DIAMETER__ts29__272__Templates::tr__AVP__3GPP__OperatorDeterminedBarring(INTEGER_template(7));
sub__data.set_item(2) = DIAMETER__Templates::tr__AVP__3GPP__SubscrRauTauTmr(INTEGER_template(ANY_VALUE));
sub__data.set_item(3) = DIAMETER__ts29__272__Templates::tr__AVP__3GPP__AMBR(INTEGER_template(ANY_VALUE), INTEGER_template(ANY_VALUE));
{
DIAMETER__Types::AVP__list_template tmp_26;
tmp_26.set_type(SUPERSET_MATCH, 3);
tmp_26.set_item(0) = DIAMETER__ts29__272__Templates::tr__AVP__3GPP__ContextId(INTEGER_template(ANY_VALUE));
tmp_26.set_item(1) = DIAMETER__ts29__272__Templates::tr__AVP__3GPP__AllApnConfigsIncl(DIAMETER__ts29__272__Templates::tr__AVP__3GPP__AllApnConfigsIncl_ind_defval);
tmp_26.set_item(2) = DIAMETER__ts29__272__Templates::tr__AVP__3GPP__ApnConfig(INTEGER_template(ANY_VALUE), DIAMETER__Types::AAA__3GPP__PDN__Type_template(ANY_VALUE), CHARSTRING_template(ANY_VALUE));
sub__data.set_item(4) = DIAMETER__ts29__272__Templates::tr__AVP__3GPP__ApnConfigProfile(tmp_26);
}
current_location.update_lineno(291);
/* HSS_Tests.ttcn, line 291 */
f__dia__ulr__ula(sub__data);
current_location.update_lineno(293);
/* HSS_Tests.ttcn, line 293 */
Prometheus__Checker::f__prometheus__expect__from__snapshot(expects, TRUE, prom__snapshot, Prometheus__Checker::f__prometheus__expect__from__snapshot_time__out_defval);
current_location.update_lineno(294);
/* HSS_Tests.ttcn, line 294 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__ulr__ula__subscr__op__det__barring__7(const COMPONENT& component_reference)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_ulr_ula_subscr_op_det_barring_7(");
TTCN_Logger::log_event_str(") on component ");
component_reference.log();
TTCN_Logger::log_char('.');
TTCN_Logger::end_event();
Text_Buf text_buf;
TTCN_Runtime::prepare_start_component(component_reference, "HSS_Tests", "f_TC_ulr_ula_subscr_op_det_barring_7", text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__ulr__ula__subscr__op__det__barring__7(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("HSS_Tests.ttcn", 296, TTCN_Location::LOCATION_TESTCASE, "TC_ulr_ula_subscr_op_det_barring_7");
try {
TTCN_Runtime::begin_testcase("HSS_Tests", "TC_ulr_ula_subscr_op_det_barring_7", "HSS_Tests", "MTC_CT", "HSS_Tests", "MTC_CT", has_timer, timer_value);
current_location.update_lineno(297);
/* HSS_Tests.ttcn, line 297 */
COMPONENT vc__conn;
current_location.update_lineno(298);
/* HSS_Tests.ttcn, line 298 */
SessionPars pars(t__SessionPars(const_cast< const SubscriberConfigs&>(subscribers)[1], t__SessionPars_s6a__next__hbh__id_defval, t__SessionPars_s6a__next__ete__id_defval).valueof());
current_location.update_lineno(299);
/* HSS_Tests.ttcn, line 299 */
f__init(f__init_guard__timeout_defval);
current_location.update_lineno(300);
/* HSS_Tests.ttcn, line 300 */
vc__conn = f__start__handler(&f__TC__ulr__ula__subscr__op__det__barring__7, SessionPars_template(pars));
current_location.update_lineno(301);
/* HSS_Tests.ttcn, line 301 */
{
tmp_28:
alt_status alt_flag = ALT_UNCHECKED, default_flag = ALT_UNCHECKED;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (alt_flag != ALT_NO) {
alt_flag = vc__conn.done(NULL, NULL);
if (alt_flag == ALT_YES) break;
else if (alt_flag == ALT_REPEAT) goto tmp_28;
}
if (default_flag != ALT_NO) {
default_flag = TTCN_Default::try_altsteps(first_run);
if (default_flag == ALT_YES || default_flag == ALT_BREAK) break;
else if (default_flag == ALT_REPEAT) goto tmp_28;
}
current_location.update_lineno(301);
/* HSS_Tests.ttcn, line 301 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone done statement failed in file HSS_Tests.ttcn, line 301.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_ulr_ula_subscr_op_det_barring_7 was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void module_control_part()
{
TTCN_Location current_location("HSS_Tests.ttcn", 305, TTCN_Location::LOCATION_CONTROLPART, "HSS_Tests");
TTCN_Runtime::begin_controlpart("HSS_Tests");
TTCN_ControlPartEnder ender_("HSS_Tests");
current_location.update_lineno(306);
/* HSS_Tests.ttcn, line 306 */
testcase_TC__ulr__ula(FALSE, 0.0);
current_location.update_lineno(308);
/* HSS_Tests.ttcn, line 308 */
if ((mp__hss__impl == HSS__Impl::HSS__IMPL__OPEN5GS)) {
current_location.update_lineno(313);
/* HSS_Tests.ttcn, line 313 */
testcase_TC__ulr__ula__subscr__op__det__barring__7(FALSE, 0.0);
}
}


/* Bodies of static functions */

void pre_init_module()
{
TTCN_Location current_location("HSS_Tests.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "HSS_Tests");
DIAMETER__ts29__272__Templates::module_object.pre_init_module();
DIAMETER__Emulation::module_object.pre_init_module();
Prometheus__Checker::module_object.pre_init_module();
current_location.update_lineno(23);
/* HSS_Tests.ttcn, line 23 */
modulepar_mp__hss__hostname = cs_0;
module_object.add_modulepar("mp_hss_hostname");
current_location.update_lineno(24);
/* HSS_Tests.ttcn, line 24 */
modulepar_mp__hss__port = 3868;
module_object.add_modulepar("mp_hss_port");
current_location.update_lineno(25);
/* HSS_Tests.ttcn, line 25 */
modulepar_mp__hss__prometheus__hostname = cs_1;
module_object.add_modulepar("mp_hss_prometheus_hostname");
current_location.update_lineno(26);
/* HSS_Tests.ttcn, line 26 */
modulepar_mp__hss__prometheus__port = Prometheus__Checker::c__prometheus__default__http__port;
module_object.add_modulepar("mp_hss_prometheus_port");
current_location.update_lineno(27);
/* HSS_Tests.ttcn, line 27 */
modulepar_mp__diam__local__hostname = cs_2;
module_object.add_modulepar("mp_diam_local_hostname");
current_location.update_lineno(28);
/* HSS_Tests.ttcn, line 28 */
modulepar_mp__diam__local__port = 3868;
module_object.add_modulepar("mp_diam_local_port");
current_location.update_lineno(29);
/* HSS_Tests.ttcn, line 29 */
modulepar_mp__diam__orig__realm = cs_3;
module_object.add_modulepar("mp_diam_orig_realm");
current_location.update_lineno(30);
/* HSS_Tests.ttcn, line 30 */
modulepar_mp__diam__orig__host = cs_4;
module_object.add_modulepar("mp_diam_orig_host");
current_location.update_lineno(31);
/* HSS_Tests.ttcn, line 31 */
modulepar_mp__diam__dest__realm = cs_3;
module_object.add_modulepar("mp_diam_dest_realm");
current_location.update_lineno(32);
/* HSS_Tests.ttcn, line 32 */
modulepar_mp__diam__dest__host = cs_5;
module_object.add_modulepar("mp_diam_dest_host");
current_location.update_lineno(33);
/* HSS_Tests.ttcn, line 33 */
modulepar_subscribers.set_size(2);
modulepar_subscribers[0] = hs_0;
modulepar_subscribers[1] = hs_1;
module_object.add_modulepar("subscribers");
current_location.update_lineno(39);
/* HSS_Tests.ttcn, line 39 */
modulepar_mp__hss__impl = HSS__Impl::HSS__IMPL__OPEN5GS;
module_object.add_modulepar("mp_hss_impl");
module_object.add_altstep("as_Tguard", (genericfunc_t)&as__Tguard_instance, (genericfunc_t )&activate_as__Tguard, (genericfunc_t )&as__Tguard);
module_object.add_function("f_diam_connhldr_ct_main", (genericfunc_t)&f__diam__connhldr__ct__main, (genericfunc_t)&start_f__diam__connhldr__ct__main);
module_object.add_function("f_diam_connhldr_expect_eteid", (genericfunc_t)&f__diam__connhldr__expect__eteid, (genericfunc_t)&start_f__diam__connhldr__expect__eteid);
module_object.add_function("DiameterForwardUnitdataCallback", (genericfunc_t)&DiameterForwardUnitdataCallback, (genericfunc_t)&start_DiameterForwardUnitdataCallback);
module_object.add_function("f_init_diameter", (genericfunc_t)&f__init__diameter, (genericfunc_t)&start_f__init__diameter);
module_object.add_function("f_init", (genericfunc_t)&f__init, (genericfunc_t)&start_f__init);
module_object.add_function("f_start_handler", (genericfunc_t)&f__start__handler, (genericfunc_t)&start_f__start__handler);
module_object.add_function("f_handler_init", (genericfunc_t)&f__handler__init, (genericfunc_t)&start_f__handler__init);
module_object.add_function("f_dia_ulr_ula", (genericfunc_t)&f__dia__ulr__ula, (genericfunc_t)&start_f__dia__ulr__ula);
module_object.add_function("f_TC_ulr_ula", (genericfunc_t)&f__TC__ulr__ula, (genericfunc_t)&start_f__TC__ulr__ula);
module_object.add_testcase_nonpard("TC_ulr_ula", testcase_TC__ulr__ula);
module_object.add_function("f_TC_ulr_ula_subscr_op_det_barring_7", (genericfunc_t)&f__TC__ulr__ula__subscr__op__det__barring__7, (genericfunc_t)&start_f__TC__ulr__ula__subscr__op__det__barring__7);
module_object.add_testcase_nonpard("TC_ulr_ula_subscr_op_det_barring_7", testcase_TC__ulr__ula__subscr__op__det__barring__7);
}

void post_init_module()
{
TTCN_Location current_location("HSS_Tests.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "HSS_Tests");
DIAMETER__ts29__272__Templates::module_object.post_init_module();
DIAMETER__Emulation::module_object.post_init_module();
Prometheus__Checker::module_object.post_init_module();
current_location.update_lineno(113);
/* HSS_Tests.ttcn, line 113 */
const_t__SessionPars_s6a__next__hbh__id_defval = 1000;
current_location.update_lineno(113);
/* HSS_Tests.ttcn, line 113 */
const_t__SessionPars_s6a__next__ete__id_defval = 22220;
current_location.update_lineno(161);
/* HSS_Tests.ttcn, line 161 */
const_f__init_guard__timeout_defval = 6.0e1;
current_location.update_lineno(167);
/* HSS_Tests.ttcn, line 167 */
template_f__start__handler_pars__tmpl_defval = OMIT_VALUE;
}

boolean set_module_param(Module_Param& param)
{
const char* const par_name = param.get_id()->get_current_name();
if (!strcmp(par_name, "mp_hss_hostname")) {
modulepar_mp__hss__hostname.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_hss_port")) {
modulepar_mp__hss__port.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_hss_prometheus_hostname")) {
modulepar_mp__hss__prometheus__hostname.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_hss_prometheus_port")) {
modulepar_mp__hss__prometheus__port.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_diam_local_hostname")) {
modulepar_mp__diam__local__hostname.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_diam_local_port")) {
modulepar_mp__diam__local__port.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_diam_orig_realm")) {
modulepar_mp__diam__orig__realm.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_diam_orig_host")) {
modulepar_mp__diam__orig__host.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_diam_dest_realm")) {
modulepar_mp__diam__dest__realm.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_diam_dest_host")) {
modulepar_mp__diam__dest__host.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "subscribers")) {
modulepar_subscribers.set_param(param);
return TRUE;
} else if (!strcmp(par_name, "mp_hss_impl")) {
modulepar_mp__hss__impl.set_param(param);
return TRUE;
} else return FALSE;
}

void log_module_param()
{
TTCN_Logger::log_event_str("mp_hss_hostname := ");
mp__hss__hostname.log();
TTCN_Logger::log_event_str(", mp_hss_port := ");
mp__hss__port.log();
TTCN_Logger::log_event_str(", mp_hss_prometheus_hostname := ");
mp__hss__prometheus__hostname.log();
TTCN_Logger::log_event_str(", mp_hss_prometheus_port := ");
mp__hss__prometheus__port.log();
TTCN_Logger::log_event_str(", mp_diam_local_hostname := ");
mp__diam__local__hostname.log();
TTCN_Logger::log_event_str(", mp_diam_local_port := ");
mp__diam__local__port.log();
TTCN_Logger::log_event_str(", mp_diam_orig_realm := ");
mp__diam__orig__realm.log();
TTCN_Logger::log_event_str(", mp_diam_orig_host := ");
mp__diam__orig__host.log();
TTCN_Logger::log_event_str(", mp_diam_dest_realm := ");
mp__diam__dest__realm.log();
TTCN_Logger::log_event_str(", mp_diam_dest_host := ");
mp__diam__dest__host.log();
TTCN_Logger::log_event_str(", subscribers := ");
subscribers.log();
TTCN_Logger::log_event_str(", mp_hss_impl := ");
mp__hss__impl.log();
}

boolean init_comp_type(const char *component_type, boolean init_base_comps)
{
(void)init_base_comps;
if (!strcmp(component_type, "MTC_CT")) {
MTC__CT_component_vc__S6a.clean_up();
MTC__CT_component_S6a__UNIT.activate_port();
MTC__CT_component_S6a__PROC.activate_port();
return TRUE;
} else if (!strcmp(component_type, "DIAMETER_ConnHdlr_CT")) {
if (init_base_comps) {
Module_List::initialize_component("DIAMETER_Emulation", "DIAMETER_ConnHdlr", FALSE);
}
DIAMETER__ConnHdlr__CT_component_DIAMETER__CLIENT.activate_port();
DIAMETER__ConnHdlr__CT_component_DIAMETER__PROC__CLIENT.activate_port();
return TRUE;
} else if (!strcmp(component_type, "Cli_Session_CT")) {
if (init_base_comps) {
Module_List::initialize_component("HTTP_Adapter", "http_CT", FALSE);
Module_List::initialize_component("Prometheus_Checker", "Prometheus_Checker_CT", FALSE);
}
Cli__Session__CT_component_g__pars.clean_up();
Cli__Session__CT_component_S6a.activate_port();
Cli__Session__CT_component_S6a__PROC.activate_port();
return TRUE;
} else return FALSE;
}

boolean init_system_port(const char* component_type, const char* port_name)
{
if (!strcmp(component_type, "MTC_CT")) {
if (!strcmp(port_name, "S6a_PROC")) {
MTC__CT_component_S6a__PROC.safe_start();
return TRUE;
}
if (!strcmp(port_name, "S6a_UNIT")) {
MTC__CT_component_S6a__UNIT.safe_start();
return TRUE;
}
}
else if (!strcmp(component_type, "DIAMETER_ConnHdlr_CT")) {
if (!strcmp(port_name, "DIAMETER")) {
DIAMETER__Emulation::DIAMETER__ConnHdlr_component_DIAMETER.safe_start();
return TRUE;
}
if (!strcmp(port_name, "DIAMETER_CLIENT")) {
DIAMETER__ConnHdlr__CT_component_DIAMETER__CLIENT.safe_start();
return TRUE;
}
if (!strcmp(port_name, "DIAMETER_PROC")) {
DIAMETER__Emulation::DIAMETER__ConnHdlr_component_DIAMETER__PROC.safe_start();
return TRUE;
}
if (!strcmp(port_name, "DIAMETER_PROC_CLIENT")) {
DIAMETER__ConnHdlr__CT_component_DIAMETER__PROC__CLIENT.safe_start();
return TRUE;
}
}
else if (!strcmp(component_type, "Cli_Session_CT")) {
if (!strcmp(port_name, "HTTP")) {
HTTP__Adapter::http__CT_component_HTTP.safe_start();
return TRUE;
}
if (!strcmp(port_name, "S6a")) {
Cli__Session__CT_component_S6a.safe_start();
return TRUE;
}
if (!strcmp(port_name, "S6a_PROC")) {
Cli__Session__CT_component_S6a__PROC.safe_start();
return TRUE;
}
}
return FALSE;
}

boolean start_ptc_function(const char *function_name, Text_Buf& function_arguments)
{
if (!strcmp(function_name, "f_diam_connhldr_ct_main")) {
HEXSTRING imsi;
imsi.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_diam_connhldr_ct_main(");
imsi.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__diam__connhldr__ct__main(imsi);
TTCN_Runtime::function_finished("f_diam_connhldr_ct_main");
return TRUE;
} else if (!strcmp(function_name, "f_diam_connhldr_expect_eteid")) {
OCTETSTRING ete__id;
ete__id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_diam_connhldr_expect_eteid(");
ete__id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__diam__connhldr__expect__eteid(ete__id);
TTCN_Runtime::function_finished("f_diam_connhldr_expect_eteid");
return TRUE;
} else if (!strcmp(function_name, "DiameterForwardUnitdataCallback")) {
DIAMETER__Types::PDU__DIAMETER msg;
msg.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function DiameterForwardUnitdataCallback(");
msg.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
DiameterForwardUnitdataCallback(msg);
TTCN_Runtime::function_finished("DiameterForwardUnitdataCallback");
return TRUE;
} else if (!strcmp(function_name, "f_init_diameter")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_init_diameter(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__init__diameter(id);
TTCN_Runtime::function_finished("f_init_diameter");
return TRUE;
} else if (!strcmp(function_name, "f_init")) {
FLOAT guard__timeout;
guard__timeout.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_init(");
guard__timeout.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__init(guard__timeout);
TTCN_Runtime::function_finished("f_init");
return TRUE;
} else if (!strcmp(function_name, "f_start_handler")) {
void__fn fn;
SessionPars_template pars__tmpl;
fn.decode_text(function_arguments);
pars__tmpl.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_start_handler(");
fn.log();
TTCN_Logger::log_event_str(", ");
pars__tmpl.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__start__handler(fn, pars__tmpl);
TTCN_Runtime::function_finished("f_start_handler");
return TRUE;
} else if (!strcmp(function_name, "f_handler_init")) {
void__fn fn;
SessionPars pars;
fn.decode_text(function_arguments);
pars.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_handler_init(");
fn.log();
TTCN_Logger::log_event_str(", ");
pars.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__handler__init(fn, pars);
TTCN_Runtime::function_finished("f_handler_init");
return TRUE;
} else if (!strcmp(function_name, "f_dia_ulr_ula")) {
DIAMETER__Types::AVP__list_template ula__sub__data;
ula__sub__data.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_dia_ulr_ula(");
ula__sub__data.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__dia__ulr__ula(ula__sub__data);
TTCN_Runtime::function_finished("f_dia_ulr_ula");
return TRUE;
} else if (!strcmp(function_name, "f_TC_ulr_ula")) {
TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_TC_ulr_ula().");
TTCN_Runtime::function_started(function_arguments);
f__TC__ulr__ula();
TTCN_Runtime::function_finished("f_TC_ulr_ula");
return TRUE;
} else if (!strcmp(function_name, "f_TC_ulr_ula_subscr_op_det_barring_7")) {
TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_TC_ulr_ula_subscr_op_det_barring_7().");
TTCN_Runtime::function_started(function_arguments);
f__TC__ulr__ula__subscr__op__det__barring__7();
TTCN_Runtime::function_finished("f_TC_ulr_ula_subscr_op_det_barring_7");
return TRUE;
} else return FALSE;
}


} /* end of namespace */
