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

namespace BTS__Tests__LAPDm {

/* Literal string constants */

const unsigned char os_4_octets[] = { 0, 254, 254, 222, 173, 190, 239 },
os_7_octets[] = { 1 },
os_9_octets[] = { 1, 2, 3 },
os_5_octets[] = { 1, 2, 3, 4 },
os_2_octets[] = { 1, 2, 3, 4, 5 },
os_6_octets[] = { 7 },
os_8_octets[] = { 12 },
os_3_octets[] = { 171, 205, 239 },
os_0_octets[] = { 254, 254 };
extern const OCTETSTRING os_1(0, NULL),
os_4(7, os_4_octets),
os_7(1, os_7_octets),
os_9(3, os_9_octets),
os_5(4, os_5_octets),
os_2(5, os_2_octets),
os_6(1, os_6_octets),
os_8(1, os_8_octets),
os_3(3, os_3_octets),
os_0(2, os_0_octets);
extern const CHARSTRING cs_3(20, "BTS_Tests_LAPDm.ttcn"),
cs_0('I'),
cs_6(20, "Missing LAPDm UA RSP"),
cs_4(20, "Missing LAPDm_RR RSP"),
cs_5(19, "Missing RSL EST IND"),
cs_2(3, "REJ"),
cs_1(2, "RR"),
cs_8(40, "Received RSL DATA IND with wrong payload"),
cs_9(56, "Timeout waiting for RSL DATA IND of de-segmented message"),
cs_7(45, "received RSL DATA IND before message complete");
const unsigned char module_checksum[] = { 0xa7, 0x47, 0xb2, 0x21, 0xa1, 0x05, 0x6e, 0x00, 0xe8, 0x95, 0xc3, 0xf9, 0x18, 0x76, 0x20, 0x4a };

/* Global variable definitions */

const TTCN_Typedescriptor_t& lapdm__test__CT_descr_ = COMPONENT_descr_;
LAPDm__RAW__PT::LAPDm__PT lapdm__test__CT_component_LAPDM("LAPDM");
COMPONENT lapdm__test__CT_component_lapdm__component;
const XERdescriptor_t       LapdmNamedFrame_name_xer_ = { {"name>\n", "name>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t LapdmNamedFrame_name_descr_ = { "@BTS_Tests_LAPDm.LapdmNamedFrame.name", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &LapdmNamedFrame_name_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
UNIVERSAL_CHARSTRING LapdmNamedFrame_lapdm_default_coding("RAW");
// No XER for LapdmNamedFrame
const TTCN_Typedescriptor_t LapdmNamedFrame_descr_ = { "@BTS_Tests_LAPDm.LapdmNamedFrame", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
BOOLEAN const_as__ignore__background_want__dcch_defval;
const BOOLEAN& as__ignore__background_want__dcch_defval = const_as__ignore__background_want__dcch_defval;
BOOLEAN const_as__ignore__background_ignore__rsl__errors_defval;
const BOOLEAN& as__ignore__background_ignore__rsl__errors_defval = const_as__ignore__background_ignore__rsl__errors_defval;
const XERdescriptor_t       LapdmDlConfig_n201_xer_ = { {"n201>\n", "n201>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t LapdmDlConfig_n201_descr_ = { "@BTS_Tests_LAPDm.LapdmDlConfig.n201", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &LapdmDlConfig_n201_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       LapdmDlConfig_t200_xer_ = { {"t200>\n", "t200>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t LapdmDlConfig_t200_descr_ = { "@BTS_Tests_LAPDm.LapdmDlConfig.t200", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &LapdmDlConfig_t200_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for LapdmDlConfig
const TTCN_Typedescriptor_t LapdmDlConfig_descr_ = { "@BTS_Tests_LAPDm.LapdmDlConfig", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       LapdmDlState_v__s_xer_ = { {"v_s>\n", "v_s>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t LapdmDlState_v__s_descr_ = { "@BTS_Tests_LAPDm.LapdmDlState.v_s", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &LapdmDlState_v__s_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       LapdmDlState_v__a_xer_ = { {"v_a>\n", "v_a>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t LapdmDlState_v__a_descr_ = { "@BTS_Tests_LAPDm.LapdmDlState.v_a", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &LapdmDlState_v__a_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
const XERdescriptor_t       LapdmDlState_v__r_xer_ = { {"v_r>\n", "v_r>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE,  NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE };
const TTCN_Typedescriptor_t LapdmDlState_v__r_descr_ = { "@BTS_Tests_LAPDm.LapdmDlState.v_r", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &LapdmDlState_v__r_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
// No XER for LapdmDlState
const TTCN_Typedescriptor_t LapdmDlState_descr_ = { "@BTS_Tests_LAPDm.LapdmDlState", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE };
LapdmDlState_template template_t__init__LapdmDlState;
const LapdmDlState_template& t__init__LapdmDlState = template_t__init__LapdmDlState;
INTEGER const_c__TS0406__MAX__L3__OCTETS;
const INTEGER& c__TS0406__MAX__L3__OCTETS = const_c__TS0406__MAX__L3__OCTETS;
TTCN_Module module_object("BTS_Tests_LAPDm", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, 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 */

LapdmNamedFrame::LapdmNamedFrame()
{
}

LapdmNamedFrame::LapdmNamedFrame(const CHARSTRING& par_name,
    const LAPDm__Types::LapdmFrame& par_lapdm)
  :   field_name(par_name),
  field_lapdm(par_lapdm)
{
}

LapdmNamedFrame::LapdmNamedFrame(const LapdmNamedFrame& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @BTS_Tests_LAPDm.LapdmNamedFrame.");
if (other_value.name().is_bound()) field_name = other_value.name();
else field_name.clean_up();
if (other_value.lapdm().is_bound()) field_lapdm = other_value.lapdm();
else field_lapdm.clean_up();
}

void LapdmNamedFrame::clean_up()
{
field_name.clean_up();
field_lapdm.clean_up();
}

const TTCN_Typedescriptor_t* LapdmNamedFrame::get_descriptor() const { return &LapdmNamedFrame_descr_; }
LapdmNamedFrame& LapdmNamedFrame::operator=(const LapdmNamedFrame& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @BTS_Tests_LAPDm.LapdmNamedFrame.");
  if (other_value.name().is_bound()) field_name = other_value.name();
  else field_name.clean_up();
  if (other_value.lapdm().is_bound()) field_lapdm = other_value.lapdm();
  else field_lapdm.clean_up();
}
return *this;
}

boolean LapdmNamedFrame::operator==(const LapdmNamedFrame& other_value) const
{
return field_name==other_value.field_name
  && field_lapdm==other_value.field_lapdm;
}

boolean LapdmNamedFrame::is_bound() const
{
return (field_name.is_bound())
  || (field_lapdm.is_bound());
}
boolean LapdmNamedFrame::is_value() const
{
return field_name.is_value()
  && field_lapdm.is_value();
}
void LapdmNamedFrame::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ name := ");
field_name.log();
TTCN_Logger::log_event_str(", lapdm := ");
field_lapdm.log();
TTCN_Logger::log_event_str(" }");
}

void LapdmNamedFrame::set_implicit_omit()
{
if (name().is_bound()) name().set_implicit_omit();
if (lapdm().is_bound()) lapdm().set_implicit_omit();
}

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

void LapdmNamedFrame::encode_text(Text_Buf& text_buf) const
{
field_name.encode_text(text_buf);
field_lapdm.encode_text(text_buf);
}

void LapdmNamedFrame::decode_text(Text_Buf& text_buf)
{
field_name.decode_text(text_buf);
field_lapdm.decode_text(text_buf);
}

struct LapdmNamedFrame_template::single_value_struct {
CHARSTRING_template field_name;
LAPDm__Types::LapdmFrame_template field_lapdm;
};

void LapdmNamedFrame_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_name = ANY_VALUE;
single_value->field_lapdm = ANY_VALUE;
}
}
}

void LapdmNamedFrame_template::copy_value(const LapdmNamedFrame& other_value)
{
single_value = new single_value_struct;
if (other_value.name().is_bound()) {
  single_value->field_name = other_value.name();
} else {
  single_value->field_name.clean_up();
}
if (other_value.lapdm().is_bound()) {
  single_value->field_lapdm = other_value.lapdm();
} else {
  single_value->field_lapdm.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void LapdmNamedFrame_template::copy_template(const LapdmNamedFrame_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.name().get_selection()) {
single_value->field_name = other_value.name();
} else {
single_value->field_name.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.lapdm().get_selection()) {
single_value->field_lapdm = other_value.lapdm();
} else {
single_value->field_lapdm.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 LapdmNamedFrame_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 LapdmNamedFrame_template(*other_value.implication_.precondition);
implication_.implied_template = new LapdmNamedFrame_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 @BTS_Tests_LAPDm.LapdmNamedFrame.");
break;
}
set_selection(other_value);
}

LapdmNamedFrame_template::LapdmNamedFrame_template()
{
}

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

LapdmNamedFrame_template::LapdmNamedFrame_template(const LapdmNamedFrame& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean LapdmNamedFrame_template::match(const LapdmNamedFrame& 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.name().is_bound()) return FALSE;
if(!single_value->field_name.match(other_value.name(), legacy))return FALSE;
if(!other_value.lapdm().is_bound()) return FALSE;
if(!single_value->field_lapdm.match(other_value.lapdm(), 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 @BTS_Tests_LAPDm.LapdmNamedFrame.");
}
return FALSE;
}

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

boolean LapdmNamedFrame_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_name.is_value()
 && single_value->field_lapdm.is_value();
}

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

LapdmNamedFrame LapdmNamedFrame_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 @BTS_Tests_LAPDm.LapdmNamedFrame.");
LapdmNamedFrame ret_val;
if (single_value->field_name.is_bound()) {
ret_val.name() = single_value->field_name.valueof();
}
if (single_value->field_lapdm.is_bound()) {
ret_val.lapdm() = single_value->field_lapdm.valueof();
}
return ret_val;
}

void LapdmNamedFrame_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 @BTS_Tests_LAPDm.LapdmNamedFrame.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new LapdmNamedFrame_template[list_length];
}

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

CHARSTRING_template& LapdmNamedFrame_template::name()
{
set_specific();
return single_value->field_name;
}

const CHARSTRING_template& LapdmNamedFrame_template::name() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field name of a non-specific template of type @BTS_Tests_LAPDm.LapdmNamedFrame.");
return single_value->field_name;
}

LAPDm__Types::LapdmFrame_template& LapdmNamedFrame_template::lapdm()
{
set_specific();
return single_value->field_lapdm;
}

const LAPDm__Types::LapdmFrame_template& LapdmNamedFrame_template::lapdm() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field lapdm of a non-specific template of type @BTS_Tests_LAPDm.LapdmNamedFrame.");
return single_value->field_lapdm;
}

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

void LapdmNamedFrame_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ name := ");
single_value->field_name.log();
TTCN_Logger::log_event_str(", lapdm := ");
single_value->field_lapdm.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 LapdmNamedFrame_template::log_match(const LapdmNamedFrame& 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_name.match(match_value.name(), legacy)){
TTCN_Logger::log_logmatch_info(".name");
single_value->field_name.log_match(match_value.name(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_lapdm.match(match_value.lapdm(), legacy)){
TTCN_Logger::log_logmatch_info(".lapdm");
single_value->field_lapdm.log_match(match_value.lapdm(), 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("{ name := ");
single_value->field_name.log_match(match_value.name(), legacy);
TTCN_Logger::log_event_str(", lapdm := ");
single_value->field_lapdm.log_match(match_value.lapdm(), 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 LapdmNamedFrame_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (name().is_bound()) name().set_implicit_omit();
if (lapdm().is_bound()) lapdm().set_implicit_omit();
}

void LapdmNamedFrame_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_name.encode_text(text_buf);
single_value->field_lapdm.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 @BTS_Tests_LAPDm.LapdmNamedFrame.");
}
}

void LapdmNamedFrame_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_name.decode_text(text_buf);
single_value->field_lapdm.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 LapdmNamedFrame_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 @BTS_Tests_LAPDm.LapdmNamedFrame.");
}
}

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

void LapdmNamedFrame_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_name.check_restriction(t_res, t_name ? t_name : "@BTS_Tests_LAPDm.LapdmNamedFrame");
single_value->field_lapdm.check_restriction(t_res, t_name ? t_name : "@BTS_Tests_LAPDm.LapdmNamedFrame");
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 : "@BTS_Tests_LAPDm.LapdmNamedFrame");
}

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

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

as__lapdm__acch_Default::as__lapdm__acch_Default()
 : Default_Base("as_lapdm_acch")
{
}

alt_status as__lapdm__acch_Default::call_altstep(boolean first_alt_run)
{
return as__lapdm__acch_instance(first_alt_run);
}

as__lapdm__dcch_Default::as__lapdm__dcch_Default()
 : Default_Base("as_lapdm_dcch")
{
}

alt_status as__lapdm__dcch_Default::call_altstep(boolean first_alt_run)
{
return as__lapdm__dcch_instance(first_alt_run);
}

as__lapdm__idle_Default::as__lapdm__idle_Default()
 : Default_Base("as_lapdm_idle")
{
}

alt_status as__lapdm__idle_Default::call_altstep(boolean first_alt_run)
{
return as__lapdm__idle_instance(first_alt_run);
}

as__rsl__meas__rep_Default::as__rsl__meas__rep_Default()
 : Default_Base("as_rsl_meas_rep")
{
}

alt_status as__rsl__meas__rep_Default::call_altstep(boolean first_alt_run)
{
return as__rsl__meas__rep_instance(first_alt_run);
}

as__rsl__fail__err_Default::as__rsl__fail__err_Default()
 : Default_Base("as_rsl_fail_err")
{
}

alt_status as__rsl__fail__err_Default::call_altstep(boolean first_alt_run)
{
return as__rsl__fail__err_instance(first_alt_run);
}

as__ignore__background_Default::as__ignore__background_Default(const BOOLEAN& want__dcch, const BOOLEAN& ignore__rsl__errors)
 : Default_Base("as_ignore_background"), par_want__dcch(want__dcch), par_ignore__rsl__errors(ignore__rsl__errors)
{
}

alt_status as__ignore__background_Default::call_altstep(boolean first_alt_run)
{
return as__ignore__background_instance(par_want__dcch, par_ignore__rsl__errors, first_alt_run);
}

LapdmDlConfig::LapdmDlConfig()
{
}

LapdmDlConfig::LapdmDlConfig(const INTEGER& par_n201,
    const INTEGER& par_t200)
  :   field_n201(par_n201),
  field_t200(par_t200)
{
}

LapdmDlConfig::LapdmDlConfig(const LapdmDlConfig& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @BTS_Tests_LAPDm.LapdmDlConfig.");
if (other_value.n201().is_bound()) field_n201 = other_value.n201();
else field_n201.clean_up();
if (other_value.t200().is_bound()) field_t200 = other_value.t200();
else field_t200.clean_up();
}

void LapdmDlConfig::clean_up()
{
field_n201.clean_up();
field_t200.clean_up();
}

const TTCN_Typedescriptor_t* LapdmDlConfig::get_descriptor() const { return &LapdmDlConfig_descr_; }
LapdmDlConfig& LapdmDlConfig::operator=(const LapdmDlConfig& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @BTS_Tests_LAPDm.LapdmDlConfig.");
  if (other_value.n201().is_bound()) field_n201 = other_value.n201();
  else field_n201.clean_up();
  if (other_value.t200().is_bound()) field_t200 = other_value.t200();
  else field_t200.clean_up();
}
return *this;
}

boolean LapdmDlConfig::operator==(const LapdmDlConfig& other_value) const
{
return field_n201==other_value.field_n201
  && field_t200==other_value.field_t200;
}

boolean LapdmDlConfig::is_bound() const
{
return (field_n201.is_bound())
  || (field_t200.is_bound());
}
boolean LapdmDlConfig::is_value() const
{
return field_n201.is_value()
  && field_t200.is_value();
}
void LapdmDlConfig::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ n201 := ");
field_n201.log();
TTCN_Logger::log_event_str(", t200 := ");
field_t200.log();
TTCN_Logger::log_event_str(" }");
}

void LapdmDlConfig::set_implicit_omit()
{
if (n201().is_bound()) n201().set_implicit_omit();
if (t200().is_bound()) t200().set_implicit_omit();
}

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

void LapdmDlConfig::encode_text(Text_Buf& text_buf) const
{
field_n201.encode_text(text_buf);
field_t200.encode_text(text_buf);
}

void LapdmDlConfig::decode_text(Text_Buf& text_buf)
{
field_n201.decode_text(text_buf);
field_t200.decode_text(text_buf);
}

struct LapdmDlConfig_template::single_value_struct {
INTEGER_template field_n201;
INTEGER_template field_t200;
};

void LapdmDlConfig_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_n201 = ANY_VALUE;
single_value->field_t200 = ANY_VALUE;
}
}
}

void LapdmDlConfig_template::copy_value(const LapdmDlConfig& other_value)
{
single_value = new single_value_struct;
if (other_value.n201().is_bound()) {
  single_value->field_n201 = other_value.n201();
} else {
  single_value->field_n201.clean_up();
}
if (other_value.t200().is_bound()) {
  single_value->field_t200 = other_value.t200();
} else {
  single_value->field_t200.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void LapdmDlConfig_template::copy_template(const LapdmDlConfig_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.n201().get_selection()) {
single_value->field_n201 = other_value.n201();
} else {
single_value->field_n201.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.t200().get_selection()) {
single_value->field_t200 = other_value.t200();
} else {
single_value->field_t200.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 LapdmDlConfig_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 LapdmDlConfig_template(*other_value.implication_.precondition);
implication_.implied_template = new LapdmDlConfig_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 @BTS_Tests_LAPDm.LapdmDlConfig.");
break;
}
set_selection(other_value);
}

LapdmDlConfig_template::LapdmDlConfig_template()
{
}

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

LapdmDlConfig_template::LapdmDlConfig_template(const LapdmDlConfig& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean LapdmDlConfig_template::match(const LapdmDlConfig& 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.n201().is_bound()) return FALSE;
if(!single_value->field_n201.match(other_value.n201(), legacy))return FALSE;
if(!other_value.t200().is_bound()) return FALSE;
if(!single_value->field_t200.match(other_value.t200(), 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 @BTS_Tests_LAPDm.LapdmDlConfig.");
}
return FALSE;
}

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

boolean LapdmDlConfig_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_n201.is_value()
 && single_value->field_t200.is_value();
}

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

LapdmDlConfig LapdmDlConfig_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 @BTS_Tests_LAPDm.LapdmDlConfig.");
LapdmDlConfig ret_val;
if (single_value->field_n201.is_bound()) {
ret_val.n201() = single_value->field_n201.valueof();
}
if (single_value->field_t200.is_bound()) {
ret_val.t200() = single_value->field_t200.valueof();
}
return ret_val;
}

void LapdmDlConfig_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 @BTS_Tests_LAPDm.LapdmDlConfig.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new LapdmDlConfig_template[list_length];
}

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

INTEGER_template& LapdmDlConfig_template::n201()
{
set_specific();
return single_value->field_n201;
}

const INTEGER_template& LapdmDlConfig_template::n201() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field n201 of a non-specific template of type @BTS_Tests_LAPDm.LapdmDlConfig.");
return single_value->field_n201;
}

INTEGER_template& LapdmDlConfig_template::t200()
{
set_specific();
return single_value->field_t200;
}

const INTEGER_template& LapdmDlConfig_template::t200() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field t200 of a non-specific template of type @BTS_Tests_LAPDm.LapdmDlConfig.");
return single_value->field_t200;
}

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

void LapdmDlConfig_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ n201 := ");
single_value->field_n201.log();
TTCN_Logger::log_event_str(", t200 := ");
single_value->field_t200.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 LapdmDlConfig_template::log_match(const LapdmDlConfig& 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_n201.match(match_value.n201(), legacy)){
TTCN_Logger::log_logmatch_info(".n201");
single_value->field_n201.log_match(match_value.n201(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_t200.match(match_value.t200(), legacy)){
TTCN_Logger::log_logmatch_info(".t200");
single_value->field_t200.log_match(match_value.t200(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::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("{ n201 := ");
single_value->field_n201.log_match(match_value.n201(), legacy);
TTCN_Logger::log_event_str(", t200 := ");
single_value->field_t200.log_match(match_value.t200(), 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 LapdmDlConfig_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (n201().is_bound()) n201().set_implicit_omit();
if (t200().is_bound()) t200().set_implicit_omit();
}

void LapdmDlConfig_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_n201.encode_text(text_buf);
single_value->field_t200.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 @BTS_Tests_LAPDm.LapdmDlConfig.");
}
}

void LapdmDlConfig_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_n201.decode_text(text_buf);
single_value->field_t200.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 LapdmDlConfig_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 @BTS_Tests_LAPDm.LapdmDlConfig.");
}
}

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

void LapdmDlConfig_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_n201.check_restriction(t_res, t_name ? t_name : "@BTS_Tests_LAPDm.LapdmDlConfig");
single_value->field_t200.check_restriction(t_res, t_name ? t_name : "@BTS_Tests_LAPDm.LapdmDlConfig");
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 : "@BTS_Tests_LAPDm.LapdmDlConfig");
}

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

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

LapdmDlState::LapdmDlState()
{
}

LapdmDlState::LapdmDlState(const INTEGER& par_v__s,
    const INTEGER& par_v__a,
    const INTEGER& par_v__r)
  :   field_v__s(par_v__s),
  field_v__a(par_v__a),
  field_v__r(par_v__r)
{
}

LapdmDlState::LapdmDlState(const LapdmDlState& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @BTS_Tests_LAPDm.LapdmDlState.");
if (other_value.v__s().is_bound()) field_v__s = other_value.v__s();
else field_v__s.clean_up();
if (other_value.v__a().is_bound()) field_v__a = other_value.v__a();
else field_v__a.clean_up();
if (other_value.v__r().is_bound()) field_v__r = other_value.v__r();
else field_v__r.clean_up();
}

void LapdmDlState::clean_up()
{
field_v__s.clean_up();
field_v__a.clean_up();
field_v__r.clean_up();
}

const TTCN_Typedescriptor_t* LapdmDlState::get_descriptor() const { return &LapdmDlState_descr_; }
LapdmDlState& LapdmDlState::operator=(const LapdmDlState& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @BTS_Tests_LAPDm.LapdmDlState.");
  if (other_value.v__s().is_bound()) field_v__s = other_value.v__s();
  else field_v__s.clean_up();
  if (other_value.v__a().is_bound()) field_v__a = other_value.v__a();
  else field_v__a.clean_up();
  if (other_value.v__r().is_bound()) field_v__r = other_value.v__r();
  else field_v__r.clean_up();
}
return *this;
}

boolean LapdmDlState::operator==(const LapdmDlState& other_value) const
{
return field_v__s==other_value.field_v__s
  && field_v__a==other_value.field_v__a
  && field_v__r==other_value.field_v__r;
}

boolean LapdmDlState::is_bound() const
{
return (field_v__s.is_bound())
  || (field_v__a.is_bound())
  || (field_v__r.is_bound());
}
boolean LapdmDlState::is_value() const
{
return field_v__s.is_value()
  && field_v__a.is_value()
  && field_v__r.is_value();
}
void LapdmDlState::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ v_s := ");
field_v__s.log();
TTCN_Logger::log_event_str(", v_a := ");
field_v__a.log();
TTCN_Logger::log_event_str(", v_r := ");
field_v__r.log();
TTCN_Logger::log_event_str(" }");
}

void LapdmDlState::set_implicit_omit()
{
if (v__s().is_bound()) v__s().set_implicit_omit();
if (v__a().is_bound()) v__a().set_implicit_omit();
if (v__r().is_bound()) v__r().set_implicit_omit();
}

void LapdmDlState::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 @BTS_Tests_LAPDm.LapdmDlState 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) v__s().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) v__a().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) v__r().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(), "v_s")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          v__s().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "v_a")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          v__a().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "v_r")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          v__r().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 @BTS_Tests_LAPDm.LapdmDlState: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@BTS_Tests_LAPDm.LapdmDlState");
  }
}

void LapdmDlState::encode_text(Text_Buf& text_buf) const
{
field_v__s.encode_text(text_buf);
field_v__a.encode_text(text_buf);
field_v__r.encode_text(text_buf);
}

void LapdmDlState::decode_text(Text_Buf& text_buf)
{
field_v__s.decode_text(text_buf);
field_v__a.decode_text(text_buf);
field_v__r.decode_text(text_buf);
}

struct LapdmDlState_template::single_value_struct {
INTEGER_template field_v__s;
INTEGER_template field_v__a;
INTEGER_template field_v__r;
};

void LapdmDlState_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_v__s = ANY_VALUE;
single_value->field_v__a = ANY_VALUE;
single_value->field_v__r = ANY_VALUE;
}
}
}

void LapdmDlState_template::copy_value(const LapdmDlState& other_value)
{
single_value = new single_value_struct;
if (other_value.v__s().is_bound()) {
  single_value->field_v__s = other_value.v__s();
} else {
  single_value->field_v__s.clean_up();
}
if (other_value.v__a().is_bound()) {
  single_value->field_v__a = other_value.v__a();
} else {
  single_value->field_v__a.clean_up();
}
if (other_value.v__r().is_bound()) {
  single_value->field_v__r = other_value.v__r();
} else {
  single_value->field_v__r.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void LapdmDlState_template::copy_template(const LapdmDlState_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.v__s().get_selection()) {
single_value->field_v__s = other_value.v__s();
} else {
single_value->field_v__s.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.v__a().get_selection()) {
single_value->field_v__a = other_value.v__a();
} else {
single_value->field_v__a.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.v__r().get_selection()) {
single_value->field_v__r = other_value.v__r();
} else {
single_value->field_v__r.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 LapdmDlState_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 LapdmDlState_template(*other_value.implication_.precondition);
implication_.implied_template = new LapdmDlState_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 @BTS_Tests_LAPDm.LapdmDlState.");
break;
}
set_selection(other_value);
}

LapdmDlState_template::LapdmDlState_template()
{
}

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

LapdmDlState_template::LapdmDlState_template(const LapdmDlState& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean LapdmDlState_template::match(const LapdmDlState& 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.v__s().is_bound()) return FALSE;
if(!single_value->field_v__s.match(other_value.v__s(), legacy))return FALSE;
if(!other_value.v__a().is_bound()) return FALSE;
if(!single_value->field_v__a.match(other_value.v__a(), legacy))return FALSE;
if(!other_value.v__r().is_bound()) return FALSE;
if(!single_value->field_v__r.match(other_value.v__r(), 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 @BTS_Tests_LAPDm.LapdmDlState.");
}
return FALSE;
}

boolean LapdmDlState_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_v__s.is_bound()
 || single_value->field_v__a.is_bound()
 || single_value->field_v__r.is_bound();
}

boolean LapdmDlState_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_v__s.is_value()
 && single_value->field_v__a.is_value()
 && single_value->field_v__r.is_value();
}

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

LapdmDlState LapdmDlState_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 @BTS_Tests_LAPDm.LapdmDlState.");
LapdmDlState ret_val;
if (single_value->field_v__s.is_bound()) {
ret_val.v__s() = single_value->field_v__s.valueof();
}
if (single_value->field_v__a.is_bound()) {
ret_val.v__a() = single_value->field_v__a.valueof();
}
if (single_value->field_v__r.is_bound()) {
ret_val.v__r() = single_value->field_v__r.valueof();
}
return ret_val;
}

void LapdmDlState_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 @BTS_Tests_LAPDm.LapdmDlState.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new LapdmDlState_template[list_length];
}

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

INTEGER_template& LapdmDlState_template::v__s()
{
set_specific();
return single_value->field_v__s;
}

const INTEGER_template& LapdmDlState_template::v__s() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field v_s of a non-specific template of type @BTS_Tests_LAPDm.LapdmDlState.");
return single_value->field_v__s;
}

INTEGER_template& LapdmDlState_template::v__a()
{
set_specific();
return single_value->field_v__a;
}

const INTEGER_template& LapdmDlState_template::v__a() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field v_a of a non-specific template of type @BTS_Tests_LAPDm.LapdmDlState.");
return single_value->field_v__a;
}

INTEGER_template& LapdmDlState_template::v__r()
{
set_specific();
return single_value->field_v__r;
}

const INTEGER_template& LapdmDlState_template::v__r() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field v_r of a non-specific template of type @BTS_Tests_LAPDm.LapdmDlState.");
return single_value->field_v__r;
}

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

void LapdmDlState_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ v_s := ");
single_value->field_v__s.log();
TTCN_Logger::log_event_str(", v_a := ");
single_value->field_v__a.log();
TTCN_Logger::log_event_str(", v_r := ");
single_value->field_v__r.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 LapdmDlState_template::log_match(const LapdmDlState& 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_v__s.match(match_value.v__s(), legacy)){
TTCN_Logger::log_logmatch_info(".v_s");
single_value->field_v__s.log_match(match_value.v__s(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_v__a.match(match_value.v__a(), legacy)){
TTCN_Logger::log_logmatch_info(".v_a");
single_value->field_v__a.log_match(match_value.v__a(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_v__r.match(match_value.v__r(), legacy)){
TTCN_Logger::log_logmatch_info(".v_r");
single_value->field_v__r.log_match(match_value.v__r(), 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("{ v_s := ");
single_value->field_v__s.log_match(match_value.v__s(), legacy);
TTCN_Logger::log_event_str(", v_a := ");
single_value->field_v__a.log_match(match_value.v__a(), legacy);
TTCN_Logger::log_event_str(", v_r := ");
single_value->field_v__r.log_match(match_value.v__r(), 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 LapdmDlState_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (v__s().is_bound()) v__s().set_implicit_omit();
if (v__a().is_bound()) v__a().set_implicit_omit();
if (v__r().is_bound()) v__r().set_implicit_omit();
}

void LapdmDlState_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_v__s.encode_text(text_buf);
single_value->field_v__a.encode_text(text_buf);
single_value->field_v__r.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 @BTS_Tests_LAPDm.LapdmDlState.");
}
}

void LapdmDlState_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_v__s.decode_text(text_buf);
single_value->field_v__a.decode_text(text_buf);
single_value->field_v__r.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 LapdmDlState_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 @BTS_Tests_LAPDm.LapdmDlState.");
}
}

void LapdmDlState_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: {
    LapdmDlState_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 @BTS_Tests_LAPDm.LapdmDlState 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) v__s().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) v__a().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) v__r().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(), "v_s")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          v__s().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "v_a")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          v__a().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "v_r")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          v__r().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 @BTS_Tests_LAPDm.LapdmDlState: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    LapdmDlState_template* precondition = new LapdmDlState_template;
    precondition->set_param(*param.get_elem(0));
    LapdmDlState_template* implied_template = new LapdmDlState_template;
    implied_template->set_param(*param.get_elem(1));
    *this = LapdmDlState_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@BTS_Tests_LAPDm.LapdmDlState");
  }
  is_ifpresent = param.get_ifpresent();
}

void LapdmDlState_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_v__s.check_restriction(t_res, t_name ? t_name : "@BTS_Tests_LAPDm.LapdmDlState");
single_value->field_v__a.check_restriction(t_res, t_name ? t_name : "@BTS_Tests_LAPDm.LapdmDlState");
single_value->field_v__r.check_restriction(t_res, t_name ? t_name : "@BTS_Tests_LAPDm.LapdmDlState");
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 : "@BTS_Tests_LAPDm.LapdmDlState");
}

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

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


/* Bodies of functions, altsteps and testcases */

void f__lapdm__init()
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 25, TTCN_Location::LOCATION_FUNCTION, "f_lapdm_init");
current_location.update_lineno(27);
/* BTS_Tests_LAPDm.ttcn, line 27 */
lapdm__test__CT_component_lapdm__component = TTCN_Runtime::create_component("LAPDm_RAW_PT", "lapdm_CT", NULL, NULL, FALSE);
current_location.update_lineno(29);
/* BTS_Tests_LAPDm.ttcn, line 29 */
TTCN_Runtime::connect_port(self, lapdm__test__CT_component_LAPDM.get_name(), lapdm__test__CT_component_lapdm__component, LAPDm__RAW__PT::lapdm__CT_component_LAPDM__SP.get_name());
current_location.update_lineno(32);
/* BTS_Tests_LAPDm.ttcn, line 32 */
{
Map_Params tmp_1(0);
TTCN_Runtime::map_port(lapdm__test__CT_component_lapdm__component, LAPDm__RAW__PT::lapdm__CT_component_L1CTL.get_name(), SYSTEM_COMPREF, "L1CTL", tmp_1);
}
current_location.update_lineno(35);
/* BTS_Tests_LAPDm.ttcn, line 35 */
LAPDm__RAW__PT::start_LAPDmStart(lapdm__test__CT_component_lapdm__component);
}

void start_f__lapdm__init(const COMPONENT& component_reference)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_lapdm_init(");
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, "BTS_Tests_LAPDm", "f_lapdm_init", text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__lapdm__exit()
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 38, TTCN_Location::LOCATION_FUNCTION, "f_lapdm_exit");
current_location.update_lineno(39);
/* BTS_Tests_LAPDm.ttcn, line 39 */
lapdm__test__CT_component_lapdm__component.stop();
current_location.update_lineno(40);
/* BTS_Tests_LAPDm.ttcn, line 40 */
{
tmp_2:
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 = lapdm__test__CT_component_lapdm__component.done(NULL, NULL);
if (alt_flag == ALT_YES) break;
else if (alt_flag == ALT_REPEAT) goto tmp_2;
}
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_2;
}
current_location.update_lineno(40);
/* BTS_Tests_LAPDm.ttcn, line 40 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone done statement failed in file BTS_Tests_LAPDm.ttcn, line 40.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(41);
/* BTS_Tests_LAPDm.ttcn, line 41 */
{
Map_Params tmp_3(0);
TTCN_Runtime::unmap_port(lapdm__test__CT_component_lapdm__component, LAPDm__RAW__PT::lapdm__CT_component_L1CTL.get_name(), SYSTEM_COMPREF, "L1CTL", tmp_3);
}
}

void start_f__lapdm__exit(const COMPONENT& component_reference)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_lapdm_exit(");
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, "BTS_Tests_LAPDm", "f_lapdm_exit", text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__switch__dcch()
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 45, TTCN_Location::LOCATION_FUNCTION, "f_switch_dcch");
current_location.update_lineno(46);
/* BTS_Tests_LAPDm.ttcn, line 46 */
BTS__Tests::TrxParsItem trx__pars(const_cast< const BTS__Tests::TrxPars&>(BTS__Tests::mp__trx__pars)[const_cast< const BTS__Tests::ConnHdlrPars&>(BTS__Tests::ConnHdlr_component_g__pars).trx__nr()]);
current_location.update_lineno(47);
/* BTS_Tests_LAPDm.ttcn, line 47 */
GSM__Types::GsmBandArfcn arfcn(GSM__Types::ts__GsmBandArfcn(INTEGER_template(const_cast< const BTS__Tests::TrxParsItem&>(trx__pars).arfcn()), GSM__Types::ts__GsmBandArfcn_pcs_defval, GSM__Types::ts__GsmBandArfcn_uplink_defval).valueof());
current_location.update_lineno(48);
/* BTS_Tests_LAPDm.ttcn, line 48 */
LAPDm__RAW__PT::BCCH__tune__req tune__req;
tune__req.arfcn() = arfcn;
tune__req.combined__ccch() = TRUE;
current_location.update_lineno(49);
/* BTS_Tests_LAPDm.ttcn, line 49 */
LAPDm__RAW__PT::DCCH__switch__req sw__req;
current_location.update_lineno(52);
/* BTS_Tests_LAPDm.ttcn, line 52 */
if (const_cast< const BTS__Tests::ConnHdlrPars&>(BTS__Tests::ConnHdlr_component_g__pars).fhp().enabled()) {
current_location.update_lineno(53);
/* BTS_Tests_LAPDm.ttcn, line 53 */
sw__req.chan__desc() = GSM__RR__Types::ts__ChanDescH1(GSM__Types::RslChannelNr_template(const_cast< const BTS__Tests::ConnHdlrPars&>(BTS__Tests::ConnHdlr_component_g__pars).chan__nr()), GSM__RR__Types::MaioHsn_template(const_cast< const BTS__Tests::ConnHdlrPars&>(BTS__Tests::ConnHdlr_component_g__pars).fhp().maio__hsn()), INTEGER_template(const_cast< const BTS__Tests::ConnHdlrPars&>(BTS__Tests::ConnHdlr_component_g__pars).tsc())).valueof();
current_location.update_lineno(56);
/* BTS_Tests_LAPDm.ttcn, line 56 */
sw__req.ma() = const_cast< const BTS__Tests::ConnHdlrPars&>(BTS__Tests::ConnHdlr_component_g__pars).fhp().ma();
}
else {
current_location.update_lineno(58);
/* BTS_Tests_LAPDm.ttcn, line 58 */
sw__req.chan__desc() = GSM__RR__Types::ts__ChanDescH0(GSM__Types::RslChannelNr_template(const_cast< const BTS__Tests::ConnHdlrPars&>(BTS__Tests::ConnHdlr_component_g__pars).chan__nr()), INTEGER_template(const_cast< const BTS__Tests::TrxParsItem&>(trx__pars).arfcn()), INTEGER_template(const_cast< const BTS__Tests::ConnHdlrPars&>(BTS__Tests::ConnHdlr_component_g__pars).tsc())).valueof();
current_location.update_lineno(61);
/* BTS_Tests_LAPDm.ttcn, line 61 */
sw__req.ma() = OMIT_VALUE;
}
current_location.update_lineno(64);
/* BTS_Tests_LAPDm.ttcn, line 64 */
lapdm__test__CT_component_LAPDM.send(tune__req, FALSE, NULL);
current_location.update_lineno(65);
/* BTS_Tests_LAPDm.ttcn, line 65 */
lapdm__test__CT_component_LAPDM.send(sw__req, FALSE, NULL);
current_location.update_lineno(66);
/* BTS_Tests_LAPDm.ttcn, line 66 */
{
tmp_8:
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 = lapdm__test__CT_component_LAPDM.receive(LAPDm__RAW__PT::DCCH__switch__res_template(ANY_VALUE), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_8;
}
current_location.update_lineno(66);
/* BTS_Tests_LAPDm.ttcn, line 66 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 66.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
}

void start_f__switch__dcch(const COMPONENT& component_reference)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_switch_dcch(");
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, "BTS_Tests_LAPDm", "f_switch_dcch", text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__release__dcch()
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 70, TTCN_Location::LOCATION_FUNCTION, "f_release_dcch");
current_location.update_lineno(71);
/* BTS_Tests_LAPDm.ttcn, line 71 */
LAPDm__RAW__PT::DCCH__release__req rel__req(NULL_VALUE);
current_location.update_lineno(72);
/* BTS_Tests_LAPDm.ttcn, line 72 */
lapdm__test__CT_component_LAPDM.send(rel__req, FALSE, NULL);
}

void start_f__release__dcch(const COMPONENT& component_reference)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_release_dcch(");
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, "BTS_Tests_LAPDm", "f_release_dcch", text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

LAPDm__RAW__PT::LAPDm__ph__data_template t__PH__DATA(const INTEGER_template& sapi, const BOOLEAN_template& sacch, const LAPDm__Types::LapdmFrame_template& frame)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 75, TTCN_Location::LOCATION_TEMPLATE, "t_PH_DATA");
LAPDm__RAW__PT::LAPDm__ph__data_template ret_val;
ret_val.sacch() = sacch;
ret_val.sapi() = sapi;
ret_val.lapdm() = frame;
return ret_val;
}

BOOLEAN f__test__sabm__results__in__ua(const INTEGER& sapi, const BOOLEAN& use__sacch, const OCTETSTRING& payload)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 81, TTCN_Location::LOCATION_FUNCTION, "f_test_sabm_results_in_ua");
current_location.update_lineno(82);
/* BTS_Tests_LAPDm.ttcn, line 82 */
LAPDm__RAW__PT::LAPDm__ph__data phd;
current_location.update_lineno(83);
/* BTS_Tests_LAPDm.ttcn, line 83 */
BOOLEAN result(FALSE);
current_location.update_lineno(84);
/* BTS_Tests_LAPDm.ttcn, line 84 */
TIMER T("T", 5.0);
current_location.update_lineno(86);
/* BTS_Tests_LAPDm.ttcn, line 86 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(sapi), BOOLEAN_template(use__sacch), LAPDm__Types::ts__LAPDm__SABM(sapi, LAPDm__Types::cr__MO__CMD, FALSE, payload)), FALSE, NULL);
current_location.update_lineno(87);
/* BTS_Tests_LAPDm.ttcn, line 87 */
T.start();
current_location.update_lineno(88);
/* BTS_Tests_LAPDm.ttcn, line 88 */
{
tmp_9:
alt_status tmp_9_alt_flag_0 = ALT_MAYBE;
alt_status tmp_9_alt_flag_1 = ALT_MAYBE;
alt_status tmp_9_alt_flag_2 = ALT_MAYBE;
alt_status tmp_9_alt_flag_3 = ALT_MAYBE;
alt_status tmp_9_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_9_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(89);
/* BTS_Tests_LAPDm.ttcn, line 89 */
tmp_9_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(ANY_VALUE), BOOLEAN_template(use__sacch), LAPDm__Types::tr__LAPDm__UA(INTEGER_template(sapi), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(FALSE), OCTETSTRING_template(payload))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_9_alt_flag_0 == ALT_YES) {
current_location.update_lineno(89);
/* BTS_Tests_LAPDm.ttcn, line 89 */
result = TRUE;
break;
}
}
if (tmp_9_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(90);
/* BTS_Tests_LAPDm.ttcn, line 90 */
tmp_9_alt_flag_1 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(any_compref, NULL, NULL, NULL);
if (tmp_9_alt_flag_1 == ALT_YES) {
current_location.update_lineno(90);
/* BTS_Tests_LAPDm.ttcn, line 90 */
goto tmp_9;
}
}
if (tmp_9_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(91);
/* BTS_Tests_LAPDm.ttcn, line 91 */
tmp_9_alt_flag_2 = lapdm__test__CT_component_LAPDM.receive(any_compref, NULL, NULL, NULL);
if (tmp_9_alt_flag_2 == ALT_YES) {
current_location.update_lineno(91);
/* BTS_Tests_LAPDm.ttcn, line 91 */
goto tmp_9;
}
}
if (tmp_9_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(92);
/* BTS_Tests_LAPDm.ttcn, line 92 */
tmp_9_alt_flag_3 = T.timeout(NULL);
if (tmp_9_alt_flag_3 == ALT_YES) break;
}
if (tmp_9_default_flag == ALT_MAYBE) {
tmp_9_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_9_default_flag == ALT_YES || tmp_9_default_flag == ALT_BREAK) break;
else if (tmp_9_default_flag == ALT_REPEAT) goto tmp_9;
}
current_location.update_lineno(88);
/* BTS_Tests_LAPDm.ttcn, line 88 */
if (tmp_9_alt_flag_0 == ALT_NO && tmp_9_alt_flag_1 == ALT_NO && tmp_9_alt_flag_2 == ALT_NO && tmp_9_alt_flag_3 == ALT_NO && tmp_9_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 88 and 93.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(94);
/* BTS_Tests_LAPDm.ttcn, line 94 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(sapi), BOOLEAN_template(use__sacch), LAPDm__Types::ts__LAPDm__RR(sapi, LAPDm__Types::cr__MT__CMD, FALSE, 0)), FALSE, NULL);
current_location.update_lineno(95);
/* BTS_Tests_LAPDm.ttcn, line 95 */
return result;
}

void start_f__test__sabm__results__in__ua(const COMPONENT& component_reference, const INTEGER& sapi, const BOOLEAN& use__sacch, const OCTETSTRING& payload)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_test_sabm_results_in_ua(");
sapi.log();
TTCN_Logger::log_event_str(", ");
use__sacch.log();
TTCN_Logger::log_event_str(", ");
payload.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, "BTS_Tests_LAPDm", "f_test_sabm_results_in_ua", text_buf);
sapi.encode_text(text_buf);
use__sacch.encode_text(text_buf);
payload.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__sabm__ua__dcch__sapi0(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 98, TTCN_Location::LOCATION_FUNCTION, "f_TC_sabm_ua_dcch_sapi0");
current_location.update_lineno(99);
/* BTS_Tests_LAPDm.ttcn, line 99 */
fp__common__init();
current_location.update_lineno(100);
/* BTS_Tests_LAPDm.ttcn, line 100 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(101);
/* BTS_Tests_LAPDm.ttcn, line 101 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(102);
/* BTS_Tests_LAPDm.ttcn, line 102 */
DEFAULT d(activate_as__ignore__background(as__ignore__background_want__dcch_defval, as__ignore__background_ignore__rsl__errors_defval));
current_location.update_lineno(103);
/* BTS_Tests_LAPDm.ttcn, line 103 */
if ((!(f__test__sabm__results__in__ua(0, FALSE, os_0)))) {
current_location.update_lineno(104);
/* BTS_Tests_LAPDm.ttcn, line 104 */
TTCN_Runtime::setverdict(FAIL);
}
current_location.update_lineno(106);
/* BTS_Tests_LAPDm.ttcn, line 106 */
TTCN_Runtime::setverdict(PASS);
current_location.update_lineno(107);
/* BTS_Tests_LAPDm.ttcn, line 107 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(108);
/* BTS_Tests_LAPDm.ttcn, line 108 */
fp__common__fini();
}

void start_f__TC__sabm__ua__dcch__sapi0(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_ua_dcch_sapi0(");
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, "BTS_Tests_LAPDm", "f_TC_sabm_ua_dcch_sapi0", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__sabm__ua__dcch__sapi0__nopayload(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 111, TTCN_Location::LOCATION_FUNCTION, "f_TC_sabm_ua_dcch_sapi0_nopayload");
current_location.update_lineno(112);
/* BTS_Tests_LAPDm.ttcn, line 112 */
fp__common__init();
current_location.update_lineno(113);
/* BTS_Tests_LAPDm.ttcn, line 113 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(114);
/* BTS_Tests_LAPDm.ttcn, line 114 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(115);
/* BTS_Tests_LAPDm.ttcn, line 115 */
DEFAULT d(activate_as__ignore__background(as__ignore__background_want__dcch_defval, as__ignore__background_ignore__rsl__errors_defval));
current_location.update_lineno(116);
/* BTS_Tests_LAPDm.ttcn, line 116 */
if (f__test__sabm__results__in__ua(0, FALSE, os_1)) {
current_location.update_lineno(117);
/* BTS_Tests_LAPDm.ttcn, line 117 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Initial SABM/UA must contain L3 payload but BTS accepts without"),TTCN_Logger::end_event_log2str()));
}
current_location.update_lineno(119);
/* BTS_Tests_LAPDm.ttcn, line 119 */
TTCN_Runtime::setverdict(PASS);
current_location.update_lineno(120);
/* BTS_Tests_LAPDm.ttcn, line 120 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(121);
/* BTS_Tests_LAPDm.ttcn, line 121 */
fp__common__fini();
}

void start_f__TC__sabm__ua__dcch__sapi0__nopayload(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_ua_dcch_sapi0_nopayload(");
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, "BTS_Tests_LAPDm", "f_TC_sabm_ua_dcch_sapi0_nopayload", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__sabm__ua__dcch__sapi3(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 124, TTCN_Location::LOCATION_FUNCTION, "f_TC_sabm_ua_dcch_sapi3");
current_location.update_lineno(125);
/* BTS_Tests_LAPDm.ttcn, line 125 */
fp__common__init();
current_location.update_lineno(126);
/* BTS_Tests_LAPDm.ttcn, line 126 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(127);
/* BTS_Tests_LAPDm.ttcn, line 127 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(128);
/* BTS_Tests_LAPDm.ttcn, line 128 */
DEFAULT d(activate_as__ignore__background(as__ignore__background_want__dcch_defval, as__ignore__background_ignore__rsl__errors_defval));
current_location.update_lineno(129);
/* BTS_Tests_LAPDm.ttcn, line 129 */
if (f__test__sabm__results__in__ua(3, FALSE, os_0)) {
current_location.update_lineno(130);
/* BTS_Tests_LAPDm.ttcn, line 130 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Initial SABM/UA must be on SAPI0, but BTS accepts SAPI=3"),TTCN_Logger::end_event_log2str()));
}
current_location.update_lineno(132);
/* BTS_Tests_LAPDm.ttcn, line 132 */
TTCN_Runtime::setverdict(PASS);
current_location.update_lineno(133);
/* BTS_Tests_LAPDm.ttcn, line 133 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(134);
/* BTS_Tests_LAPDm.ttcn, line 134 */
fp__common__fini();
}

void start_f__TC__sabm__ua__dcch__sapi3(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_ua_dcch_sapi3(");
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, "BTS_Tests_LAPDm", "f_TC_sabm_ua_dcch_sapi3", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__sabm__ua__dcch__sapi4(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 137, TTCN_Location::LOCATION_FUNCTION, "f_TC_sabm_ua_dcch_sapi4");
current_location.update_lineno(138);
/* BTS_Tests_LAPDm.ttcn, line 138 */
fp__common__init();
current_location.update_lineno(139);
/* BTS_Tests_LAPDm.ttcn, line 139 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(140);
/* BTS_Tests_LAPDm.ttcn, line 140 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(141);
/* BTS_Tests_LAPDm.ttcn, line 141 */
DEFAULT d(activate_as__ignore__background(as__ignore__background_want__dcch_defval, as__ignore__background_ignore__rsl__errors_defval));
current_location.update_lineno(142);
/* BTS_Tests_LAPDm.ttcn, line 142 */
if (f__test__sabm__results__in__ua(4, FALSE, os_0)) {
current_location.update_lineno(143);
/* BTS_Tests_LAPDm.ttcn, line 143 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Initial SABM/UA must be on SAPI0, but BTS accepts SAPI=4"),TTCN_Logger::end_event_log2str()));
}
current_location.update_lineno(145);
/* BTS_Tests_LAPDm.ttcn, line 145 */
TTCN_Runtime::setverdict(PASS);
current_location.update_lineno(146);
/* BTS_Tests_LAPDm.ttcn, line 146 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(147);
/* BTS_Tests_LAPDm.ttcn, line 147 */
fp__common__fini();
}

void start_f__TC__sabm__ua__dcch__sapi4(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_ua_dcch_sapi4(");
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, "BTS_Tests_LAPDm", "f_TC_sabm_ua_dcch_sapi4", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__sabm__ua__dcch__sapi0(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 150, TTCN_Location::LOCATION_TESTCASE, "TC_sabm_ua_dcch_sapi0");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_sabm_ua_dcch_sapi0", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(151);
/* BTS_Tests_LAPDm.ttcn, line 151 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(152);
/* BTS_Tests_LAPDm.ttcn, line 152 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__sabm__ua__dcch__sapi0);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_sabm_ua_dcch_sapi0 was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__sabm__ua__dcch__sapi0__nopayload(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 155, TTCN_Location::LOCATION_TESTCASE, "TC_sabm_ua_dcch_sapi0_nopayload");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_sabm_ua_dcch_sapi0_nopayload", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(156);
/* BTS_Tests_LAPDm.ttcn, line 156 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(157);
/* BTS_Tests_LAPDm.ttcn, line 157 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__sabm__ua__dcch__sapi0__nopayload);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_sabm_ua_dcch_sapi0_nopayload was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__sabm__ua__dcch__sapi3(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 160, TTCN_Location::LOCATION_TESTCASE, "TC_sabm_ua_dcch_sapi3");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_sabm_ua_dcch_sapi3", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(161);
/* BTS_Tests_LAPDm.ttcn, line 161 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(162);
/* BTS_Tests_LAPDm.ttcn, line 162 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__sabm__ua__dcch__sapi3);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_sabm_ua_dcch_sapi3 was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__sabm__ua__dcch__sapi4(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 165, TTCN_Location::LOCATION_TESTCASE, "TC_sabm_ua_dcch_sapi4");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_sabm_ua_dcch_sapi4", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(166);
/* BTS_Tests_LAPDm.ttcn, line 166 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(167);
/* BTS_Tests_LAPDm.ttcn, line 167 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__sabm__ua__dcch__sapi4);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_sabm_ua_dcch_sapi4 was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__sabm__contention(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 170, TTCN_Location::LOCATION_FUNCTION, "f_TC_sabm_contention");
current_location.update_lineno(171);
/* BTS_Tests_LAPDm.ttcn, line 171 */
LAPDm__RAW__PT::LAPDm__ph__data phd;
current_location.update_lineno(172);
/* BTS_Tests_LAPDm.ttcn, line 172 */
OCTETSTRING payload(os_2);
current_location.update_lineno(173);
/* BTS_Tests_LAPDm.ttcn, line 173 */
INTEGER sapi(0);
current_location.update_lineno(174);
/* BTS_Tests_LAPDm.ttcn, line 174 */
BOOLEAN use__sacch(FALSE);
current_location.update_lineno(175);
/* BTS_Tests_LAPDm.ttcn, line 175 */
TIMER T("T", 5.0);
current_location.update_lineno(177);
/* BTS_Tests_LAPDm.ttcn, line 177 */
fp__common__init();
current_location.update_lineno(178);
/* BTS_Tests_LAPDm.ttcn, line 178 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(179);
/* BTS_Tests_LAPDm.ttcn, line 179 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(182);
/* BTS_Tests_LAPDm.ttcn, line 182 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__SABM(0, LAPDm__Types::cr__MO__CMD, FALSE, os_2)), FALSE, NULL);
current_location.update_lineno(184);
/* BTS_Tests_LAPDm.ttcn, line 184 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__SABM(0, LAPDm__Types::cr__MO__CMD, FALSE, os_3)), FALSE, NULL);
current_location.update_lineno(185);
/* BTS_Tests_LAPDm.ttcn, line 185 */
T.start();
current_location.update_lineno(186);
/* BTS_Tests_LAPDm.ttcn, line 186 */
{
tmp_11:
alt_status tmp_11_alt_flag_0 = ALT_MAYBE;
alt_status tmp_11_alt_flag_1 = ALT_MAYBE;
alt_status tmp_11_alt_flag_2 = ALT_MAYBE;
alt_status tmp_11_alt_flag_3 = ALT_MAYBE;
alt_status tmp_11_alt_flag_4 = ALT_MAYBE;
alt_status tmp_11_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_11_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(187);
/* BTS_Tests_LAPDm.ttcn, line 187 */
tmp_11_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(ANY_VALUE), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__UA(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(FALSE), OCTETSTRING_template(os_2))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_11_alt_flag_0 == ALT_YES) {
current_location.update_lineno(187);
/* BTS_Tests_LAPDm.ttcn, line 187 */
TTCN_Runtime::setverdict(PASS);
current_location.update_lineno(187);
/* BTS_Tests_LAPDm.ttcn, line 187 */
goto tmp_11;
}
}
if (tmp_11_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(188);
/* BTS_Tests_LAPDm.ttcn, line 188 */
tmp_11_alt_flag_1 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(ANY_VALUE), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__UA(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(FALSE), OCTETSTRING_template(ANY_VALUE))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_11_alt_flag_1 == ALT_YES) {
current_location.update_lineno(189);
/* BTS_Tests_LAPDm.ttcn, line 189 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Second SABM was responded to during contention resolution"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_11_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(191);
/* BTS_Tests_LAPDm.ttcn, line 191 */
tmp_11_alt_flag_2 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(any_compref, NULL, NULL, NULL);
if (tmp_11_alt_flag_2 == ALT_YES) {
current_location.update_lineno(191);
/* BTS_Tests_LAPDm.ttcn, line 191 */
goto tmp_11;
}
}
if (tmp_11_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(192);
/* BTS_Tests_LAPDm.ttcn, line 192 */
tmp_11_alt_flag_3 = lapdm__test__CT_component_LAPDM.receive(any_compref, NULL, NULL, NULL);
if (tmp_11_alt_flag_3 == ALT_YES) {
current_location.update_lineno(192);
/* BTS_Tests_LAPDm.ttcn, line 192 */
goto tmp_11;
}
}
if (tmp_11_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(193);
/* BTS_Tests_LAPDm.ttcn, line 193 */
tmp_11_alt_flag_4 = T.timeout(NULL);
if (tmp_11_alt_flag_4 == ALT_YES) break;
}
if (tmp_11_default_flag == ALT_MAYBE) {
tmp_11_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_11_default_flag == ALT_YES || tmp_11_default_flag == ALT_BREAK) break;
else if (tmp_11_default_flag == ALT_REPEAT) goto tmp_11;
}
current_location.update_lineno(186);
/* BTS_Tests_LAPDm.ttcn, line 186 */
if (tmp_11_alt_flag_0 == ALT_NO && tmp_11_alt_flag_1 == ALT_NO && tmp_11_alt_flag_2 == ALT_NO && tmp_11_alt_flag_3 == ALT_NO && tmp_11_alt_flag_4 == ALT_NO && tmp_11_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 186 and 194.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(196);
/* BTS_Tests_LAPDm.ttcn, line 196 */
fp__common__fini();
}

void start_f__TC__sabm__contention(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_contention(");
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, "BTS_Tests_LAPDm", "f_TC_sabm_contention", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__sabm__contention(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 199, TTCN_Location::LOCATION_TESTCASE, "TC_sabm_contention");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_sabm_contention", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(200);
/* BTS_Tests_LAPDm.ttcn, line 200 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(201);
/* BTS_Tests_LAPDm.ttcn, line 201 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__sabm__contention);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_sabm_contention was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__sabm__retransmit(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 206, TTCN_Location::LOCATION_FUNCTION, "f_TC_sabm_retransmit");
current_location.update_lineno(207);
/* BTS_Tests_LAPDm.ttcn, line 207 */
OCTETSTRING payload(os_4);
current_location.update_lineno(208);
/* BTS_Tests_LAPDm.ttcn, line 208 */
fp__common__init();
current_location.update_lineno(209);
/* BTS_Tests_LAPDm.ttcn, line 209 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(210);
/* BTS_Tests_LAPDm.ttcn, line 210 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(211);
/* BTS_Tests_LAPDm.ttcn, line 211 */
DEFAULT d(activate_as__ignore__background(as__ignore__background_want__dcch_defval, as__ignore__background_ignore__rsl__errors_defval));
current_location.update_lineno(212);
/* BTS_Tests_LAPDm.ttcn, line 212 */
if ((!(f__test__sabm__results__in__ua(0, FALSE, os_4)))) {
current_location.update_lineno(213);
/* BTS_Tests_LAPDm.ttcn, line 213 */
TTCN_Runtime::setverdict(FAIL);
}
current_location.update_lineno(215);
/* BTS_Tests_LAPDm.ttcn, line 215 */
if ((!(f__test__sabm__results__in__ua(0, FALSE, os_4)))) {
current_location.update_lineno(216);
/* BTS_Tests_LAPDm.ttcn, line 216 */
TTCN_Runtime::setverdict(FAIL);
}
current_location.update_lineno(218);
/* BTS_Tests_LAPDm.ttcn, line 218 */
TTCN_Runtime::setverdict(PASS);
current_location.update_lineno(219);
/* BTS_Tests_LAPDm.ttcn, line 219 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(220);
/* BTS_Tests_LAPDm.ttcn, line 220 */
fp__common__fini();
}

void start_f__TC__sabm__retransmit(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_retransmit(");
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, "BTS_Tests_LAPDm", "f_TC_sabm_retransmit", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__sabm__retransmit(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 223, TTCN_Location::LOCATION_TESTCASE, "TC_sabm_retransmit");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_sabm_retransmit", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(224);
/* BTS_Tests_LAPDm.ttcn, line 224 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(225);
/* BTS_Tests_LAPDm.ttcn, line 225 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__sabm__retransmit);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_sabm_retransmit was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void fp__common__init()
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 232, TTCN_Location::LOCATION_FUNCTION, "fp_common_init");
current_location.update_lineno(235);
/* BTS_Tests_LAPDm.ttcn, line 235 */
{
Map_Params tmp_12(0);
TTCN_Runtime::unmap_port(self, BTS__Tests::ConnHdlr_component_L1CTL.get_name(), SYSTEM_COMPREF, "L1CTL", tmp_12);
}
current_location.update_lineno(236);
/* BTS_Tests_LAPDm.ttcn, line 236 */
f__lapdm__init();
current_location.update_lineno(239);
/* BTS_Tests_LAPDm.ttcn, line 239 */
{
boolean tmp_13;
tmp_13 = BTS__Tests::mp__freq__hop__enabled;
if (tmp_13) tmp_13 = (BTS__Tests::mp__transceiver__num > 1);
if (tmp_13) {
current_location.update_lineno(240);
/* BTS_Tests_LAPDm.ttcn, line 240 */
BTS__Tests::f__resolve__fh__params(BTS__Tests::ConnHdlr_component_g__pars.fhp(), INTEGER(const_cast< const BTS__Tests::ConnHdlrPars&>(BTS__Tests::ConnHdlr_component_g__pars).chan__nr().tn()), BTS__Tests::f__resolve__fh__params_trx__nr_defval);
}
}
current_location.update_lineno(244);
/* BTS_Tests_LAPDm.ttcn, line 244 */
BTS__Tests::f__rsl__chan__act(RSL__Types::RSL__IE__ChannelMode(const_cast< const BTS__Tests::ConnHdlrPars&>(BTS__Tests::ConnHdlr_component_g__pars).chan__mode()), FALSE, NULL_VALUE, BTS__Tests::f__rsl__chan__act_act__type_defval);
current_location.update_lineno(246);
/* BTS_Tests_LAPDm.ttcn, line 246 */
f__switch__dcch();
}

void start_fp__common__init(const COMPONENT& component_reference)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function fp_common_init(");
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, "BTS_Tests_LAPDm", "fp_common_init", text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void fp__common__fini()
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 249, TTCN_Location::LOCATION_FUNCTION, "fp_common_fini");
current_location.update_lineno(251);
/* BTS_Tests_LAPDm.ttcn, line 251 */
f__release__dcch();
current_location.update_lineno(252);
/* BTS_Tests_LAPDm.ttcn, line 252 */
BTS__Tests::f__rsl__chan__deact();
current_location.update_lineno(253);
/* BTS_Tests_LAPDm.ttcn, line 253 */
f__lapdm__exit();
}

void start_fp__common__fini(const COMPONENT& component_reference)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function fp_common_fini(");
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, "BTS_Tests_LAPDm", "fp_common_fini", text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__establish__mo(const GSM__Types::RslLinkId& link__id)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 257, TTCN_Location::LOCATION_FUNCTION, "f_establish_mo");
current_location.update_lineno(259);
/* BTS_Tests_LAPDm.ttcn, line 259 */
INTEGER sapi(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi());
current_location.update_lineno(260);
/* BTS_Tests_LAPDm.ttcn, line 260 */
BOOLEAN is__sacch(FALSE);
current_location.update_lineno(261);
/* BTS_Tests_LAPDm.ttcn, line 261 */
if ((const_cast< const GSM__Types::RslLinkId&>(link__id).c() == GSM__Types::RslLinkIdC::SACCH)) {
current_location.update_lineno(262);
/* BTS_Tests_LAPDm.ttcn, line 262 */
is__sacch = TRUE;
}
current_location.update_lineno(265);
/* BTS_Tests_LAPDm.ttcn, line 265 */
OCTETSTRING l3__mo(Osmocom__Types::f__rnd__octstring(5));
current_location.update_lineno(268);
/* BTS_Tests_LAPDm.ttcn, line 268 */
if (is__sacch) {
current_location.update_lineno(270);
/* BTS_Tests_LAPDm.ttcn, line 270 */
l3__mo = os_1;
current_location.update_lineno(271);
/* BTS_Tests_LAPDm.ttcn, line 271 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::ts__LAPDm__SABM(sapi, LAPDm__Types::cr__MO__CMD, TRUE, l3__mo)), FALSE, NULL);
current_location.update_lineno(272);
/* BTS_Tests_LAPDm.ttcn, line 272 */
{
tmp_16:
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 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__EST__IND__NOL3(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_16;
}
current_location.update_lineno(272);
/* BTS_Tests_LAPDm.ttcn, line 272 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 272.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
}
else {
current_location.update_lineno(274);
/* BTS_Tests_LAPDm.ttcn, line 274 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::ts__LAPDm__SABM(sapi, LAPDm__Types::cr__MO__CMD, TRUE, l3__mo)), FALSE, NULL);
current_location.update_lineno(275);
/* BTS_Tests_LAPDm.ttcn, line 275 */
{
tmp_17:
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 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__EST__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(l3__mo)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_17;
}
current_location.update_lineno(275);
/* BTS_Tests_LAPDm.ttcn, line 275 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 275.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
}
current_location.update_lineno(278);
/* BTS_Tests_LAPDm.ttcn, line 278 */
{
tmp_18:
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 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::tr__LAPDm__UA(INTEGER_template(sapi), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(TRUE), OCTETSTRING_template(l3__mo))), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_18;
}
current_location.update_lineno(278);
/* BTS_Tests_LAPDm.ttcn, line 278 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 278.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
}

void start_f__establish__mo(const COMPONENT& component_reference, const GSM__Types::RslLinkId& link__id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_establish_mo(");
link__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, "BTS_Tests_LAPDm", "f_establish_mo", text_buf);
link__id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__sabm__retransmit__bts(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 283, TTCN_Location::LOCATION_FUNCTION, "f_TC_sabm_retransmit_bts");
current_location.update_lineno(284);
/* BTS_Tests_LAPDm.ttcn, line 284 */
INTEGER sapi(3);
current_location.update_lineno(285);
/* BTS_Tests_LAPDm.ttcn, line 285 */
fp__common__init();
current_location.update_lineno(287);
/* BTS_Tests_LAPDm.ttcn, line 287 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(288);
/* BTS_Tests_LAPDm.ttcn, line 288 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.send(RSL__Types::ts__RSL__EST__REQ(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::ts__RslLinkID__DCCH(3)), FALSE, NULL);
current_location.update_lineno(290);
/* BTS_Tests_LAPDm.ttcn, line 290 */
TIMER T("T", 2.0e1);
current_location.update_lineno(291);
/* BTS_Tests_LAPDm.ttcn, line 291 */
INTEGER sabm__received(0);
current_location.update_lineno(292);
/* BTS_Tests_LAPDm.ttcn, line 292 */
T.start();
current_location.update_lineno(293);
/* BTS_Tests_LAPDm.ttcn, line 293 */
{
tmp_19:
alt_status tmp_19_alt_flag_0 = ALT_MAYBE;
alt_status tmp_19_alt_flag_1 = ALT_MAYBE;
alt_status tmp_19_alt_flag_2 = ALT_MAYBE;
alt_status tmp_19_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_19_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(294);
/* BTS_Tests_LAPDm.ttcn, line 294 */
tmp_19_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__SABM(INTEGER_template(3), BOOLEAN_template(ANY_VALUE), BOOLEAN_template(ANY_VALUE), OCTETSTRING_template(os_1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_19_alt_flag_0 == ALT_YES) {
current_location.update_lineno(295);
/* BTS_Tests_LAPDm.ttcn, line 295 */
{
INTEGER tmp_20;
++sabm__received;
}
current_location.update_lineno(296);
/* BTS_Tests_LAPDm.ttcn, line 296 */
goto tmp_19;
}
}
if (tmp_19_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(298);
/* BTS_Tests_LAPDm.ttcn, line 298 */
tmp_19_alt_flag_1 = lapdm__test__CT_component_LAPDM.receive(any_compref, NULL, NULL, NULL);
if (tmp_19_alt_flag_1 == ALT_YES) {
current_location.update_lineno(298);
/* BTS_Tests_LAPDm.ttcn, line 298 */
goto tmp_19;
}
}
if (tmp_19_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(299);
/* BTS_Tests_LAPDm.ttcn, line 299 */
tmp_19_alt_flag_2 = T.timeout(NULL);
if (tmp_19_alt_flag_2 == ALT_YES) break;
}
if (tmp_19_default_flag == ALT_MAYBE) {
tmp_19_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_19_default_flag == ALT_YES || tmp_19_default_flag == ALT_BREAK) break;
else if (tmp_19_default_flag == ALT_REPEAT) goto tmp_19;
}
current_location.update_lineno(293);
/* BTS_Tests_LAPDm.ttcn, line 293 */
if (tmp_19_alt_flag_0 == ALT_NO && tmp_19_alt_flag_1 == ALT_NO && tmp_19_alt_flag_2 == ALT_NO && tmp_19_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 293 and 300.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(301);
/* BTS_Tests_LAPDm.ttcn, line 301 */
if ((sabm__received == 0)) {
current_location.update_lineno(302);
/* BTS_Tests_LAPDm.ttcn, line 302 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("No SABM observed at all!"),TTCN_Logger::end_event_log2str()));
}
else {
current_location.update_lineno(303);
/* BTS_Tests_LAPDm.ttcn, line 303 */
if ((sabm__received != 6)) {
current_location.update_lineno(304);
/* BTS_Tests_LAPDm.ttcn, line 304 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Incorrect number of SABM re-transmissions of observed: "),sabm__received.log(),TTCN_Logger::end_event_log2str()));
}
else {
current_location.update_lineno(307);
/* BTS_Tests_LAPDm.ttcn, line 307 */
TTCN_Runtime::setverdict(PASS,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received "),sabm__received.log(),TTCN_Logger::log_event_str(" SABM"),TTCN_Logger::end_event_log2str()));
}
}
current_location.update_lineno(310);
/* BTS_Tests_LAPDm.ttcn, line 310 */
fp__common__fini();
}

void start_f__TC__sabm__retransmit__bts(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_retransmit_bts(");
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, "BTS_Tests_LAPDm", "f_TC_sabm_retransmit_bts", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__sabm__retransmit__bts(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 312, TTCN_Location::LOCATION_TESTCASE, "TC_sabm_retransmit_bts");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_sabm_retransmit_bts", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(313);
/* BTS_Tests_LAPDm.ttcn, line 313 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(314);
/* BTS_Tests_LAPDm.ttcn, line 314 */
pars.t__guard() = 3.0e1;
current_location.update_lineno(315);
/* BTS_Tests_LAPDm.ttcn, line 315 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__sabm__retransmit__bts);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_sabm_retransmit_bts was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__sabm__invalid__resp2(const CHARSTRING& , const LapdmNamedFrame& err__frame)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 327, TTCN_Location::LOCATION_FUNCTION, "f_TC_sabm_invalid_resp2");
current_location.update_lineno(328);
/* BTS_Tests_LAPDm.ttcn, line 328 */
INTEGER sapi(const_cast< const LapdmNamedFrame&>(err__frame).lapdm().ab().addr().sapi());
current_location.update_lineno(329);
/* BTS_Tests_LAPDm.ttcn, line 329 */
fp__common__init();
current_location.update_lineno(332);
/* BTS_Tests_LAPDm.ttcn, line 332 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(333);
/* BTS_Tests_LAPDm.ttcn, line 333 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.send(RSL__Types::ts__RSL__EST__REQ(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::ts__RslLinkID__DCCH(sapi)), FALSE, NULL);
current_location.update_lineno(334);
/* BTS_Tests_LAPDm.ttcn, line 334 */
{
tmp_22:
alt_status tmp_22_alt_flag_0 = ALT_MAYBE;
alt_status tmp_22_alt_flag_1 = ALT_MAYBE;
alt_status tmp_22_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_22_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(335);
/* BTS_Tests_LAPDm.ttcn, line 335 */
tmp_22_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__SABM(INTEGER_template(sapi), BOOLEAN_template(ANY_VALUE), BOOLEAN_template(ANY_VALUE), OCTETSTRING_template(os_1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_22_alt_flag_0 == ALT_YES) break;
}
if (tmp_22_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(336);
/* BTS_Tests_LAPDm.ttcn, line 336 */
tmp_22_alt_flag_1 = lapdm__test__CT_component_LAPDM.receive(any_compref, NULL, NULL, NULL);
if (tmp_22_alt_flag_1 == ALT_YES) {
current_location.update_lineno(336);
/* BTS_Tests_LAPDm.ttcn, line 336 */
goto tmp_22;
}
}
if (tmp_22_default_flag == ALT_MAYBE) {
tmp_22_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_22_default_flag == ALT_YES || tmp_22_default_flag == ALT_BREAK) break;
else if (tmp_22_default_flag == ALT_REPEAT) goto tmp_22;
}
current_location.update_lineno(334);
/* BTS_Tests_LAPDm.ttcn, line 334 */
if (tmp_22_alt_flag_0 == ALT_NO && tmp_22_alt_flag_1 == ALT_NO && tmp_22_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 334 and 337.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(340);
/* BTS_Tests_LAPDm.ttcn, line 340 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::LapdmFrame_template(const_cast< const LapdmNamedFrame&>(err__frame).lapdm())), FALSE, NULL);
current_location.update_lineno(343);
/* BTS_Tests_LAPDm.ttcn, line 343 */
TIMER T("T", 3.0);
current_location.update_lineno(344);
/* BTS_Tests_LAPDm.ttcn, line 344 */
T.start();
current_location.update_lineno(345);
/* BTS_Tests_LAPDm.ttcn, line 345 */
{
tmp_23:
alt_status tmp_23_alt_flag_0 = ALT_MAYBE;
alt_status tmp_23_alt_flag_1 = ALT_MAYBE;
alt_status tmp_23_alt_flag_2 = ALT_MAYBE;
alt_status tmp_23_alt_flag_3 = ALT_MAYBE;
alt_status tmp_23_alt_flag_4 = ALT_MAYBE;
alt_status tmp_23_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_23_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(346);
/* BTS_Tests_LAPDm.ttcn, line 346 */
tmp_23_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__SABM(INTEGER_template(sapi), BOOLEAN_template(ANY_VALUE), BOOLEAN_template(ANY_VALUE), OCTETSTRING_template(os_1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_23_alt_flag_0 == ALT_YES) {
current_location.update_lineno(347);
/* BTS_Tests_LAPDm.ttcn, line 347 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_23_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(349);
/* BTS_Tests_LAPDm.ttcn, line 349 */
tmp_23_alt_flag_1 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__UI(INTEGER_template(0), BOOLEAN_template(ANY_VALUE), OCTETSTRING_template(os_1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_23_alt_flag_1 == ALT_YES) {
current_location.update_lineno(349);
/* BTS_Tests_LAPDm.ttcn, line 349 */
goto tmp_23;
}
}
if (tmp_23_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(350);
/* BTS_Tests_LAPDm.ttcn, line 350 */
tmp_23_alt_flag_2 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::LapdmFrame_template(ANY_VALUE)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_23_alt_flag_2 == ALT_YES) {
current_location.update_lineno(351);
/* BTS_Tests_LAPDm.ttcn, line 351 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received unexpected LAPDm frame instead of SABM after sending "),const_cast< const LapdmNamedFrame&>(err__frame).name().log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_23_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(354);
/* BTS_Tests_LAPDm.ttcn, line 354 */
tmp_23_alt_flag_3 = lapdm__test__CT_component_LAPDM.receive(any_compref, NULL, NULL, NULL);
if (tmp_23_alt_flag_3 == ALT_YES) {
current_location.update_lineno(354);
/* BTS_Tests_LAPDm.ttcn, line 354 */
goto tmp_23;
}
}
if (tmp_23_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(355);
/* BTS_Tests_LAPDm.ttcn, line 355 */
tmp_23_alt_flag_4 = T.timeout(NULL);
if (tmp_23_alt_flag_4 == ALT_YES) {
current_location.update_lineno(356);
/* BTS_Tests_LAPDm.ttcn, line 356 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for SABM retransmission after sending "),const_cast< const LapdmNamedFrame&>(err__frame).name().log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_23_default_flag == ALT_MAYBE) {
tmp_23_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_23_default_flag == ALT_YES || tmp_23_default_flag == ALT_BREAK) break;
else if (tmp_23_default_flag == ALT_REPEAT) goto tmp_23;
}
current_location.update_lineno(345);
/* BTS_Tests_LAPDm.ttcn, line 345 */
if (tmp_23_alt_flag_0 == ALT_NO && tmp_23_alt_flag_1 == ALT_NO && tmp_23_alt_flag_2 == ALT_NO && tmp_23_alt_flag_3 == ALT_NO && tmp_23_alt_flag_4 == ALT_NO && tmp_23_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 345 and 359.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(361);
/* BTS_Tests_LAPDm.ttcn, line 361 */
fp__common__fini();
}

void start_f__TC__sabm__invalid__resp2(const COMPONENT& component_reference, const CHARSTRING& id, const LapdmNamedFrame& err__frame)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_invalid_resp2(");
id.log();
TTCN_Logger::log_event_str(", ");
err__frame.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, "BTS_Tests_LAPDm", "f_TC_sabm_invalid_resp2", text_buf);
id.encode_text(text_buf);
err__frame.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__sabm__invalid__resp(const CHARSTRING& id)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 363, TTCN_Location::LOCATION_FUNCTION, "f_TC_sabm_invalid_resp");
current_location.update_lineno(364);
/* BTS_Tests_LAPDm.ttcn, line 364 */
INTEGER sapi(3);
current_location.update_lineno(365);
/* BTS_Tests_LAPDm.ttcn, line 365 */
VALUE_ARRAY<LapdmNamedFrame, 3, 0> err__frame;
{
LapdmNamedFrame& tmp_24 = err__frame[0];
tmp_24.name() = cs_0;
tmp_24.lapdm() = LAPDm__Types::ts__LAPDm__I(3, LAPDm__Types::cr__MO__CMD, TRUE, 0, 0, os_5, LAPDm__Types::ts__LAPDm__I_m_defval).valueof();
}
{
LapdmNamedFrame& tmp_25 = err__frame[1];
tmp_25.name() = cs_1;
tmp_25.lapdm() = LAPDm__Types::ts__LAPDm__RR(3, LAPDm__Types::cr__MO__CMD, TRUE, 0).valueof();
}
{
LapdmNamedFrame& tmp_26 = err__frame[2];
tmp_26.name() = cs_2;
tmp_26.lapdm() = LAPDm__Types::ts__LAPDm__REJ(3, LAPDm__Types::cr__MO__CMD, TRUE, 0).valueof();
}
current_location.update_lineno(371);
/* BTS_Tests_LAPDm.ttcn, line 371 */
INTEGER i;
current_location.update_lineno(373);
/* BTS_Tests_LAPDm.ttcn, line 373 */
i = 0;
current_location.update_lineno(373);
/* BTS_Tests_LAPDm.ttcn, line 373 */
for ( ; ; ) {
current_location.update_lineno(373);
/* BTS_Tests_LAPDm.ttcn, line 373 */
if (!(i < err__frame.lengthof())) break;
current_location.update_lineno(374);
/* BTS_Tests_LAPDm.ttcn, line 374 */
f__TC__sabm__invalid__resp2(id, const_cast< const VALUE_ARRAY<LapdmNamedFrame, 3, 0>&>(err__frame)[i]);
current_location.update_lineno(373);
/* BTS_Tests_LAPDm.ttcn, line 373 */
{
INTEGER tmp_28;
++i;
}
}
}

void start_f__TC__sabm__invalid__resp(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_invalid_resp(");
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, "BTS_Tests_LAPDm", "f_TC_sabm_invalid_resp", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__sabm__invalid__resp(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 377, TTCN_Location::LOCATION_TESTCASE, "TC_sabm_invalid_resp");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_sabm_invalid_resp", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(378);
/* BTS_Tests_LAPDm.ttcn, line 378 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(379);
/* BTS_Tests_LAPDm.ttcn, line 379 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__sabm__invalid__resp);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_sabm_invalid_resp was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__sabm__dm(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 384, TTCN_Location::LOCATION_FUNCTION, "f_TC_sabm_dm");
current_location.update_lineno(385);
/* BTS_Tests_LAPDm.ttcn, line 385 */
INTEGER sapi(3);
current_location.update_lineno(386);
/* BTS_Tests_LAPDm.ttcn, line 386 */
fp__common__init();
current_location.update_lineno(389);
/* BTS_Tests_LAPDm.ttcn, line 389 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(390);
/* BTS_Tests_LAPDm.ttcn, line 390 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.send(RSL__Types::ts__RSL__EST__REQ(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::ts__RslLinkID__DCCH(3)), FALSE, NULL);
current_location.update_lineno(391);
/* BTS_Tests_LAPDm.ttcn, line 391 */
{
tmp_29:
alt_status tmp_29_alt_flag_0 = ALT_MAYBE;
alt_status tmp_29_alt_flag_1 = ALT_MAYBE;
alt_status tmp_29_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_29_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(392);
/* BTS_Tests_LAPDm.ttcn, line 392 */
tmp_29_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__SABM(INTEGER_template(3), BOOLEAN_template(ANY_VALUE), BOOLEAN_template(ANY_VALUE), OCTETSTRING_template(os_1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_29_alt_flag_0 == ALT_YES) break;
}
if (tmp_29_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(393);
/* BTS_Tests_LAPDm.ttcn, line 393 */
tmp_29_alt_flag_1 = lapdm__test__CT_component_LAPDM.receive(any_compref, NULL, NULL, NULL);
if (tmp_29_alt_flag_1 == ALT_YES) {
current_location.update_lineno(393);
/* BTS_Tests_LAPDm.ttcn, line 393 */
goto tmp_29;
}
}
if (tmp_29_default_flag == ALT_MAYBE) {
tmp_29_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_29_default_flag == ALT_YES || tmp_29_default_flag == ALT_BREAK) break;
else if (tmp_29_default_flag == ALT_REPEAT) goto tmp_29;
}
current_location.update_lineno(391);
/* BTS_Tests_LAPDm.ttcn, line 391 */
if (tmp_29_alt_flag_0 == ALT_NO && tmp_29_alt_flag_1 == ALT_NO && tmp_29_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 391 and 394.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(397);
/* BTS_Tests_LAPDm.ttcn, line 397 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(398);
/* BTS_Tests_LAPDm.ttcn, line 398 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__DM(3, LAPDm__Types::cr__MO__RSP, TRUE)), FALSE, NULL);
current_location.update_lineno(399);
/* BTS_Tests_LAPDm.ttcn, line 399 */
{
tmp_30:
alt_status tmp_30_alt_flag_0 = ALT_MAYBE;
alt_status tmp_30_alt_flag_1 = ALT_MAYBE;
alt_status tmp_30_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_30_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(400);
/* BTS_Tests_LAPDm.ttcn, line 400 */
tmp_30_alt_flag_0 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__REL__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::tr__RslLinkID__DCCH(INTEGER_template(3))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_30_alt_flag_0 == ALT_YES) break;
}
if (tmp_30_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(401);
/* BTS_Tests_LAPDm.ttcn, line 401 */
tmp_30_alt_flag_1 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(any_compref, NULL, NULL, NULL);
if (tmp_30_alt_flag_1 == ALT_YES) {
current_location.update_lineno(401);
/* BTS_Tests_LAPDm.ttcn, line 401 */
goto tmp_30;
}
}
if (tmp_30_default_flag == ALT_MAYBE) {
tmp_30_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_30_default_flag == ALT_YES || tmp_30_default_flag == ALT_BREAK) break;
else if (tmp_30_default_flag == ALT_REPEAT) goto tmp_30;
}
current_location.update_lineno(399);
/* BTS_Tests_LAPDm.ttcn, line 399 */
if (tmp_30_alt_flag_0 == ALT_NO && tmp_30_alt_flag_1 == ALT_NO && tmp_30_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 399 and 402.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(405);
/* BTS_Tests_LAPDm.ttcn, line 405 */
TIMER T("T", 3.0);
current_location.update_lineno(406);
/* BTS_Tests_LAPDm.ttcn, line 406 */
T.start();
current_location.update_lineno(407);
/* BTS_Tests_LAPDm.ttcn, line 407 */
{
tmp_31:
alt_status tmp_31_alt_flag_0 = ALT_MAYBE;
alt_status tmp_31_alt_flag_1 = ALT_MAYBE;
alt_status tmp_31_alt_flag_2 = ALT_MAYBE;
alt_status tmp_31_alt_flag_3 = ALT_MAYBE;
alt_status tmp_31_alt_flag_4 = ALT_MAYBE;
alt_status tmp_31_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_31_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(408);
/* BTS_Tests_LAPDm.ttcn, line 408 */
tmp_31_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__SABM(INTEGER_template(3), BOOLEAN_template(ANY_VALUE), BOOLEAN_template(ANY_VALUE), OCTETSTRING_template(os_1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_31_alt_flag_0 == ALT_YES) {
current_location.update_lineno(409);
/* BTS_Tests_LAPDm.ttcn, line 409 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received unexpected SABM retransmission"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_31_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(411);
/* BTS_Tests_LAPDm.ttcn, line 411 */
tmp_31_alt_flag_1 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__UI(INTEGER_template(0), BOOLEAN_template(ANY_VALUE), OCTETSTRING_template(os_1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_31_alt_flag_1 == ALT_YES) {
current_location.update_lineno(411);
/* BTS_Tests_LAPDm.ttcn, line 411 */
goto tmp_31;
}
}
if (tmp_31_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(412);
/* BTS_Tests_LAPDm.ttcn, line 412 */
tmp_31_alt_flag_2 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::LapdmFrame_template(ANY_VALUE)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_31_alt_flag_2 == ALT_YES) {
current_location.update_lineno(413);
/* BTS_Tests_LAPDm.ttcn, line 413 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received unexpected LAPDm frame"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_31_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(415);
/* BTS_Tests_LAPDm.ttcn, line 415 */
tmp_31_alt_flag_3 = lapdm__test__CT_component_LAPDM.receive(any_compref, NULL, NULL, NULL);
if (tmp_31_alt_flag_3 == ALT_YES) {
current_location.update_lineno(415);
/* BTS_Tests_LAPDm.ttcn, line 415 */
goto tmp_31;
}
}
if (tmp_31_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(416);
/* BTS_Tests_LAPDm.ttcn, line 416 */
tmp_31_alt_flag_4 = T.timeout(NULL);
if (tmp_31_alt_flag_4 == ALT_YES) {
current_location.update_lineno(417);
/* BTS_Tests_LAPDm.ttcn, line 417 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_31_default_flag == ALT_MAYBE) {
tmp_31_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_31_default_flag == ALT_YES || tmp_31_default_flag == ALT_BREAK) break;
else if (tmp_31_default_flag == ALT_REPEAT) goto tmp_31;
}
current_location.update_lineno(407);
/* BTS_Tests_LAPDm.ttcn, line 407 */
if (tmp_31_alt_flag_0 == ALT_NO && tmp_31_alt_flag_1 == ALT_NO && tmp_31_alt_flag_2 == ALT_NO && tmp_31_alt_flag_3 == ALT_NO && tmp_31_alt_flag_4 == ALT_NO && tmp_31_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 407 and 419.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(421);
/* BTS_Tests_LAPDm.ttcn, line 421 */
fp__common__fini();
}

void start_f__TC__sabm__dm(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_dm(");
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, "BTS_Tests_LAPDm", "f_TC_sabm_dm", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__sabm__dm(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 423, TTCN_Location::LOCATION_TESTCASE, "TC_sabm_dm");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_sabm_dm", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(424);
/* BTS_Tests_LAPDm.ttcn, line 424 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(425);
/* BTS_Tests_LAPDm.ttcn, line 425 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__sabm__dm);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_sabm_dm was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__establish__ign__first__sabm(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 431, TTCN_Location::LOCATION_FUNCTION, "f_TC_establish_ign_first_sabm");
current_location.update_lineno(432);
/* BTS_Tests_LAPDm.ttcn, line 432 */
INTEGER sapi(3);
current_location.update_lineno(433);
/* BTS_Tests_LAPDm.ttcn, line 433 */
INTEGER num__sabm(0);
current_location.update_lineno(434);
/* BTS_Tests_LAPDm.ttcn, line 434 */
GSM__Types::RslLinkId link__id(GSM__Types::ts__RslLinkID__DCCH(3).valueof());
current_location.update_lineno(435);
/* BTS_Tests_LAPDm.ttcn, line 435 */
TIMER T("T", 3.0);
current_location.update_lineno(437);
/* BTS_Tests_LAPDm.ttcn, line 437 */
fp__common__init();
current_location.update_lineno(440);
/* BTS_Tests_LAPDm.ttcn, line 440 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(441);
/* BTS_Tests_LAPDm.ttcn, line 441 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.send(RSL__Types::ts__RSL__EST__REQ(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id)), FALSE, NULL);
current_location.update_lineno(443);
/* BTS_Tests_LAPDm.ttcn, line 443 */
T.start();
current_location.update_lineno(444);
/* BTS_Tests_LAPDm.ttcn, line 444 */
{
tmp_32:
alt_status tmp_32_alt_flag_0 = ALT_MAYBE;
alt_status tmp_32_alt_flag_1 = ALT_MAYBE;
alt_status tmp_32_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_32_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(445);
/* BTS_Tests_LAPDm.ttcn, line 445 */
tmp_32_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__SABM(INTEGER_template(3), BOOLEAN_template(ANY_VALUE), BOOLEAN_template(ANY_VALUE), OCTETSTRING_template(os_1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_32_alt_flag_0 == ALT_YES) {
current_location.update_lineno(446);
/* BTS_Tests_LAPDm.ttcn, line 446 */
{
INTEGER tmp_33;
++num__sabm;
}
current_location.update_lineno(447);
/* BTS_Tests_LAPDm.ttcn, line 447 */
if ((num__sabm < 2)) {
current_location.update_lineno(448);
/* BTS_Tests_LAPDm.ttcn, line 448 */
goto tmp_32;
}
break;
}
}
if (tmp_32_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(451);
/* BTS_Tests_LAPDm.ttcn, line 451 */
tmp_32_alt_flag_1 = lapdm__test__CT_component_LAPDM.receive(any_compref, NULL, NULL, NULL);
if (tmp_32_alt_flag_1 == ALT_YES) {
current_location.update_lineno(451);
/* BTS_Tests_LAPDm.ttcn, line 451 */
goto tmp_32;
}
}
if (tmp_32_default_flag == ALT_MAYBE) {
tmp_32_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_32_default_flag == ALT_YES || tmp_32_default_flag == ALT_BREAK) break;
else if (tmp_32_default_flag == ALT_REPEAT) goto tmp_32;
}
current_location.update_lineno(444);
/* BTS_Tests_LAPDm.ttcn, line 444 */
if (tmp_32_alt_flag_0 == ALT_NO && tmp_32_alt_flag_1 == ALT_NO && tmp_32_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 444 and 452.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(455);
/* BTS_Tests_LAPDm.ttcn, line 455 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(456);
/* BTS_Tests_LAPDm.ttcn, line 456 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__UA(3, LAPDm__Types::cr__MO__RSP, TRUE, os_1)), FALSE, NULL);
current_location.update_lineno(457);
/* BTS_Tests_LAPDm.ttcn, line 457 */
{
tmp_34:
alt_status tmp_34_alt_flag_0 = ALT_MAYBE;
alt_status tmp_34_alt_flag_1 = ALT_MAYBE;
alt_status tmp_34_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_34_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(458);
/* BTS_Tests_LAPDm.ttcn, line 458 */
tmp_34_alt_flag_0 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__EST__CONF(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_34_alt_flag_0 == ALT_YES) break;
}
if (tmp_34_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(459);
/* BTS_Tests_LAPDm.ttcn, line 459 */
tmp_34_alt_flag_1 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(any_compref, NULL, NULL, NULL);
if (tmp_34_alt_flag_1 == ALT_YES) {
current_location.update_lineno(459);
/* BTS_Tests_LAPDm.ttcn, line 459 */
goto tmp_34;
}
}
if (tmp_34_default_flag == ALT_MAYBE) {
tmp_34_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_34_default_flag == ALT_YES || tmp_34_default_flag == ALT_BREAK) break;
else if (tmp_34_default_flag == ALT_REPEAT) goto tmp_34;
}
current_location.update_lineno(457);
/* BTS_Tests_LAPDm.ttcn, line 457 */
if (tmp_34_alt_flag_0 == ALT_NO && tmp_34_alt_flag_1 == ALT_NO && tmp_34_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 457 and 460.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(463);
/* BTS_Tests_LAPDm.ttcn, line 463 */
OCTETSTRING l3(Osmocom__Types::f__rnd__octstring(10));
current_location.update_lineno(464);
/* BTS_Tests_LAPDm.ttcn, line 464 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.send(RSL__Types::ts__RSL__DATA__REQ(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), l3), FALSE, NULL);
current_location.update_lineno(465);
/* BTS_Tests_LAPDm.ttcn, line 465 */
{
tmp_35:
alt_status tmp_35_alt_flag_0 = ALT_MAYBE;
alt_status tmp_35_alt_flag_1 = ALT_MAYBE;
alt_status tmp_35_alt_flag_2 = ALT_MAYBE;
alt_status tmp_35_alt_flag_3 = ALT_MAYBE;
alt_status tmp_35_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_35_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(466);
/* BTS_Tests_LAPDm.ttcn, line 466 */
tmp_35_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__I(INTEGER_template(3), BOOLEAN_template(LAPDm__Types::cr__MT__CMD), BOOLEAN_template(FALSE), INTEGER_template(0), INTEGER_template(0), OCTETSTRING_template(l3), LAPDm__Types::tr__LAPDm__I_m_defval)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_35_alt_flag_0 == ALT_YES) break;
}
if (tmp_35_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(468);
/* BTS_Tests_LAPDm.ttcn, line 468 */
tmp_35_alt_flag_1 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__UI(INTEGER_template(0), BOOLEAN_template(ANY_VALUE), OCTETSTRING_template(os_1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_35_alt_flag_1 == ALT_YES) {
current_location.update_lineno(468);
/* BTS_Tests_LAPDm.ttcn, line 468 */
goto tmp_35;
}
}
if (tmp_35_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(469);
/* BTS_Tests_LAPDm.ttcn, line 469 */
tmp_35_alt_flag_2 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(TRUE), LAPDm__Types::LapdmFrame_template(ANY_VALUE)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_35_alt_flag_2 == ALT_YES) {
current_location.update_lineno(469);
/* BTS_Tests_LAPDm.ttcn, line 469 */
goto tmp_35;
}
}
if (tmp_35_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(470);
/* BTS_Tests_LAPDm.ttcn, line 470 */
tmp_35_alt_flag_3 = lapdm__test__CT_component_LAPDM.receive(any_compref, NULL, NULL, NULL);
if (tmp_35_alt_flag_3 == ALT_YES) {
current_location.update_lineno(470);
/* BTS_Tests_LAPDm.ttcn, line 470 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected LAPDm received"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_35_default_flag == ALT_MAYBE) {
tmp_35_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_35_default_flag == ALT_YES || tmp_35_default_flag == ALT_BREAK) break;
else if (tmp_35_default_flag == ALT_REPEAT) goto tmp_35;
}
current_location.update_lineno(465);
/* BTS_Tests_LAPDm.ttcn, line 465 */
if (tmp_35_alt_flag_0 == ALT_NO && tmp_35_alt_flag_1 == ALT_NO && tmp_35_alt_flag_2 == ALT_NO && tmp_35_alt_flag_3 == ALT_NO && tmp_35_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 465 and 471.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(473);
/* BTS_Tests_LAPDm.ttcn, line 473 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__RR(3, LAPDm__Types::cr__MO__RSP, FALSE, 1)), FALSE, NULL);
current_location.update_lineno(476);
/* BTS_Tests_LAPDm.ttcn, line 476 */
{
tmp_36:
alt_status tmp_36_alt_flag_0 = ALT_MAYBE;
alt_status tmp_36_alt_flag_1 = ALT_MAYBE;
alt_status tmp_36_alt_flag_2 = ALT_MAYBE;
alt_status tmp_36_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_36_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(477);
/* BTS_Tests_LAPDm.ttcn, line 477 */
tmp_36_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__UI(INTEGER_template(0), BOOLEAN_template(ANY_VALUE), OCTETSTRING_template(os_1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_36_alt_flag_0 == ALT_YES) {
current_location.update_lineno(478);
/* BTS_Tests_LAPDm.ttcn, line 478 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_36_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(480);
/* BTS_Tests_LAPDm.ttcn, line 480 */
tmp_36_alt_flag_1 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(TRUE), LAPDm__Types::LapdmFrame_template(ANY_VALUE)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_36_alt_flag_1 == ALT_YES) {
current_location.update_lineno(480);
/* BTS_Tests_LAPDm.ttcn, line 480 */
goto tmp_36;
}
}
if (tmp_36_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(481);
/* BTS_Tests_LAPDm.ttcn, line 481 */
tmp_36_alt_flag_2 = lapdm__test__CT_component_LAPDM.receive(any_compref, NULL, NULL, NULL);
if (tmp_36_alt_flag_2 == ALT_YES) {
current_location.update_lineno(481);
/* BTS_Tests_LAPDm.ttcn, line 481 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unexpected LAPDm received"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_36_default_flag == ALT_MAYBE) {
tmp_36_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_36_default_flag == ALT_YES || tmp_36_default_flag == ALT_BREAK) break;
else if (tmp_36_default_flag == ALT_REPEAT) goto tmp_36;
}
current_location.update_lineno(476);
/* BTS_Tests_LAPDm.ttcn, line 476 */
if (tmp_36_alt_flag_0 == ALT_NO && tmp_36_alt_flag_1 == ALT_NO && tmp_36_alt_flag_2 == ALT_NO && tmp_36_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 476 and 482.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(484);
/* BTS_Tests_LAPDm.ttcn, line 484 */
fp__common__fini();
}

void start_f__TC__establish__ign__first__sabm(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_establish_ign_first_sabm(");
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, "BTS_Tests_LAPDm", "f_TC_establish_ign_first_sabm", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__establish__ign__first__sabm(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 486, TTCN_Location::LOCATION_TESTCASE, "TC_establish_ign_first_sabm");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_establish_ign_first_sabm", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(487);
/* BTS_Tests_LAPDm.ttcn, line 487 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(488);
/* BTS_Tests_LAPDm.ttcn, line 488 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__establish__ign__first__sabm);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_establish_ign_first_sabm was stopped.");
}
return TTCN_Runtime::end_testcase();
}

alt_status as__lapdm__acch_instance(boolean first_alt_run)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 492, TTCN_Location::LOCATION_ALTSTEP, "as_lapdm_acch");
alt_status ret_val = ALT_NO;
current_location.update_lineno(493);
/* BTS_Tests_LAPDm.ttcn, line 493 */
switch (lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(TRUE), LAPDm__Types::LapdmFrame_template(ANY_VALUE)), NULL, any_compref, NULL, NULL, NULL)) {
case ALT_YES:
{
current_location.update_lineno(493);
/* BTS_Tests_LAPDm.ttcn, line 493 */
return ALT_REPEAT;
}
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
return ret_val;
}

void as__lapdm__acch(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__lapdm__acch_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_lapdm_acch.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__lapdm__acch()
{
return new as__lapdm__acch_Default();
}

alt_status as__lapdm__dcch_instance(boolean first_alt_run)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 496, TTCN_Location::LOCATION_ALTSTEP, "as_lapdm_dcch");
alt_status ret_val = ALT_NO;
current_location.update_lineno(497);
/* BTS_Tests_LAPDm.ttcn, line 497 */
switch (lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::LapdmFrame_template(ANY_VALUE)), NULL, any_compref, NULL, NULL, NULL)) {
case ALT_YES:
{
current_location.update_lineno(497);
/* BTS_Tests_LAPDm.ttcn, line 497 */
return ALT_REPEAT;
}
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
return ret_val;
}

void as__lapdm__dcch(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__lapdm__dcch_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_lapdm_dcch.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__lapdm__dcch()
{
return new as__lapdm__dcch_Default();
}

alt_status as__lapdm__idle_instance(boolean first_alt_run)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 500, TTCN_Location::LOCATION_ALTSTEP, "as_lapdm_idle");
alt_status ret_val = ALT_NO;
current_location.update_lineno(501);
/* BTS_Tests_LAPDm.ttcn, line 501 */
switch (lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(ANY_VALUE), LAPDm__Types::tr__LAPDm__UI(INTEGER_template(ANY_VALUE), BOOLEAN_template(ANY_VALUE), OCTETSTRING_template(os_1))), NULL, any_compref, NULL, NULL, NULL)) {
case ALT_YES:
{
current_location.update_lineno(501);
/* BTS_Tests_LAPDm.ttcn, line 501 */
return ALT_REPEAT;
}
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
return ret_val;
}

void as__lapdm__idle(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__lapdm__idle_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_lapdm_idle.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__lapdm__idle()
{
return new as__lapdm__idle_Default();
}

alt_status as__rsl__meas__rep_instance(boolean first_alt_run)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 504, TTCN_Location::LOCATION_ALTSTEP, "as_rsl_meas_rep");
alt_status ret_val = ALT_NO;
current_location.update_lineno(505);
/* BTS_Tests_LAPDm.ttcn, line 505 */
switch (RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__MEAS__RES(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), RSL__Types::tr__RSL__MEAS__RES_meas__res__nr_defval, RSL__Types::tr__RSL__MEAS__RES_ul__meas_defval, RSL__Types::tr__RSL__MEAS__RES_bs__power_defval), NULL, any_compref, NULL, NULL, NULL)) {
case ALT_YES:
{
current_location.update_lineno(505);
/* BTS_Tests_LAPDm.ttcn, line 505 */
return ALT_REPEAT;
}
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
return ret_val;
}

void as__rsl__meas__rep(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__rsl__meas__rep_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_rsl_meas_rep.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__rsl__meas__rep()
{
return new as__rsl__meas__rep_Default();
}

alt_status as__rsl__fail__err_instance(boolean first_alt_run)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 508, TTCN_Location::LOCATION_ALTSTEP, "as_rsl_fail_err");
current_location.update_lineno(509);
/* BTS_Tests_LAPDm.ttcn, line 509 */
RSL__Types::RSL__Message rx__rsl;
alt_status ret_val = ALT_NO;
current_location.update_lineno(510);
/* BTS_Tests_LAPDm.ttcn, line 510 */
switch (RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__ERROR__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(ANY_VALUE), OCTETSTRING_template(ANY_VALUE)), NULL, any_compref, NULL, NULL, NULL)) {
case ALT_YES:
{
current_location.update_lineno(511);
/* BTS_Tests_LAPDm.ttcn, line 511 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received RSL ERROR IND "),rx__rsl.log(),TTCN_Logger::end_event_log2str()));
}
return ALT_YES;
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
return ret_val;
}

void as__rsl__fail__err(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__rsl__fail__err_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_rsl_fail_err.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__rsl__fail__err()
{
return new as__rsl__fail__err_Default();
}

alt_status as__ignore__background_instance(const BOOLEAN& want__dcch, const BOOLEAN& ignore__rsl__errors, boolean first_alt_run)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 515, TTCN_Location::LOCATION_ALTSTEP, "as_ignore_background");
alt_status ret_val = ALT_NO;
current_location.update_lineno(516);
/* BTS_Tests_LAPDm.ttcn, line 516 */
static boolean guard_expr_0 = FALSE;
if (first_alt_run) {
guard_expr_0 = want__dcch;
}
if (guard_expr_0) {
current_location.update_lineno(516);
/* BTS_Tests_LAPDm.ttcn, line 516 */
switch (as__lapdm__acch_instance(first_alt_run)) {
case ALT_YES:
return ALT_YES;
case ALT_REPEAT:
return ALT_REPEAT;
case ALT_BREAK:
return ALT_BREAK;
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
}
current_location.update_lineno(517);
/* BTS_Tests_LAPDm.ttcn, line 517 */
static boolean guard_expr_1 = FALSE;
if (first_alt_run) {
guard_expr_1 = (!(want__dcch));
}
if (guard_expr_1) {
current_location.update_lineno(517);
/* BTS_Tests_LAPDm.ttcn, line 517 */
switch (as__lapdm__dcch_instance(first_alt_run)) {
case ALT_YES:
return ALT_YES;
case ALT_REPEAT:
return ALT_REPEAT;
case ALT_BREAK:
return ALT_BREAK;
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
}
current_location.update_lineno(518);
/* BTS_Tests_LAPDm.ttcn, line 518 */
switch (as__lapdm__idle_instance(first_alt_run)) {
case ALT_YES:
return ALT_YES;
case ALT_REPEAT:
return ALT_REPEAT;
case ALT_BREAK:
return ALT_BREAK;
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
current_location.update_lineno(519);
/* BTS_Tests_LAPDm.ttcn, line 519 */
switch (as__rsl__meas__rep_instance(first_alt_run)) {
case ALT_YES:
return ALT_YES;
case ALT_REPEAT:
return ALT_REPEAT;
case ALT_BREAK:
return ALT_BREAK;
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
current_location.update_lineno(520);
/* BTS_Tests_LAPDm.ttcn, line 520 */
static boolean guard_expr_4 = FALSE;
if (first_alt_run) {
guard_expr_4 = (!(ignore__rsl__errors));
}
if (guard_expr_4) {
current_location.update_lineno(520);
/* BTS_Tests_LAPDm.ttcn, line 520 */
switch (as__rsl__fail__err_instance(first_alt_run)) {
case ALT_YES:
return ALT_YES;
case ALT_REPEAT:
return ALT_REPEAT;
case ALT_BREAK:
return ALT_BREAK;
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
}
current_location.update_lineno(521);
/* BTS_Tests_LAPDm.ttcn, line 521 */
static boolean guard_expr_5 = FALSE;
if (first_alt_run) {
guard_expr_5 = ignore__rsl__errors;
}
if (guard_expr_5) {
current_location.update_lineno(521);
/* BTS_Tests_LAPDm.ttcn, line 521 */
switch (RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__ERROR__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(ANY_VALUE), OCTETSTRING_template(ANY_VALUE)), NULL, any_compref, NULL, NULL, NULL)) {
case ALT_YES:
{
current_location.update_lineno(521);
/* BTS_Tests_LAPDm.ttcn, line 521 */
return ALT_REPEAT;
}
case ALT_MAYBE:
ret_val = ALT_MAYBE;
default:
break;
}
}
return ret_val;
}

void as__ignore__background(boolean nodefault_modifier, const BOOLEAN& want__dcch, const BOOLEAN& ignore__rsl__errors)
{
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__ignore__background_instance(want__dcch, ignore__rsl__errors, !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_ignore_background.");
else block_flag = TRUE;
}
}

Default_Base *activate_as__ignore__background(const BOOLEAN& want__dcch, const BOOLEAN& ignore__rsl__errors)
{
return new as__ignore__background_Default(want__dcch, ignore__rsl__errors);
}

void f__TC__iframe__seq__and__ack(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 526, TTCN_Location::LOCATION_FUNCTION, "f_TC_iframe_seq_and_ack");
current_location.update_lineno(527);
/* BTS_Tests_LAPDm.ttcn, line 527 */
INTEGER sapi(0);
current_location.update_lineno(528);
/* BTS_Tests_LAPDm.ttcn, line 528 */
GSM__Types::RslLinkId link__id(GSM__Types::ts__RslLinkID__DCCH(0).valueof());
current_location.update_lineno(529);
/* BTS_Tests_LAPDm.ttcn, line 529 */
OCTETSTRING l3(Osmocom__Types::f__rnd__octstring(18));
current_location.update_lineno(530);
/* BTS_Tests_LAPDm.ttcn, line 530 */
DEFAULT d;
current_location.update_lineno(531);
/* BTS_Tests_LAPDm.ttcn, line 531 */
TIMER T("T", 3.0);
current_location.update_lineno(533);
/* BTS_Tests_LAPDm.ttcn, line 533 */
fp__common__init();
current_location.update_lineno(536);
/* BTS_Tests_LAPDm.ttcn, line 536 */
d = activate_as__ignore__background(as__ignore__background_want__dcch_defval, as__ignore__background_ignore__rsl__errors_defval);
current_location.update_lineno(537);
/* BTS_Tests_LAPDm.ttcn, line 537 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(538);
/* BTS_Tests_LAPDm.ttcn, line 538 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(540);
/* BTS_Tests_LAPDm.ttcn, line 540 */
f__establish__mo(link__id);
current_location.update_lineno(542);
/* BTS_Tests_LAPDm.ttcn, line 542 */
INTEGER last__ns__rx(0);
{
current_location.update_lineno(544);
/* BTS_Tests_LAPDm.ttcn, line 544 */
INTEGER i(0);
current_location.update_lineno(544);
/* BTS_Tests_LAPDm.ttcn, line 544 */
for ( ; ; ) {
current_location.update_lineno(544);
/* BTS_Tests_LAPDm.ttcn, line 544 */
if (!(i < 10)) break;
current_location.update_lineno(545);
/* BTS_Tests_LAPDm.ttcn, line 545 */
OCTETSTRING l3__mo(Osmocom__Types::f__rnd__octstring(12));
current_location.update_lineno(546);
/* BTS_Tests_LAPDm.ttcn, line 546 */
OCTETSTRING l3__mt(Osmocom__Types::f__rnd__octstring(12));
current_location.update_lineno(547);
/* BTS_Tests_LAPDm.ttcn, line 547 */
LAPDm__RAW__PT::LAPDm__ph__data pd;
current_location.update_lineno(549);
/* BTS_Tests_LAPDm.ttcn, line 549 */
try {
TTCN_Logger::begin_event(TTCN_USER);
TTCN_Logger::log_event_str("Starting iteration ");
i.log();
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
current_location.update_lineno(551);
/* BTS_Tests_LAPDm.ttcn, line 551 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.send(RSL__Types::ts__RSL__DATA__REQ(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), l3__mt), FALSE, NULL);
current_location.update_lineno(552);
/* BTS_Tests_LAPDm.ttcn, line 552 */
{
tmp_38:
alt_status tmp_38_alt_flag_0 = ALT_MAYBE;
alt_status tmp_38_alt_flag_1 = ALT_MAYBE;
alt_status tmp_38_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_38_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(554);
/* BTS_Tests_LAPDm.ttcn, line 554 */
tmp_38_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__RR(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(FALSE), INTEGER_template(mod(i, 8)))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_38_alt_flag_0 == ALT_YES) {
current_location.update_lineno(556);
/* BTS_Tests_LAPDm.ttcn, line 556 */
try {
TTCN_Logger::begin_event(TTCN_USER);
TTCN_Logger::log_event_str("Ignoring RR in iteration ");
i.log();
TTCN_Logger::end_event();
} catch (...) {
TTCN_Logger::finish_event();
throw;
}
current_location.update_lineno(557);
/* BTS_Tests_LAPDm.ttcn, line 557 */
goto tmp_38;
}
}
if (tmp_38_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(560);
/* BTS_Tests_LAPDm.ttcn, line 560 */
tmp_38_alt_flag_1 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__I(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__CMD), BOOLEAN_template(FALSE), INTEGER_template(mod(i, 8)), INTEGER_template(mod(i, 8)), OCTETSTRING_template(l3__mt), LAPDm__Types::tr__LAPDm__I_m_defval)), &(pd), any_compref, NULL, NULL, NULL);
if (tmp_38_alt_flag_1 == ALT_YES) {
current_location.update_lineno(563);
/* BTS_Tests_LAPDm.ttcn, line 563 */
last__ns__rx = const_cast< const LAPDm__RAW__PT::LAPDm__ph__data&>(pd).lapdm().ab().ctrl().i().n__s();
break;
}
}
if (tmp_38_default_flag == ALT_MAYBE) {
tmp_38_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_38_default_flag == ALT_YES || tmp_38_default_flag == ALT_BREAK) break;
else if (tmp_38_default_flag == ALT_REPEAT) goto tmp_38;
}
current_location.update_lineno(552);
/* BTS_Tests_LAPDm.ttcn, line 552 */
if (tmp_38_alt_flag_0 == ALT_NO && tmp_38_alt_flag_1 == ALT_NO && tmp_38_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 552 and 565.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(567);
/* BTS_Tests_LAPDm.ttcn, line 567 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__I(0, LAPDm__Types::cr__MO__CMD, FALSE, mod((last__ns__rx + 1), 8), mod(i, 8), l3__mo, LAPDm__Types::ts__LAPDm__I_m_defval)), FALSE, NULL);
current_location.update_lineno(570);
/* BTS_Tests_LAPDm.ttcn, line 570 */
{
tmp_40:
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 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__DATA__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(l3__mo)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_40;
}
current_location.update_lineno(570);
/* BTS_Tests_LAPDm.ttcn, line 570 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 570.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(544);
/* BTS_Tests_LAPDm.ttcn, line 544 */
{
INTEGER tmp_41;
++i;
}
}
}
current_location.update_lineno(572);
/* BTS_Tests_LAPDm.ttcn, line 572 */
TTCN_Logger::log_str(TTCN_USER, "Completed iteration");
current_location.update_lineno(574);
/* BTS_Tests_LAPDm.ttcn, line 574 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(575);
/* BTS_Tests_LAPDm.ttcn, line 575 */
fp__common__fini();
}

void start_f__TC__iframe__seq__and__ack(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_iframe_seq_and_ack(");
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, "BTS_Tests_LAPDm", "f_TC_iframe_seq_and_ack", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__iframe__seq__and__ack(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 577, TTCN_Location::LOCATION_TESTCASE, "TC_iframe_seq_and_ack");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_iframe_seq_and_ack", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(578);
/* BTS_Tests_LAPDm.ttcn, line 578 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(579);
/* BTS_Tests_LAPDm.ttcn, line 579 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__iframe__seq__and__ack);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_iframe_seq_and_ack was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__iframe__timer__recovery(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 600, TTCN_Location::LOCATION_FUNCTION, "f_TC_iframe_timer_recovery");
current_location.update_lineno(601);
/* BTS_Tests_LAPDm.ttcn, line 601 */
INTEGER sapi(0);
current_location.update_lineno(602);
/* BTS_Tests_LAPDm.ttcn, line 602 */
GSM__Types::RslLinkId link__id(GSM__Types::ts__RslLinkID__DCCH(0).valueof());
current_location.update_lineno(603);
/* BTS_Tests_LAPDm.ttcn, line 603 */
DEFAULT d;
current_location.update_lineno(604);
/* BTS_Tests_LAPDm.ttcn, line 604 */
TIMER T("T", 3.0);
current_location.update_lineno(606);
/* BTS_Tests_LAPDm.ttcn, line 606 */
fp__common__init();
current_location.update_lineno(609);
/* BTS_Tests_LAPDm.ttcn, line 609 */
d = activate_as__ignore__background(as__ignore__background_want__dcch_defval, as__ignore__background_ignore__rsl__errors_defval);
current_location.update_lineno(610);
/* BTS_Tests_LAPDm.ttcn, line 610 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(611);
/* BTS_Tests_LAPDm.ttcn, line 611 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(613);
/* BTS_Tests_LAPDm.ttcn, line 613 */
OCTETSTRING l3__mo(Osmocom__Types::f__rnd__octstring(12));
current_location.update_lineno(614);
/* BTS_Tests_LAPDm.ttcn, line 614 */
OCTETSTRING l3__mt(Osmocom__Types::f__rnd__octstring(12));
current_location.update_lineno(619);
/* BTS_Tests_LAPDm.ttcn, line 619 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__SABM(0, LAPDm__Types::cr__MO__CMD, TRUE, l3__mo)), FALSE, NULL);
current_location.update_lineno(620);
/* BTS_Tests_LAPDm.ttcn, line 620 */
{
tmp_43:
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 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__EST__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(l3__mo)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_43;
}
current_location.update_lineno(620);
/* BTS_Tests_LAPDm.ttcn, line 620 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 620.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(622);
/* BTS_Tests_LAPDm.ttcn, line 622 */
{
tmp_44:
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 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__UA(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(TRUE), OCTETSTRING_template(l3__mo))), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_44;
}
current_location.update_lineno(622);
/* BTS_Tests_LAPDm.ttcn, line 622 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 622.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(625);
/* BTS_Tests_LAPDm.ttcn, line 625 */
l3__mo = Osmocom__Types::f__rnd__octstring(18);
current_location.update_lineno(627);
/* BTS_Tests_LAPDm.ttcn, line 627 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__I(0, LAPDm__Types::cr__MO__CMD, FALSE, 0, 0, l3__mo, LAPDm__Types::ts__LAPDm__I_m_defval)), FALSE, NULL);
current_location.update_lineno(629);
/* BTS_Tests_LAPDm.ttcn, line 629 */
{
tmp_46:
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 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__DATA__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(l3__mo)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_46;
}
current_location.update_lineno(629);
/* BTS_Tests_LAPDm.ttcn, line 629 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 629.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(632);
/* BTS_Tests_LAPDm.ttcn, line 632 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.send(RSL__Types::ts__RSL__DATA__REQ(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), l3__mt), FALSE, NULL);
current_location.update_lineno(633);
/* BTS_Tests_LAPDm.ttcn, line 633 */
{
tmp_47:
alt_status tmp_47_alt_flag_0 = ALT_MAYBE;
alt_status tmp_47_alt_flag_1 = ALT_MAYBE;
alt_status tmp_47_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_47_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(635);
/* BTS_Tests_LAPDm.ttcn, line 635 */
tmp_47_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__RR(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(FALSE), INTEGER_template(1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_47_alt_flag_0 == ALT_YES) {
current_location.update_lineno(636);
/* BTS_Tests_LAPDm.ttcn, line 636 */
goto tmp_47;
}
}
if (tmp_47_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(639);
/* BTS_Tests_LAPDm.ttcn, line 639 */
tmp_47_alt_flag_1 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__I(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__CMD), BOOLEAN_template(FALSE), INTEGER_template(1), INTEGER_template(0), OCTETSTRING_template(l3__mt), LAPDm__Types::tr__LAPDm__I_m_defval)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_47_alt_flag_1 == ALT_YES) break;
}
if (tmp_47_default_flag == ALT_MAYBE) {
tmp_47_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_47_default_flag == ALT_YES || tmp_47_default_flag == ALT_BREAK) break;
else if (tmp_47_default_flag == ALT_REPEAT) goto tmp_47;
}
current_location.update_lineno(633);
/* BTS_Tests_LAPDm.ttcn, line 633 */
if (tmp_47_alt_flag_0 == ALT_NO && tmp_47_alt_flag_1 == ALT_NO && tmp_47_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 633 and 641.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(646);
/* BTS_Tests_LAPDm.ttcn, line 646 */
{
tmp_48:
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 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__I(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__CMD), BOOLEAN_template(TRUE), INTEGER_template(1), INTEGER_template(0), OCTETSTRING_template(l3__mt), LAPDm__Types::tr__LAPDm__I_m_defval)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_48;
}
current_location.update_lineno(646);
/* BTS_Tests_LAPDm.ttcn, line 646 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn between lines 646 and 647.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(652);
/* BTS_Tests_LAPDm.ttcn, line 652 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__I(0, LAPDm__Types::cr__MO__CMD, FALSE, 0, 1, l3__mo, LAPDm__Types::ts__LAPDm__I_m_defval)), FALSE, NULL);
current_location.update_lineno(654);
/* BTS_Tests_LAPDm.ttcn, line 654 */
{
tmp_49:
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 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__DATA__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(l3__mo)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_49;
}
current_location.update_lineno(654);
/* BTS_Tests_LAPDm.ttcn, line 654 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 654.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(655);
/* BTS_Tests_LAPDm.ttcn, line 655 */
{
tmp_50:
alt_status tmp_50_alt_flag_0 = ALT_MAYBE;
alt_status tmp_50_alt_flag_1 = ALT_MAYBE;
alt_status tmp_50_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_50_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(658);
/* BTS_Tests_LAPDm.ttcn, line 658 */
tmp_50_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__RR(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(FALSE), INTEGER_template(2))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_50_alt_flag_0 == ALT_YES) {
current_location.update_lineno(659);
/* BTS_Tests_LAPDm.ttcn, line 659 */
goto tmp_50;
}
}
if (tmp_50_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(664);
/* BTS_Tests_LAPDm.ttcn, line 664 */
tmp_50_alt_flag_1 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__I(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__CMD), BOOLEAN_template(TRUE), INTEGER_template(2), INTEGER_template(0), OCTETSTRING_template(l3__mt), LAPDm__Types::tr__LAPDm__I_m_defval)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_50_alt_flag_1 == ALT_YES) break;
}
if (tmp_50_default_flag == ALT_MAYBE) {
tmp_50_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_50_default_flag == ALT_YES || tmp_50_default_flag == ALT_BREAK) break;
else if (tmp_50_default_flag == ALT_REPEAT) goto tmp_50;
}
current_location.update_lineno(655);
/* BTS_Tests_LAPDm.ttcn, line 655 */
if (tmp_50_alt_flag_0 == ALT_NO && tmp_50_alt_flag_1 == ALT_NO && tmp_50_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 655 and 666.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(670);
/* BTS_Tests_LAPDm.ttcn, line 670 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__RR(0, LAPDm__Types::cr__MO__RSP, TRUE, 1)), FALSE, NULL);
current_location.update_lineno(673);
/* BTS_Tests_LAPDm.ttcn, line 673 */
l3__mt = Osmocom__Types::f__rnd__octstring(16);
current_location.update_lineno(674);
/* BTS_Tests_LAPDm.ttcn, line 674 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.send(RSL__Types::ts__RSL__DATA__REQ(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), l3__mt), FALSE, NULL);
current_location.update_lineno(676);
/* BTS_Tests_LAPDm.ttcn, line 676 */
{
tmp_52:
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 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__I(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__CMD), BOOLEAN_template(FALSE), INTEGER_template(2), INTEGER_template(1), OCTETSTRING_template(l3__mt), LAPDm__Types::tr__LAPDm__I_m_defval)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_52;
}
current_location.update_lineno(676);
/* BTS_Tests_LAPDm.ttcn, line 676 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn between lines 676 and 677.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(678);
/* BTS_Tests_LAPDm.ttcn, line 678 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__RR(0, LAPDm__Types::cr__MO__RSP, TRUE, 2)), FALSE, NULL);
current_location.update_lineno(680);
/* BTS_Tests_LAPDm.ttcn, line 680 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(681);
/* BTS_Tests_LAPDm.ttcn, line 681 */
fp__common__fini();
}

void start_f__TC__iframe__timer__recovery(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_iframe_timer_recovery(");
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, "BTS_Tests_LAPDm", "f_TC_iframe_timer_recovery", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__iframe__timer__recovery(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 683, TTCN_Location::LOCATION_TESTCASE, "TC_iframe_timer_recovery");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_iframe_timer_recovery", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(684);
/* BTS_Tests_LAPDm.ttcn, line 684 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(685);
/* BTS_Tests_LAPDm.ttcn, line 685 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__iframe__timer__recovery);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_iframe_timer_recovery was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__ns__seq__error(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 690, TTCN_Location::LOCATION_FUNCTION, "f_TC_ns_seq_error");
current_location.update_lineno(691);
/* BTS_Tests_LAPDm.ttcn, line 691 */
INTEGER sapi(0);
current_location.update_lineno(692);
/* BTS_Tests_LAPDm.ttcn, line 692 */
GSM__Types::RslLinkId link__id(GSM__Types::ts__RslLinkID__DCCH(0).valueof());
current_location.update_lineno(693);
/* BTS_Tests_LAPDm.ttcn, line 693 */
DEFAULT d;
current_location.update_lineno(694);
/* BTS_Tests_LAPDm.ttcn, line 694 */
TIMER T("T", 3.0);
current_location.update_lineno(696);
/* BTS_Tests_LAPDm.ttcn, line 696 */
fp__common__init();
current_location.update_lineno(699);
/* BTS_Tests_LAPDm.ttcn, line 699 */
d = activate_as__ignore__background(as__ignore__background_want__dcch_defval, TRUE);
current_location.update_lineno(700);
/* BTS_Tests_LAPDm.ttcn, line 700 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(701);
/* BTS_Tests_LAPDm.ttcn, line 701 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(703);
/* BTS_Tests_LAPDm.ttcn, line 703 */
OCTETSTRING l3__mo(Osmocom__Types::f__rnd__octstring(12));
current_location.update_lineno(704);
/* BTS_Tests_LAPDm.ttcn, line 704 */
OCTETSTRING l3__mt(Osmocom__Types::f__rnd__octstring(12));
current_location.update_lineno(709);
/* BTS_Tests_LAPDm.ttcn, line 709 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__SABM(0, LAPDm__Types::cr__MO__CMD, TRUE, l3__mo)), FALSE, NULL);
current_location.update_lineno(710);
/* BTS_Tests_LAPDm.ttcn, line 710 */
{
tmp_54:
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 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__EST__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(l3__mo)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_54;
}
current_location.update_lineno(710);
/* BTS_Tests_LAPDm.ttcn, line 710 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 710.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(712);
/* BTS_Tests_LAPDm.ttcn, line 712 */
{
tmp_55:
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 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__UA(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(TRUE), OCTETSTRING_template(l3__mo))), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_55;
}
current_location.update_lineno(712);
/* BTS_Tests_LAPDm.ttcn, line 712 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 712.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(715);
/* BTS_Tests_LAPDm.ttcn, line 715 */
l3__mo = Osmocom__Types::f__rnd__octstring(18);
current_location.update_lineno(717);
/* BTS_Tests_LAPDm.ttcn, line 717 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__I(0, LAPDm__Types::cr__MO__CMD, FALSE, 0, 0, l3__mo, LAPDm__Types::ts__LAPDm__I_m_defval)), FALSE, NULL);
current_location.update_lineno(719);
/* BTS_Tests_LAPDm.ttcn, line 719 */
{
tmp_57:
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 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__DATA__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(l3__mo)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_57;
}
current_location.update_lineno(719);
/* BTS_Tests_LAPDm.ttcn, line 719 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 719.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(722);
/* BTS_Tests_LAPDm.ttcn, line 722 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.send(RSL__Types::ts__RSL__DATA__REQ(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), l3__mt), FALSE, NULL);
current_location.update_lineno(723);
/* BTS_Tests_LAPDm.ttcn, line 723 */
{
tmp_58:
alt_status tmp_58_alt_flag_0 = ALT_MAYBE;
alt_status tmp_58_alt_flag_1 = ALT_MAYBE;
alt_status tmp_58_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_58_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(725);
/* BTS_Tests_LAPDm.ttcn, line 725 */
tmp_58_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__RR(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(FALSE), INTEGER_template(1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_58_alt_flag_0 == ALT_YES) {
current_location.update_lineno(726);
/* BTS_Tests_LAPDm.ttcn, line 726 */
goto tmp_58;
}
}
if (tmp_58_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(729);
/* BTS_Tests_LAPDm.ttcn, line 729 */
tmp_58_alt_flag_1 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__I(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__CMD), BOOLEAN_template(FALSE), INTEGER_template(1), INTEGER_template(0), OCTETSTRING_template(l3__mt), LAPDm__Types::tr__LAPDm__I_m_defval)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_58_alt_flag_1 == ALT_YES) break;
}
if (tmp_58_default_flag == ALT_MAYBE) {
tmp_58_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_58_default_flag == ALT_YES || tmp_58_default_flag == ALT_BREAK) break;
else if (tmp_58_default_flag == ALT_REPEAT) goto tmp_58;
}
current_location.update_lineno(723);
/* BTS_Tests_LAPDm.ttcn, line 723 */
if (tmp_58_alt_flag_0 == ALT_NO && tmp_58_alt_flag_1 == ALT_NO && tmp_58_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 723 and 731.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(735);
/* BTS_Tests_LAPDm.ttcn, line 735 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__I(0, LAPDm__Types::cr__MO__CMD, FALSE, 1, 0, l3__mo, LAPDm__Types::ts__LAPDm__I_m_defval)), FALSE, NULL);
current_location.update_lineno(741);
/* BTS_Tests_LAPDm.ttcn, line 741 */
TIMER T1("T1", 2.0);
current_location.update_lineno(742);
/* BTS_Tests_LAPDm.ttcn, line 742 */
T1.start();
current_location.update_lineno(743);
/* BTS_Tests_LAPDm.ttcn, line 743 */
{
tmp_59:
alt_status tmp_59_alt_flag_0 = ALT_MAYBE;
alt_status tmp_59_alt_flag_1 = ALT_MAYBE;
alt_status tmp_59_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_59_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(744);
/* BTS_Tests_LAPDm.ttcn, line 744 */
tmp_59_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__REJ(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(FALSE), INTEGER_template(1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_59_alt_flag_0 == ALT_YES) break;
}
if (tmp_59_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(745);
/* BTS_Tests_LAPDm.ttcn, line 745 */
tmp_59_alt_flag_1 = T1.timeout(NULL);
if (tmp_59_alt_flag_1 == ALT_YES) {
current_location.update_lineno(745);
/* BTS_Tests_LAPDm.ttcn, line 745 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Missing first REJ"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_59_default_flag == ALT_MAYBE) {
tmp_59_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_59_default_flag == ALT_YES || tmp_59_default_flag == ALT_BREAK) break;
else if (tmp_59_default_flag == ALT_REPEAT) goto tmp_59;
}
current_location.update_lineno(743);
/* BTS_Tests_LAPDm.ttcn, line 743 */
if (tmp_59_alt_flag_0 == ALT_NO && tmp_59_alt_flag_1 == ALT_NO && tmp_59_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 743 and 746.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(748);
/* BTS_Tests_LAPDm.ttcn, line 748 */
Osmocom__Types::f__sleep(2.0);
current_location.update_lineno(751);
/* BTS_Tests_LAPDm.ttcn, line 751 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__I(0, LAPDm__Types::cr__MO__CMD, TRUE, 1, 0, l3__mo, LAPDm__Types::ts__LAPDm__I_m_defval)), FALSE, NULL);
current_location.update_lineno(755);
/* BTS_Tests_LAPDm.ttcn, line 755 */
T1.start();
current_location.update_lineno(756);
/* BTS_Tests_LAPDm.ttcn, line 756 */
{
tmp_60:
alt_status tmp_60_alt_flag_0 = ALT_MAYBE;
alt_status tmp_60_alt_flag_1 = ALT_MAYBE;
alt_status tmp_60_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_60_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(757);
/* BTS_Tests_LAPDm.ttcn, line 757 */
tmp_60_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__REJ(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(TRUE), INTEGER_template(1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_60_alt_flag_0 == ALT_YES) break;
}
if (tmp_60_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(758);
/* BTS_Tests_LAPDm.ttcn, line 758 */
tmp_60_alt_flag_1 = T1.timeout(NULL);
if (tmp_60_alt_flag_1 == ALT_YES) {
current_location.update_lineno(758);
/* BTS_Tests_LAPDm.ttcn, line 758 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Missing second REJ"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_60_default_flag == ALT_MAYBE) {
tmp_60_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_60_default_flag == ALT_YES || tmp_60_default_flag == ALT_BREAK) break;
else if (tmp_60_default_flag == ALT_REPEAT) goto tmp_60;
}
current_location.update_lineno(756);
/* BTS_Tests_LAPDm.ttcn, line 756 */
if (tmp_60_alt_flag_0 == ALT_NO && tmp_60_alt_flag_1 == ALT_NO && tmp_60_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 756 and 759.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(761);
/* BTS_Tests_LAPDm.ttcn, line 761 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(762);
/* BTS_Tests_LAPDm.ttcn, line 762 */
fp__common__fini();
current_location.update_lineno(763);
/* BTS_Tests_LAPDm.ttcn, line 763 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__ns__seq__error(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_ns_seq_error(");
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, "BTS_Tests_LAPDm", "f_TC_ns_seq_error", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__ns__seq__error(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 766, TTCN_Location::LOCATION_TESTCASE, "TC_ns_seq_error");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_ns_seq_error", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(767);
/* BTS_Tests_LAPDm.ttcn, line 767 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(768);
/* BTS_Tests_LAPDm.ttcn, line 768 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__ns__seq__error);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_ns_seq_error was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__nr__seq__error(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 772, TTCN_Location::LOCATION_FUNCTION, "f_TC_nr_seq_error");
current_location.update_lineno(773);
/* BTS_Tests_LAPDm.ttcn, line 773 */
INTEGER sapi(0);
current_location.update_lineno(774);
/* BTS_Tests_LAPDm.ttcn, line 774 */
GSM__Types::RslLinkId link__id(GSM__Types::ts__RslLinkID__DCCH(0).valueof());
current_location.update_lineno(775);
/* BTS_Tests_LAPDm.ttcn, line 775 */
DEFAULT d;
current_location.update_lineno(776);
/* BTS_Tests_LAPDm.ttcn, line 776 */
INTEGER n201(20);
current_location.update_lineno(777);
/* BTS_Tests_LAPDm.ttcn, line 777 */
if ((const_cast< const GSM__Types::RslLinkId&>(link__id).c() == GSM__Types::RslLinkIdC::SACCH)) {
current_location.update_lineno(778);
/* BTS_Tests_LAPDm.ttcn, line 778 */
n201 = 18;
}
current_location.update_lineno(781);
/* BTS_Tests_LAPDm.ttcn, line 781 */
fp__common__init();
current_location.update_lineno(784);
/* BTS_Tests_LAPDm.ttcn, line 784 */
d = activate_as__ignore__background(as__ignore__background_want__dcch_defval, TRUE);
current_location.update_lineno(785);
/* BTS_Tests_LAPDm.ttcn, line 785 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(786);
/* BTS_Tests_LAPDm.ttcn, line 786 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(788);
/* BTS_Tests_LAPDm.ttcn, line 788 */
OCTETSTRING l3__mo(Osmocom__Types::f__rnd__octstring(12));
current_location.update_lineno(789);
/* BTS_Tests_LAPDm.ttcn, line 789 */
OCTETSTRING l3__mt(Osmocom__Types::f__rnd__octstring(12));
current_location.update_lineno(794);
/* BTS_Tests_LAPDm.ttcn, line 794 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__SABM(0, LAPDm__Types::cr__MO__CMD, TRUE, l3__mo)), FALSE, NULL);
current_location.update_lineno(795);
/* BTS_Tests_LAPDm.ttcn, line 795 */
{
tmp_63:
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 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__EST__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(l3__mo)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_63;
}
current_location.update_lineno(795);
/* BTS_Tests_LAPDm.ttcn, line 795 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 795.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(797);
/* BTS_Tests_LAPDm.ttcn, line 797 */
{
tmp_64:
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 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__UA(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(TRUE), OCTETSTRING_template(l3__mo))), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_64;
}
current_location.update_lineno(797);
/* BTS_Tests_LAPDm.ttcn, line 797 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 797.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(801);
/* BTS_Tests_LAPDm.ttcn, line 801 */
l3__mo = Osmocom__Types::f__rnd__octstring(n201);
current_location.update_lineno(803);
/* BTS_Tests_LAPDm.ttcn, line 803 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__I(0, LAPDm__Types::cr__MO__CMD, FALSE, 1, 0, l3__mo, LAPDm__Types::ts__LAPDm__I_m_defval)), FALSE, NULL);
current_location.update_lineno(806);
/* BTS_Tests_LAPDm.ttcn, line 806 */
{
tmp_66:
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 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__DATA__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(l3__mo)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_66;
}
current_location.update_lineno(806);
/* BTS_Tests_LAPDm.ttcn, line 806 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 806.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(807);
/* BTS_Tests_LAPDm.ttcn, line 807 */
{
tmp_67:
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 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__ERROR__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(os_6)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_67;
}
current_location.update_lineno(807);
/* BTS_Tests_LAPDm.ttcn, line 807 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 807.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(809);
/* BTS_Tests_LAPDm.ttcn, line 809 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.send(RSL__Types::ts__RSL__REL__REQ(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), RSL__Types::ts__RSL__REL__REQ_rel__mode_defval), FALSE, NULL);
current_location.update_lineno(813);
/* BTS_Tests_LAPDm.ttcn, line 813 */
TIMER T1("T1", 2.0);
current_location.update_lineno(814);
/* BTS_Tests_LAPDm.ttcn, line 814 */
T1.start();
current_location.update_lineno(815);
/* BTS_Tests_LAPDm.ttcn, line 815 */
{
tmp_68:
alt_status tmp_68_alt_flag_0 = ALT_MAYBE;
alt_status tmp_68_alt_flag_1 = ALT_MAYBE;
alt_status tmp_68_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_68_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(816);
/* BTS_Tests_LAPDm.ttcn, line 816 */
tmp_68_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__DISC(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__CMD), BOOLEAN_template(TRUE))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_68_alt_flag_0 == ALT_YES) break;
}
if (tmp_68_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(817);
/* BTS_Tests_LAPDm.ttcn, line 817 */
tmp_68_alt_flag_1 = T1.timeout(NULL);
if (tmp_68_alt_flag_1 == ALT_YES) {
current_location.update_lineno(817);
/* BTS_Tests_LAPDm.ttcn, line 817 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Missing DISC from BTS"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_68_default_flag == ALT_MAYBE) {
tmp_68_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_68_default_flag == ALT_YES || tmp_68_default_flag == ALT_BREAK) break;
else if (tmp_68_default_flag == ALT_REPEAT) goto tmp_68;
}
current_location.update_lineno(815);
/* BTS_Tests_LAPDm.ttcn, line 815 */
if (tmp_68_alt_flag_0 == ALT_NO && tmp_68_alt_flag_1 == ALT_NO && tmp_68_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 815 and 818.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(822);
/* BTS_Tests_LAPDm.ttcn, line 822 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__UA(0, LAPDm__Types::cr__MO__CMD, TRUE, l3__mo)), FALSE, NULL);
current_location.update_lineno(824);
/* BTS_Tests_LAPDm.ttcn, line 824 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(825);
/* BTS_Tests_LAPDm.ttcn, line 825 */
fp__common__fini();
current_location.update_lineno(826);
/* BTS_Tests_LAPDm.ttcn, line 826 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__nr__seq__error(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_nr_seq_error(");
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, "BTS_Tests_LAPDm", "f_TC_nr_seq_error", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__nr__seq__error(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 829, TTCN_Location::LOCATION_TESTCASE, "TC_nr_seq_error");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_nr_seq_error", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(830);
/* BTS_Tests_LAPDm.ttcn, line 830 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(831);
/* BTS_Tests_LAPDm.ttcn, line 831 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__nr__seq__error);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_nr_seq_error was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__rec__invalid__frame__txrx(const INTEGER& sapi, const LAPDm__Types::LapdmFrame& x, const INTEGER& line__nr)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 834, TTCN_Location::LOCATION_FUNCTION, "f_TC_rec_invalid_frame_txrx");
current_location.update_lineno(835);
/* BTS_Tests_LAPDm.ttcn, line 835 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::LapdmFrame_template(x)), FALSE, NULL);
current_location.update_lineno(836);
/* BTS_Tests_LAPDm.ttcn, line 836 */
Osmocom__Types::f__sleep(2.0);
current_location.update_lineno(837);
/* BTS_Tests_LAPDm.ttcn, line 837 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__RR(sapi, LAPDm__Types::cr__MO__CMD, TRUE, 0)), FALSE, NULL);
current_location.update_lineno(838);
/* BTS_Tests_LAPDm.ttcn, line 838 */
TIMER T1("T1", 2.0);
current_location.update_lineno(839);
/* BTS_Tests_LAPDm.ttcn, line 839 */
T1.start();
current_location.update_lineno(840);
/* BTS_Tests_LAPDm.ttcn, line 840 */
{
tmp_69:
alt_status tmp_69_alt_flag_0 = ALT_MAYBE;
alt_status tmp_69_alt_flag_1 = ALT_MAYBE;
alt_status tmp_69_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_69_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(841);
/* BTS_Tests_LAPDm.ttcn, line 841 */
tmp_69_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__RR(INTEGER_template(sapi), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(TRUE), INTEGER_template(0))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_69_alt_flag_0 == ALT_YES) {
current_location.update_lineno(841);
/* BTS_Tests_LAPDm.ttcn, line 841 */
T1.stop();
break;
}
}
if (tmp_69_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(842);
/* BTS_Tests_LAPDm.ttcn, line 842 */
tmp_69_alt_flag_1 = T1.timeout(NULL);
if (tmp_69_alt_flag_1 == ALT_YES) {
current_location.update_lineno(842);
/* BTS_Tests_LAPDm.ttcn, line 842 */
Misc__Helpers::f__shutdown(cs_3, line__nr, FAIL, cs_4);
break;
}
}
if (tmp_69_default_flag == ALT_MAYBE) {
tmp_69_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_69_default_flag == ALT_YES || tmp_69_default_flag == ALT_BREAK) break;
else if (tmp_69_default_flag == ALT_REPEAT) goto tmp_69;
}
current_location.update_lineno(840);
/* BTS_Tests_LAPDm.ttcn, line 840 */
if (tmp_69_alt_flag_0 == ALT_NO && tmp_69_alt_flag_1 == ALT_NO && tmp_69_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 840 and 843.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
}

void start_f__TC__rec__invalid__frame__txrx(const COMPONENT& component_reference, const INTEGER& sapi, const LAPDm__Types::LapdmFrame& x, const INTEGER& line__nr)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rec_invalid_frame_txrx(");
sapi.log();
TTCN_Logger::log_event_str(", ");
x.log();
TTCN_Logger::log_event_str(", ");
line__nr.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, "BTS_Tests_LAPDm", "f_TC_rec_invalid_frame_txrx", text_buf);
sapi.encode_text(text_buf);
x.encode_text(text_buf);
line__nr.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__rec__invalid__frame(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 848, TTCN_Location::LOCATION_FUNCTION, "f_TC_rec_invalid_frame");
current_location.update_lineno(849);
/* BTS_Tests_LAPDm.ttcn, line 849 */
INTEGER sapi(0);
current_location.update_lineno(850);
/* BTS_Tests_LAPDm.ttcn, line 850 */
GSM__Types::RslLinkId link__id(GSM__Types::ts__RslLinkID__DCCH(0).valueof());
current_location.update_lineno(851);
/* BTS_Tests_LAPDm.ttcn, line 851 */
DEFAULT d;
current_location.update_lineno(852);
/* BTS_Tests_LAPDm.ttcn, line 852 */
TIMER T("T", 3.0);
current_location.update_lineno(854);
/* BTS_Tests_LAPDm.ttcn, line 854 */
fp__common__init();
current_location.update_lineno(857);
/* BTS_Tests_LAPDm.ttcn, line 857 */
d = activate_as__ignore__background(as__ignore__background_want__dcch_defval, TRUE);
current_location.update_lineno(858);
/* BTS_Tests_LAPDm.ttcn, line 858 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(859);
/* BTS_Tests_LAPDm.ttcn, line 859 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(861);
/* BTS_Tests_LAPDm.ttcn, line 861 */
OCTETSTRING l3__mo(Osmocom__Types::f__rnd__octstring(12));
current_location.update_lineno(862);
/* BTS_Tests_LAPDm.ttcn, line 862 */
OCTETSTRING l3__mt(Osmocom__Types::f__rnd__octstring(12));
current_location.update_lineno(867);
/* BTS_Tests_LAPDm.ttcn, line 867 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::ts__LAPDm__SABM(0, LAPDm__Types::cr__MO__CMD, TRUE, l3__mo)), FALSE, NULL);
current_location.update_lineno(868);
/* BTS_Tests_LAPDm.ttcn, line 868 */
T.start();
current_location.update_lineno(869);
/* BTS_Tests_LAPDm.ttcn, line 869 */
{
tmp_71:
alt_status tmp_71_alt_flag_0 = ALT_MAYBE;
alt_status tmp_71_alt_flag_1 = ALT_MAYBE;
alt_status tmp_71_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_71_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(870);
/* BTS_Tests_LAPDm.ttcn, line 870 */
tmp_71_alt_flag_0 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__EST__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(l3__mo)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_71_alt_flag_0 == ALT_YES) break;
}
if (tmp_71_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(871);
/* BTS_Tests_LAPDm.ttcn, line 871 */
tmp_71_alt_flag_1 = T.timeout(NULL);
if (tmp_71_alt_flag_1 == ALT_YES) {
current_location.update_lineno(871);
/* BTS_Tests_LAPDm.ttcn, line 871 */
Misc__Helpers::f__shutdown(cs_3, 871, FAIL, cs_5);
break;
}
}
if (tmp_71_default_flag == ALT_MAYBE) {
tmp_71_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_71_default_flag == ALT_YES || tmp_71_default_flag == ALT_BREAK) break;
else if (tmp_71_default_flag == ALT_REPEAT) goto tmp_71;
}
current_location.update_lineno(869);
/* BTS_Tests_LAPDm.ttcn, line 869 */
if (tmp_71_alt_flag_0 == ALT_NO && tmp_71_alt_flag_1 == ALT_NO && tmp_71_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 869 and 872.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(873);
/* BTS_Tests_LAPDm.ttcn, line 873 */
{
tmp_72:
alt_status tmp_72_alt_flag_0 = ALT_MAYBE;
alt_status tmp_72_alt_flag_1 = ALT_MAYBE;
alt_status tmp_72_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_72_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(875);
/* BTS_Tests_LAPDm.ttcn, line 875 */
tmp_72_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(FALSE), LAPDm__Types::tr__LAPDm__UA(INTEGER_template(0), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(TRUE), OCTETSTRING_template(l3__mo))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_72_alt_flag_0 == ALT_YES) {
current_location.update_lineno(875);
/* BTS_Tests_LAPDm.ttcn, line 875 */
T.stop();
break;
}
}
if (tmp_72_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(876);
/* BTS_Tests_LAPDm.ttcn, line 876 */
tmp_72_alt_flag_1 = T.timeout(NULL);
if (tmp_72_alt_flag_1 == ALT_YES) {
current_location.update_lineno(876);
/* BTS_Tests_LAPDm.ttcn, line 876 */
Misc__Helpers::f__shutdown(cs_3, 876, FAIL, cs_6);
break;
}
}
if (tmp_72_default_flag == ALT_MAYBE) {
tmp_72_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_72_default_flag == ALT_YES || tmp_72_default_flag == ALT_BREAK) break;
else if (tmp_72_default_flag == ALT_REPEAT) goto tmp_72;
}
current_location.update_lineno(873);
/* BTS_Tests_LAPDm.ttcn, line 873 */
if (tmp_72_alt_flag_0 == ALT_NO && tmp_72_alt_flag_1 == ALT_NO && tmp_72_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 873 and 877.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(881);
/* BTS_Tests_LAPDm.ttcn, line 881 */
LAPDm__Types::LapdmFrame x(LAPDm__Types::ts__LAPDm__RR(0, LAPDm__Types::cr__MO__CMD, FALSE, 1).valueof());
current_location.update_lineno(882);
/* BTS_Tests_LAPDm.ttcn, line 882 */
x.ab().payload() = Osmocom__Types::f__rnd__octstring(5);
current_location.update_lineno(883);
/* BTS_Tests_LAPDm.ttcn, line 883 */
f__TC__rec__invalid__frame__txrx(0, x, 883);
current_location.update_lineno(886);
/* BTS_Tests_LAPDm.ttcn, line 886 */
x = LAPDm__Types::ts__LAPDm__REJ(0, LAPDm__Types::cr__MO__CMD, FALSE, 1).valueof();
current_location.update_lineno(887);
/* BTS_Tests_LAPDm.ttcn, line 887 */
x.ab().addr().ea() = FALSE;
current_location.update_lineno(888);
/* BTS_Tests_LAPDm.ttcn, line 888 */
f__TC__rec__invalid__frame__txrx(0, x, 888);
current_location.update_lineno(891);
/* BTS_Tests_LAPDm.ttcn, line 891 */
l3__mo = os_1;
current_location.update_lineno(892);
/* BTS_Tests_LAPDm.ttcn, line 892 */
x = LAPDm__Types::ts__LAPDm__SABM(0, LAPDm__Types::cr__MO__CMD, TRUE, l3__mo).valueof();
current_location.update_lineno(893);
/* BTS_Tests_LAPDm.ttcn, line 893 */
x.ab().el() = 0;
current_location.update_lineno(894);
/* BTS_Tests_LAPDm.ttcn, line 894 */
f__TC__rec__invalid__frame__txrx(0, x, 894);
current_location.update_lineno(897);
/* BTS_Tests_LAPDm.ttcn, line 897 */
x = LAPDm__Types::ts__LAPDm__DM(0, LAPDm__Types::cr__MO__CMD, TRUE).valueof();
current_location.update_lineno(898);
/* BTS_Tests_LAPDm.ttcn, line 898 */
x.ab().payload() = Osmocom__Types::f__rnd__octstring(5);
current_location.update_lineno(899);
/* BTS_Tests_LAPDm.ttcn, line 899 */
f__TC__rec__invalid__frame__txrx(0, x, 899);
current_location.update_lineno(902);
/* BTS_Tests_LAPDm.ttcn, line 902 */
x = LAPDm__Types::ts__LAPDm__DISC(0, LAPDm__Types::cr__MO__CMD, TRUE).valueof();
current_location.update_lineno(903);
/* BTS_Tests_LAPDm.ttcn, line 903 */
x.ab().m() = TRUE;
current_location.update_lineno(904);
/* BTS_Tests_LAPDm.ttcn, line 904 */
f__TC__rec__invalid__frame__txrx(0, x, 904);
current_location.update_lineno(907);
/* BTS_Tests_LAPDm.ttcn, line 907 */
x = LAPDm__Types::ts__LAPDm__UA(0, LAPDm__Types::cr__MO__CMD, FALSE, os_1).valueof();
current_location.update_lineno(908);
/* BTS_Tests_LAPDm.ttcn, line 908 */
x.ab().addr().ea() = FALSE;
current_location.update_lineno(909);
/* BTS_Tests_LAPDm.ttcn, line 909 */
f__TC__rec__invalid__frame__txrx(0, x, 909);
current_location.update_lineno(912);
/* BTS_Tests_LAPDm.ttcn, line 912 */
x = LAPDm__Types::ts__LAPDm__I(0, LAPDm__Types::cr__MO__CMD, TRUE, 0, 6, Osmocom__Types::f__rnd__octstring(25), LAPDm__Types::ts__LAPDm__I_m_defval).valueof();
current_location.update_lineno(913);
/* BTS_Tests_LAPDm.ttcn, line 913 */
f__TC__rec__invalid__frame__txrx(0, x, 913);
current_location.update_lineno(916);
/* BTS_Tests_LAPDm.ttcn, line 916 */
x = LAPDm__Types::ts__LAPDm__I(0, LAPDm__Types::cr__MO__CMD, TRUE, 0, 7, Osmocom__Types::f__rnd__octstring(5), LAPDm__Types::ts__LAPDm__I_m_defval).valueof();
current_location.update_lineno(917);
/* BTS_Tests_LAPDm.ttcn, line 917 */
x.ab().m() = TRUE;
current_location.update_lineno(918);
/* BTS_Tests_LAPDm.ttcn, line 918 */
f__TC__rec__invalid__frame__txrx(0, x, 918);
current_location.update_lineno(920);
/* BTS_Tests_LAPDm.ttcn, line 920 */
x = LAPDm__Types::ts__LAPDm__RR(0, LAPDm__Types::cr__MO__CMD, TRUE, 0).valueof();
current_location.update_lineno(921);
/* BTS_Tests_LAPDm.ttcn, line 921 */
f__TC__rec__invalid__frame__txrx(0, x, 921);
current_location.update_lineno(925);
/* BTS_Tests_LAPDm.ttcn, line 925 */
x = LAPDm__Types::ts__LAPDm__RR(0, LAPDm__Types::cr__MO__CMD, FALSE, 1).valueof();
current_location.update_lineno(926);
/* BTS_Tests_LAPDm.ttcn, line 926 */
x.ab().ctrl().other() = 29;
current_location.update_lineno(927);
/* BTS_Tests_LAPDm.ttcn, line 927 */
f__TC__rec__invalid__frame__txrx(0, x, 927);
current_location.update_lineno(929);
/* BTS_Tests_LAPDm.ttcn, line 929 */
x = LAPDm__Types::ts__LAPDm__RR(0, LAPDm__Types::cr__MO__CMD, FALSE, 1).valueof();
current_location.update_lineno(930);
/* BTS_Tests_LAPDm.ttcn, line 930 */
x.ab().ctrl().other() = 27;
current_location.update_lineno(931);
/* BTS_Tests_LAPDm.ttcn, line 931 */
f__TC__rec__invalid__frame__txrx(0, x, 931);
current_location.update_lineno(933);
/* BTS_Tests_LAPDm.ttcn, line 933 */
x = LAPDm__Types::ts__LAPDm__RR(0, LAPDm__Types::cr__MO__CMD, FALSE, 1).valueof();
current_location.update_lineno(934);
/* BTS_Tests_LAPDm.ttcn, line 934 */
x.ab().ctrl().other() = 17;
current_location.update_lineno(935);
/* BTS_Tests_LAPDm.ttcn, line 935 */
f__TC__rec__invalid__frame__txrx(0, x, 935);
current_location.update_lineno(937);
/* BTS_Tests_LAPDm.ttcn, line 937 */
x = LAPDm__Types::ts__LAPDm__RR(0, LAPDm__Types::cr__MO__CMD, FALSE, 1).valueof();
current_location.update_lineno(938);
/* BTS_Tests_LAPDm.ttcn, line 938 */
x.ab().ctrl().other() = 95;
current_location.update_lineno(939);
/* BTS_Tests_LAPDm.ttcn, line 939 */
f__TC__rec__invalid__frame__txrx(0, x, 939);
current_location.update_lineno(941);
/* BTS_Tests_LAPDm.ttcn, line 941 */
x = LAPDm__Types::ts__LAPDm__RR(0, LAPDm__Types::cr__MO__CMD, FALSE, 1).valueof();
current_location.update_lineno(942);
/* BTS_Tests_LAPDm.ttcn, line 942 */
x.ab().ctrl().other() = 159;
current_location.update_lineno(943);
/* BTS_Tests_LAPDm.ttcn, line 943 */
f__TC__rec__invalid__frame__txrx(0, x, 943);
current_location.update_lineno(945);
/* BTS_Tests_LAPDm.ttcn, line 945 */
x = LAPDm__Types::ts__LAPDm__RR(0, LAPDm__Types::cr__MO__CMD, FALSE, 1).valueof();
current_location.update_lineno(946);
/* BTS_Tests_LAPDm.ttcn, line 946 */
x.ab().ctrl().other() = 51;
current_location.update_lineno(947);
/* BTS_Tests_LAPDm.ttcn, line 947 */
f__TC__rec__invalid__frame__txrx(0, x, 947);
current_location.update_lineno(949);
/* BTS_Tests_LAPDm.ttcn, line 949 */
x = LAPDm__Types::ts__LAPDm__RR(0, LAPDm__Types::cr__MO__CMD, FALSE, 1).valueof();
current_location.update_lineno(950);
/* BTS_Tests_LAPDm.ttcn, line 950 */
x.ab().ctrl().other() = 147;
current_location.update_lineno(951);
/* BTS_Tests_LAPDm.ttcn, line 951 */
f__TC__rec__invalid__frame__txrx(0, x, 951);
current_location.update_lineno(953);
/* BTS_Tests_LAPDm.ttcn, line 953 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(954);
/* BTS_Tests_LAPDm.ttcn, line 954 */
fp__common__fini();
current_location.update_lineno(955);
/* BTS_Tests_LAPDm.ttcn, line 955 */
TTCN_Runtime::setverdict(PASS);
}

void start_f__TC__rec__invalid__frame(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rec_invalid_frame(");
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, "BTS_Tests_LAPDm", "f_TC_rec_invalid_frame", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__rec__invalid__frame(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 958, TTCN_Location::LOCATION_TESTCASE, "TC_rec_invalid_frame");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_rec_invalid_frame", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(959);
/* BTS_Tests_LAPDm.ttcn, line 959 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(960);
/* BTS_Tests_LAPDm.ttcn, line 960 */
pars.t__guard() = 6.0e1;
current_location.update_lineno(961);
/* BTS_Tests_LAPDm.ttcn, line 961 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__rec__invalid__frame);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_rec_invalid_frame was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void inc__mod8(INTEGER& v)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 981, TTCN_Location::LOCATION_FUNCTION, "inc_mod8");
current_location.update_lineno(983);
/* BTS_Tests_LAPDm.ttcn, line 983 */
{
INTEGER tmp_104;
tmp_104 = mod((v + 1), 8);
v = tmp_104;
}
}

void f__lapdm__transceive__mo(LapdmDlState& dls, const GSM__Types::RslLinkId& link__id, const OCTETSTRING& l3)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 986, TTCN_Location::LOCATION_FUNCTION, "f_lapdm_transceive_mo");
current_location.update_lineno(988);
/* BTS_Tests_LAPDm.ttcn, line 988 */
LAPDm__RAW__PT::LAPDm__ph__data pd;
current_location.update_lineno(989);
/* BTS_Tests_LAPDm.ttcn, line 989 */
INTEGER offset(0);
current_location.update_lineno(990);
/* BTS_Tests_LAPDm.ttcn, line 990 */
INTEGER n201(20);
current_location.update_lineno(991);
/* BTS_Tests_LAPDm.ttcn, line 991 */
BOOLEAN is__sacch(FALSE);
current_location.update_lineno(992);
/* BTS_Tests_LAPDm.ttcn, line 992 */
if ((const_cast< const GSM__Types::RslLinkId&>(link__id).c() == GSM__Types::RslLinkIdC::SACCH)) {
current_location.update_lineno(993);
/* BTS_Tests_LAPDm.ttcn, line 993 */
n201 = 18;
current_location.update_lineno(994);
/* BTS_Tests_LAPDm.ttcn, line 994 */
is__sacch = TRUE;
}
for ( ; ; ) {
current_location.update_lineno(997);
/* BTS_Tests_LAPDm.ttcn, line 997 */
if (!(offset < l3.lengthof())) break;
current_location.update_lineno(998);
/* BTS_Tests_LAPDm.ttcn, line 998 */
INTEGER remain__len((l3.lengthof() - offset));
current_location.update_lineno(999);
/* BTS_Tests_LAPDm.ttcn, line 999 */
INTEGER seg__len(remain__len);
current_location.update_lineno(1000);
/* BTS_Tests_LAPDm.ttcn, line 1000 */
if ((remain__len > n201)) {
current_location.update_lineno(1001);
/* BTS_Tests_LAPDm.ttcn, line 1001 */
seg__len = n201;
}
current_location.update_lineno(1003);
/* BTS_Tests_LAPDm.ttcn, line 1003 */
OCTETSTRING segment(substr(l3, offset, seg__len));
current_location.update_lineno(1004);
/* BTS_Tests_LAPDm.ttcn, line 1004 */
BOOLEAN more;
current_location.update_lineno(1005);
/* BTS_Tests_LAPDm.ttcn, line 1005 */
if (((offset + segment.lengthof()) < l3.lengthof())) {
current_location.update_lineno(1006);
/* BTS_Tests_LAPDm.ttcn, line 1006 */
more = TRUE;
}
else {
current_location.update_lineno(1008);
/* BTS_Tests_LAPDm.ttcn, line 1008 */
more = FALSE;
}
current_location.update_lineno(1011);
/* BTS_Tests_LAPDm.ttcn, line 1011 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::ts__LAPDm__I(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi(), LAPDm__Types::cr__MO__CMD, FALSE, const_cast< const LapdmDlState&>(dls).v__a(), const_cast< const LapdmDlState&>(dls).v__s(), segment, more)), FALSE, NULL);
current_location.update_lineno(1014);
/* BTS_Tests_LAPDm.ttcn, line 1014 */
inc__mod8(dls.v__s());
current_location.update_lineno(1015);
/* BTS_Tests_LAPDm.ttcn, line 1015 */
{
INTEGER tmp_110;
tmp_110 = (offset + segment.lengthof());
offset = tmp_110;
}
current_location.update_lineno(1018);
/* BTS_Tests_LAPDm.ttcn, line 1018 */
{
tmp_111:
alt_status tmp_111_alt_flag_0 = ALT_MAYBE;
alt_status tmp_111_alt_flag_1 = ALT_MAYBE;
alt_status tmp_111_alt_flag_2 = ALT_MAYBE;
alt_status tmp_111_alt_flag_3 = ALT_MAYBE;
alt_status tmp_111_alt_flag_4 = ALT_UNCHECKED;
alt_status tmp_111_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_111_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1019);
/* BTS_Tests_LAPDm.ttcn, line 1019 */
tmp_111_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::tr__LAPDm__RR(INTEGER_template(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi()), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(FALSE), INTEGER_template(mod(const_cast< const LapdmDlState&>(dls).v__s(), 8)))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_111_alt_flag_0 == ALT_YES) break;
}
if (tmp_111_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1021);
/* BTS_Tests_LAPDm.ttcn, line 1021 */
tmp_111_alt_flag_1 = as__ignore__background_instance((!(is__sacch)), as__ignore__background_ignore__rsl__errors_defval, first_run);
if (tmp_111_alt_flag_1 == ALT_REPEAT) goto tmp_111;
if (tmp_111_alt_flag_1 == ALT_BREAK) break;
if (tmp_111_alt_flag_1 == ALT_YES) break;
}
if (tmp_111_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1022);
/* BTS_Tests_LAPDm.ttcn, line 1022 */
tmp_111_alt_flag_2 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::LapdmFrame_template(ANY_VALUE)), &(pd), any_compref, NULL, NULL, NULL);
if (tmp_111_alt_flag_2 == ALT_YES) {
current_location.update_lineno(1023);
/* BTS_Tests_LAPDm.ttcn, line 1023 */
Misc__Helpers::f__shutdown(cs_3, 1023, FAIL, (TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("received unexpected LAPDm "),pd.log(),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_111_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(1025);
/* BTS_Tests_LAPDm.ttcn, line 1025 */
tmp_111_alt_flag_3 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(ANY_VALUE), LAPDm__Types::LapdmFrame_template(ANY_VALUE)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_111_alt_flag_3 == ALT_YES) {
current_location.update_lineno(1025);
/* BTS_Tests_LAPDm.ttcn, line 1025 */
goto tmp_111;
}
}
if (tmp_111_alt_flag_4 == ALT_UNCHECKED) {
current_location.update_lineno(1026);
/* BTS_Tests_LAPDm.ttcn, line 1026 */
if ((offset < l3.lengthof())) tmp_111_alt_flag_4 = ALT_MAYBE;
else tmp_111_alt_flag_4 = ALT_NO;
}
if (tmp_111_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(1026);
/* BTS_Tests_LAPDm.ttcn, line 1026 */
tmp_111_alt_flag_4 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__DATA__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(ANY_VALUE)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_111_alt_flag_4 == ALT_YES) {
current_location.update_lineno(1027);
/* BTS_Tests_LAPDm.ttcn, line 1027 */
Misc__Helpers::f__shutdown(cs_3, 1027, FAIL, cs_7);
break;
}
}
if (tmp_111_default_flag == ALT_MAYBE) {
tmp_111_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_111_default_flag == ALT_YES || tmp_111_default_flag == ALT_BREAK) break;
else if (tmp_111_default_flag == ALT_REPEAT) goto tmp_111;
}
current_location.update_lineno(1018);
/* BTS_Tests_LAPDm.ttcn, line 1018 */
if (tmp_111_alt_flag_0 == ALT_NO && tmp_111_alt_flag_1 == ALT_NO && tmp_111_alt_flag_2 == ALT_NO && tmp_111_alt_flag_3 == ALT_NO && tmp_111_alt_flag_4 == ALT_NO && tmp_111_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 1018 and 1029.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
}
current_location.update_lineno(1032);
/* BTS_Tests_LAPDm.ttcn, line 1032 */
TIMER T("T", 1.0);
current_location.update_lineno(1033);
/* BTS_Tests_LAPDm.ttcn, line 1033 */
T.start();
current_location.update_lineno(1034);
/* BTS_Tests_LAPDm.ttcn, line 1034 */
{
tmp_112:
alt_status tmp_112_alt_flag_0 = ALT_MAYBE;
alt_status tmp_112_alt_flag_1 = ALT_MAYBE;
alt_status tmp_112_alt_flag_2 = ALT_MAYBE;
alt_status tmp_112_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_112_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1035);
/* BTS_Tests_LAPDm.ttcn, line 1035 */
tmp_112_alt_flag_0 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__DATA__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(l3)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_112_alt_flag_0 == ALT_YES) {
current_location.update_lineno(1036);
/* BTS_Tests_LAPDm.ttcn, line 1036 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_112_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1038);
/* BTS_Tests_LAPDm.ttcn, line 1038 */
tmp_112_alt_flag_1 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__DATA__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(ANY_VALUE)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_112_alt_flag_1 == ALT_YES) {
current_location.update_lineno(1039);
/* BTS_Tests_LAPDm.ttcn, line 1039 */
Misc__Helpers::f__shutdown(cs_3, 1039, FAIL, cs_8);
break;
}
}
if (tmp_112_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1041);
/* BTS_Tests_LAPDm.ttcn, line 1041 */
tmp_112_alt_flag_2 = T.timeout(NULL);
if (tmp_112_alt_flag_2 == ALT_YES) {
current_location.update_lineno(1042);
/* BTS_Tests_LAPDm.ttcn, line 1042 */
Misc__Helpers::f__shutdown(cs_3, 1042, FAIL, cs_9);
break;
}
}
if (tmp_112_default_flag == ALT_MAYBE) {
tmp_112_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_112_default_flag == ALT_YES || tmp_112_default_flag == ALT_BREAK) break;
else if (tmp_112_default_flag == ALT_REPEAT) goto tmp_112;
}
current_location.update_lineno(1034);
/* BTS_Tests_LAPDm.ttcn, line 1034 */
if (tmp_112_alt_flag_0 == ALT_NO && tmp_112_alt_flag_1 == ALT_NO && tmp_112_alt_flag_2 == ALT_NO && tmp_112_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 1034 and 1044.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
}

void start_f__lapdm__transceive__mo(const COMPONENT& component_reference, LapdmDlState& dls, const GSM__Types::RslLinkId& link__id, const OCTETSTRING& l3)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_lapdm_transceive_mo(");
dls.log();
TTCN_Logger::log_event_str(", ");
link__id.log();
TTCN_Logger::log_event_str(", ");
l3.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, "BTS_Tests_LAPDm", "f_lapdm_transceive_mo", text_buf);
dls.encode_text(text_buf);
link__id.encode_text(text_buf);
l3.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__segm__concat(const CHARSTRING& , const GSM__Types::RslLinkId& link__id)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1052, TTCN_Location::LOCATION_FUNCTION, "f_TC_segm_concat");
current_location.update_lineno(1053);
/* BTS_Tests_LAPDm.ttcn, line 1053 */
INTEGER sapi(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi());
current_location.update_lineno(1054);
/* BTS_Tests_LAPDm.ttcn, line 1054 */
BOOLEAN is__sacch(FALSE);
current_location.update_lineno(1055);
/* BTS_Tests_LAPDm.ttcn, line 1055 */
if ((const_cast< const GSM__Types::RslLinkId&>(link__id).c() == GSM__Types::RslLinkIdC::SACCH)) {
current_location.update_lineno(1056);
/* BTS_Tests_LAPDm.ttcn, line 1056 */
is__sacch = TRUE;
}
current_location.update_lineno(1058);
/* BTS_Tests_LAPDm.ttcn, line 1058 */
DEFAULT d;
current_location.update_lineno(1059);
/* BTS_Tests_LAPDm.ttcn, line 1059 */
TIMER T("T", 3.0);
current_location.update_lineno(1061);
/* BTS_Tests_LAPDm.ttcn, line 1061 */
fp__common__init();
current_location.update_lineno(1064);
/* BTS_Tests_LAPDm.ttcn, line 1064 */
d = activate_as__ignore__background((!(is__sacch)), as__ignore__background_ignore__rsl__errors_defval);
current_location.update_lineno(1065);
/* BTS_Tests_LAPDm.ttcn, line 1065 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(1066);
/* BTS_Tests_LAPDm.ttcn, line 1066 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(1068);
/* BTS_Tests_LAPDm.ttcn, line 1068 */
f__establish__mo(link__id);
current_location.update_lineno(1070);
/* BTS_Tests_LAPDm.ttcn, line 1070 */
OCTETSTRING l3__mo(Osmocom__Types::f__rnd__octstring(251));
current_location.update_lineno(1072);
/* BTS_Tests_LAPDm.ttcn, line 1072 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(1074);
/* BTS_Tests_LAPDm.ttcn, line 1074 */
LapdmDlState dls(t__init__LapdmDlState.valueof());
current_location.update_lineno(1075);
/* BTS_Tests_LAPDm.ttcn, line 1075 */
f__lapdm__transceive__mo(dls, link__id, l3__mo);
current_location.update_lineno(1077);
/* BTS_Tests_LAPDm.ttcn, line 1077 */
fp__common__fini();
}

void start_f__TC__segm__concat(const COMPONENT& component_reference, const CHARSTRING& id, const GSM__Types::RslLinkId& link__id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_segm_concat(");
id.log();
TTCN_Logger::log_event_str(", ");
link__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, "BTS_Tests_LAPDm", "f_TC_segm_concat", text_buf);
id.encode_text(text_buf);
link__id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__segm__concat__dcch(const CHARSTRING& id)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1079, TTCN_Location::LOCATION_FUNCTION, "f_TC_segm_concat_dcch");
current_location.update_lineno(1080);
/* BTS_Tests_LAPDm.ttcn, line 1080 */
f__TC__segm__concat(id, GSM__Types::ts__RslLinkID__DCCH(0).valueof());
}

void start_f__TC__segm__concat__dcch(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_segm_concat_dcch(");
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, "BTS_Tests_LAPDm", "f_TC_segm_concat_dcch", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

void f__TC__segm__concat__sacch(const CHARSTRING& id)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1082, TTCN_Location::LOCATION_FUNCTION, "f_TC_segm_concat_sacch");
current_location.update_lineno(1083);
/* BTS_Tests_LAPDm.ttcn, line 1083 */
f__TC__segm__concat(id, GSM__Types::ts__RslLinkID__SACCH(0).valueof());
}

void start_f__TC__segm__concat__sacch(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_segm_concat_sacch(");
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, "BTS_Tests_LAPDm", "f_TC_segm_concat_sacch", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__segm__concat__dcch(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1086, TTCN_Location::LOCATION_TESTCASE, "TC_segm_concat_dcch");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_segm_concat_dcch", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1087);
/* BTS_Tests_LAPDm.ttcn, line 1087 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(1088);
/* BTS_Tests_LAPDm.ttcn, line 1088 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__segm__concat__dcch);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_segm_concat_dcch was stopped.");
}
return TTCN_Runtime::end_testcase();
}

verdicttype testcase_TC__segm__concat__sacch(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1091, TTCN_Location::LOCATION_TESTCASE, "TC_segm_concat_sacch");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_segm_concat_sacch", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1092);
/* BTS_Tests_LAPDm.ttcn, line 1092 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(1093);
/* BTS_Tests_LAPDm.ttcn, line 1093 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__segm__concat__sacch);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_segm_concat_sacch was stopped.");
}
return TTCN_Runtime::end_testcase();
}

INTEGER f__n200__by__chan__nr(const GSM__Types::RslChannelNr& chan__nr, const GSM__Types::RslLinkId& link__id)
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1097, TTCN_Location::LOCATION_FUNCTION, "f_n200_by_chan_nr");
current_location.update_lineno(1099);
/* BTS_Tests_LAPDm.ttcn, line 1099 */
if (GSM__Types::tr__RslLinkID__SACCH(INTEGER_template(ANY_VALUE)).match(link__id)) {
current_location.update_lineno(1100);
/* BTS_Tests_LAPDm.ttcn, line 1100 */
return 5;
}
{
const GSM__Types::RslChannelNr &tmp_116 = chan__nr;
current_location.update_lineno(1104);
/* BTS_Tests_LAPDm.ttcn, line 1104 */
if(GSM__Types::t__RslChanNr__SDCCH4(INTEGER_template(ANY_VALUE), INTEGER_template(ANY_VALUE)).match(tmp_116)) goto tmp_115_0;
current_location.update_lineno(1105);
/* BTS_Tests_LAPDm.ttcn, line 1105 */
if(GSM__Types::t__RslChanNr__SDCCH8(INTEGER_template(ANY_VALUE), INTEGER_template(ANY_VALUE)).match(tmp_116)) goto tmp_115_1;
current_location.update_lineno(1106);
/* BTS_Tests_LAPDm.ttcn, line 1106 */
if(GSM__Types::t__RslChanNr__Bm(INTEGER_template(ANY_VALUE)).match(tmp_116)) goto tmp_115_2;
current_location.update_lineno(1107);
/* BTS_Tests_LAPDm.ttcn, line 1107 */
if(GSM__Types::t__RslChanNr__Lm(INTEGER_template(ANY_VALUE), INTEGER_template(ANY_VALUE)).match(tmp_116)) goto tmp_115_3;
goto tmp_115_end;
tmp_115_0:
{
current_location.update_lineno(1104);
/* BTS_Tests_LAPDm.ttcn, line 1104 */
return 23;
}
tmp_115_1:
{
current_location.update_lineno(1105);
/* BTS_Tests_LAPDm.ttcn, line 1105 */
return 23;
}
tmp_115_2:
{
current_location.update_lineno(1106);
/* BTS_Tests_LAPDm.ttcn, line 1106 */
return 34;
}
tmp_115_3:
{
current_location.update_lineno(1107);
/* BTS_Tests_LAPDm.ttcn, line 1107 */
return 29;
}
tmp_115_end: /* empty */;
}
current_location.update_lineno(1109);
/* BTS_Tests_LAPDm.ttcn, line 1109 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Unknown chan_nr "),chan__nr.log(),TTCN_Logger::log_event_str(" or link_id "),link__id.log(),TTCN_Logger::end_event_log2str()));
current_location.update_lineno(1110);
/* BTS_Tests_LAPDm.ttcn, line 1110 */
return -1;
}

void f__TC__t200__n200(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1114, TTCN_Location::LOCATION_FUNCTION, "f_TC_t200_n200");
current_location.update_lineno(1115);
/* BTS_Tests_LAPDm.ttcn, line 1115 */
GSM__Types::RslLinkId link__id(GSM__Types::ts__RslLinkID__SACCH(0).valueof());
current_location.update_lineno(1116);
/* BTS_Tests_LAPDm.ttcn, line 1116 */
INTEGER sapi(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi());
current_location.update_lineno(1117);
/* BTS_Tests_LAPDm.ttcn, line 1117 */
BOOLEAN is__sacch(FALSE);
current_location.update_lineno(1118);
/* BTS_Tests_LAPDm.ttcn, line 1118 */
if ((const_cast< const GSM__Types::RslLinkId&>(link__id).c() == GSM__Types::RslLinkIdC::SACCH)) {
current_location.update_lineno(1119);
/* BTS_Tests_LAPDm.ttcn, line 1119 */
is__sacch = TRUE;
}
current_location.update_lineno(1121);
/* BTS_Tests_LAPDm.ttcn, line 1121 */
INTEGER n200(f__n200__by__chan__nr(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr, link__id));
current_location.update_lineno(1122);
/* BTS_Tests_LAPDm.ttcn, line 1122 */
INTEGER num__retrans(0);
current_location.update_lineno(1123);
/* BTS_Tests_LAPDm.ttcn, line 1123 */
TIMER T("T", 3.0);
current_location.update_lineno(1124);
/* BTS_Tests_LAPDm.ttcn, line 1124 */
DEFAULT d;
current_location.update_lineno(1126);
/* BTS_Tests_LAPDm.ttcn, line 1126 */
fp__common__init();
current_location.update_lineno(1129);
/* BTS_Tests_LAPDm.ttcn, line 1129 */
d = activate_as__ignore__background((!(is__sacch)), as__ignore__background_ignore__rsl__errors_defval);
current_location.update_lineno(1130);
/* BTS_Tests_LAPDm.ttcn, line 1130 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(1131);
/* BTS_Tests_LAPDm.ttcn, line 1131 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(1133);
/* BTS_Tests_LAPDm.ttcn, line 1133 */
f__establish__mo(link__id);
current_location.update_lineno(1135);
/* BTS_Tests_LAPDm.ttcn, line 1135 */
OCTETSTRING l3__mt(Osmocom__Types::f__rnd__octstring(18));
current_location.update_lineno(1136);
/* BTS_Tests_LAPDm.ttcn, line 1136 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.send(RSL__Types::ts__RSL__DATA__REQ(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), l3__mt), FALSE, NULL);
current_location.update_lineno(1138);
/* BTS_Tests_LAPDm.ttcn, line 1138 */
{
tmp_119:
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 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::tr__LAPDm__I(INTEGER_template(sapi), BOOLEAN_template(LAPDm__Types::cr__MT__CMD), BOOLEAN_template(FALSE), INTEGER_template(0), INTEGER_template(0), OCTETSTRING_template(l3__mt), LAPDm__Types::tr__LAPDm__I_m_defval)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_119;
}
current_location.update_lineno(1138);
/* BTS_Tests_LAPDm.ttcn, line 1138 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn between lines 1138 and 1139.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1140);
/* BTS_Tests_LAPDm.ttcn, line 1140 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(1142);
/* BTS_Tests_LAPDm.ttcn, line 1142 */
{
tmp_120:
alt_status tmp_120_alt_flag_0 = ALT_MAYBE;
alt_status tmp_120_alt_flag_1 = ALT_MAYBE;
alt_status tmp_120_alt_flag_2 = ALT_UNCHECKED;
alt_status tmp_120_alt_flag_3 = ALT_UNCHECKED;
alt_status tmp_120_alt_flag_4 = ALT_MAYBE;
alt_status tmp_120_alt_flag_5 = ALT_MAYBE;
alt_status tmp_120_alt_flag_6 = ALT_UNCHECKED;
alt_status tmp_120_alt_flag_7 = ALT_MAYBE;
alt_status tmp_120_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_120_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1144);
/* BTS_Tests_LAPDm.ttcn, line 1144 */
tmp_120_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::tr__LAPDm__I(INTEGER_template(sapi), BOOLEAN_template(LAPDm__Types::cr__MT__CMD), BOOLEAN_template(TRUE), INTEGER_template(0), INTEGER_template(0), OCTETSTRING_template(l3__mt), LAPDm__Types::tr__LAPDm__I_m_defval)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_120_alt_flag_0 == ALT_YES) {
current_location.update_lineno(1146);
/* BTS_Tests_LAPDm.ttcn, line 1146 */
{
INTEGER tmp_121;
++num__retrans;
}
current_location.update_lineno(1147);
/* BTS_Tests_LAPDm.ttcn, line 1147 */
if ((num__retrans < n200)) {
current_location.update_lineno(1148);
/* BTS_Tests_LAPDm.ttcn, line 1148 */
goto tmp_120;
}
else {
current_location.update_lineno(1149);
/* BTS_Tests_LAPDm.ttcn, line 1149 */
if ((num__retrans == n200)) {
current_location.update_lineno(1150);
/* BTS_Tests_LAPDm.ttcn, line 1150 */
T.start();
current_location.update_lineno(1151);
/* BTS_Tests_LAPDm.ttcn, line 1151 */
goto tmp_120;
}
else {
}
}
break;
}
}
if (tmp_120_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1156);
/* BTS_Tests_LAPDm.ttcn, line 1156 */
tmp_120_alt_flag_1 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::tr__LAPDm__I(INTEGER_template(sapi), BOOLEAN_template(ANY_VALUE), BOOLEAN_template(ANY_VALUE), INTEGER_template(ANY_VALUE), INTEGER_template(ANY_VALUE), OCTETSTRING_template(ANY_VALUE), LAPDm__Types::tr__LAPDm__I_m_defval)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_120_alt_flag_1 == ALT_YES) {
current_location.update_lineno(1157);
/* BTS_Tests_LAPDm.ttcn, line 1157 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received unexpected I frame"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_120_alt_flag_2 == ALT_UNCHECKED) {
current_location.update_lineno(1159);
/* BTS_Tests_LAPDm.ttcn, line 1159 */
if ((!(is__sacch))) tmp_120_alt_flag_2 = ALT_MAYBE;
else tmp_120_alt_flag_2 = ALT_NO;
}
if (tmp_120_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1159);
/* BTS_Tests_LAPDm.ttcn, line 1159 */
tmp_120_alt_flag_2 = as__lapdm__acch_instance(first_run);
if (tmp_120_alt_flag_2 == ALT_REPEAT) goto tmp_120;
if (tmp_120_alt_flag_2 == ALT_BREAK) break;
if (tmp_120_alt_flag_2 == ALT_YES) break;
}
if (tmp_120_alt_flag_3 == ALT_UNCHECKED) {
current_location.update_lineno(1160);
/* BTS_Tests_LAPDm.ttcn, line 1160 */
if (is__sacch) tmp_120_alt_flag_3 = ALT_MAYBE;
else tmp_120_alt_flag_3 = ALT_NO;
}
if (tmp_120_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(1160);
/* BTS_Tests_LAPDm.ttcn, line 1160 */
tmp_120_alt_flag_3 = as__lapdm__dcch_instance(first_run);
if (tmp_120_alt_flag_3 == ALT_REPEAT) goto tmp_120;
if (tmp_120_alt_flag_3 == ALT_BREAK) break;
if (tmp_120_alt_flag_3 == ALT_YES) break;
}
if (tmp_120_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(1161);
/* BTS_Tests_LAPDm.ttcn, line 1161 */
tmp_120_alt_flag_4 = as__lapdm__idle_instance(first_run);
if (tmp_120_alt_flag_4 == ALT_REPEAT) goto tmp_120;
if (tmp_120_alt_flag_4 == ALT_BREAK) break;
if (tmp_120_alt_flag_4 == ALT_YES) break;
}
if (tmp_120_alt_flag_5 == ALT_MAYBE) {
current_location.update_lineno(1162);
/* BTS_Tests_LAPDm.ttcn, line 1162 */
tmp_120_alt_flag_5 = as__rsl__meas__rep_instance(first_run);
if (tmp_120_alt_flag_5 == ALT_REPEAT) goto tmp_120;
if (tmp_120_alt_flag_5 == ALT_BREAK) break;
if (tmp_120_alt_flag_5 == ALT_YES) break;
}
if (tmp_120_alt_flag_6 == ALT_UNCHECKED) {
current_location.update_lineno(1163);
/* BTS_Tests_LAPDm.ttcn, line 1163 */
if ((num__retrans == n200)) tmp_120_alt_flag_6 = ALT_MAYBE;
else tmp_120_alt_flag_6 = ALT_NO;
}
if (tmp_120_alt_flag_6 == ALT_MAYBE) {
current_location.update_lineno(1163);
/* BTS_Tests_LAPDm.ttcn, line 1163 */
tmp_120_alt_flag_6 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__ERROR__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(os_7)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_120_alt_flag_6 == ALT_YES) break;
}
if (tmp_120_alt_flag_7 == ALT_MAYBE) {
current_location.update_lineno(1166);
/* BTS_Tests_LAPDm.ttcn, line 1166 */
tmp_120_alt_flag_7 = T.timeout(NULL);
if (tmp_120_alt_flag_7 == ALT_YES) {
current_location.update_lineno(1167);
/* BTS_Tests_LAPDm.ttcn, line 1167 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Missing RSL RLL ERROR INDICATION"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_120_default_flag == ALT_MAYBE) {
tmp_120_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_120_default_flag == ALT_YES || tmp_120_default_flag == ALT_BREAK) break;
else if (tmp_120_default_flag == ALT_REPEAT) goto tmp_120;
}
current_location.update_lineno(1142);
/* BTS_Tests_LAPDm.ttcn, line 1142 */
if (tmp_120_alt_flag_0 == ALT_NO && tmp_120_alt_flag_1 == ALT_NO && tmp_120_alt_flag_2 == ALT_NO && tmp_120_alt_flag_3 == ALT_NO && tmp_120_alt_flag_4 == ALT_NO && tmp_120_alt_flag_5 == ALT_NO && tmp_120_alt_flag_6 == ALT_NO && tmp_120_alt_flag_7 == ALT_NO && tmp_120_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 1142 and 1169.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1171);
/* BTS_Tests_LAPDm.ttcn, line 1171 */
if ((num__retrans == n200)) {
current_location.update_lineno(1172);
/* BTS_Tests_LAPDm.ttcn, line 1172 */
TTCN_Runtime::setverdict(PASS,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Received "),num__retrans.log(),TTCN_Logger::log_event_str(" on channel "),RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr.log(),TTCN_Logger::log_event_str(" link "),link__id.log(),TTCN_Logger::end_event_log2str()));
}
else {
current_location.update_lineno(1173);
/* BTS_Tests_LAPDm.ttcn, line 1173 */
if ((num__retrans < n200)) {
current_location.update_lineno(1174);
/* BTS_Tests_LAPDm.ttcn, line 1174 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Too few retransmissions ("),num__retrans.log(),TTCN_Logger::log_event_str("); N200="),n200.log(),TTCN_Logger::log_event_str(" on channel "),RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr.log(),TTCN_Logger::log_event_str(" link "),link__id.log(),TTCN_Logger::end_event_log2str()));
}
}
current_location.update_lineno(1178);
/* BTS_Tests_LAPDm.ttcn, line 1178 */
fp__common__fini();
}

void start_f__TC__t200__n200(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_t200_n200(");
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, "BTS_Tests_LAPDm", "f_TC_t200_n200", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__t200__n200(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1180, TTCN_Location::LOCATION_TESTCASE, "TC_t200_n200");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_t200_n200", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1181);
/* BTS_Tests_LAPDm.ttcn, line 1181 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(1182);
/* BTS_Tests_LAPDm.ttcn, line 1182 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__t200__n200);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_t200_n200 was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__rr__response__frame__loss(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1187, TTCN_Location::LOCATION_FUNCTION, "f_TC_rr_response_frame_loss");
current_location.update_lineno(1188);
/* BTS_Tests_LAPDm.ttcn, line 1188 */
GSM__Types::RslLinkId link__id(GSM__Types::ts__RslLinkID__DCCH(0).valueof());
current_location.update_lineno(1189);
/* BTS_Tests_LAPDm.ttcn, line 1189 */
INTEGER sapi(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi());
current_location.update_lineno(1190);
/* BTS_Tests_LAPDm.ttcn, line 1190 */
BOOLEAN is__sacch(FALSE);
current_location.update_lineno(1191);
/* BTS_Tests_LAPDm.ttcn, line 1191 */
if ((const_cast< const GSM__Types::RslLinkId&>(link__id).c() == GSM__Types::RslLinkIdC::SACCH)) {
current_location.update_lineno(1192);
/* BTS_Tests_LAPDm.ttcn, line 1192 */
is__sacch = TRUE;
}
current_location.update_lineno(1194);
/* BTS_Tests_LAPDm.ttcn, line 1194 */
TIMER T("T", 3.0);
current_location.update_lineno(1195);
/* BTS_Tests_LAPDm.ttcn, line 1195 */
DEFAULT d;
current_location.update_lineno(1197);
/* BTS_Tests_LAPDm.ttcn, line 1197 */
fp__common__init();
current_location.update_lineno(1200);
/* BTS_Tests_LAPDm.ttcn, line 1200 */
d = activate_as__ignore__background(TRUE, as__ignore__background_ignore__rsl__errors_defval);
current_location.update_lineno(1201);
/* BTS_Tests_LAPDm.ttcn, line 1201 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(1202);
/* BTS_Tests_LAPDm.ttcn, line 1202 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(1204);
/* BTS_Tests_LAPDm.ttcn, line 1204 */
f__establish__mo(link__id);
current_location.update_lineno(1206);
/* BTS_Tests_LAPDm.ttcn, line 1206 */
OCTETSTRING l3__mo(Osmocom__Types::f__rnd__octstring(10));
current_location.update_lineno(1208);
/* BTS_Tests_LAPDm.ttcn, line 1208 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::ts__LAPDm__I(sapi, LAPDm__Types::cr__MO__CMD, FALSE, 0, 0, l3__mo, LAPDm__Types::ts__LAPDm__I_m_defval)), FALSE, NULL);
current_location.update_lineno(1210);
/* BTS_Tests_LAPDm.ttcn, line 1210 */
{
tmp_124:
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 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__DATA__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(l3__mo)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_124;
}
current_location.update_lineno(1210);
/* BTS_Tests_LAPDm.ttcn, line 1210 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 1210.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1212);
/* BTS_Tests_LAPDm.ttcn, line 1212 */
{
tmp_125:
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 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::tr__LAPDm__RR(INTEGER_template(sapi), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(FALSE), INTEGER_template(1))), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_125;
}
current_location.update_lineno(1212);
/* BTS_Tests_LAPDm.ttcn, line 1212 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 1212.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1215);
/* BTS_Tests_LAPDm.ttcn, line 1215 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::ts__LAPDm__I(sapi, LAPDm__Types::cr__MO__CMD, TRUE, 0, 0, l3__mo, LAPDm__Types::ts__LAPDm__I_m_defval)), FALSE, NULL);
current_location.update_lineno(1218);
/* BTS_Tests_LAPDm.ttcn, line 1218 */
T.start();
current_location.update_lineno(1219);
/* BTS_Tests_LAPDm.ttcn, line 1219 */
{
tmp_126:
alt_status tmp_126_alt_flag_0 = ALT_MAYBE;
alt_status tmp_126_alt_flag_1 = ALT_MAYBE;
alt_status tmp_126_alt_flag_2 = ALT_MAYBE;
alt_status tmp_126_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_126_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1221);
/* BTS_Tests_LAPDm.ttcn, line 1221 */
tmp_126_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::tr__LAPDm__RR(INTEGER_template(sapi), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(TRUE), INTEGER_template(1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_126_alt_flag_0 == ALT_YES) {
current_location.update_lineno(1222);
/* BTS_Tests_LAPDm.ttcn, line 1222 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_126_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1225);
/* BTS_Tests_LAPDm.ttcn, line 1225 */
tmp_126_alt_flag_1 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::tr__LAPDm__REJ(INTEGER_template(sapi), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(TRUE), INTEGER_template(1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_126_alt_flag_1 == ALT_YES) {
current_location.update_lineno(1226);
/* BTS_Tests_LAPDm.ttcn, line 1226 */
TTCN_Runtime::setverdict(PASS);
break;
}
}
if (tmp_126_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1228);
/* BTS_Tests_LAPDm.ttcn, line 1228 */
tmp_126_alt_flag_2 = T.timeout(NULL);
if (tmp_126_alt_flag_2 == ALT_YES) {
current_location.update_lineno(1229);
/* BTS_Tests_LAPDm.ttcn, line 1229 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for RR or REJ"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_126_default_flag == ALT_MAYBE) {
tmp_126_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_126_default_flag == ALT_YES || tmp_126_default_flag == ALT_BREAK) break;
else if (tmp_126_default_flag == ALT_REPEAT) goto tmp_126;
}
current_location.update_lineno(1219);
/* BTS_Tests_LAPDm.ttcn, line 1219 */
if (tmp_126_alt_flag_0 == ALT_NO && tmp_126_alt_flag_1 == ALT_NO && tmp_126_alt_flag_2 == ALT_NO && tmp_126_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 1219 and 1231.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1233);
/* BTS_Tests_LAPDm.ttcn, line 1233 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(1235);
/* BTS_Tests_LAPDm.ttcn, line 1235 */
fp__common__fini();
}

void start_f__TC__rr__response__frame__loss(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rr_response_frame_loss(");
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, "BTS_Tests_LAPDm", "f_TC_rr_response_frame_loss", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__rr__response__frame__loss(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1237, TTCN_Location::LOCATION_TESTCASE, "TC_rr_response_frame_loss");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_rr_response_frame_loss", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1238);
/* BTS_Tests_LAPDm.ttcn, line 1238 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(1239);
/* BTS_Tests_LAPDm.ttcn, line 1239 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__rr__response__frame__loss);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_rr_response_frame_loss was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__incorrect__cr(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1243, TTCN_Location::LOCATION_FUNCTION, "f_TC_incorrect_cr");
current_location.update_lineno(1244);
/* BTS_Tests_LAPDm.ttcn, line 1244 */
GSM__Types::RslLinkId link__id(GSM__Types::ts__RslLinkID__DCCH(0).valueof());
current_location.update_lineno(1245);
/* BTS_Tests_LAPDm.ttcn, line 1245 */
INTEGER sapi(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi());
current_location.update_lineno(1246);
/* BTS_Tests_LAPDm.ttcn, line 1246 */
BOOLEAN is__sacch(FALSE);
current_location.update_lineno(1247);
/* BTS_Tests_LAPDm.ttcn, line 1247 */
if ((const_cast< const GSM__Types::RslLinkId&>(link__id).c() == GSM__Types::RslLinkIdC::SACCH)) {
current_location.update_lineno(1248);
/* BTS_Tests_LAPDm.ttcn, line 1248 */
is__sacch = TRUE;
}
current_location.update_lineno(1250);
/* BTS_Tests_LAPDm.ttcn, line 1250 */
TIMER T("T", 3.0);
current_location.update_lineno(1251);
/* BTS_Tests_LAPDm.ttcn, line 1251 */
DEFAULT d;
current_location.update_lineno(1253);
/* BTS_Tests_LAPDm.ttcn, line 1253 */
fp__common__init();
current_location.update_lineno(1256);
/* BTS_Tests_LAPDm.ttcn, line 1256 */
d = activate_as__ignore__background(TRUE, as__ignore__background_ignore__rsl__errors_defval);
current_location.update_lineno(1257);
/* BTS_Tests_LAPDm.ttcn, line 1257 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(1258);
/* BTS_Tests_LAPDm.ttcn, line 1258 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(1260);
/* BTS_Tests_LAPDm.ttcn, line 1260 */
f__establish__mo(link__id);
current_location.update_lineno(1262);
/* BTS_Tests_LAPDm.ttcn, line 1262 */
OCTETSTRING l3__mo(Osmocom__Types::f__rnd__octstring(10));
current_location.update_lineno(1264);
/* BTS_Tests_LAPDm.ttcn, line 1264 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::ts__LAPDm__I(sapi, LAPDm__Types::cr__MO__RSP, TRUE, 0, 0, l3__mo, LAPDm__Types::ts__LAPDm__I_m_defval)), FALSE, NULL);
current_location.update_lineno(1266);
/* BTS_Tests_LAPDm.ttcn, line 1266 */
T.start();
current_location.update_lineno(1267);
/* BTS_Tests_LAPDm.ttcn, line 1267 */
{
tmp_129:
alt_status tmp_129_alt_flag_0 = ALT_MAYBE;
alt_status tmp_129_alt_flag_1 = ALT_MAYBE;
alt_status tmp_129_alt_flag_2 = ALT_MAYBE;
alt_status tmp_129_alt_flag_3 = ALT_MAYBE;
alt_status tmp_129_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_129_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1268);
/* BTS_Tests_LAPDm.ttcn, line 1268 */
tmp_129_alt_flag_0 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__DATA__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(l3__mo)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_129_alt_flag_0 == ALT_YES) {
current_location.update_lineno(1269);
/* BTS_Tests_LAPDm.ttcn, line 1269 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("BTS didn't ignore I frame with wrong C/R bit"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_129_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1271);
/* BTS_Tests_LAPDm.ttcn, line 1271 */
tmp_129_alt_flag_1 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__ERROR__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(os_8)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_129_alt_flag_1 == ALT_YES) {
current_location.update_lineno(1272);
/* BTS_Tests_LAPDm.ttcn, line 1272 */
goto tmp_129;
}
}
if (tmp_129_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1275);
/* BTS_Tests_LAPDm.ttcn, line 1275 */
tmp_129_alt_flag_2 = as__lapdm__idle_instance(first_run);
if (tmp_129_alt_flag_2 == ALT_REPEAT) goto tmp_129;
if (tmp_129_alt_flag_2 == ALT_BREAK) break;
if (tmp_129_alt_flag_2 == ALT_YES) {
current_location.update_lineno(1276);
/* BTS_Tests_LAPDm.ttcn, line 1276 */
TTCN_Runtime::setverdict(PASS,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("still sending idle frames"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_129_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(1278);
/* BTS_Tests_LAPDm.ttcn, line 1278 */
tmp_129_alt_flag_3 = T.timeout(NULL);
if (tmp_129_alt_flag_3 == ALT_YES) break;
}
if (tmp_129_default_flag == ALT_MAYBE) {
tmp_129_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_129_default_flag == ALT_YES || tmp_129_default_flag == ALT_BREAK) break;
else if (tmp_129_default_flag == ALT_REPEAT) goto tmp_129;
}
current_location.update_lineno(1267);
/* BTS_Tests_LAPDm.ttcn, line 1267 */
if (tmp_129_alt_flag_0 == ALT_NO && tmp_129_alt_flag_1 == ALT_NO && tmp_129_alt_flag_2 == ALT_NO && tmp_129_alt_flag_3 == ALT_NO && tmp_129_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 1267 and 1279.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1282);
/* BTS_Tests_LAPDm.ttcn, line 1282 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::ts__LAPDm__RR(sapi, LAPDm__Types::cr__MO__CMD, TRUE, 0)), FALSE, NULL);
current_location.update_lineno(1285);
/* BTS_Tests_LAPDm.ttcn, line 1285 */
{
tmp_130:
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 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::tr__LAPDm__RR(INTEGER_template(sapi), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(TRUE), INTEGER_template(0))), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_130;
}
current_location.update_lineno(1285);
/* BTS_Tests_LAPDm.ttcn, line 1285 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 1285.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1287);
/* BTS_Tests_LAPDm.ttcn, line 1287 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(1289);
/* BTS_Tests_LAPDm.ttcn, line 1289 */
fp__common__fini();
}

void start_f__TC__incorrect__cr(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_incorrect_cr(");
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, "BTS_Tests_LAPDm", "f_TC_incorrect_cr", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__incorrect__cr(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1291, TTCN_Location::LOCATION_TESTCASE, "TC_incorrect_cr");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_incorrect_cr", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1292);
/* BTS_Tests_LAPDm.ttcn, line 1292 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(1293);
/* BTS_Tests_LAPDm.ttcn, line 1293 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__incorrect__cr);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_incorrect_cr was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__sabm__incorrect__c(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1298, TTCN_Location::LOCATION_FUNCTION, "f_TC_sabm_incorrect_c");
current_location.update_lineno(1299);
/* BTS_Tests_LAPDm.ttcn, line 1299 */
GSM__Types::RslLinkId link__id(GSM__Types::ts__RslLinkID__DCCH(0).valueof());
current_location.update_lineno(1300);
/* BTS_Tests_LAPDm.ttcn, line 1300 */
INTEGER sapi(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi());
current_location.update_lineno(1301);
/* BTS_Tests_LAPDm.ttcn, line 1301 */
BOOLEAN is__sacch(FALSE);
current_location.update_lineno(1302);
/* BTS_Tests_LAPDm.ttcn, line 1302 */
if ((const_cast< const GSM__Types::RslLinkId&>(link__id).c() == GSM__Types::RslLinkIdC::SACCH)) {
current_location.update_lineno(1303);
/* BTS_Tests_LAPDm.ttcn, line 1303 */
is__sacch = TRUE;
}
current_location.update_lineno(1305);
/* BTS_Tests_LAPDm.ttcn, line 1305 */
TIMER T("T", 3.0);
current_location.update_lineno(1306);
/* BTS_Tests_LAPDm.ttcn, line 1306 */
DEFAULT d;
current_location.update_lineno(1308);
/* BTS_Tests_LAPDm.ttcn, line 1308 */
fp__common__init();
current_location.update_lineno(1311);
/* BTS_Tests_LAPDm.ttcn, line 1311 */
d = activate_as__ignore__background(TRUE, as__ignore__background_ignore__rsl__errors_defval);
current_location.update_lineno(1312);
/* BTS_Tests_LAPDm.ttcn, line 1312 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(1313);
/* BTS_Tests_LAPDm.ttcn, line 1313 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(1315);
/* BTS_Tests_LAPDm.ttcn, line 1315 */
f__establish__mo(link__id);
current_location.update_lineno(1318);
/* BTS_Tests_LAPDm.ttcn, line 1318 */
OCTETSTRING l3__mo(os_9);
current_location.update_lineno(1319);
/* BTS_Tests_LAPDm.ttcn, line 1319 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::ts__LAPDm__I(sapi, LAPDm__Types::cr__MO__CMD, FALSE, 0, 0, l3__mo, LAPDm__Types::ts__LAPDm__I_m_defval)), FALSE, NULL);
current_location.update_lineno(1322);
/* BTS_Tests_LAPDm.ttcn, line 1322 */
{
tmp_133:
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 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::tr__LAPDm__RR(INTEGER_template(sapi), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(FALSE), INTEGER_template(1))), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_133;
}
current_location.update_lineno(1322);
/* BTS_Tests_LAPDm.ttcn, line 1322 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 1322.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1323);
/* BTS_Tests_LAPDm.ttcn, line 1323 */
{
tmp_134:
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 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__DATA__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(l3__mo)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_134;
}
current_location.update_lineno(1323);
/* BTS_Tests_LAPDm.ttcn, line 1323 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 1323.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1325);
/* BTS_Tests_LAPDm.ttcn, line 1325 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::ts__LAPDm__SABM(sapi, LAPDm__Types::cr__MO__RSP, TRUE, os_1)), FALSE, NULL);
current_location.update_lineno(1327);
/* BTS_Tests_LAPDm.ttcn, line 1327 */
{
tmp_135:
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 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__ERROR__IND(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), OCTETSTRING_template(os_8)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_135;
}
current_location.update_lineno(1327);
/* BTS_Tests_LAPDm.ttcn, line 1327 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 1327.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1329);
/* BTS_Tests_LAPDm.ttcn, line 1329 */
{
tmp_136:
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 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::tr__LAPDm__UI(INTEGER_template(0), BOOLEAN_template(ANY_VALUE), OCTETSTRING_template(os_1))), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_136;
}
current_location.update_lineno(1329);
/* BTS_Tests_LAPDm.ttcn, line 1329 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 1329.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1331);
/* BTS_Tests_LAPDm.ttcn, line 1331 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::ts__LAPDm__RR(sapi, LAPDm__Types::cr__MO__CMD, TRUE, 0)), FALSE, NULL);
current_location.update_lineno(1333);
/* BTS_Tests_LAPDm.ttcn, line 1333 */
{
tmp_137:
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 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(is__sacch), LAPDm__Types::tr__LAPDm__RR(INTEGER_template(sapi), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(TRUE), INTEGER_template(1))), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_137;
}
current_location.update_lineno(1333);
/* BTS_Tests_LAPDm.ttcn, line 1333 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn, line 1333.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1335);
/* BTS_Tests_LAPDm.ttcn, line 1335 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(1337);
/* BTS_Tests_LAPDm.ttcn, line 1337 */
fp__common__fini();
}

void start_f__TC__sabm__incorrect__c(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_incorrect_c(");
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, "BTS_Tests_LAPDm", "f_TC_sabm_incorrect_c", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__sabm__incorrect__c(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1339, TTCN_Location::LOCATION_TESTCASE, "TC_sabm_incorrect_c");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_sabm_incorrect_c", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1340);
/* BTS_Tests_LAPDm.ttcn, line 1340 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(1341);
/* BTS_Tests_LAPDm.ttcn, line 1341 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__sabm__incorrect__c);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_sabm_incorrect_c was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__normal__reestablishment(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1350, TTCN_Location::LOCATION_FUNCTION, "f_TC_normal_reestablishment");
current_location.update_lineno(1351);
/* BTS_Tests_LAPDm.ttcn, line 1351 */
GSM__Types::RslLinkId link__id(GSM__Types::ts__RslLinkID__DCCH(0).valueof());
current_location.update_lineno(1352);
/* BTS_Tests_LAPDm.ttcn, line 1352 */
OCTETSTRING l3__mo(Osmocom__Types::f__rnd__octstring(251));
current_location.update_lineno(1353);
/* BTS_Tests_LAPDm.ttcn, line 1353 */
DEFAULT d;
current_location.update_lineno(1354);
/* BTS_Tests_LAPDm.ttcn, line 1354 */
TIMER T("T", 3.0);
current_location.update_lineno(1355);
/* BTS_Tests_LAPDm.ttcn, line 1355 */
BOOLEAN use__sacch(FALSE);
current_location.update_lineno(1356);
/* BTS_Tests_LAPDm.ttcn, line 1356 */
BOOLEAN received__estind(FALSE);
current_location.update_lineno(1357);
/* BTS_Tests_LAPDm.ttcn, line 1357 */
BOOLEAN received__ua(FALSE);
current_location.update_lineno(1359);
/* BTS_Tests_LAPDm.ttcn, line 1359 */
fp__common__init();
current_location.update_lineno(1362);
/* BTS_Tests_LAPDm.ttcn, line 1362 */
d = activate_as__ignore__background(TRUE, as__ignore__background_ignore__rsl__errors_defval);
current_location.update_lineno(1363);
/* BTS_Tests_LAPDm.ttcn, line 1363 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(1364);
/* BTS_Tests_LAPDm.ttcn, line 1364 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(1366);
/* BTS_Tests_LAPDm.ttcn, line 1366 */
f__establish__mo(link__id);
current_location.update_lineno(1368);
/* BTS_Tests_LAPDm.ttcn, line 1368 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(1370);
/* BTS_Tests_LAPDm.ttcn, line 1370 */
LapdmDlState dls(t__init__LapdmDlState.valueof());
current_location.update_lineno(1371);
/* BTS_Tests_LAPDm.ttcn, line 1371 */
f__lapdm__transceive__mo(dls, link__id, l3__mo);
current_location.update_lineno(1373);
/* BTS_Tests_LAPDm.ttcn, line 1373 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi()), BOOLEAN_template(use__sacch), LAPDm__Types::ts__LAPDm__SABM(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi(), LAPDm__Types::cr__MO__CMD, TRUE, os_1)), FALSE, NULL);
current_location.update_lineno(1374);
/* BTS_Tests_LAPDm.ttcn, line 1374 */
T.start();
current_location.update_lineno(1375);
/* BTS_Tests_LAPDm.ttcn, line 1375 */
{
tmp_139:
alt_status tmp_139_alt_flag_0 = ALT_MAYBE;
alt_status tmp_139_alt_flag_1 = ALT_MAYBE;
alt_status tmp_139_alt_flag_2 = ALT_MAYBE;
alt_status tmp_139_alt_flag_3 = ALT_MAYBE;
alt_status tmp_139_alt_flag_4 = ALT_MAYBE;
alt_status tmp_139_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_139_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1376);
/* BTS_Tests_LAPDm.ttcn, line 1376 */
tmp_139_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(ANY_VALUE), BOOLEAN_template(use__sacch), LAPDm__Types::tr__LAPDm__UA(INTEGER_template(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi()), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(TRUE), OCTETSTRING_template(os_1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_139_alt_flag_0 == ALT_YES) {
current_location.update_lineno(1377);
/* BTS_Tests_LAPDm.ttcn, line 1377 */
received__ua = TRUE;
current_location.update_lineno(1378);
/* BTS_Tests_LAPDm.ttcn, line 1378 */
if ((!(received__estind))) {
current_location.update_lineno(1379);
/* BTS_Tests_LAPDm.ttcn, line 1379 */
goto tmp_139;
}
break;
}
}
if (tmp_139_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1382);
/* BTS_Tests_LAPDm.ttcn, line 1382 */
tmp_139_alt_flag_1 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__EST__IND__NOL3(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_139_alt_flag_1 == ALT_YES) {
current_location.update_lineno(1383);
/* BTS_Tests_LAPDm.ttcn, line 1383 */
received__estind = TRUE;
current_location.update_lineno(1384);
/* BTS_Tests_LAPDm.ttcn, line 1384 */
if ((!(received__ua))) {
current_location.update_lineno(1385);
/* BTS_Tests_LAPDm.ttcn, line 1385 */
goto tmp_139;
}
break;
}
}
if (tmp_139_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1388);
/* BTS_Tests_LAPDm.ttcn, line 1388 */
tmp_139_alt_flag_2 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(any_compref, NULL, NULL, NULL);
if (tmp_139_alt_flag_2 == ALT_YES) {
current_location.update_lineno(1388);
/* BTS_Tests_LAPDm.ttcn, line 1388 */
goto tmp_139;
}
}
if (tmp_139_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(1389);
/* BTS_Tests_LAPDm.ttcn, line 1389 */
tmp_139_alt_flag_3 = lapdm__test__CT_component_LAPDM.receive(any_compref, NULL, NULL, NULL);
if (tmp_139_alt_flag_3 == ALT_YES) {
current_location.update_lineno(1389);
/* BTS_Tests_LAPDm.ttcn, line 1389 */
goto tmp_139;
}
}
if (tmp_139_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(1390);
/* BTS_Tests_LAPDm.ttcn, line 1390 */
tmp_139_alt_flag_4 = T.timeout(NULL);
if (tmp_139_alt_flag_4 == ALT_YES) {
current_location.update_lineno(1390);
/* BTS_Tests_LAPDm.ttcn, line 1390 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for UA"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_139_default_flag == ALT_MAYBE) {
tmp_139_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_139_default_flag == ALT_YES || tmp_139_default_flag == ALT_BREAK) break;
else if (tmp_139_default_flag == ALT_REPEAT) goto tmp_139;
}
current_location.update_lineno(1375);
/* BTS_Tests_LAPDm.ttcn, line 1375 */
if (tmp_139_alt_flag_0 == ALT_NO && tmp_139_alt_flag_1 == ALT_NO && tmp_139_alt_flag_2 == ALT_NO && tmp_139_alt_flag_3 == ALT_NO && tmp_139_alt_flag_4 == ALT_NO && tmp_139_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 1375 and 1391.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1394);
/* BTS_Tests_LAPDm.ttcn, line 1394 */
l3__mo = Osmocom__Types::f__rnd__octstring(251);
current_location.update_lineno(1395);
/* BTS_Tests_LAPDm.ttcn, line 1395 */
dls = t__init__LapdmDlState.valueof();
current_location.update_lineno(1396);
/* BTS_Tests_LAPDm.ttcn, line 1396 */
f__lapdm__transceive__mo(dls, link__id, l3__mo);
current_location.update_lineno(1399);
/* BTS_Tests_LAPDm.ttcn, line 1399 */
fp__common__fini();
}

void start_f__TC__normal__reestablishment(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_normal_reestablishment(");
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, "BTS_Tests_LAPDm", "f_TC_normal_reestablishment", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__normal__reestablishment(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1401, TTCN_Location::LOCATION_TESTCASE, "TC_normal_reestablishment");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_normal_reestablishment", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1402);
/* BTS_Tests_LAPDm.ttcn, line 1402 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(1403);
/* BTS_Tests_LAPDm.ttcn, line 1403 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__normal__reestablishment);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_normal_reestablishment was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void f__TC__normal__reestablishment__state__unacked(const CHARSTRING& )
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1412, TTCN_Location::LOCATION_FUNCTION, "f_TC_normal_reestablishment_state_unacked");
current_location.update_lineno(1413);
/* BTS_Tests_LAPDm.ttcn, line 1413 */
GSM__Types::RslLinkId link__id(GSM__Types::ts__RslLinkID__DCCH(0).valueof());
current_location.update_lineno(1414);
/* BTS_Tests_LAPDm.ttcn, line 1414 */
OCTETSTRING l3__mo(Osmocom__Types::f__rnd__octstring(251));
current_location.update_lineno(1415);
/* BTS_Tests_LAPDm.ttcn, line 1415 */
OCTETSTRING l3__mt(Osmocom__Types::f__rnd__octstring(20));
current_location.update_lineno(1416);
/* BTS_Tests_LAPDm.ttcn, line 1416 */
LapdmDlState dls;
current_location.update_lineno(1417);
/* BTS_Tests_LAPDm.ttcn, line 1417 */
DEFAULT d;
current_location.update_lineno(1418);
/* BTS_Tests_LAPDm.ttcn, line 1418 */
TIMER T("T", 3.0);
current_location.update_lineno(1419);
/* BTS_Tests_LAPDm.ttcn, line 1419 */
BOOLEAN use__sacch(FALSE);
current_location.update_lineno(1420);
/* BTS_Tests_LAPDm.ttcn, line 1420 */
BOOLEAN received__estind(FALSE);
current_location.update_lineno(1421);
/* BTS_Tests_LAPDm.ttcn, line 1421 */
BOOLEAN received__ua(FALSE);
current_location.update_lineno(1423);
/* BTS_Tests_LAPDm.ttcn, line 1423 */
fp__common__init();
current_location.update_lineno(1426);
/* BTS_Tests_LAPDm.ttcn, line 1426 */
d = activate_as__ignore__background(TRUE, as__ignore__background_ignore__rsl__errors_defval);
current_location.update_lineno(1427);
/* BTS_Tests_LAPDm.ttcn, line 1427 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.clear();
current_location.update_lineno(1428);
/* BTS_Tests_LAPDm.ttcn, line 1428 */
lapdm__test__CT_component_LAPDM.clear();
current_location.update_lineno(1430);
/* BTS_Tests_LAPDm.ttcn, line 1430 */
f__establish__mo(link__id);
current_location.update_lineno(1431);
/* BTS_Tests_LAPDm.ttcn, line 1431 */
RSL__Emulation::RSL__DchanHdlr_component_RSL.send(RSL__Types::ts__RSL__DATA__REQ(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id), l3__mt), FALSE, NULL);
current_location.update_lineno(1433);
/* BTS_Tests_LAPDm.ttcn, line 1433 */
{
tmp_145:
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 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(use__sacch), LAPDm__Types::tr__LAPDm__I(INTEGER_template(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi()), BOOLEAN_template(LAPDm__Types::cr__MT__CMD), BOOLEAN_template(FALSE), INTEGER_template(0), INTEGER_template(0), OCTETSTRING_template(l3__mt), LAPDm__Types::tr__LAPDm__I_m_defval)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_145;
}
current_location.update_lineno(1433);
/* BTS_Tests_LAPDm.ttcn, line 1433 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn between lines 1433 and 1434.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1436);
/* BTS_Tests_LAPDm.ttcn, line 1436 */
{
tmp_146:
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 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(0), BOOLEAN_template(use__sacch), LAPDm__Types::tr__LAPDm__I(INTEGER_template(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi()), BOOLEAN_template(LAPDm__Types::cr__MT__CMD), BOOLEAN_template(TRUE), INTEGER_template(0), INTEGER_template(0), OCTETSTRING_template(l3__mt), LAPDm__Types::tr__LAPDm__I_m_defval)), NULL, any_compref, NULL, NULL, NULL);
if (alt_flag == ALT_YES) break;
}
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_146;
}
current_location.update_lineno(1436);
/* BTS_Tests_LAPDm.ttcn, line 1436 */
if (alt_flag == ALT_NO && default_flag == ALT_NO) TTCN_error("Stand-alone receive statement failed in file BTS_Tests_LAPDm.ttcn between lines 1436 and 1437.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1438);
/* BTS_Tests_LAPDm.ttcn, line 1438 */
TTCN_Default::deactivate(d);
;
current_location.update_lineno(1441);
/* BTS_Tests_LAPDm.ttcn, line 1441 */
lapdm__test__CT_component_LAPDM.send(t__PH__DATA(INTEGER_template(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi()), BOOLEAN_template(use__sacch), LAPDm__Types::ts__LAPDm__SABM(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi(), LAPDm__Types::cr__MO__CMD, TRUE, os_1)), FALSE, NULL);
current_location.update_lineno(1442);
/* BTS_Tests_LAPDm.ttcn, line 1442 */
T.start();
current_location.update_lineno(1443);
/* BTS_Tests_LAPDm.ttcn, line 1443 */
{
tmp_147:
alt_status tmp_147_alt_flag_0 = ALT_MAYBE;
alt_status tmp_147_alt_flag_1 = ALT_MAYBE;
alt_status tmp_147_alt_flag_2 = ALT_MAYBE;
alt_status tmp_147_alt_flag_3 = ALT_MAYBE;
alt_status tmp_147_alt_flag_4 = ALT_MAYBE;
alt_status tmp_147_default_flag = ALT_MAYBE;
boolean first_run = TRUE;
TTCN_Snapshot::take_new(FALSE);
for ( ; ; ) {
if (tmp_147_alt_flag_0 == ALT_MAYBE) {
current_location.update_lineno(1444);
/* BTS_Tests_LAPDm.ttcn, line 1444 */
tmp_147_alt_flag_0 = lapdm__test__CT_component_LAPDM.receive(t__PH__DATA(INTEGER_template(ANY_VALUE), BOOLEAN_template(use__sacch), LAPDm__Types::tr__LAPDm__UA(INTEGER_template(const_cast< const GSM__Types::RslLinkId&>(link__id).sapi()), BOOLEAN_template(LAPDm__Types::cr__MT__RSP), BOOLEAN_template(TRUE), OCTETSTRING_template(os_1))), NULL, any_compref, NULL, NULL, NULL);
if (tmp_147_alt_flag_0 == ALT_YES) {
current_location.update_lineno(1445);
/* BTS_Tests_LAPDm.ttcn, line 1445 */
received__ua = TRUE;
current_location.update_lineno(1446);
/* BTS_Tests_LAPDm.ttcn, line 1446 */
if ((!(received__estind))) {
current_location.update_lineno(1447);
/* BTS_Tests_LAPDm.ttcn, line 1447 */
goto tmp_147;
}
break;
}
}
if (tmp_147_alt_flag_1 == ALT_MAYBE) {
current_location.update_lineno(1450);
/* BTS_Tests_LAPDm.ttcn, line 1450 */
tmp_147_alt_flag_1 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(RSL__Types::tr__RSL__EST__IND__NOL3(GSM__Types::RslChannelNr_template(RSL__Emulation::RSL__DchanHdlr_component_g__chan__nr), GSM__Types::RslLinkId_template(link__id)), NULL, any_compref, NULL, NULL, NULL);
if (tmp_147_alt_flag_1 == ALT_YES) {
current_location.update_lineno(1451);
/* BTS_Tests_LAPDm.ttcn, line 1451 */
received__estind = TRUE;
current_location.update_lineno(1452);
/* BTS_Tests_LAPDm.ttcn, line 1452 */
if ((!(received__ua))) {
current_location.update_lineno(1453);
/* BTS_Tests_LAPDm.ttcn, line 1453 */
goto tmp_147;
}
break;
}
}
if (tmp_147_alt_flag_2 == ALT_MAYBE) {
current_location.update_lineno(1456);
/* BTS_Tests_LAPDm.ttcn, line 1456 */
tmp_147_alt_flag_2 = RSL__Emulation::RSL__DchanHdlr_component_RSL.receive(any_compref, NULL, NULL, NULL);
if (tmp_147_alt_flag_2 == ALT_YES) {
current_location.update_lineno(1456);
/* BTS_Tests_LAPDm.ttcn, line 1456 */
goto tmp_147;
}
}
if (tmp_147_alt_flag_3 == ALT_MAYBE) {
current_location.update_lineno(1457);
/* BTS_Tests_LAPDm.ttcn, line 1457 */
tmp_147_alt_flag_3 = lapdm__test__CT_component_LAPDM.receive(any_compref, NULL, NULL, NULL);
if (tmp_147_alt_flag_3 == ALT_YES) {
current_location.update_lineno(1457);
/* BTS_Tests_LAPDm.ttcn, line 1457 */
goto tmp_147;
}
}
if (tmp_147_alt_flag_4 == ALT_MAYBE) {
current_location.update_lineno(1458);
/* BTS_Tests_LAPDm.ttcn, line 1458 */
tmp_147_alt_flag_4 = T.timeout(NULL);
if (tmp_147_alt_flag_4 == ALT_YES) {
current_location.update_lineno(1458);
/* BTS_Tests_LAPDm.ttcn, line 1458 */
TTCN_Runtime::setverdict(FAIL,(TTCN_Logger::begin_event_log2str(),TTCN_Logger::log_event_str("Timeout waiting for UA"),TTCN_Logger::end_event_log2str()));
break;
}
}
if (tmp_147_default_flag == ALT_MAYBE) {
tmp_147_default_flag = TTCN_Default::try_altsteps(first_run);
if (tmp_147_default_flag == ALT_YES || tmp_147_default_flag == ALT_BREAK) break;
else if (tmp_147_default_flag == ALT_REPEAT) goto tmp_147;
}
current_location.update_lineno(1443);
/* BTS_Tests_LAPDm.ttcn, line 1443 */
if (tmp_147_alt_flag_0 == ALT_NO && tmp_147_alt_flag_1 == ALT_NO && tmp_147_alt_flag_2 == ALT_NO && tmp_147_alt_flag_3 == ALT_NO && tmp_147_alt_flag_4 == ALT_NO && tmp_147_default_flag == ALT_NO) TTCN_error("None of the branches can be chosen in the alt statement in file BTS_Tests_LAPDm.ttcn between lines 1443 and 1459.");
TTCN_Snapshot::take_new(TRUE);
first_run = FALSE;
}
}
current_location.update_lineno(1462);
/* BTS_Tests_LAPDm.ttcn, line 1462 */
l3__mo = Osmocom__Types::f__rnd__octstring(251);
current_location.update_lineno(1463);
/* BTS_Tests_LAPDm.ttcn, line 1463 */
dls = t__init__LapdmDlState.valueof();
current_location.update_lineno(1464);
/* BTS_Tests_LAPDm.ttcn, line 1464 */
f__lapdm__transceive__mo(dls, link__id, l3__mo);
current_location.update_lineno(1466);
/* BTS_Tests_LAPDm.ttcn, line 1466 */
fp__common__fini();
}

void start_f__TC__normal__reestablishment__state__unacked(const COMPONENT& component_reference, const CHARSTRING& id)
{
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_normal_reestablishment_state_unacked(");
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, "BTS_Tests_LAPDm", "f_TC_normal_reestablishment_state_unacked", text_buf);
id.encode_text(text_buf);
TTCN_Runtime::send_start_component(text_buf);
}

verdicttype testcase_TC__normal__reestablishment__state__unacked(boolean has_timer, double timer_value)
{
TTCN_Runtime::check_begin_testcase(has_timer, timer_value);
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1468, TTCN_Location::LOCATION_TESTCASE, "TC_normal_reestablishment_state_unacked");
try {
TTCN_Runtime::begin_testcase("BTS_Tests_LAPDm", "TC_normal_reestablishment_state_unacked", "BTS_Tests", "test_CT", "BTS_Tests", "test_CT", has_timer, timer_value);
current_location.update_lineno(1469);
/* BTS_Tests_LAPDm.ttcn, line 1469 */
BTS__Tests::ConnHdlrPars pars(BTS__Tests::t__Pars(GSM__Types::t__RslChanNr__Bm(INTEGER_template(1)), RSL__Types::ts__RSL__ChanMode__SIGN(RSL__Types::ts__RSL__ChanMode__SIGN_t_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxd_defval, RSL__Types::ts__RSL__ChanMode__SIGN_dtxu_defval), BTS__Tests::t__Pars_spec_defval, BTS__Tests::t__Pars_trx__nr_defval, BTS__Tests::t__Pars_t__guard_defval).valueof());
current_location.update_lineno(1470);
/* BTS_Tests_LAPDm.ttcn, line 1470 */
BTS__Tests::f__testmatrix__each__chan(pars, &f__TC__normal__reestablishment__state__unacked);
} catch (const TC_Error& tc_error) {
} catch (const TC_End& tc_end) {
TTCN_Logger::log_str(TTCN_FUNCTION, "Test case TC_normal_reestablishment_state_unacked was stopped.");
}
return TTCN_Runtime::end_testcase();
}

void module_control_part()
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 1473, TTCN_Location::LOCATION_CONTROLPART, "BTS_Tests_LAPDm");
TTCN_Runtime::begin_controlpart("BTS_Tests_LAPDm");
TTCN_ControlPartEnder ender_("BTS_Tests_LAPDm");
current_location.update_lineno(1474);
/* BTS_Tests_LAPDm.ttcn, line 1474 */
testcase_TC__sabm__ua__dcch__sapi0(FALSE, 0.0);
current_location.update_lineno(1475);
/* BTS_Tests_LAPDm.ttcn, line 1475 */
testcase_TC__sabm__ua__dcch__sapi0__nopayload(FALSE, 0.0);
current_location.update_lineno(1476);
/* BTS_Tests_LAPDm.ttcn, line 1476 */
testcase_TC__sabm__ua__dcch__sapi3(FALSE, 0.0);
current_location.update_lineno(1477);
/* BTS_Tests_LAPDm.ttcn, line 1477 */
testcase_TC__sabm__ua__dcch__sapi4(FALSE, 0.0);
current_location.update_lineno(1478);
/* BTS_Tests_LAPDm.ttcn, line 1478 */
testcase_TC__sabm__contention(FALSE, 0.0);
current_location.update_lineno(1479);
/* BTS_Tests_LAPDm.ttcn, line 1479 */
testcase_TC__sabm__retransmit(FALSE, 0.0);
current_location.update_lineno(1480);
/* BTS_Tests_LAPDm.ttcn, line 1480 */
testcase_TC__sabm__retransmit__bts(FALSE, 0.0);
current_location.update_lineno(1481);
/* BTS_Tests_LAPDm.ttcn, line 1481 */
testcase_TC__sabm__invalid__resp(FALSE, 0.0);
current_location.update_lineno(1482);
/* BTS_Tests_LAPDm.ttcn, line 1482 */
testcase_TC__sabm__dm(FALSE, 0.0);
current_location.update_lineno(1483);
/* BTS_Tests_LAPDm.ttcn, line 1483 */
testcase_TC__establish__ign__first__sabm(FALSE, 0.0);
current_location.update_lineno(1484);
/* BTS_Tests_LAPDm.ttcn, line 1484 */
testcase_TC__iframe__seq__and__ack(FALSE, 0.0);
current_location.update_lineno(1485);
/* BTS_Tests_LAPDm.ttcn, line 1485 */
testcase_TC__iframe__timer__recovery(FALSE, 0.0);
current_location.update_lineno(1486);
/* BTS_Tests_LAPDm.ttcn, line 1486 */
testcase_TC__ns__seq__error(FALSE, 0.0);
current_location.update_lineno(1487);
/* BTS_Tests_LAPDm.ttcn, line 1487 */
testcase_TC__nr__seq__error(FALSE, 0.0);
current_location.update_lineno(1488);
/* BTS_Tests_LAPDm.ttcn, line 1488 */
testcase_TC__rec__invalid__frame(FALSE, 0.0);
current_location.update_lineno(1489);
/* BTS_Tests_LAPDm.ttcn, line 1489 */
testcase_TC__segm__concat__dcch(FALSE, 0.0);
current_location.update_lineno(1490);
/* BTS_Tests_LAPDm.ttcn, line 1490 */
testcase_TC__segm__concat__sacch(FALSE, 0.0);
current_location.update_lineno(1491);
/* BTS_Tests_LAPDm.ttcn, line 1491 */
testcase_TC__t200__n200(FALSE, 0.0);
current_location.update_lineno(1492);
/* BTS_Tests_LAPDm.ttcn, line 1492 */
testcase_TC__rr__response__frame__loss(FALSE, 0.0);
current_location.update_lineno(1493);
/* BTS_Tests_LAPDm.ttcn, line 1493 */
testcase_TC__incorrect__cr(FALSE, 0.0);
current_location.update_lineno(1494);
/* BTS_Tests_LAPDm.ttcn, line 1494 */
testcase_TC__sabm__incorrect__c(FALSE, 0.0);
current_location.update_lineno(1495);
/* BTS_Tests_LAPDm.ttcn, line 1495 */
testcase_TC__normal__reestablishment(FALSE, 0.0);
current_location.update_lineno(1496);
/* BTS_Tests_LAPDm.ttcn, line 1496 */
testcase_TC__normal__reestablishment__state__unacked(FALSE, 0.0);
}


/* Bodies of static functions */

void pre_init_module()
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "BTS_Tests_LAPDm");
LAPDm__RAW__PT::module_object.pre_init_module();
RSL__Types::module_object.pre_init_module();
BTS__Tests::module_object.pre_init_module();
module_object.add_function("f_lapdm_init", (genericfunc_t)&f__lapdm__init, (genericfunc_t)&start_f__lapdm__init);
module_object.add_function("f_lapdm_exit", (genericfunc_t)&f__lapdm__exit, (genericfunc_t)&start_f__lapdm__exit);
module_object.add_function("f_switch_dcch", (genericfunc_t)&f__switch__dcch, (genericfunc_t)&start_f__switch__dcch);
module_object.add_function("f_release_dcch", (genericfunc_t)&f__release__dcch, (genericfunc_t)&start_f__release__dcch);
module_object.add_function("f_test_sabm_results_in_ua", (genericfunc_t)&f__test__sabm__results__in__ua, (genericfunc_t)&start_f__test__sabm__results__in__ua);
module_object.add_function("f_TC_sabm_ua_dcch_sapi0", (genericfunc_t)&f__TC__sabm__ua__dcch__sapi0, (genericfunc_t)&start_f__TC__sabm__ua__dcch__sapi0);
module_object.add_function("f_TC_sabm_ua_dcch_sapi0_nopayload", (genericfunc_t)&f__TC__sabm__ua__dcch__sapi0__nopayload, (genericfunc_t)&start_f__TC__sabm__ua__dcch__sapi0__nopayload);
module_object.add_function("f_TC_sabm_ua_dcch_sapi3", (genericfunc_t)&f__TC__sabm__ua__dcch__sapi3, (genericfunc_t)&start_f__TC__sabm__ua__dcch__sapi3);
module_object.add_function("f_TC_sabm_ua_dcch_sapi4", (genericfunc_t)&f__TC__sabm__ua__dcch__sapi4, (genericfunc_t)&start_f__TC__sabm__ua__dcch__sapi4);
module_object.add_testcase_nonpard("TC_sabm_ua_dcch_sapi0", testcase_TC__sabm__ua__dcch__sapi0);
module_object.add_testcase_nonpard("TC_sabm_ua_dcch_sapi0_nopayload", testcase_TC__sabm__ua__dcch__sapi0__nopayload);
module_object.add_testcase_nonpard("TC_sabm_ua_dcch_sapi3", testcase_TC__sabm__ua__dcch__sapi3);
module_object.add_testcase_nonpard("TC_sabm_ua_dcch_sapi4", testcase_TC__sabm__ua__dcch__sapi4);
module_object.add_function("f_TC_sabm_contention", (genericfunc_t)&f__TC__sabm__contention, (genericfunc_t)&start_f__TC__sabm__contention);
module_object.add_testcase_nonpard("TC_sabm_contention", testcase_TC__sabm__contention);
module_object.add_function("f_TC_sabm_retransmit", (genericfunc_t)&f__TC__sabm__retransmit, (genericfunc_t)&start_f__TC__sabm__retransmit);
module_object.add_testcase_nonpard("TC_sabm_retransmit", testcase_TC__sabm__retransmit);
module_object.add_function("fp_common_init", (genericfunc_t)&fp__common__init, (genericfunc_t)&start_fp__common__init);
module_object.add_function("fp_common_fini", (genericfunc_t)&fp__common__fini, (genericfunc_t)&start_fp__common__fini);
module_object.add_function("f_establish_mo", (genericfunc_t)&f__establish__mo, (genericfunc_t)&start_f__establish__mo);
module_object.add_function("f_TC_sabm_retransmit_bts", (genericfunc_t)&f__TC__sabm__retransmit__bts, (genericfunc_t)&start_f__TC__sabm__retransmit__bts);
module_object.add_testcase_nonpard("TC_sabm_retransmit_bts", testcase_TC__sabm__retransmit__bts);
module_object.add_function("f_TC_sabm_invalid_resp2", (genericfunc_t)&f__TC__sabm__invalid__resp2, (genericfunc_t)&start_f__TC__sabm__invalid__resp2);
module_object.add_function("f_TC_sabm_invalid_resp", (genericfunc_t)&f__TC__sabm__invalid__resp, (genericfunc_t)&start_f__TC__sabm__invalid__resp);
module_object.add_testcase_nonpard("TC_sabm_invalid_resp", testcase_TC__sabm__invalid__resp);
module_object.add_function("f_TC_sabm_dm", (genericfunc_t)&f__TC__sabm__dm, (genericfunc_t)&start_f__TC__sabm__dm);
module_object.add_testcase_nonpard("TC_sabm_dm", testcase_TC__sabm__dm);
module_object.add_function("f_TC_establish_ign_first_sabm", (genericfunc_t)&f__TC__establish__ign__first__sabm, (genericfunc_t)&start_f__TC__establish__ign__first__sabm);
module_object.add_testcase_nonpard("TC_establish_ign_first_sabm", testcase_TC__establish__ign__first__sabm);
module_object.add_altstep("as_lapdm_acch", (genericfunc_t)&as__lapdm__acch_instance, (genericfunc_t )&activate_as__lapdm__acch, (genericfunc_t )&as__lapdm__acch);
module_object.add_altstep("as_lapdm_dcch", (genericfunc_t)&as__lapdm__dcch_instance, (genericfunc_t )&activate_as__lapdm__dcch, (genericfunc_t )&as__lapdm__dcch);
module_object.add_altstep("as_lapdm_idle", (genericfunc_t)&as__lapdm__idle_instance, (genericfunc_t )&activate_as__lapdm__idle, (genericfunc_t )&as__lapdm__idle);
module_object.add_altstep("as_rsl_meas_rep", (genericfunc_t)&as__rsl__meas__rep_instance, (genericfunc_t )&activate_as__rsl__meas__rep, (genericfunc_t )&as__rsl__meas__rep);
module_object.add_altstep("as_rsl_fail_err", (genericfunc_t)&as__rsl__fail__err_instance, (genericfunc_t )&activate_as__rsl__fail__err, (genericfunc_t )&as__rsl__fail__err);
module_object.add_altstep("as_ignore_background", (genericfunc_t)&as__ignore__background_instance, (genericfunc_t )&activate_as__ignore__background, (genericfunc_t )&as__ignore__background);
module_object.add_function("f_TC_iframe_seq_and_ack", (genericfunc_t)&f__TC__iframe__seq__and__ack, (genericfunc_t)&start_f__TC__iframe__seq__and__ack);
module_object.add_testcase_nonpard("TC_iframe_seq_and_ack", testcase_TC__iframe__seq__and__ack);
module_object.add_function("f_TC_iframe_timer_recovery", (genericfunc_t)&f__TC__iframe__timer__recovery, (genericfunc_t)&start_f__TC__iframe__timer__recovery);
module_object.add_testcase_nonpard("TC_iframe_timer_recovery", testcase_TC__iframe__timer__recovery);
module_object.add_function("f_TC_ns_seq_error", (genericfunc_t)&f__TC__ns__seq__error, (genericfunc_t)&start_f__TC__ns__seq__error);
module_object.add_testcase_nonpard("TC_ns_seq_error", testcase_TC__ns__seq__error);
module_object.add_function("f_TC_nr_seq_error", (genericfunc_t)&f__TC__nr__seq__error, (genericfunc_t)&start_f__TC__nr__seq__error);
module_object.add_testcase_nonpard("TC_nr_seq_error", testcase_TC__nr__seq__error);
module_object.add_function("f_TC_rec_invalid_frame_txrx", (genericfunc_t)&f__TC__rec__invalid__frame__txrx, (genericfunc_t)&start_f__TC__rec__invalid__frame__txrx);
module_object.add_function("f_TC_rec_invalid_frame", (genericfunc_t)&f__TC__rec__invalid__frame, (genericfunc_t)&start_f__TC__rec__invalid__frame);
module_object.add_testcase_nonpard("TC_rec_invalid_frame", testcase_TC__rec__invalid__frame);
module_object.add_function("inc_mod8", (genericfunc_t)&inc__mod8, NULL);
module_object.add_function("f_lapdm_transceive_mo", (genericfunc_t)&f__lapdm__transceive__mo, (genericfunc_t)&start_f__lapdm__transceive__mo);
current_location.update_lineno(1048);
/* BTS_Tests_LAPDm.ttcn, line 1048 */
const_c__TS0406__MAX__L3__OCTETS = 251;
module_object.add_function("f_TC_segm_concat", (genericfunc_t)&f__TC__segm__concat, (genericfunc_t)&start_f__TC__segm__concat);
module_object.add_function("f_TC_segm_concat_dcch", (genericfunc_t)&f__TC__segm__concat__dcch, (genericfunc_t)&start_f__TC__segm__concat__dcch);
module_object.add_function("f_TC_segm_concat_sacch", (genericfunc_t)&f__TC__segm__concat__sacch, (genericfunc_t)&start_f__TC__segm__concat__sacch);
module_object.add_testcase_nonpard("TC_segm_concat_dcch", testcase_TC__segm__concat__dcch);
module_object.add_testcase_nonpard("TC_segm_concat_sacch", testcase_TC__segm__concat__sacch);
module_object.add_function("f_n200_by_chan_nr", (genericfunc_t)&f__n200__by__chan__nr, NULL);
module_object.add_function("f_TC_t200_n200", (genericfunc_t)&f__TC__t200__n200, (genericfunc_t)&start_f__TC__t200__n200);
module_object.add_testcase_nonpard("TC_t200_n200", testcase_TC__t200__n200);
module_object.add_function("f_TC_rr_response_frame_loss", (genericfunc_t)&f__TC__rr__response__frame__loss, (genericfunc_t)&start_f__TC__rr__response__frame__loss);
module_object.add_testcase_nonpard("TC_rr_response_frame_loss", testcase_TC__rr__response__frame__loss);
module_object.add_function("f_TC_incorrect_cr", (genericfunc_t)&f__TC__incorrect__cr, (genericfunc_t)&start_f__TC__incorrect__cr);
module_object.add_testcase_nonpard("TC_incorrect_cr", testcase_TC__incorrect__cr);
module_object.add_function("f_TC_sabm_incorrect_c", (genericfunc_t)&f__TC__sabm__incorrect__c, (genericfunc_t)&start_f__TC__sabm__incorrect__c);
module_object.add_testcase_nonpard("TC_sabm_incorrect_c", testcase_TC__sabm__incorrect__c);
module_object.add_function("f_TC_normal_reestablishment", (genericfunc_t)&f__TC__normal__reestablishment, (genericfunc_t)&start_f__TC__normal__reestablishment);
module_object.add_testcase_nonpard("TC_normal_reestablishment", testcase_TC__normal__reestablishment);
module_object.add_function("f_TC_normal_reestablishment_state_unacked", (genericfunc_t)&f__TC__normal__reestablishment__state__unacked, (genericfunc_t)&start_f__TC__normal__reestablishment__state__unacked);
module_object.add_testcase_nonpard("TC_normal_reestablishment_state_unacked", testcase_TC__normal__reestablishment__state__unacked);
}

void post_init_module()
{
TTCN_Location current_location("BTS_Tests_LAPDm.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "BTS_Tests_LAPDm");
LAPDm__RAW__PT::module_object.post_init_module();
RSL__Types::module_object.post_init_module();
BTS__Tests::module_object.post_init_module();
current_location.update_lineno(515);
/* BTS_Tests_LAPDm.ttcn, line 515 */
const_as__ignore__background_want__dcch_defval = TRUE;
current_location.update_lineno(515);
/* BTS_Tests_LAPDm.ttcn, line 515 */
const_as__ignore__background_ignore__rsl__errors_defval = FALSE;
current_location.update_lineno(975);
/* BTS_Tests_LAPDm.ttcn, line 975 */
template_t__init__LapdmDlState.v__s() = 0;
template_t__init__LapdmDlState.v__a() = 0;
template_t__init__LapdmDlState.v__r() = 0;
}

boolean init_comp_type(const char *component_type, boolean init_base_comps)
{
(void)init_base_comps;
if (!strcmp(component_type, "lapdm_test_CT")) {
lapdm__test__CT_component_LAPDM.activate_port();
lapdm__test__CT_component_lapdm__component.clean_up();
return TRUE;
} else return FALSE;
}

boolean init_system_port(const char* component_type, const char* port_name)
{
if (!strcmp(component_type, "lapdm_test_CT")) {
if (!strcmp(port_name, "LAPDM")) {
lapdm__test__CT_component_LAPDM.safe_start();
return TRUE;
}
}
return FALSE;
}

boolean start_ptc_function(const char *function_name, Text_Buf& function_arguments)
{
if (!strcmp(function_name, "f_lapdm_init")) {
TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_lapdm_init().");
TTCN_Runtime::function_started(function_arguments);
f__lapdm__init();
TTCN_Runtime::function_finished("f_lapdm_init");
return TRUE;
} else if (!strcmp(function_name, "f_lapdm_exit")) {
TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_lapdm_exit().");
TTCN_Runtime::function_started(function_arguments);
f__lapdm__exit();
TTCN_Runtime::function_finished("f_lapdm_exit");
return TRUE;
} else if (!strcmp(function_name, "f_switch_dcch")) {
TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_switch_dcch().");
TTCN_Runtime::function_started(function_arguments);
f__switch__dcch();
TTCN_Runtime::function_finished("f_switch_dcch");
return TRUE;
} else if (!strcmp(function_name, "f_release_dcch")) {
TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function f_release_dcch().");
TTCN_Runtime::function_started(function_arguments);
f__release__dcch();
TTCN_Runtime::function_finished("f_release_dcch");
return TRUE;
} else if (!strcmp(function_name, "f_test_sabm_results_in_ua")) {
INTEGER sapi;
BOOLEAN use__sacch;
OCTETSTRING payload;
sapi.decode_text(function_arguments);
use__sacch.decode_text(function_arguments);
payload.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_test_sabm_results_in_ua(");
sapi.log();
TTCN_Logger::log_event_str(", ");
use__sacch.log();
TTCN_Logger::log_event_str(", ");
payload.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__test__sabm__results__in__ua(sapi, use__sacch, payload);
TTCN_Runtime::function_finished("f_test_sabm_results_in_ua");
return TRUE;
} else if (!strcmp(function_name, "f_TC_sabm_ua_dcch_sapi0")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_ua_dcch_sapi0(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__sabm__ua__dcch__sapi0(id);
TTCN_Runtime::function_finished("f_TC_sabm_ua_dcch_sapi0");
return TRUE;
} else if (!strcmp(function_name, "f_TC_sabm_ua_dcch_sapi0_nopayload")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_ua_dcch_sapi0_nopayload(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__sabm__ua__dcch__sapi0__nopayload(id);
TTCN_Runtime::function_finished("f_TC_sabm_ua_dcch_sapi0_nopayload");
return TRUE;
} else if (!strcmp(function_name, "f_TC_sabm_ua_dcch_sapi3")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_ua_dcch_sapi3(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__sabm__ua__dcch__sapi3(id);
TTCN_Runtime::function_finished("f_TC_sabm_ua_dcch_sapi3");
return TRUE;
} else if (!strcmp(function_name, "f_TC_sabm_ua_dcch_sapi4")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_ua_dcch_sapi4(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__sabm__ua__dcch__sapi4(id);
TTCN_Runtime::function_finished("f_TC_sabm_ua_dcch_sapi4");
return TRUE;
} else if (!strcmp(function_name, "f_TC_sabm_contention")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_contention(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__sabm__contention(id);
TTCN_Runtime::function_finished("f_TC_sabm_contention");
return TRUE;
} else if (!strcmp(function_name, "f_TC_sabm_retransmit")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_retransmit(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__sabm__retransmit(id);
TTCN_Runtime::function_finished("f_TC_sabm_retransmit");
return TRUE;
} else if (!strcmp(function_name, "fp_common_init")) {
TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function fp_common_init().");
TTCN_Runtime::function_started(function_arguments);
fp__common__init();
TTCN_Runtime::function_finished("fp_common_init");
return TRUE;
} else if (!strcmp(function_name, "fp_common_fini")) {
TTCN_Logger::log_str(TTCN_Logger::PARALLEL_PTC, "Starting function fp_common_fini().");
TTCN_Runtime::function_started(function_arguments);
fp__common__fini();
TTCN_Runtime::function_finished("fp_common_fini");
return TRUE;
} else if (!strcmp(function_name, "f_establish_mo")) {
GSM__Types::RslLinkId link__id;
link__id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_establish_mo(");
link__id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__establish__mo(link__id);
TTCN_Runtime::function_finished("f_establish_mo");
return TRUE;
} else if (!strcmp(function_name, "f_TC_sabm_retransmit_bts")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_retransmit_bts(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__sabm__retransmit__bts(id);
TTCN_Runtime::function_finished("f_TC_sabm_retransmit_bts");
return TRUE;
} else if (!strcmp(function_name, "f_TC_sabm_invalid_resp2")) {
CHARSTRING id;
LapdmNamedFrame err__frame;
id.decode_text(function_arguments);
err__frame.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_invalid_resp2(");
id.log();
TTCN_Logger::log_event_str(", ");
err__frame.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__sabm__invalid__resp2(id, err__frame);
TTCN_Runtime::function_finished("f_TC_sabm_invalid_resp2");
return TRUE;
} else if (!strcmp(function_name, "f_TC_sabm_invalid_resp")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_invalid_resp(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__sabm__invalid__resp(id);
TTCN_Runtime::function_finished("f_TC_sabm_invalid_resp");
return TRUE;
} else if (!strcmp(function_name, "f_TC_sabm_dm")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_dm(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__sabm__dm(id);
TTCN_Runtime::function_finished("f_TC_sabm_dm");
return TRUE;
} else if (!strcmp(function_name, "f_TC_establish_ign_first_sabm")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_establish_ign_first_sabm(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__establish__ign__first__sabm(id);
TTCN_Runtime::function_finished("f_TC_establish_ign_first_sabm");
return TRUE;
} else if (!strcmp(function_name, "f_TC_iframe_seq_and_ack")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_iframe_seq_and_ack(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__iframe__seq__and__ack(id);
TTCN_Runtime::function_finished("f_TC_iframe_seq_and_ack");
return TRUE;
} else if (!strcmp(function_name, "f_TC_iframe_timer_recovery")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_iframe_timer_recovery(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__iframe__timer__recovery(id);
TTCN_Runtime::function_finished("f_TC_iframe_timer_recovery");
return TRUE;
} else if (!strcmp(function_name, "f_TC_ns_seq_error")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_ns_seq_error(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__ns__seq__error(id);
TTCN_Runtime::function_finished("f_TC_ns_seq_error");
return TRUE;
} else if (!strcmp(function_name, "f_TC_nr_seq_error")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_nr_seq_error(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__nr__seq__error(id);
TTCN_Runtime::function_finished("f_TC_nr_seq_error");
return TRUE;
} else if (!strcmp(function_name, "f_TC_rec_invalid_frame_txrx")) {
INTEGER sapi;
LAPDm__Types::LapdmFrame x;
INTEGER line__nr;
sapi.decode_text(function_arguments);
x.decode_text(function_arguments);
line__nr.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rec_invalid_frame_txrx(");
sapi.log();
TTCN_Logger::log_event_str(", ");
x.log();
TTCN_Logger::log_event_str(", ");
line__nr.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__rec__invalid__frame__txrx(sapi, x, line__nr);
TTCN_Runtime::function_finished("f_TC_rec_invalid_frame_txrx");
return TRUE;
} else if (!strcmp(function_name, "f_TC_rec_invalid_frame")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rec_invalid_frame(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__rec__invalid__frame(id);
TTCN_Runtime::function_finished("f_TC_rec_invalid_frame");
return TRUE;
} else if (!strcmp(function_name, "f_lapdm_transceive_mo")) {
LapdmDlState  dls;
GSM__Types::RslLinkId link__id;
OCTETSTRING l3;
dls.decode_text(function_arguments);
link__id.decode_text(function_arguments);
l3.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_lapdm_transceive_mo(");
dls.log();
TTCN_Logger::log_event_str(", ");
link__id.log();
TTCN_Logger::log_event_str(", ");
l3.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__lapdm__transceive__mo(dls, link__id, l3);
TTCN_Runtime::function_finished("f_lapdm_transceive_mo");
return TRUE;
} else if (!strcmp(function_name, "f_TC_segm_concat")) {
CHARSTRING id;
GSM__Types::RslLinkId link__id;
id.decode_text(function_arguments);
link__id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_segm_concat(");
id.log();
TTCN_Logger::log_event_str(", ");
link__id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__segm__concat(id, link__id);
TTCN_Runtime::function_finished("f_TC_segm_concat");
return TRUE;
} else if (!strcmp(function_name, "f_TC_segm_concat_dcch")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_segm_concat_dcch(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__segm__concat__dcch(id);
TTCN_Runtime::function_finished("f_TC_segm_concat_dcch");
return TRUE;
} else if (!strcmp(function_name, "f_TC_segm_concat_sacch")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_segm_concat_sacch(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__segm__concat__sacch(id);
TTCN_Runtime::function_finished("f_TC_segm_concat_sacch");
return TRUE;
} else if (!strcmp(function_name, "f_TC_t200_n200")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_t200_n200(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__t200__n200(id);
TTCN_Runtime::function_finished("f_TC_t200_n200");
return TRUE;
} else if (!strcmp(function_name, "f_TC_rr_response_frame_loss")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_rr_response_frame_loss(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__rr__response__frame__loss(id);
TTCN_Runtime::function_finished("f_TC_rr_response_frame_loss");
return TRUE;
} else if (!strcmp(function_name, "f_TC_incorrect_cr")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_incorrect_cr(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__incorrect__cr(id);
TTCN_Runtime::function_finished("f_TC_incorrect_cr");
return TRUE;
} else if (!strcmp(function_name, "f_TC_sabm_incorrect_c")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_sabm_incorrect_c(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__sabm__incorrect__c(id);
TTCN_Runtime::function_finished("f_TC_sabm_incorrect_c");
return TRUE;
} else if (!strcmp(function_name, "f_TC_normal_reestablishment")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_normal_reestablishment(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__normal__reestablishment(id);
TTCN_Runtime::function_finished("f_TC_normal_reestablishment");
return TRUE;
} else if (!strcmp(function_name, "f_TC_normal_reestablishment_state_unacked")) {
CHARSTRING id;
id.decode_text(function_arguments);
TTCN_Logger::begin_event(TTCN_Logger::PARALLEL_PTC);
TTCN_Logger::log_event_str("Starting function f_TC_normal_reestablishment_state_unacked(");
id.log();
TTCN_Logger::log_event_str(").");
TTCN_Logger::end_event();
TTCN_Runtime::function_started(function_arguments);
f__TC__normal__reestablishment__state__unacked(id);
TTCN_Runtime::function_finished("f_TC_normal_reestablishment_state_unacked");
return TRUE;
} else return FALSE;
}


} /* end of namespace */
