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

namespace RLCMAC__CSN1__Types {

/* Member functions of C++ classes */

PktCellChgNotifR6Additions::PktCellChgNotifR6Additions()
{
}

PktCellChgNotifR6Additions::PktCellChgNotifR6Additions(const BITSTRING& par_utran__ba__used__presence,
    const OPTIONAL< INTEGER >& par_utran__ba__used,
    const UtranCCNMeasReport& par_utran__ccn__meas__rep)
  :   field_utran__ba__used__presence(par_utran__ba__used__presence),
  field_utran__ba__used(par_utran__ba__used),
  field_utran__ccn__meas__rep(par_utran__ccn__meas__rep)
{
}

PktCellChgNotifR6Additions::PktCellChgNotifR6Additions(const PktCellChgNotifR6Additions& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RLCMAC_CSN1_Types.PktCellChgNotifR6Additions.");
if (other_value.utran__ba__used__presence().is_bound()) field_utran__ba__used__presence = other_value.utran__ba__used__presence();
else field_utran__ba__used__presence.clean_up();
if (other_value.utran__ba__used().is_bound()) field_utran__ba__used = other_value.utran__ba__used();
else field_utran__ba__used.clean_up();
if (other_value.utran__ccn__meas__rep().is_bound()) field_utran__ccn__meas__rep = other_value.utran__ccn__meas__rep();
else field_utran__ccn__meas__rep.clean_up();
}

void PktCellChgNotifR6Additions::clean_up()
{
field_utran__ba__used__presence.clean_up();
field_utran__ba__used.clean_up();
field_utran__ccn__meas__rep.clean_up();
}

const TTCN_Typedescriptor_t* PktCellChgNotifR6Additions::get_descriptor() const { return &PktCellChgNotifR6Additions_descr_; }
PktCellChgNotifR6Additions& PktCellChgNotifR6Additions::operator=(const PktCellChgNotifR6Additions& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RLCMAC_CSN1_Types.PktCellChgNotifR6Additions.");
  if (other_value.utran__ba__used__presence().is_bound()) field_utran__ba__used__presence = other_value.utran__ba__used__presence();
  else field_utran__ba__used__presence.clean_up();
  if (other_value.utran__ba__used().is_bound()) field_utran__ba__used = other_value.utran__ba__used();
  else field_utran__ba__used.clean_up();
  if (other_value.utran__ccn__meas__rep().is_bound()) field_utran__ccn__meas__rep = other_value.utran__ccn__meas__rep();
  else field_utran__ccn__meas__rep.clean_up();
}
return *this;
}

boolean PktCellChgNotifR6Additions::operator==(const PktCellChgNotifR6Additions& other_value) const
{
return field_utran__ba__used__presence==other_value.field_utran__ba__used__presence
  && field_utran__ba__used==other_value.field_utran__ba__used
  && field_utran__ccn__meas__rep==other_value.field_utran__ccn__meas__rep;
}

boolean PktCellChgNotifR6Additions::is_bound() const
{
return (field_utran__ba__used__presence.is_bound())
  || (OPTIONAL_OMIT == field_utran__ba__used.get_selection() || field_utran__ba__used.is_bound())
  || (field_utran__ccn__meas__rep.is_bound());
}
boolean PktCellChgNotifR6Additions::is_value() const
{
return field_utran__ba__used__presence.is_value()
  && (OPTIONAL_OMIT == field_utran__ba__used.get_selection() || field_utran__ba__used.is_value())
  && field_utran__ccn__meas__rep.is_value();
}
int PktCellChgNotifR6Additions::size_of() const
{
  int ret_val = 2;
  if (field_utran__ba__used.ispresent()) ret_val++;
  return ret_val;
}

void PktCellChgNotifR6Additions::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ utran_ba_used_presence := ");
field_utran__ba__used__presence.log();
TTCN_Logger::log_event_str(", utran_ba_used := ");
field_utran__ba__used.log();
TTCN_Logger::log_event_str(", utran_ccn_meas_rep := ");
field_utran__ccn__meas__rep.log();
TTCN_Logger::log_event_str(" }");
}

void PktCellChgNotifR6Additions::set_implicit_omit()
{
if (utran__ba__used__presence().is_bound()) utran__ba__used__presence().set_implicit_omit();
if (!utran__ba__used().is_bound()) utran__ba__used() = OMIT_VALUE;
else utran__ba__used().set_implicit_omit();
if (utran__ccn__meas__rep().is_bound()) utran__ccn__meas__rep().set_implicit_omit();
}

void PktCellChgNotifR6Additions::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 @RLCMAC_CSN1_Types.PktCellChgNotifR6Additions 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) utran__ba__used__presence().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) utran__ba__used().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) utran__ccn__meas__rep().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(), "utran_ba_used_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          utran__ba__used__presence().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(), "utran_ba_used")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          utran__ba__used().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(), "utran_ccn_meas_rep")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          utran__ccn__meas__rep().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 @RLCMAC_CSN1_Types.PktCellChgNotifR6Additions: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@RLCMAC_CSN1_Types.PktCellChgNotifR6Additions");
  }
}

void PktCellChgNotifR6Additions::encode_text(Text_Buf& text_buf) const
{
field_utran__ba__used__presence.encode_text(text_buf);
field_utran__ba__used.encode_text(text_buf);
field_utran__ccn__meas__rep.encode_text(text_buf);
}

void PktCellChgNotifR6Additions::decode_text(Text_Buf& text_buf)
{
field_utran__ba__used__presence.decode_text(text_buf);
field_utran__ba__used.decode_text(text_buf);
field_utran__ccn__meas__rep.decode_text(text_buf);
}

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

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

int PktCellChgNotifR6Additions::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PktCellChgNotifR6Additions_utran__ba__used__presence_descr_.raw->forceomit);
  decoded_field_length = field_utran__ba__used__presence.RAW_decode(PktCellChgNotifR6Additions_utran__ba__used__presence_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (limit > 0 && field_utran__ba__used__presence ==  bs_0){
  if (force_omit != NULL && (*force_omit)(1)) {
    field_utran__ba__used = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_1_force_omit(1, force_omit, PktCellChgNotifR6Additions_utran__ba__used_descr_.raw->forceomit);
  decoded_field_length = field_utran__ba__used().RAW_decode(PktCellChgNotifR6Additions_utran__ba__used_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 1) {
  field_utran__ba__used = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_utran__ba__used=OMIT_VALUE;
  RAW_Force_Omit field_2_force_omit(2, force_omit, PktCellChgNotifR6Additions_utran__ccn__meas__rep_descr_.raw->forceomit);
  decoded_field_length = field_utran__ccn__meas__rep.RAW_decode(PktCellChgNotifR6Additions_utran__ccn__meas__rep_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PktCellChgNotifR6Additions::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 3;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(3);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PktCellChgNotifR6Additions_utran__ba__used__presence_descr_.raw);
  if (field_utran__ba__used.ispresent()) {
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PktCellChgNotifR6Additions_utran__ba__used_descr_.raw);
  }
  else myleaf.body.node.nodes[1] = NULL;
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PktCellChgNotifR6Additions_utran__ccn__meas__rep_descr_.raw);
  encoded_length += field_utran__ba__used__presence.RAW_encode(PktCellChgNotifR6Additions_utran__ba__used__presence_descr_, *myleaf.body.node.nodes[0]);
  if (field_utran__ba__used.ispresent()) {
  encoded_length += field_utran__ba__used().RAW_encode(PktCellChgNotifR6Additions_utran__ba__used_descr_, *myleaf.body.node.nodes[1]);
  }
  encoded_length += field_utran__ccn__meas__rep.RAW_encode(PktCellChgNotifR6Additions_utran__ccn__meas__rep_descr_, *myleaf.body.node.nodes[2]);
  if (field_utran__ba__used.ispresent() && (field_utran__ba__used__presence !=  bs_0)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_0.RAW_encode(PktCellChgNotifR6Additions_utran__ba__used__presence_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  return myleaf.length = encoded_length;
}

struct PktCellChgNotifR6Additions_template::single_value_struct {
BITSTRING_template field_utran__ba__used__presence;
INTEGER_template field_utran__ba__used;
UtranCCNMeasReport_template field_utran__ccn__meas__rep;
};

void PktCellChgNotifR6Additions_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_utran__ba__used__presence = ANY_VALUE;
single_value->field_utran__ba__used = ANY_OR_OMIT;
single_value->field_utran__ccn__meas__rep = ANY_VALUE;
}
}
}

void PktCellChgNotifR6Additions_template::copy_value(const PktCellChgNotifR6Additions& other_value)
{
single_value = new single_value_struct;
if (other_value.utran__ba__used__presence().is_bound()) {
  single_value->field_utran__ba__used__presence = other_value.utran__ba__used__presence();
} else {
  single_value->field_utran__ba__used__presence.clean_up();
}
if (other_value.utran__ba__used().is_bound()) {
  if (other_value.utran__ba__used().ispresent()) single_value->field_utran__ba__used = other_value.utran__ba__used()();
  else single_value->field_utran__ba__used = OMIT_VALUE;
} else {
  single_value->field_utran__ba__used.clean_up();
}
if (other_value.utran__ccn__meas__rep().is_bound()) {
  single_value->field_utran__ccn__meas__rep = other_value.utran__ccn__meas__rep();
} else {
  single_value->field_utran__ccn__meas__rep.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PktCellChgNotifR6Additions_template::copy_template(const PktCellChgNotifR6Additions_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.utran__ba__used__presence().get_selection()) {
single_value->field_utran__ba__used__presence = other_value.utran__ba__used__presence();
} else {
single_value->field_utran__ba__used__presence.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.utran__ba__used().get_selection()) {
single_value->field_utran__ba__used = other_value.utran__ba__used();
} else {
single_value->field_utran__ba__used.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.utran__ccn__meas__rep().get_selection()) {
single_value->field_utran__ccn__meas__rep = other_value.utran__ccn__meas__rep();
} else {
single_value->field_utran__ccn__meas__rep.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 PktCellChgNotifR6Additions_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 PktCellChgNotifR6Additions_template(*other_value.implication_.precondition);
implication_.implied_template = new PktCellChgNotifR6Additions_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 @RLCMAC_CSN1_Types.PktCellChgNotifR6Additions.");
break;
}
set_selection(other_value);
}

PktCellChgNotifR6Additions_template::PktCellChgNotifR6Additions_template()
{
}

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

PktCellChgNotifR6Additions_template::PktCellChgNotifR6Additions_template(const PktCellChgNotifR6Additions& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PktCellChgNotifR6Additions_template::match(const PktCellChgNotifR6Additions& 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.utran__ba__used__presence().is_bound()) return FALSE;
if(!single_value->field_utran__ba__used__presence.match(other_value.utran__ba__used__presence(), legacy))return FALSE;
if(!other_value.utran__ba__used().is_bound()) return FALSE;
if((other_value.utran__ba__used().ispresent() ? !single_value->field_utran__ba__used.match((const INTEGER&)other_value.utran__ba__used(), legacy) : !single_value->field_utran__ba__used.match_omit(legacy)))return FALSE;
if(!other_value.utran__ccn__meas__rep().is_bound()) return FALSE;
if(!single_value->field_utran__ccn__meas__rep.match(other_value.utran__ccn__meas__rep(), 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 @RLCMAC_CSN1_Types.PktCellChgNotifR6Additions.");
}
return FALSE;
}

boolean PktCellChgNotifR6Additions_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_utran__ba__used__presence.is_bound()
 || (single_value->field_utran__ba__used.is_omit() || single_value->field_utran__ba__used.is_bound())
 || single_value->field_utran__ccn__meas__rep.is_bound();
}

boolean PktCellChgNotifR6Additions_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_utran__ba__used__presence.is_value()
 && (single_value->field_utran__ba__used.is_omit() || single_value->field_utran__ba__used.is_value())
 && single_value->field_utran__ccn__meas__rep.is_value();
}

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

PktCellChgNotifR6Additions PktCellChgNotifR6Additions_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 @RLCMAC_CSN1_Types.PktCellChgNotifR6Additions.");
PktCellChgNotifR6Additions ret_val;
if (single_value->field_utran__ba__used__presence.is_bound()) {
ret_val.utran__ba__used__presence() = single_value->field_utran__ba__used__presence.valueof();
}
if (single_value->field_utran__ba__used.is_omit()) ret_val.utran__ba__used() = OMIT_VALUE;
else if (single_value->field_utran__ba__used.is_bound()) {
ret_val.utran__ba__used() = single_value->field_utran__ba__used.valueof();
}
if (single_value->field_utran__ccn__meas__rep.is_bound()) {
ret_val.utran__ccn__meas__rep() = single_value->field_utran__ccn__meas__rep.valueof();
}
return ret_val;
}

void PktCellChgNotifR6Additions_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 @RLCMAC_CSN1_Types.PktCellChgNotifR6Additions.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PktCellChgNotifR6Additions_template[list_length];
}

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

BITSTRING_template& PktCellChgNotifR6Additions_template::utran__ba__used__presence()
{
set_specific();
return single_value->field_utran__ba__used__presence;
}

const BITSTRING_template& PktCellChgNotifR6Additions_template::utran__ba__used__presence() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field utran_ba_used_presence of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifR6Additions.");
return single_value->field_utran__ba__used__presence;
}

INTEGER_template& PktCellChgNotifR6Additions_template::utran__ba__used()
{
set_specific();
return single_value->field_utran__ba__used;
}

const INTEGER_template& PktCellChgNotifR6Additions_template::utran__ba__used() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field utran_ba_used of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifR6Additions.");
return single_value->field_utran__ba__used;
}

UtranCCNMeasReport_template& PktCellChgNotifR6Additions_template::utran__ccn__meas__rep()
{
set_specific();
return single_value->field_utran__ccn__meas__rep;
}

const UtranCCNMeasReport_template& PktCellChgNotifR6Additions_template::utran__ccn__meas__rep() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field utran_ccn_meas_rep of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifR6Additions.");
return single_value->field_utran__ccn__meas__rep;
}

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

void PktCellChgNotifR6Additions_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ utran_ba_used_presence := ");
single_value->field_utran__ba__used__presence.log();
TTCN_Logger::log_event_str(", utran_ba_used := ");
single_value->field_utran__ba__used.log();
TTCN_Logger::log_event_str(", utran_ccn_meas_rep := ");
single_value->field_utran__ccn__meas__rep.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 PktCellChgNotifR6Additions_template::log_match(const PktCellChgNotifR6Additions& 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_utran__ba__used__presence.match(match_value.utran__ba__used__presence(), legacy)){
TTCN_Logger::log_logmatch_info(".utran_ba_used_presence");
single_value->field_utran__ba__used__presence.log_match(match_value.utran__ba__used__presence(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.utran__ba__used().ispresent()){
if(!single_value->field_utran__ba__used.match(match_value.utran__ba__used(), legacy)){
TTCN_Logger::log_logmatch_info(".utran_ba_used");
single_value->field_utran__ba__used.log_match(match_value.utran__ba__used(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_utran__ba__used.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".utran_ba_used := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_utran__ba__used.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_utran__ccn__meas__rep.match(match_value.utran__ccn__meas__rep(), legacy)){
TTCN_Logger::log_logmatch_info(".utran_ccn_meas_rep");
single_value->field_utran__ccn__meas__rep.log_match(match_value.utran__ccn__meas__rep(), 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("{ utran_ba_used_presence := ");
single_value->field_utran__ba__used__presence.log_match(match_value.utran__ba__used__presence(), legacy);
TTCN_Logger::log_event_str(", utran_ba_used := ");
if (match_value.utran__ba__used().ispresent()) {
single_value->field_utran__ba__used.log_match(match_value.utran__ba__used(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_utran__ba__used.log();
if (single_value->field_utran__ba__used.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", utran_ccn_meas_rep := ");
single_value->field_utran__ccn__meas__rep.log_match(match_value.utran__ccn__meas__rep(), 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 PktCellChgNotifR6Additions_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (utran__ba__used__presence().is_bound()) utran__ba__used__presence().set_implicit_omit();
if (!utran__ba__used().is_bound()) utran__ba__used() = OMIT_VALUE;
else utran__ba__used().set_implicit_omit();
if (utran__ccn__meas__rep().is_bound()) utran__ccn__meas__rep().set_implicit_omit();
}

void PktCellChgNotifR6Additions_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_utran__ba__used__presence.encode_text(text_buf);
single_value->field_utran__ba__used.encode_text(text_buf);
single_value->field_utran__ccn__meas__rep.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 @RLCMAC_CSN1_Types.PktCellChgNotifR6Additions.");
}
}

void PktCellChgNotifR6Additions_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_utran__ba__used__presence.decode_text(text_buf);
single_value->field_utran__ba__used.decode_text(text_buf);
single_value->field_utran__ccn__meas__rep.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 PktCellChgNotifR6Additions_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 @RLCMAC_CSN1_Types.PktCellChgNotifR6Additions.");
}
}

void PktCellChgNotifR6Additions_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: {
    PktCellChgNotifR6Additions_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 @RLCMAC_CSN1_Types.PktCellChgNotifR6Additions 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) utran__ba__used__presence().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) utran__ba__used().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) utran__ccn__meas__rep().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(), "utran_ba_used_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          utran__ba__used__presence().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(), "utran_ba_used")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          utran__ba__used().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(), "utran_ccn_meas_rep")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          utran__ccn__meas__rep().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 @RLCMAC_CSN1_Types.PktCellChgNotifR6Additions: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PktCellChgNotifR6Additions_template* precondition = new PktCellChgNotifR6Additions_template;
    precondition->set_param(*param.get_elem(0));
    PktCellChgNotifR6Additions_template* implied_template = new PktCellChgNotifR6Additions_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PktCellChgNotifR6Additions_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@RLCMAC_CSN1_Types.PktCellChgNotifR6Additions");
  }
  is_ifpresent = param.get_ifpresent();
}

void PktCellChgNotifR6Additions_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_utran__ba__used__presence.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifR6Additions");
single_value->field_utran__ba__used.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifR6Additions");
single_value->field_utran__ccn__meas__rep.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifR6Additions");
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 : "@RLCMAC_CSN1_Types.PktCellChgNotifR6Additions");
}

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

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

PktCellChgNotifyU0::PktCellChgNotifyU0()
{
}

PktCellChgNotifyU0::PktCellChgNotifyU0(const BITSTRING& par_tag,
    const INTEGER& par_arfcn,
    const INTEGER& par_bsic)
  :   field_tag(par_tag),
  field_arfcn(par_arfcn),
  field_bsic(par_bsic)
{
}

PktCellChgNotifyU0::PktCellChgNotifyU0(const PktCellChgNotifyU0& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RLCMAC_CSN1_Types.PktCellChgNotifyU0.");
if (other_value.tag().is_bound()) field_tag = other_value.tag();
else field_tag.clean_up();
if (other_value.arfcn().is_bound()) field_arfcn = other_value.arfcn();
else field_arfcn.clean_up();
if (other_value.bsic().is_bound()) field_bsic = other_value.bsic();
else field_bsic.clean_up();
}

void PktCellChgNotifyU0::clean_up()
{
field_tag.clean_up();
field_arfcn.clean_up();
field_bsic.clean_up();
}

const TTCN_Typedescriptor_t* PktCellChgNotifyU0::get_descriptor() const { return &PktCellChgNotifyU0_descr_; }
PktCellChgNotifyU0& PktCellChgNotifyU0::operator=(const PktCellChgNotifyU0& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RLCMAC_CSN1_Types.PktCellChgNotifyU0.");
  if (other_value.tag().is_bound()) field_tag = other_value.tag();
  else field_tag.clean_up();
  if (other_value.arfcn().is_bound()) field_arfcn = other_value.arfcn();
  else field_arfcn.clean_up();
  if (other_value.bsic().is_bound()) field_bsic = other_value.bsic();
  else field_bsic.clean_up();
}
return *this;
}

boolean PktCellChgNotifyU0::operator==(const PktCellChgNotifyU0& other_value) const
{
return field_tag==other_value.field_tag
  && field_arfcn==other_value.field_arfcn
  && field_bsic==other_value.field_bsic;
}

boolean PktCellChgNotifyU0::is_bound() const
{
return (field_tag.is_bound())
  || (field_arfcn.is_bound())
  || (field_bsic.is_bound());
}
boolean PktCellChgNotifyU0::is_value() const
{
return field_tag.is_value()
  && field_arfcn.is_value()
  && field_bsic.is_value();
}
void PktCellChgNotifyU0::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ tag := ");
field_tag.log();
TTCN_Logger::log_event_str(", arfcn := ");
field_arfcn.log();
TTCN_Logger::log_event_str(", bsic := ");
field_bsic.log();
TTCN_Logger::log_event_str(" }");
}

void PktCellChgNotifyU0::set_implicit_omit()
{
if (tag().is_bound()) tag().set_implicit_omit();
if (arfcn().is_bound()) arfcn().set_implicit_omit();
if (bsic().is_bound()) bsic().set_implicit_omit();
}

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

void PktCellChgNotifyU0::encode_text(Text_Buf& text_buf) const
{
field_tag.encode_text(text_buf);
field_arfcn.encode_text(text_buf);
field_bsic.encode_text(text_buf);
}

void PktCellChgNotifyU0::decode_text(Text_Buf& text_buf)
{
field_tag.decode_text(text_buf);
field_arfcn.decode_text(text_buf);
field_bsic.decode_text(text_buf);
}

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

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

int PktCellChgNotifyU0::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PktCellChgNotifyU0_tag_descr_.raw->forceomit);
  decoded_field_length = field_tag.RAW_decode(PktCellChgNotifyU0_tag_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PktCellChgNotifyU0_arfcn_descr_.raw->forceomit);
  decoded_field_length = field_arfcn.RAW_decode(PktCellChgNotifyU0_arfcn_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PktCellChgNotifyU0_bsic_descr_.raw->forceomit);
  decoded_field_length = field_bsic.RAW_decode(PktCellChgNotifyU0_bsic_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PktCellChgNotifyU0::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 3;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(3);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PktCellChgNotifyU0_tag_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PktCellChgNotifyU0_arfcn_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PktCellChgNotifyU0_bsic_descr_.raw);
  encoded_length += field_tag.RAW_encode(PktCellChgNotifyU0_tag_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_arfcn.RAW_encode(PktCellChgNotifyU0_arfcn_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_bsic.RAW_encode(PktCellChgNotifyU0_bsic_descr_, *myleaf.body.node.nodes[2]);
  return myleaf.length = encoded_length;
}

struct PktCellChgNotifyU0_template::single_value_struct {
BITSTRING_template field_tag;
INTEGER_template field_arfcn;
INTEGER_template field_bsic;
};

void PktCellChgNotifyU0_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_tag = ANY_VALUE;
single_value->field_arfcn = ANY_VALUE;
single_value->field_bsic = ANY_VALUE;
}
}
}

void PktCellChgNotifyU0_template::copy_value(const PktCellChgNotifyU0& other_value)
{
single_value = new single_value_struct;
if (other_value.tag().is_bound()) {
  single_value->field_tag = other_value.tag();
} else {
  single_value->field_tag.clean_up();
}
if (other_value.arfcn().is_bound()) {
  single_value->field_arfcn = other_value.arfcn();
} else {
  single_value->field_arfcn.clean_up();
}
if (other_value.bsic().is_bound()) {
  single_value->field_bsic = other_value.bsic();
} else {
  single_value->field_bsic.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PktCellChgNotifyU0_template::copy_template(const PktCellChgNotifyU0_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.tag().get_selection()) {
single_value->field_tag = other_value.tag();
} else {
single_value->field_tag.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.arfcn().get_selection()) {
single_value->field_arfcn = other_value.arfcn();
} else {
single_value->field_arfcn.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.bsic().get_selection()) {
single_value->field_bsic = other_value.bsic();
} else {
single_value->field_bsic.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 PktCellChgNotifyU0_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 PktCellChgNotifyU0_template(*other_value.implication_.precondition);
implication_.implied_template = new PktCellChgNotifyU0_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 @RLCMAC_CSN1_Types.PktCellChgNotifyU0.");
break;
}
set_selection(other_value);
}

PktCellChgNotifyU0_template::PktCellChgNotifyU0_template()
{
}

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

PktCellChgNotifyU0_template::PktCellChgNotifyU0_template(const PktCellChgNotifyU0& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PktCellChgNotifyU0_template::match(const PktCellChgNotifyU0& 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.tag().is_bound()) return FALSE;
if(!single_value->field_tag.match(other_value.tag(), legacy))return FALSE;
if(!other_value.arfcn().is_bound()) return FALSE;
if(!single_value->field_arfcn.match(other_value.arfcn(), legacy))return FALSE;
if(!other_value.bsic().is_bound()) return FALSE;
if(!single_value->field_bsic.match(other_value.bsic(), 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 @RLCMAC_CSN1_Types.PktCellChgNotifyU0.");
}
return FALSE;
}

boolean PktCellChgNotifyU0_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_tag.is_bound()
 || single_value->field_arfcn.is_bound()
 || single_value->field_bsic.is_bound();
}

boolean PktCellChgNotifyU0_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_tag.is_value()
 && single_value->field_arfcn.is_value()
 && single_value->field_bsic.is_value();
}

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

PktCellChgNotifyU0 PktCellChgNotifyU0_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 @RLCMAC_CSN1_Types.PktCellChgNotifyU0.");
PktCellChgNotifyU0 ret_val;
if (single_value->field_tag.is_bound()) {
ret_val.tag() = single_value->field_tag.valueof();
}
if (single_value->field_arfcn.is_bound()) {
ret_val.arfcn() = single_value->field_arfcn.valueof();
}
if (single_value->field_bsic.is_bound()) {
ret_val.bsic() = single_value->field_bsic.valueof();
}
return ret_val;
}

void PktCellChgNotifyU0_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 @RLCMAC_CSN1_Types.PktCellChgNotifyU0.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PktCellChgNotifyU0_template[list_length];
}

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

BITSTRING_template& PktCellChgNotifyU0_template::tag()
{
set_specific();
return single_value->field_tag;
}

const BITSTRING_template& PktCellChgNotifyU0_template::tag() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tag of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU0.");
return single_value->field_tag;
}

INTEGER_template& PktCellChgNotifyU0_template::arfcn()
{
set_specific();
return single_value->field_arfcn;
}

const INTEGER_template& PktCellChgNotifyU0_template::arfcn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field arfcn of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU0.");
return single_value->field_arfcn;
}

INTEGER_template& PktCellChgNotifyU0_template::bsic()
{
set_specific();
return single_value->field_bsic;
}

const INTEGER_template& PktCellChgNotifyU0_template::bsic() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field bsic of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU0.");
return single_value->field_bsic;
}

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

void PktCellChgNotifyU0_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ tag := ");
single_value->field_tag.log();
TTCN_Logger::log_event_str(", arfcn := ");
single_value->field_arfcn.log();
TTCN_Logger::log_event_str(", bsic := ");
single_value->field_bsic.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 PktCellChgNotifyU0_template::log_match(const PktCellChgNotifyU0& 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_tag.match(match_value.tag(), legacy)){
TTCN_Logger::log_logmatch_info(".tag");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_arfcn.match(match_value.arfcn(), legacy)){
TTCN_Logger::log_logmatch_info(".arfcn");
single_value->field_arfcn.log_match(match_value.arfcn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_bsic.match(match_value.bsic(), legacy)){
TTCN_Logger::log_logmatch_info(".bsic");
single_value->field_bsic.log_match(match_value.bsic(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::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("{ tag := ");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::log_event_str(", arfcn := ");
single_value->field_arfcn.log_match(match_value.arfcn(), legacy);
TTCN_Logger::log_event_str(", bsic := ");
single_value->field_bsic.log_match(match_value.bsic(), 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 PktCellChgNotifyU0_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (tag().is_bound()) tag().set_implicit_omit();
if (arfcn().is_bound()) arfcn().set_implicit_omit();
if (bsic().is_bound()) bsic().set_implicit_omit();
}

void PktCellChgNotifyU0_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_tag.encode_text(text_buf);
single_value->field_arfcn.encode_text(text_buf);
single_value->field_bsic.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 @RLCMAC_CSN1_Types.PktCellChgNotifyU0.");
}
}

void PktCellChgNotifyU0_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_tag.decode_text(text_buf);
single_value->field_arfcn.decode_text(text_buf);
single_value->field_bsic.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 PktCellChgNotifyU0_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 @RLCMAC_CSN1_Types.PktCellChgNotifyU0.");
}
}

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

void PktCellChgNotifyU0_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_tag.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyU0");
single_value->field_arfcn.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyU0");
single_value->field_bsic.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyU0");
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 : "@RLCMAC_CSN1_Types.PktCellChgNotifyU0");
}

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

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

PktCellChgNotifyU10::PktCellChgNotifyU10()
{
}

PktCellChgNotifyU10::PktCellChgNotifyU10(const BITSTRING& par_tag,
    const UtranTargetCell& par_utran__target__cell)
  :   field_tag(par_tag),
  field_utran__target__cell(par_utran__target__cell)
{
}

PktCellChgNotifyU10::PktCellChgNotifyU10(const PktCellChgNotifyU10& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RLCMAC_CSN1_Types.PktCellChgNotifyU10.");
if (other_value.tag().is_bound()) field_tag = other_value.tag();
else field_tag.clean_up();
if (other_value.utran__target__cell().is_bound()) field_utran__target__cell = other_value.utran__target__cell();
else field_utran__target__cell.clean_up();
}

void PktCellChgNotifyU10::clean_up()
{
field_tag.clean_up();
field_utran__target__cell.clean_up();
}

const TTCN_Typedescriptor_t* PktCellChgNotifyU10::get_descriptor() const { return &PktCellChgNotifyU10_descr_; }
PktCellChgNotifyU10& PktCellChgNotifyU10::operator=(const PktCellChgNotifyU10& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RLCMAC_CSN1_Types.PktCellChgNotifyU10.");
  if (other_value.tag().is_bound()) field_tag = other_value.tag();
  else field_tag.clean_up();
  if (other_value.utran__target__cell().is_bound()) field_utran__target__cell = other_value.utran__target__cell();
  else field_utran__target__cell.clean_up();
}
return *this;
}

boolean PktCellChgNotifyU10::operator==(const PktCellChgNotifyU10& other_value) const
{
return field_tag==other_value.field_tag
  && field_utran__target__cell==other_value.field_utran__target__cell;
}

boolean PktCellChgNotifyU10::is_bound() const
{
return (field_tag.is_bound())
  || (field_utran__target__cell.is_bound());
}
boolean PktCellChgNotifyU10::is_value() const
{
return field_tag.is_value()
  && field_utran__target__cell.is_value();
}
void PktCellChgNotifyU10::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ tag := ");
field_tag.log();
TTCN_Logger::log_event_str(", utran_target_cell := ");
field_utran__target__cell.log();
TTCN_Logger::log_event_str(" }");
}

void PktCellChgNotifyU10::set_implicit_omit()
{
if (tag().is_bound()) tag().set_implicit_omit();
if (utran__target__cell().is_bound()) utran__target__cell().set_implicit_omit();
}

void PktCellChgNotifyU10::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 @RLCMAC_CSN1_Types.PktCellChgNotifyU10 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) tag().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) utran__target__cell().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(), "tag")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tag().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(), "utran_target_cell")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          utran__target__cell().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 @RLCMAC_CSN1_Types.PktCellChgNotifyU10: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@RLCMAC_CSN1_Types.PktCellChgNotifyU10");
  }
}

void PktCellChgNotifyU10::encode_text(Text_Buf& text_buf) const
{
field_tag.encode_text(text_buf);
field_utran__target__cell.encode_text(text_buf);
}

void PktCellChgNotifyU10::decode_text(Text_Buf& text_buf)
{
field_tag.decode_text(text_buf);
field_utran__target__cell.decode_text(text_buf);
}

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

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

int PktCellChgNotifyU10::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PktCellChgNotifyU10_tag_descr_.raw->forceomit);
  decoded_field_length = field_tag.RAW_decode(PktCellChgNotifyU10_tag_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PktCellChgNotifyU10_utran__target__cell_descr_.raw->forceomit);
  decoded_field_length = field_utran__target__cell.RAW_decode(PktCellChgNotifyU10_utran__target__cell_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PktCellChgNotifyU10::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 2;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PktCellChgNotifyU10_tag_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PktCellChgNotifyU10_utran__target__cell_descr_.raw);
  encoded_length += field_tag.RAW_encode(PktCellChgNotifyU10_tag_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_utran__target__cell.RAW_encode(PktCellChgNotifyU10_utran__target__cell_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct PktCellChgNotifyU10_template::single_value_struct {
BITSTRING_template field_tag;
UtranTargetCell_template field_utran__target__cell;
};

void PktCellChgNotifyU10_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_tag = ANY_VALUE;
single_value->field_utran__target__cell = ANY_VALUE;
}
}
}

void PktCellChgNotifyU10_template::copy_value(const PktCellChgNotifyU10& other_value)
{
single_value = new single_value_struct;
if (other_value.tag().is_bound()) {
  single_value->field_tag = other_value.tag();
} else {
  single_value->field_tag.clean_up();
}
if (other_value.utran__target__cell().is_bound()) {
  single_value->field_utran__target__cell = other_value.utran__target__cell();
} else {
  single_value->field_utran__target__cell.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PktCellChgNotifyU10_template::copy_template(const PktCellChgNotifyU10_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.tag().get_selection()) {
single_value->field_tag = other_value.tag();
} else {
single_value->field_tag.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.utran__target__cell().get_selection()) {
single_value->field_utran__target__cell = other_value.utran__target__cell();
} else {
single_value->field_utran__target__cell.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 PktCellChgNotifyU10_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 PktCellChgNotifyU10_template(*other_value.implication_.precondition);
implication_.implied_template = new PktCellChgNotifyU10_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 @RLCMAC_CSN1_Types.PktCellChgNotifyU10.");
break;
}
set_selection(other_value);
}

PktCellChgNotifyU10_template::PktCellChgNotifyU10_template()
{
}

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

PktCellChgNotifyU10_template::PktCellChgNotifyU10_template(const PktCellChgNotifyU10& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PktCellChgNotifyU10_template::match(const PktCellChgNotifyU10& 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.tag().is_bound()) return FALSE;
if(!single_value->field_tag.match(other_value.tag(), legacy))return FALSE;
if(!other_value.utran__target__cell().is_bound()) return FALSE;
if(!single_value->field_utran__target__cell.match(other_value.utran__target__cell(), 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 @RLCMAC_CSN1_Types.PktCellChgNotifyU10.");
}
return FALSE;
}

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

boolean PktCellChgNotifyU10_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_tag.is_value()
 && single_value->field_utran__target__cell.is_value();
}

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

PktCellChgNotifyU10 PktCellChgNotifyU10_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 @RLCMAC_CSN1_Types.PktCellChgNotifyU10.");
PktCellChgNotifyU10 ret_val;
if (single_value->field_tag.is_bound()) {
ret_val.tag() = single_value->field_tag.valueof();
}
if (single_value->field_utran__target__cell.is_bound()) {
ret_val.utran__target__cell() = single_value->field_utran__target__cell.valueof();
}
return ret_val;
}

void PktCellChgNotifyU10_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 @RLCMAC_CSN1_Types.PktCellChgNotifyU10.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PktCellChgNotifyU10_template[list_length];
}

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

BITSTRING_template& PktCellChgNotifyU10_template::tag()
{
set_specific();
return single_value->field_tag;
}

const BITSTRING_template& PktCellChgNotifyU10_template::tag() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tag of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU10.");
return single_value->field_tag;
}

UtranTargetCell_template& PktCellChgNotifyU10_template::utran__target__cell()
{
set_specific();
return single_value->field_utran__target__cell;
}

const UtranTargetCell_template& PktCellChgNotifyU10_template::utran__target__cell() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field utran_target_cell of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU10.");
return single_value->field_utran__target__cell;
}

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

void PktCellChgNotifyU10_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ tag := ");
single_value->field_tag.log();
TTCN_Logger::log_event_str(", utran_target_cell := ");
single_value->field_utran__target__cell.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 PktCellChgNotifyU10_template::log_match(const PktCellChgNotifyU10& 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_tag.match(match_value.tag(), legacy)){
TTCN_Logger::log_logmatch_info(".tag");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_utran__target__cell.match(match_value.utran__target__cell(), legacy)){
TTCN_Logger::log_logmatch_info(".utran_target_cell");
single_value->field_utran__target__cell.log_match(match_value.utran__target__cell(), 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("{ tag := ");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::log_event_str(", utran_target_cell := ");
single_value->field_utran__target__cell.log_match(match_value.utran__target__cell(), 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 PktCellChgNotifyU10_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (tag().is_bound()) tag().set_implicit_omit();
if (utran__target__cell().is_bound()) utran__target__cell().set_implicit_omit();
}

void PktCellChgNotifyU10_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_tag.encode_text(text_buf);
single_value->field_utran__target__cell.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 @RLCMAC_CSN1_Types.PktCellChgNotifyU10.");
}
}

void PktCellChgNotifyU10_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_tag.decode_text(text_buf);
single_value->field_utran__target__cell.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 PktCellChgNotifyU10_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 @RLCMAC_CSN1_Types.PktCellChgNotifyU10.");
}
}

void PktCellChgNotifyU10_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: {
    PktCellChgNotifyU10_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 @RLCMAC_CSN1_Types.PktCellChgNotifyU10 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) tag().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) utran__target__cell().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(), "tag")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tag().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(), "utran_target_cell")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          utran__target__cell().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 @RLCMAC_CSN1_Types.PktCellChgNotifyU10: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PktCellChgNotifyU10_template* precondition = new PktCellChgNotifyU10_template;
    precondition->set_param(*param.get_elem(0));
    PktCellChgNotifyU10_template* implied_template = new PktCellChgNotifyU10_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PktCellChgNotifyU10_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@RLCMAC_CSN1_Types.PktCellChgNotifyU10");
  }
  is_ifpresent = param.get_ifpresent();
}

void PktCellChgNotifyU10_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_tag.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyU10");
single_value->field_utran__target__cell.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyU10");
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 : "@RLCMAC_CSN1_Types.PktCellChgNotifyU10");
}

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

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

PktCellChgNotifyU110::PktCellChgNotifyU110()
{
}

PktCellChgNotifyU110::PktCellChgNotifyU110(const BITSTRING& par_tag,
    const BITSTRING& par_arfcn__bsic__presence,
    const OPTIONAL< INTEGER >& par_arfcn,
    const OPTIONAL< INTEGER >& par_bsic,
    const BITSTRING& par_utran__target__cell__presence,
    const OPTIONAL< UtranTargetCell >& par_utran__target__cell,
    const BITSTRING& par_eutran__target__cell__presence,
    const OPTIONAL< EutranTargetCell >& par_eutran__target__cell,
    const BITSTRING& par_eutran__ccn__meas__rep__presence,
    const OPTIONAL< EutranCCNMeasReport >& par_eutran__ccn__meas__rep)
  :   field_tag(par_tag),
  field_arfcn__bsic__presence(par_arfcn__bsic__presence),
  field_arfcn(par_arfcn),
  field_bsic(par_bsic),
  field_utran__target__cell__presence(par_utran__target__cell__presence),
  field_utran__target__cell(par_utran__target__cell),
  field_eutran__target__cell__presence(par_eutran__target__cell__presence),
  field_eutran__target__cell(par_eutran__target__cell),
  field_eutran__ccn__meas__rep__presence(par_eutran__ccn__meas__rep__presence),
  field_eutran__ccn__meas__rep(par_eutran__ccn__meas__rep)
{
}

PktCellChgNotifyU110::PktCellChgNotifyU110(const PktCellChgNotifyU110& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
if (other_value.tag().is_bound()) field_tag = other_value.tag();
else field_tag.clean_up();
if (other_value.arfcn__bsic__presence().is_bound()) field_arfcn__bsic__presence = other_value.arfcn__bsic__presence();
else field_arfcn__bsic__presence.clean_up();
if (other_value.arfcn().is_bound()) field_arfcn = other_value.arfcn();
else field_arfcn.clean_up();
if (other_value.bsic().is_bound()) field_bsic = other_value.bsic();
else field_bsic.clean_up();
if (other_value.utran__target__cell__presence().is_bound()) field_utran__target__cell__presence = other_value.utran__target__cell__presence();
else field_utran__target__cell__presence.clean_up();
if (other_value.utran__target__cell().is_bound()) field_utran__target__cell = other_value.utran__target__cell();
else field_utran__target__cell.clean_up();
if (other_value.eutran__target__cell__presence().is_bound()) field_eutran__target__cell__presence = other_value.eutran__target__cell__presence();
else field_eutran__target__cell__presence.clean_up();
if (other_value.eutran__target__cell().is_bound()) field_eutran__target__cell = other_value.eutran__target__cell();
else field_eutran__target__cell.clean_up();
if (other_value.eutran__ccn__meas__rep__presence().is_bound()) field_eutran__ccn__meas__rep__presence = other_value.eutran__ccn__meas__rep__presence();
else field_eutran__ccn__meas__rep__presence.clean_up();
if (other_value.eutran__ccn__meas__rep().is_bound()) field_eutran__ccn__meas__rep = other_value.eutran__ccn__meas__rep();
else field_eutran__ccn__meas__rep.clean_up();
}

void PktCellChgNotifyU110::clean_up()
{
field_tag.clean_up();
field_arfcn__bsic__presence.clean_up();
field_arfcn.clean_up();
field_bsic.clean_up();
field_utran__target__cell__presence.clean_up();
field_utran__target__cell.clean_up();
field_eutran__target__cell__presence.clean_up();
field_eutran__target__cell.clean_up();
field_eutran__ccn__meas__rep__presence.clean_up();
field_eutran__ccn__meas__rep.clean_up();
}

const TTCN_Typedescriptor_t* PktCellChgNotifyU110::get_descriptor() const { return &PktCellChgNotifyU110_descr_; }
PktCellChgNotifyU110& PktCellChgNotifyU110::operator=(const PktCellChgNotifyU110& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
  if (other_value.tag().is_bound()) field_tag = other_value.tag();
  else field_tag.clean_up();
  if (other_value.arfcn__bsic__presence().is_bound()) field_arfcn__bsic__presence = other_value.arfcn__bsic__presence();
  else field_arfcn__bsic__presence.clean_up();
  if (other_value.arfcn().is_bound()) field_arfcn = other_value.arfcn();
  else field_arfcn.clean_up();
  if (other_value.bsic().is_bound()) field_bsic = other_value.bsic();
  else field_bsic.clean_up();
  if (other_value.utran__target__cell__presence().is_bound()) field_utran__target__cell__presence = other_value.utran__target__cell__presence();
  else field_utran__target__cell__presence.clean_up();
  if (other_value.utran__target__cell().is_bound()) field_utran__target__cell = other_value.utran__target__cell();
  else field_utran__target__cell.clean_up();
  if (other_value.eutran__target__cell__presence().is_bound()) field_eutran__target__cell__presence = other_value.eutran__target__cell__presence();
  else field_eutran__target__cell__presence.clean_up();
  if (other_value.eutran__target__cell().is_bound()) field_eutran__target__cell = other_value.eutran__target__cell();
  else field_eutran__target__cell.clean_up();
  if (other_value.eutran__ccn__meas__rep__presence().is_bound()) field_eutran__ccn__meas__rep__presence = other_value.eutran__ccn__meas__rep__presence();
  else field_eutran__ccn__meas__rep__presence.clean_up();
  if (other_value.eutran__ccn__meas__rep().is_bound()) field_eutran__ccn__meas__rep = other_value.eutran__ccn__meas__rep();
  else field_eutran__ccn__meas__rep.clean_up();
}
return *this;
}

boolean PktCellChgNotifyU110::operator==(const PktCellChgNotifyU110& other_value) const
{
return field_tag==other_value.field_tag
  && field_arfcn__bsic__presence==other_value.field_arfcn__bsic__presence
  && field_arfcn==other_value.field_arfcn
  && field_bsic==other_value.field_bsic
  && field_utran__target__cell__presence==other_value.field_utran__target__cell__presence
  && field_utran__target__cell==other_value.field_utran__target__cell
  && field_eutran__target__cell__presence==other_value.field_eutran__target__cell__presence
  && field_eutran__target__cell==other_value.field_eutran__target__cell
  && field_eutran__ccn__meas__rep__presence==other_value.field_eutran__ccn__meas__rep__presence
  && field_eutran__ccn__meas__rep==other_value.field_eutran__ccn__meas__rep;
}

boolean PktCellChgNotifyU110::is_bound() const
{
return (field_tag.is_bound())
  || (field_arfcn__bsic__presence.is_bound())
  || (OPTIONAL_OMIT == field_arfcn.get_selection() || field_arfcn.is_bound())
  || (OPTIONAL_OMIT == field_bsic.get_selection() || field_bsic.is_bound())
  || (field_utran__target__cell__presence.is_bound())
  || (OPTIONAL_OMIT == field_utran__target__cell.get_selection() || field_utran__target__cell.is_bound())
  || (field_eutran__target__cell__presence.is_bound())
  || (OPTIONAL_OMIT == field_eutran__target__cell.get_selection() || field_eutran__target__cell.is_bound())
  || (field_eutran__ccn__meas__rep__presence.is_bound())
  || (OPTIONAL_OMIT == field_eutran__ccn__meas__rep.get_selection() || field_eutran__ccn__meas__rep.is_bound());
}
boolean PktCellChgNotifyU110::is_value() const
{
return field_tag.is_value()
  && field_arfcn__bsic__presence.is_value()
  && (OPTIONAL_OMIT == field_arfcn.get_selection() || field_arfcn.is_value())
  && (OPTIONAL_OMIT == field_bsic.get_selection() || field_bsic.is_value())
  && field_utran__target__cell__presence.is_value()
  && (OPTIONAL_OMIT == field_utran__target__cell.get_selection() || field_utran__target__cell.is_value())
  && field_eutran__target__cell__presence.is_value()
  && (OPTIONAL_OMIT == field_eutran__target__cell.get_selection() || field_eutran__target__cell.is_value())
  && field_eutran__ccn__meas__rep__presence.is_value()
  && (OPTIONAL_OMIT == field_eutran__ccn__meas__rep.get_selection() || field_eutran__ccn__meas__rep.is_value());
}
int PktCellChgNotifyU110::size_of() const
{
  int ret_val = 5;
  if (field_arfcn.ispresent()) ret_val++;
  if (field_bsic.ispresent()) ret_val++;
  if (field_utran__target__cell.ispresent()) ret_val++;
  if (field_eutran__target__cell.ispresent()) ret_val++;
  if (field_eutran__ccn__meas__rep.ispresent()) ret_val++;
  return ret_val;
}

void PktCellChgNotifyU110::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ tag := ");
field_tag.log();
TTCN_Logger::log_event_str(", arfcn_bsic_presence := ");
field_arfcn__bsic__presence.log();
TTCN_Logger::log_event_str(", arfcn := ");
field_arfcn.log();
TTCN_Logger::log_event_str(", bsic := ");
field_bsic.log();
TTCN_Logger::log_event_str(", utran_target_cell_presence := ");
field_utran__target__cell__presence.log();
TTCN_Logger::log_event_str(", utran_target_cell := ");
field_utran__target__cell.log();
TTCN_Logger::log_event_str(", eutran_target_cell_presence := ");
field_eutran__target__cell__presence.log();
TTCN_Logger::log_event_str(", eutran_target_cell := ");
field_eutran__target__cell.log();
TTCN_Logger::log_event_str(", eutran_ccn_meas_rep_presence := ");
field_eutran__ccn__meas__rep__presence.log();
TTCN_Logger::log_event_str(", eutran_ccn_meas_rep := ");
field_eutran__ccn__meas__rep.log();
TTCN_Logger::log_event_str(" }");
}

void PktCellChgNotifyU110::set_implicit_omit()
{
if (tag().is_bound()) tag().set_implicit_omit();
if (arfcn__bsic__presence().is_bound()) arfcn__bsic__presence().set_implicit_omit();
if (!arfcn().is_bound()) arfcn() = OMIT_VALUE;
else arfcn().set_implicit_omit();
if (!bsic().is_bound()) bsic() = OMIT_VALUE;
else bsic().set_implicit_omit();
if (utran__target__cell__presence().is_bound()) utran__target__cell__presence().set_implicit_omit();
if (!utran__target__cell().is_bound()) utran__target__cell() = OMIT_VALUE;
else utran__target__cell().set_implicit_omit();
if (eutran__target__cell__presence().is_bound()) eutran__target__cell__presence().set_implicit_omit();
if (!eutran__target__cell().is_bound()) eutran__target__cell() = OMIT_VALUE;
else eutran__target__cell().set_implicit_omit();
if (eutran__ccn__meas__rep__presence().is_bound()) eutran__ccn__meas__rep__presence().set_implicit_omit();
if (!eutran__ccn__meas__rep().is_bound()) eutran__ccn__meas__rep() = OMIT_VALUE;
else eutran__ccn__meas__rep().set_implicit_omit();
}

void PktCellChgNotifyU110::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 (10<param.get_size()) {
      param.error("record value of type @RLCMAC_CSN1_Types.PktCellChgNotifyU110 has 10 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) tag().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) arfcn__bsic__presence().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) arfcn().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) bsic().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) utran__target__cell__presence().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) utran__target__cell().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) eutran__target__cell__presence().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) eutran__target__cell().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) eutran__ccn__meas__rep__presence().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) eutran__ccn__meas__rep().set_param(*param.get_elem(9));
    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(), "tag")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tag().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "arfcn_bsic_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          arfcn__bsic__presence().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "arfcn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          arfcn().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(), "bsic")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bsic().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(), "utran_target_cell_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          utran__target__cell__presence().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(), "utran_target_cell")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          utran__target__cell().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(), "eutran_target_cell_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          eutran__target__cell__presence().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(), "eutran_target_cell")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          eutran__target__cell().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(), "eutran_ccn_meas_rep_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          eutran__ccn__meas__rep__presence().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(), "eutran_ccn_meas_rep")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          eutran__ccn__meas__rep().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 @RLCMAC_CSN1_Types.PktCellChgNotifyU110: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@RLCMAC_CSN1_Types.PktCellChgNotifyU110");
  }
}

void PktCellChgNotifyU110::encode_text(Text_Buf& text_buf) const
{
field_tag.encode_text(text_buf);
field_arfcn__bsic__presence.encode_text(text_buf);
field_arfcn.encode_text(text_buf);
field_bsic.encode_text(text_buf);
field_utran__target__cell__presence.encode_text(text_buf);
field_utran__target__cell.encode_text(text_buf);
field_eutran__target__cell__presence.encode_text(text_buf);
field_eutran__target__cell.encode_text(text_buf);
field_eutran__ccn__meas__rep__presence.encode_text(text_buf);
field_eutran__ccn__meas__rep.encode_text(text_buf);
}

void PktCellChgNotifyU110::decode_text(Text_Buf& text_buf)
{
field_tag.decode_text(text_buf);
field_arfcn__bsic__presence.decode_text(text_buf);
field_arfcn.decode_text(text_buf);
field_bsic.decode_text(text_buf);
field_utran__target__cell__presence.decode_text(text_buf);
field_utran__target__cell.decode_text(text_buf);
field_eutran__target__cell__presence.decode_text(text_buf);
field_eutran__target__cell.decode_text(text_buf);
field_eutran__ccn__meas__rep__presence.decode_text(text_buf);
field_eutran__ccn__meas__rep.decode_text(text_buf);
}

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

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

int PktCellChgNotifyU110::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PktCellChgNotifyU110_tag_descr_.raw->forceomit);
  decoded_field_length = field_tag.RAW_decode(PktCellChgNotifyU110_tag_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PktCellChgNotifyU110_arfcn__bsic__presence_descr_.raw->forceomit);
  decoded_field_length = field_arfcn__bsic__presence.RAW_decode(PktCellChgNotifyU110_arfcn__bsic__presence_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (limit > 0 && field_arfcn__bsic__presence ==  bs_0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_arfcn = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, PktCellChgNotifyU110_arfcn_descr_.raw->forceomit);
  decoded_field_length = field_arfcn().RAW_decode(PktCellChgNotifyU110_arfcn_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_arfcn = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_arfcn=OMIT_VALUE;
  if (limit > 0 && field_arfcn__bsic__presence ==  bs_0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_bsic = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, PktCellChgNotifyU110_bsic_descr_.raw->forceomit);
  decoded_field_length = field_bsic().RAW_decode(PktCellChgNotifyU110_bsic_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_bsic = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_bsic=OMIT_VALUE;
  RAW_Force_Omit field_4_force_omit(4, force_omit, PktCellChgNotifyU110_utran__target__cell__presence_descr_.raw->forceomit);
  decoded_field_length = field_utran__target__cell__presence.RAW_decode(PktCellChgNotifyU110_utran__target__cell__presence_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (limit > 0 && field_utran__target__cell__presence ==  bs_0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_utran__target__cell = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, PktCellChgNotifyU110_utran__target__cell_descr_.raw->forceomit);
  decoded_field_length = field_utran__target__cell().RAW_decode(PktCellChgNotifyU110_utran__target__cell_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_utran__target__cell = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_utran__target__cell=OMIT_VALUE;
  RAW_Force_Omit field_6_force_omit(6, force_omit, PktCellChgNotifyU110_eutran__target__cell__presence_descr_.raw->forceomit);
  decoded_field_length = field_eutran__target__cell__presence.RAW_decode(PktCellChgNotifyU110_eutran__target__cell__presence_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (limit > 0 && field_eutran__target__cell__presence ==  bs_0){
  if (force_omit != NULL && (*force_omit)(7)) {
    field_eutran__target__cell = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_7_force_omit(7, force_omit, PktCellChgNotifyU110_eutran__target__cell_descr_.raw->forceomit);
  decoded_field_length = field_eutran__target__cell().RAW_decode(PktCellChgNotifyU110_eutran__target__cell_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 1) {
  field_eutran__target__cell = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_eutran__target__cell=OMIT_VALUE;
  RAW_Force_Omit field_8_force_omit(8, force_omit, PktCellChgNotifyU110_eutran__ccn__meas__rep__presence_descr_.raw->forceomit);
  decoded_field_length = field_eutran__ccn__meas__rep__presence.RAW_decode(PktCellChgNotifyU110_eutran__ccn__meas__rep__presence_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_8_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (limit > 0 && field_eutran__ccn__meas__rep__presence ==  bs_0){
  if (force_omit != NULL && (*force_omit)(9)) {
    field_eutran__ccn__meas__rep = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_9_force_omit(9, force_omit, PktCellChgNotifyU110_eutran__ccn__meas__rep_descr_.raw->forceomit);
  decoded_field_length = field_eutran__ccn__meas__rep().RAW_decode(PktCellChgNotifyU110_eutran__ccn__meas__rep_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_9_force_omit);
  if (decoded_field_length < 1) {
  field_eutran__ccn__meas__rep = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_eutran__ccn__meas__rep=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PktCellChgNotifyU110::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 10;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(10);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PktCellChgNotifyU110_tag_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PktCellChgNotifyU110_arfcn__bsic__presence_descr_.raw);
  if (field_arfcn.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PktCellChgNotifyU110_arfcn_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_bsic.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PktCellChgNotifyU110_bsic_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, PktCellChgNotifyU110_utran__target__cell__presence_descr_.raw);
  if (field_utran__target__cell.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, PktCellChgNotifyU110_utran__target__cell_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, PktCellChgNotifyU110_eutran__target__cell__presence_descr_.raw);
  if (field_eutran__target__cell.ispresent()) {
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, PktCellChgNotifyU110_eutran__target__cell_descr_.raw);
  }
  else myleaf.body.node.nodes[7] = NULL;
  myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 8, PktCellChgNotifyU110_eutran__ccn__meas__rep__presence_descr_.raw);
  if (field_eutran__ccn__meas__rep.ispresent()) {
  myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 9, PktCellChgNotifyU110_eutran__ccn__meas__rep_descr_.raw);
  }
  else myleaf.body.node.nodes[9] = NULL;
  encoded_length += field_tag.RAW_encode(PktCellChgNotifyU110_tag_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_arfcn__bsic__presence.RAW_encode(PktCellChgNotifyU110_arfcn__bsic__presence_descr_, *myleaf.body.node.nodes[1]);
  if (field_arfcn.ispresent()) {
  encoded_length += field_arfcn().RAW_encode(PktCellChgNotifyU110_arfcn_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_bsic.ispresent()) {
  encoded_length += field_bsic().RAW_encode(PktCellChgNotifyU110_bsic_descr_, *myleaf.body.node.nodes[3]);
  }
  encoded_length += field_utran__target__cell__presence.RAW_encode(PktCellChgNotifyU110_utran__target__cell__presence_descr_, *myleaf.body.node.nodes[4]);
  if (field_utran__target__cell.ispresent()) {
  encoded_length += field_utran__target__cell().RAW_encode(PktCellChgNotifyU110_utran__target__cell_descr_, *myleaf.body.node.nodes[5]);
  }
  encoded_length += field_eutran__target__cell__presence.RAW_encode(PktCellChgNotifyU110_eutran__target__cell__presence_descr_, *myleaf.body.node.nodes[6]);
  if (field_eutran__target__cell.ispresent()) {
  encoded_length += field_eutran__target__cell().RAW_encode(PktCellChgNotifyU110_eutran__target__cell_descr_, *myleaf.body.node.nodes[7]);
  }
  encoded_length += field_eutran__ccn__meas__rep__presence.RAW_encode(PktCellChgNotifyU110_eutran__ccn__meas__rep__presence_descr_, *myleaf.body.node.nodes[8]);
  if (field_eutran__ccn__meas__rep.ispresent()) {
  encoded_length += field_eutran__ccn__meas__rep().RAW_encode(PktCellChgNotifyU110_eutran__ccn__meas__rep_descr_, *myleaf.body.node.nodes[9]);
  }
  if (field_arfcn.ispresent() && (field_arfcn__bsic__presence !=  bs_0)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={1};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_0.RAW_encode(PktCellChgNotifyU110_arfcn__bsic__presence_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  if (field_bsic.ispresent() && (field_arfcn__bsic__presence !=  bs_0)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={1};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_0.RAW_encode(PktCellChgNotifyU110_arfcn__bsic__presence_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  if (field_utran__target__cell.ispresent() && (field_utran__target__cell__presence !=  bs_0)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={4};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_0.RAW_encode(PktCellChgNotifyU110_utran__target__cell__presence_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  if (field_eutran__target__cell.ispresent() && (field_eutran__target__cell__presence !=  bs_0)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={6};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_0.RAW_encode(PktCellChgNotifyU110_eutran__target__cell__presence_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  if (field_eutran__ccn__meas__rep.ispresent() && (field_eutran__ccn__meas__rep__presence !=  bs_0)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={8};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_0.RAW_encode(PktCellChgNotifyU110_eutran__ccn__meas__rep__presence_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  return myleaf.length = encoded_length;
}

struct PktCellChgNotifyU110_template::single_value_struct {
BITSTRING_template field_tag;
BITSTRING_template field_arfcn__bsic__presence;
INTEGER_template field_arfcn;
INTEGER_template field_bsic;
BITSTRING_template field_utran__target__cell__presence;
UtranTargetCell_template field_utran__target__cell;
BITSTRING_template field_eutran__target__cell__presence;
EutranTargetCell_template field_eutran__target__cell;
BITSTRING_template field_eutran__ccn__meas__rep__presence;
EutranCCNMeasReport_template field_eutran__ccn__meas__rep;
};

void PktCellChgNotifyU110_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_tag = ANY_VALUE;
single_value->field_arfcn__bsic__presence = ANY_VALUE;
single_value->field_arfcn = ANY_OR_OMIT;
single_value->field_bsic = ANY_OR_OMIT;
single_value->field_utran__target__cell__presence = ANY_VALUE;
single_value->field_utran__target__cell = ANY_OR_OMIT;
single_value->field_eutran__target__cell__presence = ANY_VALUE;
single_value->field_eutran__target__cell = ANY_OR_OMIT;
single_value->field_eutran__ccn__meas__rep__presence = ANY_VALUE;
single_value->field_eutran__ccn__meas__rep = ANY_OR_OMIT;
}
}
}

void PktCellChgNotifyU110_template::copy_value(const PktCellChgNotifyU110& other_value)
{
single_value = new single_value_struct;
if (other_value.tag().is_bound()) {
  single_value->field_tag = other_value.tag();
} else {
  single_value->field_tag.clean_up();
}
if (other_value.arfcn__bsic__presence().is_bound()) {
  single_value->field_arfcn__bsic__presence = other_value.arfcn__bsic__presence();
} else {
  single_value->field_arfcn__bsic__presence.clean_up();
}
if (other_value.arfcn().is_bound()) {
  if (other_value.arfcn().ispresent()) single_value->field_arfcn = other_value.arfcn()();
  else single_value->field_arfcn = OMIT_VALUE;
} else {
  single_value->field_arfcn.clean_up();
}
if (other_value.bsic().is_bound()) {
  if (other_value.bsic().ispresent()) single_value->field_bsic = other_value.bsic()();
  else single_value->field_bsic = OMIT_VALUE;
} else {
  single_value->field_bsic.clean_up();
}
if (other_value.utran__target__cell__presence().is_bound()) {
  single_value->field_utran__target__cell__presence = other_value.utran__target__cell__presence();
} else {
  single_value->field_utran__target__cell__presence.clean_up();
}
if (other_value.utran__target__cell().is_bound()) {
  if (other_value.utran__target__cell().ispresent()) single_value->field_utran__target__cell = other_value.utran__target__cell()();
  else single_value->field_utran__target__cell = OMIT_VALUE;
} else {
  single_value->field_utran__target__cell.clean_up();
}
if (other_value.eutran__target__cell__presence().is_bound()) {
  single_value->field_eutran__target__cell__presence = other_value.eutran__target__cell__presence();
} else {
  single_value->field_eutran__target__cell__presence.clean_up();
}
if (other_value.eutran__target__cell().is_bound()) {
  if (other_value.eutran__target__cell().ispresent()) single_value->field_eutran__target__cell = other_value.eutran__target__cell()();
  else single_value->field_eutran__target__cell = OMIT_VALUE;
} else {
  single_value->field_eutran__target__cell.clean_up();
}
if (other_value.eutran__ccn__meas__rep__presence().is_bound()) {
  single_value->field_eutran__ccn__meas__rep__presence = other_value.eutran__ccn__meas__rep__presence();
} else {
  single_value->field_eutran__ccn__meas__rep__presence.clean_up();
}
if (other_value.eutran__ccn__meas__rep().is_bound()) {
  if (other_value.eutran__ccn__meas__rep().ispresent()) single_value->field_eutran__ccn__meas__rep = other_value.eutran__ccn__meas__rep()();
  else single_value->field_eutran__ccn__meas__rep = OMIT_VALUE;
} else {
  single_value->field_eutran__ccn__meas__rep.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PktCellChgNotifyU110_template::copy_template(const PktCellChgNotifyU110_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.tag().get_selection()) {
single_value->field_tag = other_value.tag();
} else {
single_value->field_tag.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.arfcn__bsic__presence().get_selection()) {
single_value->field_arfcn__bsic__presence = other_value.arfcn__bsic__presence();
} else {
single_value->field_arfcn__bsic__presence.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.arfcn().get_selection()) {
single_value->field_arfcn = other_value.arfcn();
} else {
single_value->field_arfcn.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.bsic().get_selection()) {
single_value->field_bsic = other_value.bsic();
} else {
single_value->field_bsic.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.utran__target__cell__presence().get_selection()) {
single_value->field_utran__target__cell__presence = other_value.utran__target__cell__presence();
} else {
single_value->field_utran__target__cell__presence.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.utran__target__cell().get_selection()) {
single_value->field_utran__target__cell = other_value.utran__target__cell();
} else {
single_value->field_utran__target__cell.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.eutran__target__cell__presence().get_selection()) {
single_value->field_eutran__target__cell__presence = other_value.eutran__target__cell__presence();
} else {
single_value->field_eutran__target__cell__presence.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.eutran__target__cell().get_selection()) {
single_value->field_eutran__target__cell = other_value.eutran__target__cell();
} else {
single_value->field_eutran__target__cell.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.eutran__ccn__meas__rep__presence().get_selection()) {
single_value->field_eutran__ccn__meas__rep__presence = other_value.eutran__ccn__meas__rep__presence();
} else {
single_value->field_eutran__ccn__meas__rep__presence.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.eutran__ccn__meas__rep().get_selection()) {
single_value->field_eutran__ccn__meas__rep = other_value.eutran__ccn__meas__rep();
} else {
single_value->field_eutran__ccn__meas__rep.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 PktCellChgNotifyU110_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 PktCellChgNotifyU110_template(*other_value.implication_.precondition);
implication_.implied_template = new PktCellChgNotifyU110_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 @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
break;
}
set_selection(other_value);
}

PktCellChgNotifyU110_template::PktCellChgNotifyU110_template()
{
}

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

PktCellChgNotifyU110_template::PktCellChgNotifyU110_template(const PktCellChgNotifyU110& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PktCellChgNotifyU110_template::match(const PktCellChgNotifyU110& 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.tag().is_bound()) return FALSE;
if(!single_value->field_tag.match(other_value.tag(), legacy))return FALSE;
if(!other_value.arfcn__bsic__presence().is_bound()) return FALSE;
if(!single_value->field_arfcn__bsic__presence.match(other_value.arfcn__bsic__presence(), legacy))return FALSE;
if(!other_value.arfcn().is_bound()) return FALSE;
if((other_value.arfcn().ispresent() ? !single_value->field_arfcn.match((const INTEGER&)other_value.arfcn(), legacy) : !single_value->field_arfcn.match_omit(legacy)))return FALSE;
if(!other_value.bsic().is_bound()) return FALSE;
if((other_value.bsic().ispresent() ? !single_value->field_bsic.match((const INTEGER&)other_value.bsic(), legacy) : !single_value->field_bsic.match_omit(legacy)))return FALSE;
if(!other_value.utran__target__cell__presence().is_bound()) return FALSE;
if(!single_value->field_utran__target__cell__presence.match(other_value.utran__target__cell__presence(), legacy))return FALSE;
if(!other_value.utran__target__cell().is_bound()) return FALSE;
if((other_value.utran__target__cell().ispresent() ? !single_value->field_utran__target__cell.match((const UtranTargetCell&)other_value.utran__target__cell(), legacy) : !single_value->field_utran__target__cell.match_omit(legacy)))return FALSE;
if(!other_value.eutran__target__cell__presence().is_bound()) return FALSE;
if(!single_value->field_eutran__target__cell__presence.match(other_value.eutran__target__cell__presence(), legacy))return FALSE;
if(!other_value.eutran__target__cell().is_bound()) return FALSE;
if((other_value.eutran__target__cell().ispresent() ? !single_value->field_eutran__target__cell.match((const EutranTargetCell&)other_value.eutran__target__cell(), legacy) : !single_value->field_eutran__target__cell.match_omit(legacy)))return FALSE;
if(!other_value.eutran__ccn__meas__rep__presence().is_bound()) return FALSE;
if(!single_value->field_eutran__ccn__meas__rep__presence.match(other_value.eutran__ccn__meas__rep__presence(), legacy))return FALSE;
if(!other_value.eutran__ccn__meas__rep().is_bound()) return FALSE;
if((other_value.eutran__ccn__meas__rep().ispresent() ? !single_value->field_eutran__ccn__meas__rep.match((const EutranCCNMeasReport&)other_value.eutran__ccn__meas__rep(), legacy) : !single_value->field_eutran__ccn__meas__rep.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
}
return FALSE;
}

boolean PktCellChgNotifyU110_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_tag.is_bound()
 || single_value->field_arfcn__bsic__presence.is_bound()
 || (single_value->field_arfcn.is_omit() || single_value->field_arfcn.is_bound())
 || (single_value->field_bsic.is_omit() || single_value->field_bsic.is_bound())
 || single_value->field_utran__target__cell__presence.is_bound()
 || (single_value->field_utran__target__cell.is_omit() || single_value->field_utran__target__cell.is_bound())
 || single_value->field_eutran__target__cell__presence.is_bound()
 || (single_value->field_eutran__target__cell.is_omit() || single_value->field_eutran__target__cell.is_bound())
 || single_value->field_eutran__ccn__meas__rep__presence.is_bound()
 || (single_value->field_eutran__ccn__meas__rep.is_omit() || single_value->field_eutran__ccn__meas__rep.is_bound());
}

boolean PktCellChgNotifyU110_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_tag.is_value()
 && single_value->field_arfcn__bsic__presence.is_value()
 && (single_value->field_arfcn.is_omit() || single_value->field_arfcn.is_value())
 && (single_value->field_bsic.is_omit() || single_value->field_bsic.is_value())
 && single_value->field_utran__target__cell__presence.is_value()
 && (single_value->field_utran__target__cell.is_omit() || single_value->field_utran__target__cell.is_value())
 && single_value->field_eutran__target__cell__presence.is_value()
 && (single_value->field_eutran__target__cell.is_omit() || single_value->field_eutran__target__cell.is_value())
 && single_value->field_eutran__ccn__meas__rep__presence.is_value()
 && (single_value->field_eutran__ccn__meas__rep.is_omit() || single_value->field_eutran__ccn__meas__rep.is_value());
}

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

PktCellChgNotifyU110 PktCellChgNotifyU110_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 @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
PktCellChgNotifyU110 ret_val;
if (single_value->field_tag.is_bound()) {
ret_val.tag() = single_value->field_tag.valueof();
}
if (single_value->field_arfcn__bsic__presence.is_bound()) {
ret_val.arfcn__bsic__presence() = single_value->field_arfcn__bsic__presence.valueof();
}
if (single_value->field_arfcn.is_omit()) ret_val.arfcn() = OMIT_VALUE;
else if (single_value->field_arfcn.is_bound()) {
ret_val.arfcn() = single_value->field_arfcn.valueof();
}
if (single_value->field_bsic.is_omit()) ret_val.bsic() = OMIT_VALUE;
else if (single_value->field_bsic.is_bound()) {
ret_val.bsic() = single_value->field_bsic.valueof();
}
if (single_value->field_utran__target__cell__presence.is_bound()) {
ret_val.utran__target__cell__presence() = single_value->field_utran__target__cell__presence.valueof();
}
if (single_value->field_utran__target__cell.is_omit()) ret_val.utran__target__cell() = OMIT_VALUE;
else if (single_value->field_utran__target__cell.is_bound()) {
ret_val.utran__target__cell() = single_value->field_utran__target__cell.valueof();
}
if (single_value->field_eutran__target__cell__presence.is_bound()) {
ret_val.eutran__target__cell__presence() = single_value->field_eutran__target__cell__presence.valueof();
}
if (single_value->field_eutran__target__cell.is_omit()) ret_val.eutran__target__cell() = OMIT_VALUE;
else if (single_value->field_eutran__target__cell.is_bound()) {
ret_val.eutran__target__cell() = single_value->field_eutran__target__cell.valueof();
}
if (single_value->field_eutran__ccn__meas__rep__presence.is_bound()) {
ret_val.eutran__ccn__meas__rep__presence() = single_value->field_eutran__ccn__meas__rep__presence.valueof();
}
if (single_value->field_eutran__ccn__meas__rep.is_omit()) ret_val.eutran__ccn__meas__rep() = OMIT_VALUE;
else if (single_value->field_eutran__ccn__meas__rep.is_bound()) {
ret_val.eutran__ccn__meas__rep() = single_value->field_eutran__ccn__meas__rep.valueof();
}
return ret_val;
}

void PktCellChgNotifyU110_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 @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PktCellChgNotifyU110_template[list_length];
}

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

BITSTRING_template& PktCellChgNotifyU110_template::tag()
{
set_specific();
return single_value->field_tag;
}

const BITSTRING_template& PktCellChgNotifyU110_template::tag() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tag of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
return single_value->field_tag;
}

BITSTRING_template& PktCellChgNotifyU110_template::arfcn__bsic__presence()
{
set_specific();
return single_value->field_arfcn__bsic__presence;
}

const BITSTRING_template& PktCellChgNotifyU110_template::arfcn__bsic__presence() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field arfcn_bsic_presence of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
return single_value->field_arfcn__bsic__presence;
}

INTEGER_template& PktCellChgNotifyU110_template::arfcn()
{
set_specific();
return single_value->field_arfcn;
}

const INTEGER_template& PktCellChgNotifyU110_template::arfcn() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field arfcn of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
return single_value->field_arfcn;
}

INTEGER_template& PktCellChgNotifyU110_template::bsic()
{
set_specific();
return single_value->field_bsic;
}

const INTEGER_template& PktCellChgNotifyU110_template::bsic() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field bsic of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
return single_value->field_bsic;
}

BITSTRING_template& PktCellChgNotifyU110_template::utran__target__cell__presence()
{
set_specific();
return single_value->field_utran__target__cell__presence;
}

const BITSTRING_template& PktCellChgNotifyU110_template::utran__target__cell__presence() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field utran_target_cell_presence of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
return single_value->field_utran__target__cell__presence;
}

UtranTargetCell_template& PktCellChgNotifyU110_template::utran__target__cell()
{
set_specific();
return single_value->field_utran__target__cell;
}

const UtranTargetCell_template& PktCellChgNotifyU110_template::utran__target__cell() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field utran_target_cell of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
return single_value->field_utran__target__cell;
}

BITSTRING_template& PktCellChgNotifyU110_template::eutran__target__cell__presence()
{
set_specific();
return single_value->field_eutran__target__cell__presence;
}

const BITSTRING_template& PktCellChgNotifyU110_template::eutran__target__cell__presence() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field eutran_target_cell_presence of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
return single_value->field_eutran__target__cell__presence;
}

EutranTargetCell_template& PktCellChgNotifyU110_template::eutran__target__cell()
{
set_specific();
return single_value->field_eutran__target__cell;
}

const EutranTargetCell_template& PktCellChgNotifyU110_template::eutran__target__cell() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field eutran_target_cell of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
return single_value->field_eutran__target__cell;
}

BITSTRING_template& PktCellChgNotifyU110_template::eutran__ccn__meas__rep__presence()
{
set_specific();
return single_value->field_eutran__ccn__meas__rep__presence;
}

const BITSTRING_template& PktCellChgNotifyU110_template::eutran__ccn__meas__rep__presence() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field eutran_ccn_meas_rep_presence of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
return single_value->field_eutran__ccn__meas__rep__presence;
}

EutranCCNMeasReport_template& PktCellChgNotifyU110_template::eutran__ccn__meas__rep()
{
set_specific();
return single_value->field_eutran__ccn__meas__rep;
}

const EutranCCNMeasReport_template& PktCellChgNotifyU110_template::eutran__ccn__meas__rep() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field eutran_ccn_meas_rep of a non-specific template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
return single_value->field_eutran__ccn__meas__rep;
}

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

void PktCellChgNotifyU110_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ tag := ");
single_value->field_tag.log();
TTCN_Logger::log_event_str(", arfcn_bsic_presence := ");
single_value->field_arfcn__bsic__presence.log();
TTCN_Logger::log_event_str(", arfcn := ");
single_value->field_arfcn.log();
TTCN_Logger::log_event_str(", bsic := ");
single_value->field_bsic.log();
TTCN_Logger::log_event_str(", utran_target_cell_presence := ");
single_value->field_utran__target__cell__presence.log();
TTCN_Logger::log_event_str(", utran_target_cell := ");
single_value->field_utran__target__cell.log();
TTCN_Logger::log_event_str(", eutran_target_cell_presence := ");
single_value->field_eutran__target__cell__presence.log();
TTCN_Logger::log_event_str(", eutran_target_cell := ");
single_value->field_eutran__target__cell.log();
TTCN_Logger::log_event_str(", eutran_ccn_meas_rep_presence := ");
single_value->field_eutran__ccn__meas__rep__presence.log();
TTCN_Logger::log_event_str(", eutran_ccn_meas_rep := ");
single_value->field_eutran__ccn__meas__rep.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 PktCellChgNotifyU110_template::log_match(const PktCellChgNotifyU110& 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_tag.match(match_value.tag(), legacy)){
TTCN_Logger::log_logmatch_info(".tag");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_arfcn__bsic__presence.match(match_value.arfcn__bsic__presence(), legacy)){
TTCN_Logger::log_logmatch_info(".arfcn_bsic_presence");
single_value->field_arfcn__bsic__presence.log_match(match_value.arfcn__bsic__presence(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.arfcn().ispresent()){
if(!single_value->field_arfcn.match(match_value.arfcn(), legacy)){
TTCN_Logger::log_logmatch_info(".arfcn");
single_value->field_arfcn.log_match(match_value.arfcn(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_arfcn.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".arfcn := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_arfcn.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.bsic().ispresent()){
if(!single_value->field_bsic.match(match_value.bsic(), legacy)){
TTCN_Logger::log_logmatch_info(".bsic");
single_value->field_bsic.log_match(match_value.bsic(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_bsic.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".bsic := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_bsic.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_utran__target__cell__presence.match(match_value.utran__target__cell__presence(), legacy)){
TTCN_Logger::log_logmatch_info(".utran_target_cell_presence");
single_value->field_utran__target__cell__presence.log_match(match_value.utran__target__cell__presence(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.utran__target__cell().ispresent()){
if(!single_value->field_utran__target__cell.match(match_value.utran__target__cell(), legacy)){
TTCN_Logger::log_logmatch_info(".utran_target_cell");
single_value->field_utran__target__cell.log_match(match_value.utran__target__cell(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_utran__target__cell.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".utran_target_cell := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_utran__target__cell.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_eutran__target__cell__presence.match(match_value.eutran__target__cell__presence(), legacy)){
TTCN_Logger::log_logmatch_info(".eutran_target_cell_presence");
single_value->field_eutran__target__cell__presence.log_match(match_value.eutran__target__cell__presence(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.eutran__target__cell().ispresent()){
if(!single_value->field_eutran__target__cell.match(match_value.eutran__target__cell(), legacy)){
TTCN_Logger::log_logmatch_info(".eutran_target_cell");
single_value->field_eutran__target__cell.log_match(match_value.eutran__target__cell(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_eutran__target__cell.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".eutran_target_cell := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_eutran__target__cell.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_eutran__ccn__meas__rep__presence.match(match_value.eutran__ccn__meas__rep__presence(), legacy)){
TTCN_Logger::log_logmatch_info(".eutran_ccn_meas_rep_presence");
single_value->field_eutran__ccn__meas__rep__presence.log_match(match_value.eutran__ccn__meas__rep__presence(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.eutran__ccn__meas__rep().ispresent()){
if(!single_value->field_eutran__ccn__meas__rep.match(match_value.eutran__ccn__meas__rep(), legacy)){
TTCN_Logger::log_logmatch_info(".eutran_ccn_meas_rep");
single_value->field_eutran__ccn__meas__rep.log_match(match_value.eutran__ccn__meas__rep(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_eutran__ccn__meas__rep.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".eutran_ccn_meas_rep := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_eutran__ccn__meas__rep.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ tag := ");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::log_event_str(", arfcn_bsic_presence := ");
single_value->field_arfcn__bsic__presence.log_match(match_value.arfcn__bsic__presence(), legacy);
TTCN_Logger::log_event_str(", arfcn := ");
if (match_value.arfcn().ispresent()) {
single_value->field_arfcn.log_match(match_value.arfcn(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_arfcn.log();
if (single_value->field_arfcn.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", bsic := ");
if (match_value.bsic().ispresent()) {
single_value->field_bsic.log_match(match_value.bsic(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_bsic.log();
if (single_value->field_bsic.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", utran_target_cell_presence := ");
single_value->field_utran__target__cell__presence.log_match(match_value.utran__target__cell__presence(), legacy);
TTCN_Logger::log_event_str(", utran_target_cell := ");
if (match_value.utran__target__cell().ispresent()) {
single_value->field_utran__target__cell.log_match(match_value.utran__target__cell(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_utran__target__cell.log();
if (single_value->field_utran__target__cell.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", eutran_target_cell_presence := ");
single_value->field_eutran__target__cell__presence.log_match(match_value.eutran__target__cell__presence(), legacy);
TTCN_Logger::log_event_str(", eutran_target_cell := ");
if (match_value.eutran__target__cell().ispresent()) {
single_value->field_eutran__target__cell.log_match(match_value.eutran__target__cell(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_eutran__target__cell.log();
if (single_value->field_eutran__target__cell.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", eutran_ccn_meas_rep_presence := ");
single_value->field_eutran__ccn__meas__rep__presence.log_match(match_value.eutran__ccn__meas__rep__presence(), legacy);
TTCN_Logger::log_event_str(", eutran_ccn_meas_rep := ");
if (match_value.eutran__ccn__meas__rep().ispresent()) {
single_value->field_eutran__ccn__meas__rep.log_match(match_value.eutran__ccn__meas__rep(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_eutran__ccn__meas__rep.log();
if (single_value->field_eutran__ccn__meas__rep.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PktCellChgNotifyU110_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (tag().is_bound()) tag().set_implicit_omit();
if (arfcn__bsic__presence().is_bound()) arfcn__bsic__presence().set_implicit_omit();
if (!arfcn().is_bound()) arfcn() = OMIT_VALUE;
else arfcn().set_implicit_omit();
if (!bsic().is_bound()) bsic() = OMIT_VALUE;
else bsic().set_implicit_omit();
if (utran__target__cell__presence().is_bound()) utran__target__cell__presence().set_implicit_omit();
if (!utran__target__cell().is_bound()) utran__target__cell() = OMIT_VALUE;
else utran__target__cell().set_implicit_omit();
if (eutran__target__cell__presence().is_bound()) eutran__target__cell__presence().set_implicit_omit();
if (!eutran__target__cell().is_bound()) eutran__target__cell() = OMIT_VALUE;
else eutran__target__cell().set_implicit_omit();
if (eutran__ccn__meas__rep__presence().is_bound()) eutran__ccn__meas__rep__presence().set_implicit_omit();
if (!eutran__ccn__meas__rep().is_bound()) eutran__ccn__meas__rep() = OMIT_VALUE;
else eutran__ccn__meas__rep().set_implicit_omit();
}

void PktCellChgNotifyU110_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_tag.encode_text(text_buf);
single_value->field_arfcn__bsic__presence.encode_text(text_buf);
single_value->field_arfcn.encode_text(text_buf);
single_value->field_bsic.encode_text(text_buf);
single_value->field_utran__target__cell__presence.encode_text(text_buf);
single_value->field_utran__target__cell.encode_text(text_buf);
single_value->field_eutran__target__cell__presence.encode_text(text_buf);
single_value->field_eutran__target__cell.encode_text(text_buf);
single_value->field_eutran__ccn__meas__rep__presence.encode_text(text_buf);
single_value->field_eutran__ccn__meas__rep.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 @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
}
}

void PktCellChgNotifyU110_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_tag.decode_text(text_buf);
single_value->field_arfcn__bsic__presence.decode_text(text_buf);
single_value->field_arfcn.decode_text(text_buf);
single_value->field_bsic.decode_text(text_buf);
single_value->field_utran__target__cell__presence.decode_text(text_buf);
single_value->field_utran__target__cell.decode_text(text_buf);
single_value->field_eutran__target__cell__presence.decode_text(text_buf);
single_value->field_eutran__target__cell.decode_text(text_buf);
single_value->field_eutran__ccn__meas__rep__presence.decode_text(text_buf);
single_value->field_eutran__ccn__meas__rep.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 PktCellChgNotifyU110_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 @RLCMAC_CSN1_Types.PktCellChgNotifyU110.");
}
}

void PktCellChgNotifyU110_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: {
    PktCellChgNotifyU110_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 (10<param.get_size()) {
      param.error("record template of type @RLCMAC_CSN1_Types.PktCellChgNotifyU110 has 10 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) tag().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) arfcn__bsic__presence().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) arfcn().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) bsic().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) utran__target__cell__presence().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) utran__target__cell().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) eutran__target__cell__presence().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) eutran__target__cell().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) eutran__ccn__meas__rep__presence().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) eutran__ccn__meas__rep().set_param(*param.get_elem(9));
    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(), "tag")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tag().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "arfcn_bsic_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          arfcn__bsic__presence().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "arfcn")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          arfcn().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(), "bsic")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bsic().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(), "utran_target_cell_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          utran__target__cell__presence().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(), "utran_target_cell")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          utran__target__cell().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(), "eutran_target_cell_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          eutran__target__cell__presence().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(), "eutran_target_cell")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          eutran__target__cell().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(), "eutran_ccn_meas_rep_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          eutran__ccn__meas__rep__presence().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(), "eutran_ccn_meas_rep")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          eutran__ccn__meas__rep().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 @RLCMAC_CSN1_Types.PktCellChgNotifyU110: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PktCellChgNotifyU110_template* precondition = new PktCellChgNotifyU110_template;
    precondition->set_param(*param.get_elem(0));
    PktCellChgNotifyU110_template* implied_template = new PktCellChgNotifyU110_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PktCellChgNotifyU110_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@RLCMAC_CSN1_Types.PktCellChgNotifyU110");
  }
  is_ifpresent = param.get_ifpresent();
}

void PktCellChgNotifyU110_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_tag.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyU110");
single_value->field_arfcn__bsic__presence.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyU110");
single_value->field_arfcn.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyU110");
single_value->field_bsic.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyU110");
single_value->field_utran__target__cell__presence.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyU110");
single_value->field_utran__target__cell.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyU110");
single_value->field_eutran__target__cell__presence.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyU110");
single_value->field_eutran__target__cell.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyU110");
single_value->field_eutran__ccn__meas__rep__presence.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyU110");
single_value->field_eutran__ccn__meas__rep.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyU110");
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 : "@RLCMAC_CSN1_Types.PktCellChgNotifyU110");
}

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

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

void PktCellChgNotifyUnion::copy_value(const PktCellChgNotifyUnion& other_value)
{
switch (other_value.union_selection) {
case ALT_u0:
field_u0 = new PktCellChgNotifyU0(*other_value.field_u0);
break;
case ALT_u10:
field_u10 = new PktCellChgNotifyU10(*other_value.field_u10);
break;
case ALT_u110:
field_u110 = new PktCellChgNotifyU110(*other_value.field_u110);
break;
default:
TTCN_error("Assignment of an unbound union value of type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
}
union_selection = other_value.union_selection;
}

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

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

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

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

boolean PktCellChgNotifyUnion::operator==(const PktCellChgNotifyUnion& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_u0:
return *field_u0 == *other_value.field_u0;
case ALT_u10:
return *field_u10 == *other_value.field_u10;
case ALT_u110:
return *field_u110 == *other_value.field_u110;
default:
return FALSE;
}
}

PktCellChgNotifyU0& PktCellChgNotifyUnion::u0()
{
if (union_selection != ALT_u0) {
clean_up();
field_u0 = new PktCellChgNotifyU0;
union_selection = ALT_u0;
}
return *field_u0;
}

const PktCellChgNotifyU0& PktCellChgNotifyUnion::u0() const
{
if (union_selection != ALT_u0) TTCN_error("Using non-selected field u0 in a value of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
return *field_u0;
}

PktCellChgNotifyU10& PktCellChgNotifyUnion::u10()
{
if (union_selection != ALT_u10) {
clean_up();
field_u10 = new PktCellChgNotifyU10;
union_selection = ALT_u10;
}
return *field_u10;
}

const PktCellChgNotifyU10& PktCellChgNotifyUnion::u10() const
{
if (union_selection != ALT_u10) TTCN_error("Using non-selected field u10 in a value of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
return *field_u10;
}

PktCellChgNotifyU110& PktCellChgNotifyUnion::u110()
{
if (union_selection != ALT_u110) {
clean_up();
field_u110 = new PktCellChgNotifyU110;
union_selection = ALT_u110;
}
return *field_u110;
}

const PktCellChgNotifyU110& PktCellChgNotifyUnion::u110() const
{
if (union_selection != ALT_u110) TTCN_error("Using non-selected field u110 in a value of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
return *field_u110;
}

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

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

boolean PktCellChgNotifyUnion::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_u0: return field_u0->is_value();
case ALT_u10: return field_u10->is_value();
case ALT_u110: return field_u110->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void PktCellChgNotifyUnion::clean_up()
{
switch (union_selection) {
case ALT_u0:
  delete field_u0;
  break;
case ALT_u10:
  delete field_u10;
  break;
case ALT_u110:
  delete field_u110;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void PktCellChgNotifyUnion::log() const
{
switch (union_selection) {
case ALT_u0:
TTCN_Logger::log_event_str("{ u0 := ");
field_u0->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_u10:
TTCN_Logger::log_event_str("{ u10 := ");
field_u10->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_u110:
TTCN_Logger::log_event_str("{ u110 := ");
field_u110->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

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

void PktCellChgNotifyUnion::set_implicit_omit()
{
switch (union_selection) {
case ALT_u0:
field_u0->set_implicit_omit(); break;
case ALT_u10:
field_u10->set_implicit_omit(); break;
case ALT_u110:
field_u110->set_implicit_omit(); break;
default: break;
}
}

void PktCellChgNotifyUnion::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_u0:
field_u0->encode_text(text_buf);
break;
case ALT_u10:
field_u10->encode_text(text_buf);
break;
case ALT_u110:
field_u110->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
}
}

void PktCellChgNotifyUnion::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_u0:
u0().decode_text(text_buf);
break;
case ALT_u10:
u10().decode_text(text_buf);
break;
case ALT_u110:
u110().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
}
}

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

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

int PktCellChgNotifyUnion::RAW_decode(
const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, 
raw_order_t top_bit_ord, boolean no_err, int sel_field, boolean, const RAW_Force_Omit* force_omit)
{
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  int decoded_length=0;
  int starting_pos=p_buf.get_pos_bit();
  if(sel_field!=-1){
    switch(sel_field){
    case 0: {
      RAW_Force_Omit field_force_omit(0, force_omit, PktCellChgNotifyUnion_u0_descr_.raw->forceomit);
      decoded_length = u0().RAW_decode(PktCellChgNotifyUnion_u0_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 1: {
      RAW_Force_Omit field_force_omit(1, force_omit, PktCellChgNotifyUnion_u10_descr_.raw->forceomit);
      decoded_length = u10().RAW_decode(PktCellChgNotifyUnion_u10_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 2: {
      RAW_Force_Omit field_force_omit(2, force_omit, PktCellChgNotifyUnion_u110_descr_.raw->forceomit);
      decoded_length = u110().RAW_decode(PktCellChgNotifyUnion_u110_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    default: break;
    }
    return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
  } else {
    boolean already_failed = FALSE;
    already_failed = FALSE;
    if (!already_failed) {
      BITSTRING temporal_0;
      int decoded_0_length;
      p_buf.set_pos_bit(starting_pos + 0);
      decoded_0_length = temporal_0.RAW_decode(PktCellChgNotifyU0_tag_descr_, p_buf, limit, top_bit_ord, TRUE);
      if (decoded_0_length > 0) {
        if (temporal_0 ==  bs_1) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(0, force_omit, PktCellChgNotifyUnion_u0_descr_.raw->forceomit);
          decoded_length = u0().RAW_decode(PktCellChgNotifyUnion_u0_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_u0).tag() ==  bs_1) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
    already_failed = FALSE;
    if (!already_failed) {
      BITSTRING temporal_1;
      int decoded_1_length;
      p_buf.set_pos_bit(starting_pos + 0);
      decoded_1_length = temporal_1.RAW_decode(PktCellChgNotifyU10_tag_descr_, p_buf, limit, top_bit_ord, TRUE);
      if (decoded_1_length > 0) {
        if (temporal_1 ==  bs_4) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(1, force_omit, PktCellChgNotifyUnion_u10_descr_.raw->forceomit);
          decoded_length = u10().RAW_decode(PktCellChgNotifyUnion_u10_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_u10).tag() ==  bs_4) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
    already_failed = FALSE;
    if (!already_failed) {
      BITSTRING temporal_2;
      int decoded_2_length;
      p_buf.set_pos_bit(starting_pos + 0);
      decoded_2_length = temporal_2.RAW_decode(PktCellChgNotifyU110_tag_descr_, p_buf, limit, top_bit_ord, TRUE);
      if (decoded_2_length > 0) {
        if (temporal_2 ==  bs_6) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(2, force_omit, PktCellChgNotifyUnion_u110_descr_.raw->forceomit);
          decoded_length = u110().RAW_decode(PktCellChgNotifyUnion_u110_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_u110).tag() ==  bs_6) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
 }
 clean_up();
 return -1;
}

int PktCellChgNotifyUnion::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
{
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 3;  myleaf.body.node.nodes = init_nodes_of_enc_tree(3);
  memset(myleaf.body.node.nodes, 0, 3 * sizeof(RAW_enc_tree *));
  switch (union_selection) {
  case ALT_u0:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, PktCellChgNotifyUnion_u0_descr_.raw);
    encoded_length = field_u0->RAW_encode(PktCellChgNotifyUnion_u0_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &PktCellChgNotifyUnion_u0_descr_;
    if ((*field_u0).tag() !=  bs_1) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={0,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_1.RAW_encode(PktCellChgNotifyU0_tag_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  case ALT_u10:
    myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, PktCellChgNotifyUnion_u10_descr_.raw);
    encoded_length = field_u10->RAW_encode(PktCellChgNotifyUnion_u10_descr_, *myleaf.body.node.nodes[1]);
    myleaf.body.node.nodes[1]->coding_descr = &PktCellChgNotifyUnion_u10_descr_;
    if ((*field_u10).tag() !=  bs_4) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={1,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_4.RAW_encode(PktCellChgNotifyU10_tag_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  case ALT_u110:
    myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, PktCellChgNotifyUnion_u110_descr_.raw);
    encoded_length = field_u110->RAW_encode(PktCellChgNotifyUnion_u110_descr_, *myleaf.body.node.nodes[2]);
    myleaf.body.node.nodes[2]->coding_descr = &PktCellChgNotifyUnion_u110_descr_;
    if ((*field_u110).tag() !=  bs_6) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={2,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_6.RAW_encode(PktCellChgNotifyU110_tag_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  default:
    TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  }
  return encoded_length;
}

void PktCellChgNotifyUnion_template::copy_value(const PktCellChgNotifyUnion& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case PktCellChgNotifyUnion::ALT_u0:
single_value.field_u0 = new PktCellChgNotifyU0_template(other_value.u0());
break;
case PktCellChgNotifyUnion::ALT_u10:
single_value.field_u10 = new PktCellChgNotifyU10_template(other_value.u10());
break;
case PktCellChgNotifyUnion::ALT_u110:
single_value.field_u110 = new PktCellChgNotifyU110_template(other_value.u110());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
}
set_selection(SPECIFIC_VALUE);
}

void PktCellChgNotifyUnion_template::copy_template(const PktCellChgNotifyUnion_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value.union_selection = other_value.single_value.union_selection;
switch (single_value.union_selection) {
case PktCellChgNotifyUnion::ALT_u0:
single_value.field_u0 = new PktCellChgNotifyU0_template(*other_value.single_value.field_u0);
break;
case PktCellChgNotifyUnion::ALT_u10:
single_value.field_u10 = new PktCellChgNotifyU10_template(*other_value.single_value.field_u10);
break;
case PktCellChgNotifyUnion::ALT_u110:
single_value.field_u110 = new PktCellChgNotifyU110_template(*other_value.single_value.field_u110);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
}
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 PktCellChgNotifyUnion_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 PktCellChgNotifyUnion_template(*other_value.implication_.precondition);
implication_.implied_template = new PktCellChgNotifyUnion_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized template of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
}
set_selection(other_value);
}

PktCellChgNotifyUnion_template::PktCellChgNotifyUnion_template()
{
}

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

PktCellChgNotifyUnion_template::PktCellChgNotifyUnion_template(const PktCellChgNotifyUnion& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void PktCellChgNotifyUnion_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case PktCellChgNotifyUnion::ALT_u0:
delete single_value.field_u0;
break;
case PktCellChgNotifyUnion::ALT_u10:
delete single_value.field_u10;
break;
case PktCellChgNotifyUnion::ALT_u110:
delete single_value.field_u110;
default:
break;
}
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

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

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

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

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

boolean PktCellChgNotifyUnion_template::match(const PktCellChgNotifyUnion& 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:
{
PktCellChgNotifyUnion::union_selection_type value_selection = other_value.get_selection();
if (value_selection == PktCellChgNotifyUnion::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case PktCellChgNotifyUnion::ALT_u0:
return single_value.field_u0->match(other_value.u0(), legacy);
case PktCellChgNotifyUnion::ALT_u10:
return single_value.field_u10->match(other_value.u10(), legacy);
case PktCellChgNotifyUnion::ALT_u110:
return single_value.field_u110->match(other_value.u110(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
}
}
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error ("Matching an uninitialized template of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
}
return FALSE;
}

boolean PktCellChgNotifyUnion_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case PktCellChgNotifyUnion::ALT_u0:
return single_value.field_u0->is_value();
case PktCellChgNotifyUnion::ALT_u10:
return single_value.field_u10->is_value();
case PktCellChgNotifyUnion::ALT_u110:
return single_value.field_u110->is_value();
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
}
}

PktCellChgNotifyUnion PktCellChgNotifyUnion_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
PktCellChgNotifyUnion ret_val;
switch (single_value.union_selection) {
case PktCellChgNotifyUnion::ALT_u0:
ret_val.u0() = single_value.field_u0->valueof();
break;
case PktCellChgNotifyUnion::ALT_u10:
ret_val.u10() = single_value.field_u10->valueof();
break;
case PktCellChgNotifyUnion::ALT_u110:
ret_val.u110() = single_value.field_u110->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
}
return ret_val;
}

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

PktCellChgNotifyU0_template& PktCellChgNotifyUnion_template::u0()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PktCellChgNotifyUnion::ALT_u0) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_u0 = new PktCellChgNotifyU0_template(ANY_VALUE);
else single_value.field_u0 = new PktCellChgNotifyU0_template;
single_value.union_selection = PktCellChgNotifyUnion::ALT_u0;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_u0;
}

const PktCellChgNotifyU0_template& PktCellChgNotifyUnion_template::u0() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field u0 in a non-specific template of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
if (single_value.union_selection != PktCellChgNotifyUnion::ALT_u0) TTCN_error("Accessing non-selected field u0 in a template of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
return *single_value.field_u0;
}

PktCellChgNotifyU10_template& PktCellChgNotifyUnion_template::u10()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PktCellChgNotifyUnion::ALT_u10) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_u10 = new PktCellChgNotifyU10_template(ANY_VALUE);
else single_value.field_u10 = new PktCellChgNotifyU10_template;
single_value.union_selection = PktCellChgNotifyUnion::ALT_u10;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_u10;
}

const PktCellChgNotifyU10_template& PktCellChgNotifyUnion_template::u10() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field u10 in a non-specific template of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
if (single_value.union_selection != PktCellChgNotifyUnion::ALT_u10) TTCN_error("Accessing non-selected field u10 in a template of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
return *single_value.field_u10;
}

PktCellChgNotifyU110_template& PktCellChgNotifyUnion_template::u110()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PktCellChgNotifyUnion::ALT_u110) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_u110 = new PktCellChgNotifyU110_template(ANY_VALUE);
else single_value.field_u110 = new PktCellChgNotifyU110_template;
single_value.union_selection = PktCellChgNotifyUnion::ALT_u110;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_u110;
}

const PktCellChgNotifyU110_template& PktCellChgNotifyUnion_template::u110() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field u110 in a non-specific template of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
if (single_value.union_selection != PktCellChgNotifyUnion::ALT_u110) TTCN_error("Accessing non-selected field u110 in a template of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
return *single_value.field_u110;
}

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

void PktCellChgNotifyUnion_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case PktCellChgNotifyUnion::ALT_u0:
TTCN_Logger::log_event_str("{ u0 := ");
single_value.field_u0->log();
TTCN_Logger::log_event_str(" }");
break;
case PktCellChgNotifyUnion::ALT_u10:
TTCN_Logger::log_event_str("{ u10 := ");
single_value.field_u10->log();
TTCN_Logger::log_event_str(" }");
break;
case PktCellChgNotifyUnion::ALT_u110:
TTCN_Logger::log_event_str("{ u110 := ");
single_value.field_u110->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_str("<invalid selector>");
}
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void PktCellChgNotifyUnion_template::log_match(const PktCellChgNotifyUnion& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity() && match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
return;
}
if (template_selection == SPECIFIC_VALUE && single_value.union_selection == match_value.get_selection()) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
switch (single_value.union_selection) {
case PktCellChgNotifyUnion::ALT_u0:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".u0");
single_value.field_u0->log_match(match_value.u0(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ u0 := ");
single_value.field_u0->log_match(match_value.u0(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PktCellChgNotifyUnion::ALT_u10:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".u10");
single_value.field_u10->log_match(match_value.u10(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ u10 := ");
single_value.field_u10->log_match(match_value.u10(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PktCellChgNotifyUnion::ALT_u110:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".u110");
single_value.field_u110->log_match(match_value.u110(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ u110 := ");
single_value.field_u110->log_match(match_value.u110(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
default:
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str("<invalid selector>");
}
} else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PktCellChgNotifyUnion_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
switch (single_value.union_selection) {
case PktCellChgNotifyUnion::ALT_u0:
single_value.field_u0->set_implicit_omit(); break;
case PktCellChgNotifyUnion::ALT_u10:
single_value.field_u10->set_implicit_omit(); break;
case PktCellChgNotifyUnion::ALT_u110:
single_value.field_u110->set_implicit_omit(); break;
default: break;
}
}

void PktCellChgNotifyUnion_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value.union_selection);
switch (single_value.union_selection) {
case PktCellChgNotifyUnion::ALT_u0:
single_value.field_u0->encode_text(text_buf);
break;
case PktCellChgNotifyUnion::ALT_u10:
single_value.field_u10->encode_text(text_buf);
break;
case PktCellChgNotifyUnion::ALT_u110:
single_value.field_u110->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized template of type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
}
}

void PktCellChgNotifyUnion_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
{
single_value.union_selection = PktCellChgNotifyUnion::UNBOUND_VALUE;
PktCellChgNotifyUnion::union_selection_type new_selection = (PktCellChgNotifyUnion::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case PktCellChgNotifyUnion::ALT_u0:
single_value.field_u0 = new PktCellChgNotifyU0_template;
single_value.field_u0->decode_text(text_buf);
break;
case PktCellChgNotifyUnion::ALT_u10:
single_value.field_u10 = new PktCellChgNotifyU10_template;
single_value.field_u10->decode_text(text_buf);
break;
case PktCellChgNotifyUnion::ALT_u110:
single_value.field_u110 = new PktCellChgNotifyU110_template;
single_value.field_u110->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
}
single_value.union_selection = new_selection;
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new PktCellChgNotifyUnion_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized selector was received in a template of type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
}
}

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

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

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

void PktCellChgNotifyUnion_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
switch (single_value.union_selection) {
case PktCellChgNotifyUnion::ALT_u0:
single_value.field_u0->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyUnion");
return;
case PktCellChgNotifyUnion::ALT_u10:
single_value.field_u10->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyUnion");
return;
case PktCellChgNotifyUnion::ALT_u110:
single_value.field_u110->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PktCellChgNotifyUnion");
return;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @RLCMAC_CSN1_Types.PktCellChgNotifyUnion.");
}
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 : "@RLCMAC_CSN1_Types.PktCellChgNotifyUnion");
}

PacketCellChangeNotification::PacketCellChangeNotification()
{
}

PacketCellChangeNotification::PacketCellChangeNotification(const GlobalTfi& par_gtfi,
    const PktCellChgNotifyUnion& par_u,
    const BITSTRING& par_ba__psi3__presence,
    const OPTIONAL< BITSTRING >& par_ba__used,
    const OPTIONAL< BITSTRING >& par_psi3__change__mark,
    const BITSTRING& par_pmo__used,
    const BITSTRING& par_pccn__sending,
    const CCNMeasReport& par_ccn__meas__rep,
    const OPTIONAL< PktCellChgNotifAdditions >& par_rel__additions)
  :   field_gtfi(par_gtfi),
  field_u(par_u),
  field_ba__psi3__presence(par_ba__psi3__presence),
  field_ba__used(par_ba__used),
  field_psi3__change__mark(par_psi3__change__mark),
  field_pmo__used(par_pmo__used),
  field_pccn__sending(par_pccn__sending),
  field_ccn__meas__rep(par_ccn__meas__rep),
  field_rel__additions(par_rel__additions)
{
}

PacketCellChangeNotification::PacketCellChangeNotification(const PacketCellChangeNotification& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
if (other_value.gtfi().is_bound()) field_gtfi = other_value.gtfi();
else field_gtfi.clean_up();
if (other_value.u().is_bound()) field_u = other_value.u();
else field_u.clean_up();
if (other_value.ba__psi3__presence().is_bound()) field_ba__psi3__presence = other_value.ba__psi3__presence();
else field_ba__psi3__presence.clean_up();
if (other_value.ba__used().is_bound()) field_ba__used = other_value.ba__used();
else field_ba__used.clean_up();
if (other_value.psi3__change__mark().is_bound()) field_psi3__change__mark = other_value.psi3__change__mark();
else field_psi3__change__mark.clean_up();
if (other_value.pmo__used().is_bound()) field_pmo__used = other_value.pmo__used();
else field_pmo__used.clean_up();
if (other_value.pccn__sending().is_bound()) field_pccn__sending = other_value.pccn__sending();
else field_pccn__sending.clean_up();
if (other_value.ccn__meas__rep().is_bound()) field_ccn__meas__rep = other_value.ccn__meas__rep();
else field_ccn__meas__rep.clean_up();
if (other_value.rel__additions().is_bound()) field_rel__additions = other_value.rel__additions();
else field_rel__additions.clean_up();
}

void PacketCellChangeNotification::clean_up()
{
field_gtfi.clean_up();
field_u.clean_up();
field_ba__psi3__presence.clean_up();
field_ba__used.clean_up();
field_psi3__change__mark.clean_up();
field_pmo__used.clean_up();
field_pccn__sending.clean_up();
field_ccn__meas__rep.clean_up();
field_rel__additions.clean_up();
}

const TTCN_Typedescriptor_t* PacketCellChangeNotification::get_descriptor() const { return &PacketCellChangeNotification_descr_; }
PacketCellChangeNotification& PacketCellChangeNotification::operator=(const PacketCellChangeNotification& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
  if (other_value.gtfi().is_bound()) field_gtfi = other_value.gtfi();
  else field_gtfi.clean_up();
  if (other_value.u().is_bound()) field_u = other_value.u();
  else field_u.clean_up();
  if (other_value.ba__psi3__presence().is_bound()) field_ba__psi3__presence = other_value.ba__psi3__presence();
  else field_ba__psi3__presence.clean_up();
  if (other_value.ba__used().is_bound()) field_ba__used = other_value.ba__used();
  else field_ba__used.clean_up();
  if (other_value.psi3__change__mark().is_bound()) field_psi3__change__mark = other_value.psi3__change__mark();
  else field_psi3__change__mark.clean_up();
  if (other_value.pmo__used().is_bound()) field_pmo__used = other_value.pmo__used();
  else field_pmo__used.clean_up();
  if (other_value.pccn__sending().is_bound()) field_pccn__sending = other_value.pccn__sending();
  else field_pccn__sending.clean_up();
  if (other_value.ccn__meas__rep().is_bound()) field_ccn__meas__rep = other_value.ccn__meas__rep();
  else field_ccn__meas__rep.clean_up();
  if (other_value.rel__additions().is_bound()) field_rel__additions = other_value.rel__additions();
  else field_rel__additions.clean_up();
}
return *this;
}

boolean PacketCellChangeNotification::operator==(const PacketCellChangeNotification& other_value) const
{
return field_gtfi==other_value.field_gtfi
  && field_u==other_value.field_u
  && field_ba__psi3__presence==other_value.field_ba__psi3__presence
  && field_ba__used==other_value.field_ba__used
  && field_psi3__change__mark==other_value.field_psi3__change__mark
  && field_pmo__used==other_value.field_pmo__used
  && field_pccn__sending==other_value.field_pccn__sending
  && field_ccn__meas__rep==other_value.field_ccn__meas__rep
  && field_rel__additions==other_value.field_rel__additions;
}

boolean PacketCellChangeNotification::is_bound() const
{
return (field_gtfi.is_bound())
  || (field_u.is_bound())
  || (field_ba__psi3__presence.is_bound())
  || (OPTIONAL_OMIT == field_ba__used.get_selection() || field_ba__used.is_bound())
  || (OPTIONAL_OMIT == field_psi3__change__mark.get_selection() || field_psi3__change__mark.is_bound())
  || (field_pmo__used.is_bound())
  || (field_pccn__sending.is_bound())
  || (field_ccn__meas__rep.is_bound())
  || (OPTIONAL_OMIT == field_rel__additions.get_selection() || field_rel__additions.is_bound());
}
boolean PacketCellChangeNotification::is_value() const
{
return field_gtfi.is_value()
  && field_u.is_value()
  && field_ba__psi3__presence.is_value()
  && (OPTIONAL_OMIT == field_ba__used.get_selection() || field_ba__used.is_value())
  && (OPTIONAL_OMIT == field_psi3__change__mark.get_selection() || field_psi3__change__mark.is_value())
  && field_pmo__used.is_value()
  && field_pccn__sending.is_value()
  && field_ccn__meas__rep.is_value()
  && (OPTIONAL_OMIT == field_rel__additions.get_selection() || field_rel__additions.is_value());
}
int PacketCellChangeNotification::size_of() const
{
  int ret_val = 6;
  if (field_ba__used.ispresent()) ret_val++;
  if (field_psi3__change__mark.ispresent()) ret_val++;
  if (field_rel__additions.ispresent()) ret_val++;
  return ret_val;
}

void PacketCellChangeNotification::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ gtfi := ");
field_gtfi.log();
TTCN_Logger::log_event_str(", u := ");
field_u.log();
TTCN_Logger::log_event_str(", ba_psi3_presence := ");
field_ba__psi3__presence.log();
TTCN_Logger::log_event_str(", ba_used := ");
field_ba__used.log();
TTCN_Logger::log_event_str(", psi3_change_mark := ");
field_psi3__change__mark.log();
TTCN_Logger::log_event_str(", pmo_used := ");
field_pmo__used.log();
TTCN_Logger::log_event_str(", pccn_sending := ");
field_pccn__sending.log();
TTCN_Logger::log_event_str(", ccn_meas_rep := ");
field_ccn__meas__rep.log();
TTCN_Logger::log_event_str(", rel_additions := ");
field_rel__additions.log();
TTCN_Logger::log_event_str(" }");
}

void PacketCellChangeNotification::set_implicit_omit()
{
if (gtfi().is_bound()) gtfi().set_implicit_omit();
if (u().is_bound()) u().set_implicit_omit();
if (ba__psi3__presence().is_bound()) ba__psi3__presence().set_implicit_omit();
if (!ba__used().is_bound()) ba__used() = OMIT_VALUE;
else ba__used().set_implicit_omit();
if (!psi3__change__mark().is_bound()) psi3__change__mark() = OMIT_VALUE;
else psi3__change__mark().set_implicit_omit();
if (pmo__used().is_bound()) pmo__used().set_implicit_omit();
if (pccn__sending().is_bound()) pccn__sending().set_implicit_omit();
if (ccn__meas__rep().is_bound()) ccn__meas__rep().set_implicit_omit();
if (!rel__additions().is_bound()) rel__additions() = OMIT_VALUE;
else rel__additions().set_implicit_omit();
}

void PacketCellChangeNotification::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 (9<param.get_size()) {
      param.error("record value of type @RLCMAC_CSN1_Types.PacketCellChangeNotification has 9 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) gtfi().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) u().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) ba__psi3__presence().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) ba__used().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) psi3__change__mark().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) pmo__used().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) pccn__sending().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) ccn__meas__rep().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) rel__additions().set_param(*param.get_elem(8));
    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(), "gtfi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          gtfi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "u")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          u().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ba_psi3_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ba__psi3__presence().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(), "ba_used")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ba__used().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(), "psi3_change_mark")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          psi3__change__mark().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(), "pmo_used")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pmo__used().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(), "pccn_sending")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pccn__sending().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(), "ccn_meas_rep")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ccn__meas__rep().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(), "rel_additions")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rel__additions().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 @RLCMAC_CSN1_Types.PacketCellChangeNotification: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@RLCMAC_CSN1_Types.PacketCellChangeNotification");
  }
}

void PacketCellChangeNotification::encode_text(Text_Buf& text_buf) const
{
field_gtfi.encode_text(text_buf);
field_u.encode_text(text_buf);
field_ba__psi3__presence.encode_text(text_buf);
field_ba__used.encode_text(text_buf);
field_psi3__change__mark.encode_text(text_buf);
field_pmo__used.encode_text(text_buf);
field_pccn__sending.encode_text(text_buf);
field_ccn__meas__rep.encode_text(text_buf);
field_rel__additions.encode_text(text_buf);
}

void PacketCellChangeNotification::decode_text(Text_Buf& text_buf)
{
field_gtfi.decode_text(text_buf);
field_u.decode_text(text_buf);
field_ba__psi3__presence.decode_text(text_buf);
field_ba__used.decode_text(text_buf);
field_psi3__change__mark.decode_text(text_buf);
field_pmo__used.decode_text(text_buf);
field_pccn__sending.decode_text(text_buf);
field_ccn__meas__rep.decode_text(text_buf);
field_rel__additions.decode_text(text_buf);
}

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

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

int PacketCellChangeNotification::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, PacketCellChangeNotification_gtfi_descr_.raw->forceomit);
  decoded_field_length = field_gtfi.RAW_decode(PacketCellChangeNotification_gtfi_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, PacketCellChangeNotification_u_descr_.raw->forceomit);
  decoded_field_length = field_u.RAW_decode(PacketCellChangeNotification_u_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, PacketCellChangeNotification_ba__psi3__presence_descr_.raw->forceomit);
  decoded_field_length = field_ba__psi3__presence.RAW_decode(PacketCellChangeNotification_ba__psi3__presence_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (limit > 0 && field_ba__psi3__presence ==  bs_1){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_ba__used = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, PacketCellChangeNotification_ba__used_descr_.raw->forceomit);
  decoded_field_length = field_ba__used().RAW_decode(PacketCellChangeNotification_ba__used_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_ba__used = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_ba__used=OMIT_VALUE;
  if (limit > 0 && field_ba__psi3__presence ==  bs_0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_psi3__change__mark = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, PacketCellChangeNotification_psi3__change__mark_descr_.raw->forceomit);
  decoded_field_length = field_psi3__change__mark().RAW_decode(PacketCellChangeNotification_psi3__change__mark_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_psi3__change__mark = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_psi3__change__mark=OMIT_VALUE;
  RAW_Force_Omit field_5_force_omit(5, force_omit, PacketCellChangeNotification_pmo__used_descr_.raw->forceomit);
  decoded_field_length = field_pmo__used.RAW_decode(PacketCellChangeNotification_pmo__used_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_6_force_omit(6, force_omit, PacketCellChangeNotification_pccn__sending_descr_.raw->forceomit);
  decoded_field_length = field_pccn__sending.RAW_decode(PacketCellChangeNotification_pccn__sending_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_7_force_omit(7, force_omit, PacketCellChangeNotification_ccn__meas__rep_descr_.raw->forceomit);
  decoded_field_length = field_ccn__meas__rep.RAW_decode(PacketCellChangeNotification_ccn__meas__rep_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(8)) {
    field_rel__additions = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_8_force_omit(8, force_omit, PacketCellChangeNotification_rel__additions_descr_.raw->forceomit);
  decoded_field_length = field_rel__additions().RAW_decode(PacketCellChangeNotification_rel__additions_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_8_force_omit);
  if (decoded_field_length < 1) {
  field_rel__additions = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_rel__additions=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PacketCellChangeNotification::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 9;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(9);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, PacketCellChangeNotification_gtfi_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PacketCellChangeNotification_u_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PacketCellChangeNotification_ba__psi3__presence_descr_.raw);
  if (field_ba__used.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, PacketCellChangeNotification_ba__used_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_psi3__change__mark.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, PacketCellChangeNotification_psi3__change__mark_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, PacketCellChangeNotification_pmo__used_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, PacketCellChangeNotification_pccn__sending_descr_.raw);
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, PacketCellChangeNotification_ccn__meas__rep_descr_.raw);
  if (field_rel__additions.ispresent()) {
  myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 8, PacketCellChangeNotification_rel__additions_descr_.raw);
  }
  else myleaf.body.node.nodes[8] = NULL;
  encoded_length += field_gtfi.RAW_encode(PacketCellChangeNotification_gtfi_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_u.RAW_encode(PacketCellChangeNotification_u_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_ba__psi3__presence.RAW_encode(PacketCellChangeNotification_ba__psi3__presence_descr_, *myleaf.body.node.nodes[2]);
  if (field_ba__used.ispresent()) {
  encoded_length += field_ba__used().RAW_encode(PacketCellChangeNotification_ba__used_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_psi3__change__mark.ispresent()) {
  encoded_length += field_psi3__change__mark().RAW_encode(PacketCellChangeNotification_psi3__change__mark_descr_, *myleaf.body.node.nodes[4]);
  }
  encoded_length += field_pmo__used.RAW_encode(PacketCellChangeNotification_pmo__used_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_pccn__sending.RAW_encode(PacketCellChangeNotification_pccn__sending_descr_, *myleaf.body.node.nodes[6]);
  encoded_length += field_ccn__meas__rep.RAW_encode(PacketCellChangeNotification_ccn__meas__rep_descr_, *myleaf.body.node.nodes[7]);
  if (field_rel__additions.ispresent()) {
  encoded_length += field_rel__additions().RAW_encode(PacketCellChangeNotification_rel__additions_descr_, *myleaf.body.node.nodes[8]);
  }
  if (field_ba__used.ispresent() && (field_ba__psi3__presence !=  bs_1)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={2};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_1.RAW_encode(PacketCellChangeNotification_ba__psi3__presence_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  if (field_psi3__change__mark.ispresent() && (field_ba__psi3__presence !=  bs_0)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={2};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_0.RAW_encode(PacketCellChangeNotification_ba__psi3__presence_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  return myleaf.length = encoded_length;
}

struct PacketCellChangeNotification_template::single_value_struct {
GlobalTfi_template field_gtfi;
PktCellChgNotifyUnion_template field_u;
BITSTRING_template field_ba__psi3__presence;
BITSTRING_template field_ba__used;
BITSTRING_template field_psi3__change__mark;
BITSTRING_template field_pmo__used;
BITSTRING_template field_pccn__sending;
CCNMeasReport_template field_ccn__meas__rep;
PktCellChgNotifAdditions_template field_rel__additions;
};

void PacketCellChangeNotification_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_gtfi = ANY_VALUE;
single_value->field_u = ANY_VALUE;
single_value->field_ba__psi3__presence = ANY_VALUE;
single_value->field_ba__used = ANY_OR_OMIT;
single_value->field_psi3__change__mark = ANY_OR_OMIT;
single_value->field_pmo__used = ANY_VALUE;
single_value->field_pccn__sending = ANY_VALUE;
single_value->field_ccn__meas__rep = ANY_VALUE;
single_value->field_rel__additions = ANY_OR_OMIT;
}
}
}

void PacketCellChangeNotification_template::copy_value(const PacketCellChangeNotification& other_value)
{
single_value = new single_value_struct;
if (other_value.gtfi().is_bound()) {
  single_value->field_gtfi = other_value.gtfi();
} else {
  single_value->field_gtfi.clean_up();
}
if (other_value.u().is_bound()) {
  single_value->field_u = other_value.u();
} else {
  single_value->field_u.clean_up();
}
if (other_value.ba__psi3__presence().is_bound()) {
  single_value->field_ba__psi3__presence = other_value.ba__psi3__presence();
} else {
  single_value->field_ba__psi3__presence.clean_up();
}
if (other_value.ba__used().is_bound()) {
  if (other_value.ba__used().ispresent()) single_value->field_ba__used = other_value.ba__used()();
  else single_value->field_ba__used = OMIT_VALUE;
} else {
  single_value->field_ba__used.clean_up();
}
if (other_value.psi3__change__mark().is_bound()) {
  if (other_value.psi3__change__mark().ispresent()) single_value->field_psi3__change__mark = other_value.psi3__change__mark()();
  else single_value->field_psi3__change__mark = OMIT_VALUE;
} else {
  single_value->field_psi3__change__mark.clean_up();
}
if (other_value.pmo__used().is_bound()) {
  single_value->field_pmo__used = other_value.pmo__used();
} else {
  single_value->field_pmo__used.clean_up();
}
if (other_value.pccn__sending().is_bound()) {
  single_value->field_pccn__sending = other_value.pccn__sending();
} else {
  single_value->field_pccn__sending.clean_up();
}
if (other_value.ccn__meas__rep().is_bound()) {
  single_value->field_ccn__meas__rep = other_value.ccn__meas__rep();
} else {
  single_value->field_ccn__meas__rep.clean_up();
}
if (other_value.rel__additions().is_bound()) {
  if (other_value.rel__additions().ispresent()) single_value->field_rel__additions = other_value.rel__additions()();
  else single_value->field_rel__additions = OMIT_VALUE;
} else {
  single_value->field_rel__additions.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PacketCellChangeNotification_template::copy_template(const PacketCellChangeNotification_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.gtfi().get_selection()) {
single_value->field_gtfi = other_value.gtfi();
} else {
single_value->field_gtfi.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.u().get_selection()) {
single_value->field_u = other_value.u();
} else {
single_value->field_u.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ba__psi3__presence().get_selection()) {
single_value->field_ba__psi3__presence = other_value.ba__psi3__presence();
} else {
single_value->field_ba__psi3__presence.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ba__used().get_selection()) {
single_value->field_ba__used = other_value.ba__used();
} else {
single_value->field_ba__used.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.psi3__change__mark().get_selection()) {
single_value->field_psi3__change__mark = other_value.psi3__change__mark();
} else {
single_value->field_psi3__change__mark.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.pmo__used().get_selection()) {
single_value->field_pmo__used = other_value.pmo__used();
} else {
single_value->field_pmo__used.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.pccn__sending().get_selection()) {
single_value->field_pccn__sending = other_value.pccn__sending();
} else {
single_value->field_pccn__sending.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ccn__meas__rep().get_selection()) {
single_value->field_ccn__meas__rep = other_value.ccn__meas__rep();
} else {
single_value->field_ccn__meas__rep.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.rel__additions().get_selection()) {
single_value->field_rel__additions = other_value.rel__additions();
} else {
single_value->field_rel__additions.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 PacketCellChangeNotification_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 PacketCellChangeNotification_template(*other_value.implication_.precondition);
implication_.implied_template = new PacketCellChangeNotification_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 @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
break;
}
set_selection(other_value);
}

PacketCellChangeNotification_template::PacketCellChangeNotification_template()
{
}

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

PacketCellChangeNotification_template::PacketCellChangeNotification_template(const PacketCellChangeNotification& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PacketCellChangeNotification_template::match(const PacketCellChangeNotification& 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.gtfi().is_bound()) return FALSE;
if(!single_value->field_gtfi.match(other_value.gtfi(), legacy))return FALSE;
if(!other_value.u().is_bound()) return FALSE;
if(!single_value->field_u.match(other_value.u(), legacy))return FALSE;
if(!other_value.ba__psi3__presence().is_bound()) return FALSE;
if(!single_value->field_ba__psi3__presence.match(other_value.ba__psi3__presence(), legacy))return FALSE;
if(!other_value.ba__used().is_bound()) return FALSE;
if((other_value.ba__used().ispresent() ? !single_value->field_ba__used.match((const BITSTRING&)other_value.ba__used(), legacy) : !single_value->field_ba__used.match_omit(legacy)))return FALSE;
if(!other_value.psi3__change__mark().is_bound()) return FALSE;
if((other_value.psi3__change__mark().ispresent() ? !single_value->field_psi3__change__mark.match((const BITSTRING&)other_value.psi3__change__mark(), legacy) : !single_value->field_psi3__change__mark.match_omit(legacy)))return FALSE;
if(!other_value.pmo__used().is_bound()) return FALSE;
if(!single_value->field_pmo__used.match(other_value.pmo__used(), legacy))return FALSE;
if(!other_value.pccn__sending().is_bound()) return FALSE;
if(!single_value->field_pccn__sending.match(other_value.pccn__sending(), legacy))return FALSE;
if(!other_value.ccn__meas__rep().is_bound()) return FALSE;
if(!single_value->field_ccn__meas__rep.match(other_value.ccn__meas__rep(), legacy))return FALSE;
if(!other_value.rel__additions().is_bound()) return FALSE;
if((other_value.rel__additions().ispresent() ? !single_value->field_rel__additions.match((const PktCellChgNotifAdditions&)other_value.rel__additions(), legacy) : !single_value->field_rel__additions.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
}
return FALSE;
}

boolean PacketCellChangeNotification_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_gtfi.is_bound()
 || single_value->field_u.is_bound()
 || single_value->field_ba__psi3__presence.is_bound()
 || (single_value->field_ba__used.is_omit() || single_value->field_ba__used.is_bound())
 || (single_value->field_psi3__change__mark.is_omit() || single_value->field_psi3__change__mark.is_bound())
 || single_value->field_pmo__used.is_bound()
 || single_value->field_pccn__sending.is_bound()
 || single_value->field_ccn__meas__rep.is_bound()
 || (single_value->field_rel__additions.is_omit() || single_value->field_rel__additions.is_bound());
}

boolean PacketCellChangeNotification_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_gtfi.is_value()
 && single_value->field_u.is_value()
 && single_value->field_ba__psi3__presence.is_value()
 && (single_value->field_ba__used.is_omit() || single_value->field_ba__used.is_value())
 && (single_value->field_psi3__change__mark.is_omit() || single_value->field_psi3__change__mark.is_value())
 && single_value->field_pmo__used.is_value()
 && single_value->field_pccn__sending.is_value()
 && single_value->field_ccn__meas__rep.is_value()
 && (single_value->field_rel__additions.is_omit() || single_value->field_rel__additions.is_value());
}

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

PacketCellChangeNotification PacketCellChangeNotification_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 @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
PacketCellChangeNotification ret_val;
if (single_value->field_gtfi.is_bound()) {
ret_val.gtfi() = single_value->field_gtfi.valueof();
}
if (single_value->field_u.is_bound()) {
ret_val.u() = single_value->field_u.valueof();
}
if (single_value->field_ba__psi3__presence.is_bound()) {
ret_val.ba__psi3__presence() = single_value->field_ba__psi3__presence.valueof();
}
if (single_value->field_ba__used.is_omit()) ret_val.ba__used() = OMIT_VALUE;
else if (single_value->field_ba__used.is_bound()) {
ret_val.ba__used() = single_value->field_ba__used.valueof();
}
if (single_value->field_psi3__change__mark.is_omit()) ret_val.psi3__change__mark() = OMIT_VALUE;
else if (single_value->field_psi3__change__mark.is_bound()) {
ret_val.psi3__change__mark() = single_value->field_psi3__change__mark.valueof();
}
if (single_value->field_pmo__used.is_bound()) {
ret_val.pmo__used() = single_value->field_pmo__used.valueof();
}
if (single_value->field_pccn__sending.is_bound()) {
ret_val.pccn__sending() = single_value->field_pccn__sending.valueof();
}
if (single_value->field_ccn__meas__rep.is_bound()) {
ret_val.ccn__meas__rep() = single_value->field_ccn__meas__rep.valueof();
}
if (single_value->field_rel__additions.is_omit()) ret_val.rel__additions() = OMIT_VALUE;
else if (single_value->field_rel__additions.is_bound()) {
ret_val.rel__additions() = single_value->field_rel__additions.valueof();
}
return ret_val;
}

void PacketCellChangeNotification_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 @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PacketCellChangeNotification_template[list_length];
}

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

GlobalTfi_template& PacketCellChangeNotification_template::gtfi()
{
set_specific();
return single_value->field_gtfi;
}

const GlobalTfi_template& PacketCellChangeNotification_template::gtfi() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field gtfi of a non-specific template of type @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
return single_value->field_gtfi;
}

PktCellChgNotifyUnion_template& PacketCellChangeNotification_template::u()
{
set_specific();
return single_value->field_u;
}

const PktCellChgNotifyUnion_template& PacketCellChangeNotification_template::u() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field u of a non-specific template of type @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
return single_value->field_u;
}

BITSTRING_template& PacketCellChangeNotification_template::ba__psi3__presence()
{
set_specific();
return single_value->field_ba__psi3__presence;
}

const BITSTRING_template& PacketCellChangeNotification_template::ba__psi3__presence() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ba_psi3_presence of a non-specific template of type @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
return single_value->field_ba__psi3__presence;
}

BITSTRING_template& PacketCellChangeNotification_template::ba__used()
{
set_specific();
return single_value->field_ba__used;
}

const BITSTRING_template& PacketCellChangeNotification_template::ba__used() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ba_used of a non-specific template of type @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
return single_value->field_ba__used;
}

BITSTRING_template& PacketCellChangeNotification_template::psi3__change__mark()
{
set_specific();
return single_value->field_psi3__change__mark;
}

const BITSTRING_template& PacketCellChangeNotification_template::psi3__change__mark() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field psi3_change_mark of a non-specific template of type @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
return single_value->field_psi3__change__mark;
}

BITSTRING_template& PacketCellChangeNotification_template::pmo__used()
{
set_specific();
return single_value->field_pmo__used;
}

const BITSTRING_template& PacketCellChangeNotification_template::pmo__used() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pmo_used of a non-specific template of type @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
return single_value->field_pmo__used;
}

BITSTRING_template& PacketCellChangeNotification_template::pccn__sending()
{
set_specific();
return single_value->field_pccn__sending;
}

const BITSTRING_template& PacketCellChangeNotification_template::pccn__sending() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pccn_sending of a non-specific template of type @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
return single_value->field_pccn__sending;
}

CCNMeasReport_template& PacketCellChangeNotification_template::ccn__meas__rep()
{
set_specific();
return single_value->field_ccn__meas__rep;
}

const CCNMeasReport_template& PacketCellChangeNotification_template::ccn__meas__rep() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ccn_meas_rep of a non-specific template of type @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
return single_value->field_ccn__meas__rep;
}

PktCellChgNotifAdditions_template& PacketCellChangeNotification_template::rel__additions()
{
set_specific();
return single_value->field_rel__additions;
}

const PktCellChgNotifAdditions_template& PacketCellChangeNotification_template::rel__additions() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field rel_additions of a non-specific template of type @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
return single_value->field_rel__additions;
}

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

void PacketCellChangeNotification_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ gtfi := ");
single_value->field_gtfi.log();
TTCN_Logger::log_event_str(", u := ");
single_value->field_u.log();
TTCN_Logger::log_event_str(", ba_psi3_presence := ");
single_value->field_ba__psi3__presence.log();
TTCN_Logger::log_event_str(", ba_used := ");
single_value->field_ba__used.log();
TTCN_Logger::log_event_str(", psi3_change_mark := ");
single_value->field_psi3__change__mark.log();
TTCN_Logger::log_event_str(", pmo_used := ");
single_value->field_pmo__used.log();
TTCN_Logger::log_event_str(", pccn_sending := ");
single_value->field_pccn__sending.log();
TTCN_Logger::log_event_str(", ccn_meas_rep := ");
single_value->field_ccn__meas__rep.log();
TTCN_Logger::log_event_str(", rel_additions := ");
single_value->field_rel__additions.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 PacketCellChangeNotification_template::log_match(const PacketCellChangeNotification& 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_gtfi.match(match_value.gtfi(), legacy)){
TTCN_Logger::log_logmatch_info(".gtfi");
single_value->field_gtfi.log_match(match_value.gtfi(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_u.match(match_value.u(), legacy)){
TTCN_Logger::log_logmatch_info(".u");
single_value->field_u.log_match(match_value.u(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ba__psi3__presence.match(match_value.ba__psi3__presence(), legacy)){
TTCN_Logger::log_logmatch_info(".ba_psi3_presence");
single_value->field_ba__psi3__presence.log_match(match_value.ba__psi3__presence(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.ba__used().ispresent()){
if(!single_value->field_ba__used.match(match_value.ba__used(), legacy)){
TTCN_Logger::log_logmatch_info(".ba_used");
single_value->field_ba__used.log_match(match_value.ba__used(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_ba__used.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".ba_used := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_ba__used.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.psi3__change__mark().ispresent()){
if(!single_value->field_psi3__change__mark.match(match_value.psi3__change__mark(), legacy)){
TTCN_Logger::log_logmatch_info(".psi3_change_mark");
single_value->field_psi3__change__mark.log_match(match_value.psi3__change__mark(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_psi3__change__mark.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".psi3_change_mark := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_psi3__change__mark.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_pmo__used.match(match_value.pmo__used(), legacy)){
TTCN_Logger::log_logmatch_info(".pmo_used");
single_value->field_pmo__used.log_match(match_value.pmo__used(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_pccn__sending.match(match_value.pccn__sending(), legacy)){
TTCN_Logger::log_logmatch_info(".pccn_sending");
single_value->field_pccn__sending.log_match(match_value.pccn__sending(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_ccn__meas__rep.match(match_value.ccn__meas__rep(), legacy)){
TTCN_Logger::log_logmatch_info(".ccn_meas_rep");
single_value->field_ccn__meas__rep.log_match(match_value.ccn__meas__rep(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.rel__additions().ispresent()){
if(!single_value->field_rel__additions.match(match_value.rel__additions(), legacy)){
TTCN_Logger::log_logmatch_info(".rel_additions");
single_value->field_rel__additions.log_match(match_value.rel__additions(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_rel__additions.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".rel_additions := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_rel__additions.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ gtfi := ");
single_value->field_gtfi.log_match(match_value.gtfi(), legacy);
TTCN_Logger::log_event_str(", u := ");
single_value->field_u.log_match(match_value.u(), legacy);
TTCN_Logger::log_event_str(", ba_psi3_presence := ");
single_value->field_ba__psi3__presence.log_match(match_value.ba__psi3__presence(), legacy);
TTCN_Logger::log_event_str(", ba_used := ");
if (match_value.ba__used().ispresent()) {
single_value->field_ba__used.log_match(match_value.ba__used(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_ba__used.log();
if (single_value->field_ba__used.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", psi3_change_mark := ");
if (match_value.psi3__change__mark().ispresent()) {
single_value->field_psi3__change__mark.log_match(match_value.psi3__change__mark(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_psi3__change__mark.log();
if (single_value->field_psi3__change__mark.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", pmo_used := ");
single_value->field_pmo__used.log_match(match_value.pmo__used(), legacy);
TTCN_Logger::log_event_str(", pccn_sending := ");
single_value->field_pccn__sending.log_match(match_value.pccn__sending(), legacy);
TTCN_Logger::log_event_str(", ccn_meas_rep := ");
single_value->field_ccn__meas__rep.log_match(match_value.ccn__meas__rep(), legacy);
TTCN_Logger::log_event_str(", rel_additions := ");
if (match_value.rel__additions().ispresent()) {
single_value->field_rel__additions.log_match(match_value.rel__additions(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_rel__additions.log();
if (single_value->field_rel__additions.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void PacketCellChangeNotification_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (gtfi().is_bound()) gtfi().set_implicit_omit();
if (u().is_bound()) u().set_implicit_omit();
if (ba__psi3__presence().is_bound()) ba__psi3__presence().set_implicit_omit();
if (!ba__used().is_bound()) ba__used() = OMIT_VALUE;
else ba__used().set_implicit_omit();
if (!psi3__change__mark().is_bound()) psi3__change__mark() = OMIT_VALUE;
else psi3__change__mark().set_implicit_omit();
if (pmo__used().is_bound()) pmo__used().set_implicit_omit();
if (pccn__sending().is_bound()) pccn__sending().set_implicit_omit();
if (ccn__meas__rep().is_bound()) ccn__meas__rep().set_implicit_omit();
if (!rel__additions().is_bound()) rel__additions() = OMIT_VALUE;
else rel__additions().set_implicit_omit();
}

void PacketCellChangeNotification_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_gtfi.encode_text(text_buf);
single_value->field_u.encode_text(text_buf);
single_value->field_ba__psi3__presence.encode_text(text_buf);
single_value->field_ba__used.encode_text(text_buf);
single_value->field_psi3__change__mark.encode_text(text_buf);
single_value->field_pmo__used.encode_text(text_buf);
single_value->field_pccn__sending.encode_text(text_buf);
single_value->field_ccn__meas__rep.encode_text(text_buf);
single_value->field_rel__additions.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 @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
}
}

void PacketCellChangeNotification_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_gtfi.decode_text(text_buf);
single_value->field_u.decode_text(text_buf);
single_value->field_ba__psi3__presence.decode_text(text_buf);
single_value->field_ba__used.decode_text(text_buf);
single_value->field_psi3__change__mark.decode_text(text_buf);
single_value->field_pmo__used.decode_text(text_buf);
single_value->field_pccn__sending.decode_text(text_buf);
single_value->field_ccn__meas__rep.decode_text(text_buf);
single_value->field_rel__additions.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 PacketCellChangeNotification_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 @RLCMAC_CSN1_Types.PacketCellChangeNotification.");
}
}

void PacketCellChangeNotification_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: {
    PacketCellChangeNotification_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 (9<param.get_size()) {
      param.error("record template of type @RLCMAC_CSN1_Types.PacketCellChangeNotification has 9 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) gtfi().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) u().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) ba__psi3__presence().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) ba__used().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) psi3__change__mark().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) pmo__used().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) pccn__sending().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) ccn__meas__rep().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) rel__additions().set_param(*param.get_elem(8));
    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(), "gtfi")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          gtfi().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "u")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          u().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "ba_psi3_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ba__psi3__presence().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(), "ba_used")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ba__used().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(), "psi3_change_mark")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          psi3__change__mark().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(), "pmo_used")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pmo__used().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(), "pccn_sending")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pccn__sending().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(), "ccn_meas_rep")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ccn__meas__rep().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(), "rel_additions")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          rel__additions().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 @RLCMAC_CSN1_Types.PacketCellChangeNotification: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PacketCellChangeNotification_template* precondition = new PacketCellChangeNotification_template;
    precondition->set_param(*param.get_elem(0));
    PacketCellChangeNotification_template* implied_template = new PacketCellChangeNotification_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PacketCellChangeNotification_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@RLCMAC_CSN1_Types.PacketCellChangeNotification");
  }
  is_ifpresent = param.get_ifpresent();
}

void PacketCellChangeNotification_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_gtfi.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PacketCellChangeNotification");
single_value->field_u.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PacketCellChangeNotification");
single_value->field_ba__psi3__presence.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PacketCellChangeNotification");
single_value->field_ba__used.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PacketCellChangeNotification");
single_value->field_psi3__change__mark.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PacketCellChangeNotification");
single_value->field_pmo__used.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PacketCellChangeNotification");
single_value->field_pccn__sending.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PacketCellChangeNotification");
single_value->field_ccn__meas__rep.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PacketCellChangeNotification");
single_value->field_rel__additions.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.PacketCellChangeNotification");
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 : "@RLCMAC_CSN1_Types.PacketCellChangeNotification");
}

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

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

void RlcmacUlCtrlUnion::copy_value(const RlcmacUlCtrlUnion& other_value)
{
switch (other_value.union_selection) {
case ALT_ctrl__ack:
field_ctrl__ack = new PacketCtrlAck(*other_value.field_ctrl__ack);
break;
case ALT_dl__ack__nack:
field_dl__ack__nack = new PacketDlAckNack(*other_value.field_dl__ack__nack);
break;
case ALT_dl__ack__nack__egprs:
field_dl__ack__nack__egprs = new EgprsPacketDlAckNack(*other_value.field_dl__ack__nack__egprs);
break;
case ALT_ul__dummy:
field_ul__dummy = new PacketUlDummy(*other_value.field_ul__dummy);
break;
case ALT_meas__report:
field_meas__report = new PacketMeasReport(*other_value.field_meas__report);
break;
case ALT_resource__req:
field_resource__req = new PacketResourceReq(*other_value.field_resource__req);
break;
case ALT_cell__chg__notif:
field_cell__chg__notif = new PacketCellChangeNotification(*other_value.field_cell__chg__notif);
break;
case ALT_other:
field_other = new OCTETSTRING(*other_value.field_other);
break;
default:
TTCN_error("Assignment of an unbound union value of type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
}
union_selection = other_value.union_selection;
}

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

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

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

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

boolean RlcmacUlCtrlUnion::operator==(const RlcmacUlCtrlUnion& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_ctrl__ack:
return *field_ctrl__ack == *other_value.field_ctrl__ack;
case ALT_dl__ack__nack:
return *field_dl__ack__nack == *other_value.field_dl__ack__nack;
case ALT_dl__ack__nack__egprs:
return *field_dl__ack__nack__egprs == *other_value.field_dl__ack__nack__egprs;
case ALT_ul__dummy:
return *field_ul__dummy == *other_value.field_ul__dummy;
case ALT_meas__report:
return *field_meas__report == *other_value.field_meas__report;
case ALT_resource__req:
return *field_resource__req == *other_value.field_resource__req;
case ALT_cell__chg__notif:
return *field_cell__chg__notif == *other_value.field_cell__chg__notif;
case ALT_other:
return *field_other == *other_value.field_other;
default:
return FALSE;
}
}

PacketCtrlAck& RlcmacUlCtrlUnion::ctrl__ack()
{
if (union_selection != ALT_ctrl__ack) {
clean_up();
field_ctrl__ack = new PacketCtrlAck;
union_selection = ALT_ctrl__ack;
}
return *field_ctrl__ack;
}

const PacketCtrlAck& RlcmacUlCtrlUnion::ctrl__ack() const
{
if (union_selection != ALT_ctrl__ack) TTCN_error("Using non-selected field ctrl_ack in a value of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
return *field_ctrl__ack;
}

PacketDlAckNack& RlcmacUlCtrlUnion::dl__ack__nack()
{
if (union_selection != ALT_dl__ack__nack) {
clean_up();
field_dl__ack__nack = new PacketDlAckNack;
union_selection = ALT_dl__ack__nack;
}
return *field_dl__ack__nack;
}

const PacketDlAckNack& RlcmacUlCtrlUnion::dl__ack__nack() const
{
if (union_selection != ALT_dl__ack__nack) TTCN_error("Using non-selected field dl_ack_nack in a value of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
return *field_dl__ack__nack;
}

EgprsPacketDlAckNack& RlcmacUlCtrlUnion::dl__ack__nack__egprs()
{
if (union_selection != ALT_dl__ack__nack__egprs) {
clean_up();
field_dl__ack__nack__egprs = new EgprsPacketDlAckNack;
union_selection = ALT_dl__ack__nack__egprs;
}
return *field_dl__ack__nack__egprs;
}

const EgprsPacketDlAckNack& RlcmacUlCtrlUnion::dl__ack__nack__egprs() const
{
if (union_selection != ALT_dl__ack__nack__egprs) TTCN_error("Using non-selected field dl_ack_nack_egprs in a value of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
return *field_dl__ack__nack__egprs;
}

PacketUlDummy& RlcmacUlCtrlUnion::ul__dummy()
{
if (union_selection != ALT_ul__dummy) {
clean_up();
field_ul__dummy = new PacketUlDummy;
union_selection = ALT_ul__dummy;
}
return *field_ul__dummy;
}

const PacketUlDummy& RlcmacUlCtrlUnion::ul__dummy() const
{
if (union_selection != ALT_ul__dummy) TTCN_error("Using non-selected field ul_dummy in a value of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
return *field_ul__dummy;
}

PacketMeasReport& RlcmacUlCtrlUnion::meas__report()
{
if (union_selection != ALT_meas__report) {
clean_up();
field_meas__report = new PacketMeasReport;
union_selection = ALT_meas__report;
}
return *field_meas__report;
}

const PacketMeasReport& RlcmacUlCtrlUnion::meas__report() const
{
if (union_selection != ALT_meas__report) TTCN_error("Using non-selected field meas_report in a value of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
return *field_meas__report;
}

PacketResourceReq& RlcmacUlCtrlUnion::resource__req()
{
if (union_selection != ALT_resource__req) {
clean_up();
field_resource__req = new PacketResourceReq;
union_selection = ALT_resource__req;
}
return *field_resource__req;
}

const PacketResourceReq& RlcmacUlCtrlUnion::resource__req() const
{
if (union_selection != ALT_resource__req) TTCN_error("Using non-selected field resource_req in a value of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
return *field_resource__req;
}

PacketCellChangeNotification& RlcmacUlCtrlUnion::cell__chg__notif()
{
if (union_selection != ALT_cell__chg__notif) {
clean_up();
field_cell__chg__notif = new PacketCellChangeNotification;
union_selection = ALT_cell__chg__notif;
}
return *field_cell__chg__notif;
}

const PacketCellChangeNotification& RlcmacUlCtrlUnion::cell__chg__notif() const
{
if (union_selection != ALT_cell__chg__notif) TTCN_error("Using non-selected field cell_chg_notif in a value of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
return *field_cell__chg__notif;
}

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

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

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

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

boolean RlcmacUlCtrlUnion::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_ctrl__ack: return field_ctrl__ack->is_value();
case ALT_dl__ack__nack: return field_dl__ack__nack->is_value();
case ALT_dl__ack__nack__egprs: return field_dl__ack__nack__egprs->is_value();
case ALT_ul__dummy: return field_ul__dummy->is_value();
case ALT_meas__report: return field_meas__report->is_value();
case ALT_resource__req: return field_resource__req->is_value();
case ALT_cell__chg__notif: return field_cell__chg__notif->is_value();
case ALT_other: return field_other->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void RlcmacUlCtrlUnion::clean_up()
{
switch (union_selection) {
case ALT_ctrl__ack:
  delete field_ctrl__ack;
  break;
case ALT_dl__ack__nack:
  delete field_dl__ack__nack;
  break;
case ALT_dl__ack__nack__egprs:
  delete field_dl__ack__nack__egprs;
  break;
case ALT_ul__dummy:
  delete field_ul__dummy;
  break;
case ALT_meas__report:
  delete field_meas__report;
  break;
case ALT_resource__req:
  delete field_resource__req;
  break;
case ALT_cell__chg__notif:
  delete field_cell__chg__notif;
  break;
case ALT_other:
  delete field_other;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void RlcmacUlCtrlUnion::log() const
{
switch (union_selection) {
case ALT_ctrl__ack:
TTCN_Logger::log_event_str("{ ctrl_ack := ");
field_ctrl__ack->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_dl__ack__nack:
TTCN_Logger::log_event_str("{ dl_ack_nack := ");
field_dl__ack__nack->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_dl__ack__nack__egprs:
TTCN_Logger::log_event_str("{ dl_ack_nack_egprs := ");
field_dl__ack__nack__egprs->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_ul__dummy:
TTCN_Logger::log_event_str("{ ul_dummy := ");
field_ul__dummy->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_meas__report:
TTCN_Logger::log_event_str("{ meas_report := ");
field_meas__report->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_resource__req:
TTCN_Logger::log_event_str("{ resource_req := ");
field_resource__req->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_cell__chg__notif:
TTCN_Logger::log_event_str("{ cell_chg_notif := ");
field_cell__chg__notif->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_other:
TTCN_Logger::log_event_str("{ other := ");
field_other->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

void RlcmacUlCtrlUnion::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "union value");
  Module_Param_Ptr m_p = &param;
  if (m_p->get_type()==Module_Param::MP_Value_List && m_p->get_size()==0) return;
  if (m_p->get_type()!=Module_Param::MP_Assignment_List) {
    param.error("union value with field name was expected");
  }
  Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1);
  char* last_name = mp_last->get_id()->get_name();
  if (!strcmp(last_name, "ctrl_ack")) {
    ctrl__ack().set_param(*mp_last);
    if (!ctrl__ack().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "dl_ack_nack")) {
    dl__ack__nack().set_param(*mp_last);
    if (!dl__ack__nack().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "dl_ack_nack_egprs")) {
    dl__ack__nack__egprs().set_param(*mp_last);
    if (!dl__ack__nack__egprs().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "ul_dummy")) {
    ul__dummy().set_param(*mp_last);
    if (!ul__dummy().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "meas_report")) {
    meas__report().set_param(*mp_last);
    if (!meas__report().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "resource_req")) {
    resource__req().set_param(*mp_last);
    if (!resource__req().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "cell_chg_notif")) {
    cell__chg__notif().set_param(*mp_last);
    if (!cell__chg__notif().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "other")) {
    other().set_param(*mp_last);
    if (!other().is_bound()) clean_up();
    return;
  }
  mp_last->error("Field %s does not exist in type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.", last_name);
}

void RlcmacUlCtrlUnion::set_implicit_omit()
{
switch (union_selection) {
case ALT_ctrl__ack:
field_ctrl__ack->set_implicit_omit(); break;
case ALT_dl__ack__nack:
field_dl__ack__nack->set_implicit_omit(); break;
case ALT_dl__ack__nack__egprs:
field_dl__ack__nack__egprs->set_implicit_omit(); break;
case ALT_ul__dummy:
field_ul__dummy->set_implicit_omit(); break;
case ALT_meas__report:
field_meas__report->set_implicit_omit(); break;
case ALT_resource__req:
field_resource__req->set_implicit_omit(); break;
case ALT_cell__chg__notif:
field_cell__chg__notif->set_implicit_omit(); break;
case ALT_other:
field_other->set_implicit_omit(); break;
default: break;
}
}

void RlcmacUlCtrlUnion::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_ctrl__ack:
field_ctrl__ack->encode_text(text_buf);
break;
case ALT_dl__ack__nack:
field_dl__ack__nack->encode_text(text_buf);
break;
case ALT_dl__ack__nack__egprs:
field_dl__ack__nack__egprs->encode_text(text_buf);
break;
case ALT_ul__dummy:
field_ul__dummy->encode_text(text_buf);
break;
case ALT_meas__report:
field_meas__report->encode_text(text_buf);
break;
case ALT_resource__req:
field_resource__req->encode_text(text_buf);
break;
case ALT_cell__chg__notif:
field_cell__chg__notif->encode_text(text_buf);
break;
case ALT_other:
field_other->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
}
}

void RlcmacUlCtrlUnion::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_ctrl__ack:
ctrl__ack().decode_text(text_buf);
break;
case ALT_dl__ack__nack:
dl__ack__nack().decode_text(text_buf);
break;
case ALT_dl__ack__nack__egprs:
dl__ack__nack__egprs().decode_text(text_buf);
break;
case ALT_ul__dummy:
ul__dummy().decode_text(text_buf);
break;
case ALT_meas__report:
meas__report().decode_text(text_buf);
break;
case ALT_resource__req:
resource__req().decode_text(text_buf);
break;
case ALT_cell__chg__notif:
cell__chg__notif().decode_text(text_buf);
break;
case ALT_other:
other().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
}
}

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

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

int RlcmacUlCtrlUnion::RAW_decode(
const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, 
raw_order_t top_bit_ord, boolean no_err, int sel_field, boolean, const RAW_Force_Omit* force_omit)
{
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  int decoded_length=0;
  int starting_pos=p_buf.get_pos_bit();
  if(sel_field!=-1){
    switch(sel_field){
    case 0: {
      RAW_Force_Omit field_force_omit(0, force_omit, RlcmacUlCtrlUnion_ctrl__ack_descr_.raw->forceomit);
      decoded_length = ctrl__ack().RAW_decode(RlcmacUlCtrlUnion_ctrl__ack_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 1: {
      RAW_Force_Omit field_force_omit(1, force_omit, RlcmacUlCtrlUnion_dl__ack__nack_descr_.raw->forceomit);
      decoded_length = dl__ack__nack().RAW_decode(RlcmacUlCtrlUnion_dl__ack__nack_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 2: {
      RAW_Force_Omit field_force_omit(2, force_omit, RlcmacUlCtrlUnion_dl__ack__nack__egprs_descr_.raw->forceomit);
      decoded_length = dl__ack__nack__egprs().RAW_decode(RlcmacUlCtrlUnion_dl__ack__nack__egprs_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 3: {
      RAW_Force_Omit field_force_omit(3, force_omit, RlcmacUlCtrlUnion_ul__dummy_descr_.raw->forceomit);
      decoded_length = ul__dummy().RAW_decode(RlcmacUlCtrlUnion_ul__dummy_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 4: {
      RAW_Force_Omit field_force_omit(4, force_omit, RlcmacUlCtrlUnion_meas__report_descr_.raw->forceomit);
      decoded_length = meas__report().RAW_decode(RlcmacUlCtrlUnion_meas__report_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 5: {
      RAW_Force_Omit field_force_omit(5, force_omit, RlcmacUlCtrlUnion_resource__req_descr_.raw->forceomit);
      decoded_length = resource__req().RAW_decode(RlcmacUlCtrlUnion_resource__req_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 6: {
      RAW_Force_Omit field_force_omit(6, force_omit, RlcmacUlCtrlUnion_cell__chg__notif_descr_.raw->forceomit);
      decoded_length = cell__chg__notif().RAW_decode(RlcmacUlCtrlUnion_cell__chg__notif_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 7: {
      RAW_Force_Omit field_force_omit(7, force_omit, RlcmacUlCtrlUnion_other_descr_.raw->forceomit);
      decoded_length = other().RAW_decode(RlcmacUlCtrlUnion_other_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    default: break;
    }
    return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
  } else {
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_0_force_omit(0, force_omit, RlcmacUlCtrlUnion_ctrl__ack_descr_.raw->forceomit);
      decoded_length = ctrl__ack().RAW_decode(RlcmacUlCtrlUnion_ctrl__ack_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_0_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_1_force_omit(1, force_omit, RlcmacUlCtrlUnion_dl__ack__nack_descr_.raw->forceomit);
      decoded_length = dl__ack__nack().RAW_decode(RlcmacUlCtrlUnion_dl__ack__nack_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_1_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_2_force_omit(2, force_omit, RlcmacUlCtrlUnion_dl__ack__nack__egprs_descr_.raw->forceomit);
      decoded_length = dl__ack__nack__egprs().RAW_decode(RlcmacUlCtrlUnion_dl__ack__nack__egprs_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_2_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_3_force_omit(3, force_omit, RlcmacUlCtrlUnion_ul__dummy_descr_.raw->forceomit);
      decoded_length = ul__dummy().RAW_decode(RlcmacUlCtrlUnion_ul__dummy_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_3_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_4_force_omit(4, force_omit, RlcmacUlCtrlUnion_meas__report_descr_.raw->forceomit);
      decoded_length = meas__report().RAW_decode(RlcmacUlCtrlUnion_meas__report_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_4_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_5_force_omit(5, force_omit, RlcmacUlCtrlUnion_resource__req_descr_.raw->forceomit);
      decoded_length = resource__req().RAW_decode(RlcmacUlCtrlUnion_resource__req_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_5_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_6_force_omit(6, force_omit, RlcmacUlCtrlUnion_cell__chg__notif_descr_.raw->forceomit);
      decoded_length = cell__chg__notif().RAW_decode(RlcmacUlCtrlUnion_cell__chg__notif_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_6_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_7_force_omit(7, force_omit, RlcmacUlCtrlUnion_other_descr_.raw->forceomit);
      decoded_length = other().RAW_decode(RlcmacUlCtrlUnion_other_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_7_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
 }
 clean_up();
 return -1;
}

int RlcmacUlCtrlUnion::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
{
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 8;  myleaf.body.node.nodes = init_nodes_of_enc_tree(8);
  memset(myleaf.body.node.nodes, 0, 8 * sizeof(RAW_enc_tree *));
  switch (union_selection) {
  case ALT_ctrl__ack:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, RlcmacUlCtrlUnion_ctrl__ack_descr_.raw);
    encoded_length = field_ctrl__ack->RAW_encode(RlcmacUlCtrlUnion_ctrl__ack_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &RlcmacUlCtrlUnion_ctrl__ack_descr_;
    break;
  case ALT_dl__ack__nack:
    myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, RlcmacUlCtrlUnion_dl__ack__nack_descr_.raw);
    encoded_length = field_dl__ack__nack->RAW_encode(RlcmacUlCtrlUnion_dl__ack__nack_descr_, *myleaf.body.node.nodes[1]);
    myleaf.body.node.nodes[1]->coding_descr = &RlcmacUlCtrlUnion_dl__ack__nack_descr_;
    break;
  case ALT_dl__ack__nack__egprs:
    myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, RlcmacUlCtrlUnion_dl__ack__nack__egprs_descr_.raw);
    encoded_length = field_dl__ack__nack__egprs->RAW_encode(RlcmacUlCtrlUnion_dl__ack__nack__egprs_descr_, *myleaf.body.node.nodes[2]);
    myleaf.body.node.nodes[2]->coding_descr = &RlcmacUlCtrlUnion_dl__ack__nack__egprs_descr_;
    break;
  case ALT_ul__dummy:
    myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 3, RlcmacUlCtrlUnion_ul__dummy_descr_.raw);
    encoded_length = field_ul__dummy->RAW_encode(RlcmacUlCtrlUnion_ul__dummy_descr_, *myleaf.body.node.nodes[3]);
    myleaf.body.node.nodes[3]->coding_descr = &RlcmacUlCtrlUnion_ul__dummy_descr_;
    break;
  case ALT_meas__report:
    myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 4, RlcmacUlCtrlUnion_meas__report_descr_.raw);
    encoded_length = field_meas__report->RAW_encode(RlcmacUlCtrlUnion_meas__report_descr_, *myleaf.body.node.nodes[4]);
    myleaf.body.node.nodes[4]->coding_descr = &RlcmacUlCtrlUnion_meas__report_descr_;
    break;
  case ALT_resource__req:
    myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 5, RlcmacUlCtrlUnion_resource__req_descr_.raw);
    encoded_length = field_resource__req->RAW_encode(RlcmacUlCtrlUnion_resource__req_descr_, *myleaf.body.node.nodes[5]);
    myleaf.body.node.nodes[5]->coding_descr = &RlcmacUlCtrlUnion_resource__req_descr_;
    break;
  case ALT_cell__chg__notif:
    myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 6, RlcmacUlCtrlUnion_cell__chg__notif_descr_.raw);
    encoded_length = field_cell__chg__notif->RAW_encode(RlcmacUlCtrlUnion_cell__chg__notif_descr_, *myleaf.body.node.nodes[6]);
    myleaf.body.node.nodes[6]->coding_descr = &RlcmacUlCtrlUnion_cell__chg__notif_descr_;
    break;
  case ALT_other:
    myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 7, RlcmacUlCtrlUnion_other_descr_.raw);
    encoded_length = field_other->RAW_encode(RlcmacUlCtrlUnion_other_descr_, *myleaf.body.node.nodes[7]);
    myleaf.body.node.nodes[7]->coding_descr = &RlcmacUlCtrlUnion_other_descr_;
    break;
  default:
    TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  }
  return encoded_length;
}

void RlcmacUlCtrlUnion_template::copy_value(const RlcmacUlCtrlUnion& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case RlcmacUlCtrlUnion::ALT_ctrl__ack:
single_value.field_ctrl__ack = new PacketCtrlAck_template(other_value.ctrl__ack());
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack:
single_value.field_dl__ack__nack = new PacketDlAckNack_template(other_value.dl__ack__nack());
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs:
single_value.field_dl__ack__nack__egprs = new EgprsPacketDlAckNack_template(other_value.dl__ack__nack__egprs());
break;
case RlcmacUlCtrlUnion::ALT_ul__dummy:
single_value.field_ul__dummy = new PacketUlDummy_template(other_value.ul__dummy());
break;
case RlcmacUlCtrlUnion::ALT_meas__report:
single_value.field_meas__report = new PacketMeasReport_template(other_value.meas__report());
break;
case RlcmacUlCtrlUnion::ALT_resource__req:
single_value.field_resource__req = new PacketResourceReq_template(other_value.resource__req());
break;
case RlcmacUlCtrlUnion::ALT_cell__chg__notif:
single_value.field_cell__chg__notif = new PacketCellChangeNotification_template(other_value.cell__chg__notif());
break;
case RlcmacUlCtrlUnion::ALT_other:
single_value.field_other = new OCTETSTRING_template(other_value.other());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
}
set_selection(SPECIFIC_VALUE);
}

void RlcmacUlCtrlUnion_template::copy_template(const RlcmacUlCtrlUnion_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value.union_selection = other_value.single_value.union_selection;
switch (single_value.union_selection) {
case RlcmacUlCtrlUnion::ALT_ctrl__ack:
single_value.field_ctrl__ack = new PacketCtrlAck_template(*other_value.single_value.field_ctrl__ack);
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack:
single_value.field_dl__ack__nack = new PacketDlAckNack_template(*other_value.single_value.field_dl__ack__nack);
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs:
single_value.field_dl__ack__nack__egprs = new EgprsPacketDlAckNack_template(*other_value.single_value.field_dl__ack__nack__egprs);
break;
case RlcmacUlCtrlUnion::ALT_ul__dummy:
single_value.field_ul__dummy = new PacketUlDummy_template(*other_value.single_value.field_ul__dummy);
break;
case RlcmacUlCtrlUnion::ALT_meas__report:
single_value.field_meas__report = new PacketMeasReport_template(*other_value.single_value.field_meas__report);
break;
case RlcmacUlCtrlUnion::ALT_resource__req:
single_value.field_resource__req = new PacketResourceReq_template(*other_value.single_value.field_resource__req);
break;
case RlcmacUlCtrlUnion::ALT_cell__chg__notif:
single_value.field_cell__chg__notif = new PacketCellChangeNotification_template(*other_value.single_value.field_cell__chg__notif);
break;
case RlcmacUlCtrlUnion::ALT_other:
single_value.field_other = new OCTETSTRING_template(*other_value.single_value.field_other);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
}
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 RlcmacUlCtrlUnion_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 RlcmacUlCtrlUnion_template(*other_value.implication_.precondition);
implication_.implied_template = new RlcmacUlCtrlUnion_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
}
set_selection(other_value);
}

RlcmacUlCtrlUnion_template::RlcmacUlCtrlUnion_template()
{
}

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

RlcmacUlCtrlUnion_template::RlcmacUlCtrlUnion_template(const RlcmacUlCtrlUnion& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void RlcmacUlCtrlUnion_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case RlcmacUlCtrlUnion::ALT_ctrl__ack:
delete single_value.field_ctrl__ack;
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack:
delete single_value.field_dl__ack__nack;
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs:
delete single_value.field_dl__ack__nack__egprs;
break;
case RlcmacUlCtrlUnion::ALT_ul__dummy:
delete single_value.field_ul__dummy;
break;
case RlcmacUlCtrlUnion::ALT_meas__report:
delete single_value.field_meas__report;
break;
case RlcmacUlCtrlUnion::ALT_resource__req:
delete single_value.field_resource__req;
break;
case RlcmacUlCtrlUnion::ALT_cell__chg__notif:
delete single_value.field_cell__chg__notif;
break;
case RlcmacUlCtrlUnion::ALT_other:
delete single_value.field_other;
default:
break;
}
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

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

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

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

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

boolean RlcmacUlCtrlUnion_template::match(const RlcmacUlCtrlUnion& 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:
{
RlcmacUlCtrlUnion::union_selection_type value_selection = other_value.get_selection();
if (value_selection == RlcmacUlCtrlUnion::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case RlcmacUlCtrlUnion::ALT_ctrl__ack:
return single_value.field_ctrl__ack->match(other_value.ctrl__ack(), legacy);
case RlcmacUlCtrlUnion::ALT_dl__ack__nack:
return single_value.field_dl__ack__nack->match(other_value.dl__ack__nack(), legacy);
case RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs:
return single_value.field_dl__ack__nack__egprs->match(other_value.dl__ack__nack__egprs(), legacy);
case RlcmacUlCtrlUnion::ALT_ul__dummy:
return single_value.field_ul__dummy->match(other_value.ul__dummy(), legacy);
case RlcmacUlCtrlUnion::ALT_meas__report:
return single_value.field_meas__report->match(other_value.meas__report(), legacy);
case RlcmacUlCtrlUnion::ALT_resource__req:
return single_value.field_resource__req->match(other_value.resource__req(), legacy);
case RlcmacUlCtrlUnion::ALT_cell__chg__notif:
return single_value.field_cell__chg__notif->match(other_value.cell__chg__notif(), legacy);
case RlcmacUlCtrlUnion::ALT_other:
return single_value.field_other->match(other_value.other(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
}
}
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error ("Matching an uninitialized template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
}
return FALSE;
}

boolean RlcmacUlCtrlUnion_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case RlcmacUlCtrlUnion::ALT_ctrl__ack:
return single_value.field_ctrl__ack->is_value();
case RlcmacUlCtrlUnion::ALT_dl__ack__nack:
return single_value.field_dl__ack__nack->is_value();
case RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs:
return single_value.field_dl__ack__nack__egprs->is_value();
case RlcmacUlCtrlUnion::ALT_ul__dummy:
return single_value.field_ul__dummy->is_value();
case RlcmacUlCtrlUnion::ALT_meas__report:
return single_value.field_meas__report->is_value();
case RlcmacUlCtrlUnion::ALT_resource__req:
return single_value.field_resource__req->is_value();
case RlcmacUlCtrlUnion::ALT_cell__chg__notif:
return single_value.field_cell__chg__notif->is_value();
case RlcmacUlCtrlUnion::ALT_other:
return single_value.field_other->is_value();
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
}
}

RlcmacUlCtrlUnion RlcmacUlCtrlUnion_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
RlcmacUlCtrlUnion ret_val;
switch (single_value.union_selection) {
case RlcmacUlCtrlUnion::ALT_ctrl__ack:
ret_val.ctrl__ack() = single_value.field_ctrl__ack->valueof();
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack:
ret_val.dl__ack__nack() = single_value.field_dl__ack__nack->valueof();
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs:
ret_val.dl__ack__nack__egprs() = single_value.field_dl__ack__nack__egprs->valueof();
break;
case RlcmacUlCtrlUnion::ALT_ul__dummy:
ret_val.ul__dummy() = single_value.field_ul__dummy->valueof();
break;
case RlcmacUlCtrlUnion::ALT_meas__report:
ret_val.meas__report() = single_value.field_meas__report->valueof();
break;
case RlcmacUlCtrlUnion::ALT_resource__req:
ret_val.resource__req() = single_value.field_resource__req->valueof();
break;
case RlcmacUlCtrlUnion::ALT_cell__chg__notif:
ret_val.cell__chg__notif() = single_value.field_cell__chg__notif->valueof();
break;
case RlcmacUlCtrlUnion::ALT_other:
ret_val.other() = single_value.field_other->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
}
return ret_val;
}

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

PacketCtrlAck_template& RlcmacUlCtrlUnion_template::ctrl__ack()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != RlcmacUlCtrlUnion::ALT_ctrl__ack) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_ctrl__ack = new PacketCtrlAck_template(ANY_VALUE);
else single_value.field_ctrl__ack = new PacketCtrlAck_template;
single_value.union_selection = RlcmacUlCtrlUnion::ALT_ctrl__ack;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_ctrl__ack;
}

const PacketCtrlAck_template& RlcmacUlCtrlUnion_template::ctrl__ack() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ctrl_ack in a non-specific template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
if (single_value.union_selection != RlcmacUlCtrlUnion::ALT_ctrl__ack) TTCN_error("Accessing non-selected field ctrl_ack in a template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
return *single_value.field_ctrl__ack;
}

PacketDlAckNack_template& RlcmacUlCtrlUnion_template::dl__ack__nack()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != RlcmacUlCtrlUnion::ALT_dl__ack__nack) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_dl__ack__nack = new PacketDlAckNack_template(ANY_VALUE);
else single_value.field_dl__ack__nack = new PacketDlAckNack_template;
single_value.union_selection = RlcmacUlCtrlUnion::ALT_dl__ack__nack;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_dl__ack__nack;
}

const PacketDlAckNack_template& RlcmacUlCtrlUnion_template::dl__ack__nack() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dl_ack_nack in a non-specific template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
if (single_value.union_selection != RlcmacUlCtrlUnion::ALT_dl__ack__nack) TTCN_error("Accessing non-selected field dl_ack_nack in a template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
return *single_value.field_dl__ack__nack;
}

EgprsPacketDlAckNack_template& RlcmacUlCtrlUnion_template::dl__ack__nack__egprs()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_dl__ack__nack__egprs = new EgprsPacketDlAckNack_template(ANY_VALUE);
else single_value.field_dl__ack__nack__egprs = new EgprsPacketDlAckNack_template;
single_value.union_selection = RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_dl__ack__nack__egprs;
}

const EgprsPacketDlAckNack_template& RlcmacUlCtrlUnion_template::dl__ack__nack__egprs() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dl_ack_nack_egprs in a non-specific template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
if (single_value.union_selection != RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs) TTCN_error("Accessing non-selected field dl_ack_nack_egprs in a template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
return *single_value.field_dl__ack__nack__egprs;
}

PacketUlDummy_template& RlcmacUlCtrlUnion_template::ul__dummy()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != RlcmacUlCtrlUnion::ALT_ul__dummy) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_ul__dummy = new PacketUlDummy_template(ANY_VALUE);
else single_value.field_ul__dummy = new PacketUlDummy_template;
single_value.union_selection = RlcmacUlCtrlUnion::ALT_ul__dummy;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_ul__dummy;
}

const PacketUlDummy_template& RlcmacUlCtrlUnion_template::ul__dummy() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ul_dummy in a non-specific template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
if (single_value.union_selection != RlcmacUlCtrlUnion::ALT_ul__dummy) TTCN_error("Accessing non-selected field ul_dummy in a template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
return *single_value.field_ul__dummy;
}

PacketMeasReport_template& RlcmacUlCtrlUnion_template::meas__report()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != RlcmacUlCtrlUnion::ALT_meas__report) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_meas__report = new PacketMeasReport_template(ANY_VALUE);
else single_value.field_meas__report = new PacketMeasReport_template;
single_value.union_selection = RlcmacUlCtrlUnion::ALT_meas__report;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_meas__report;
}

const PacketMeasReport_template& RlcmacUlCtrlUnion_template::meas__report() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field meas_report in a non-specific template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
if (single_value.union_selection != RlcmacUlCtrlUnion::ALT_meas__report) TTCN_error("Accessing non-selected field meas_report in a template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
return *single_value.field_meas__report;
}

PacketResourceReq_template& RlcmacUlCtrlUnion_template::resource__req()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != RlcmacUlCtrlUnion::ALT_resource__req) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_resource__req = new PacketResourceReq_template(ANY_VALUE);
else single_value.field_resource__req = new PacketResourceReq_template;
single_value.union_selection = RlcmacUlCtrlUnion::ALT_resource__req;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_resource__req;
}

const PacketResourceReq_template& RlcmacUlCtrlUnion_template::resource__req() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field resource_req in a non-specific template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
if (single_value.union_selection != RlcmacUlCtrlUnion::ALT_resource__req) TTCN_error("Accessing non-selected field resource_req in a template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
return *single_value.field_resource__req;
}

PacketCellChangeNotification_template& RlcmacUlCtrlUnion_template::cell__chg__notif()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != RlcmacUlCtrlUnion::ALT_cell__chg__notif) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_cell__chg__notif = new PacketCellChangeNotification_template(ANY_VALUE);
else single_value.field_cell__chg__notif = new PacketCellChangeNotification_template;
single_value.union_selection = RlcmacUlCtrlUnion::ALT_cell__chg__notif;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_cell__chg__notif;
}

const PacketCellChangeNotification_template& RlcmacUlCtrlUnion_template::cell__chg__notif() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field cell_chg_notif in a non-specific template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
if (single_value.union_selection != RlcmacUlCtrlUnion::ALT_cell__chg__notif) TTCN_error("Accessing non-selected field cell_chg_notif in a template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
return *single_value.field_cell__chg__notif;
}

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

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

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

void RlcmacUlCtrlUnion_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case RlcmacUlCtrlUnion::ALT_ctrl__ack:
TTCN_Logger::log_event_str("{ ctrl_ack := ");
single_value.field_ctrl__ack->log();
TTCN_Logger::log_event_str(" }");
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack:
TTCN_Logger::log_event_str("{ dl_ack_nack := ");
single_value.field_dl__ack__nack->log();
TTCN_Logger::log_event_str(" }");
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs:
TTCN_Logger::log_event_str("{ dl_ack_nack_egprs := ");
single_value.field_dl__ack__nack__egprs->log();
TTCN_Logger::log_event_str(" }");
break;
case RlcmacUlCtrlUnion::ALT_ul__dummy:
TTCN_Logger::log_event_str("{ ul_dummy := ");
single_value.field_ul__dummy->log();
TTCN_Logger::log_event_str(" }");
break;
case RlcmacUlCtrlUnion::ALT_meas__report:
TTCN_Logger::log_event_str("{ meas_report := ");
single_value.field_meas__report->log();
TTCN_Logger::log_event_str(" }");
break;
case RlcmacUlCtrlUnion::ALT_resource__req:
TTCN_Logger::log_event_str("{ resource_req := ");
single_value.field_resource__req->log();
TTCN_Logger::log_event_str(" }");
break;
case RlcmacUlCtrlUnion::ALT_cell__chg__notif:
TTCN_Logger::log_event_str("{ cell_chg_notif := ");
single_value.field_cell__chg__notif->log();
TTCN_Logger::log_event_str(" }");
break;
case RlcmacUlCtrlUnion::ALT_other:
TTCN_Logger::log_event_str("{ other := ");
single_value.field_other->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_str("<invalid selector>");
}
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void RlcmacUlCtrlUnion_template::log_match(const RlcmacUlCtrlUnion& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity() && match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
return;
}
if (template_selection == SPECIFIC_VALUE && single_value.union_selection == match_value.get_selection()) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
switch (single_value.union_selection) {
case RlcmacUlCtrlUnion::ALT_ctrl__ack:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".ctrl_ack");
single_value.field_ctrl__ack->log_match(match_value.ctrl__ack(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ ctrl_ack := ");
single_value.field_ctrl__ack->log_match(match_value.ctrl__ack(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".dl_ack_nack");
single_value.field_dl__ack__nack->log_match(match_value.dl__ack__nack(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ dl_ack_nack := ");
single_value.field_dl__ack__nack->log_match(match_value.dl__ack__nack(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".dl_ack_nack_egprs");
single_value.field_dl__ack__nack__egprs->log_match(match_value.dl__ack__nack__egprs(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ dl_ack_nack_egprs := ");
single_value.field_dl__ack__nack__egprs->log_match(match_value.dl__ack__nack__egprs(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case RlcmacUlCtrlUnion::ALT_ul__dummy:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".ul_dummy");
single_value.field_ul__dummy->log_match(match_value.ul__dummy(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ ul_dummy := ");
single_value.field_ul__dummy->log_match(match_value.ul__dummy(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case RlcmacUlCtrlUnion::ALT_meas__report:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".meas_report");
single_value.field_meas__report->log_match(match_value.meas__report(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ meas_report := ");
single_value.field_meas__report->log_match(match_value.meas__report(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case RlcmacUlCtrlUnion::ALT_resource__req:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".resource_req");
single_value.field_resource__req->log_match(match_value.resource__req(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ resource_req := ");
single_value.field_resource__req->log_match(match_value.resource__req(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case RlcmacUlCtrlUnion::ALT_cell__chg__notif:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".cell_chg_notif");
single_value.field_cell__chg__notif->log_match(match_value.cell__chg__notif(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ cell_chg_notif := ");
single_value.field_cell__chg__notif->log_match(match_value.cell__chg__notif(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case RlcmacUlCtrlUnion::ALT_other:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".other");
single_value.field_other->log_match(match_value.other(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ other := ");
single_value.field_other->log_match(match_value.other(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
default:
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str("<invalid selector>");
}
} else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void RlcmacUlCtrlUnion_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
switch (single_value.union_selection) {
case RlcmacUlCtrlUnion::ALT_ctrl__ack:
single_value.field_ctrl__ack->set_implicit_omit(); break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack:
single_value.field_dl__ack__nack->set_implicit_omit(); break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs:
single_value.field_dl__ack__nack__egprs->set_implicit_omit(); break;
case RlcmacUlCtrlUnion::ALT_ul__dummy:
single_value.field_ul__dummy->set_implicit_omit(); break;
case RlcmacUlCtrlUnion::ALT_meas__report:
single_value.field_meas__report->set_implicit_omit(); break;
case RlcmacUlCtrlUnion::ALT_resource__req:
single_value.field_resource__req->set_implicit_omit(); break;
case RlcmacUlCtrlUnion::ALT_cell__chg__notif:
single_value.field_cell__chg__notif->set_implicit_omit(); break;
case RlcmacUlCtrlUnion::ALT_other:
single_value.field_other->set_implicit_omit(); break;
default: break;
}
}

void RlcmacUlCtrlUnion_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value.union_selection);
switch (single_value.union_selection) {
case RlcmacUlCtrlUnion::ALT_ctrl__ack:
single_value.field_ctrl__ack->encode_text(text_buf);
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack:
single_value.field_dl__ack__nack->encode_text(text_buf);
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs:
single_value.field_dl__ack__nack__egprs->encode_text(text_buf);
break;
case RlcmacUlCtrlUnion::ALT_ul__dummy:
single_value.field_ul__dummy->encode_text(text_buf);
break;
case RlcmacUlCtrlUnion::ALT_meas__report:
single_value.field_meas__report->encode_text(text_buf);
break;
case RlcmacUlCtrlUnion::ALT_resource__req:
single_value.field_resource__req->encode_text(text_buf);
break;
case RlcmacUlCtrlUnion::ALT_cell__chg__notif:
single_value.field_cell__chg__notif->encode_text(text_buf);
break;
case RlcmacUlCtrlUnion::ALT_other:
single_value.field_other->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized template of type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
}
}

void RlcmacUlCtrlUnion_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
{
single_value.union_selection = RlcmacUlCtrlUnion::UNBOUND_VALUE;
RlcmacUlCtrlUnion::union_selection_type new_selection = (RlcmacUlCtrlUnion::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case RlcmacUlCtrlUnion::ALT_ctrl__ack:
single_value.field_ctrl__ack = new PacketCtrlAck_template;
single_value.field_ctrl__ack->decode_text(text_buf);
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack:
single_value.field_dl__ack__nack = new PacketDlAckNack_template;
single_value.field_dl__ack__nack->decode_text(text_buf);
break;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs:
single_value.field_dl__ack__nack__egprs = new EgprsPacketDlAckNack_template;
single_value.field_dl__ack__nack__egprs->decode_text(text_buf);
break;
case RlcmacUlCtrlUnion::ALT_ul__dummy:
single_value.field_ul__dummy = new PacketUlDummy_template;
single_value.field_ul__dummy->decode_text(text_buf);
break;
case RlcmacUlCtrlUnion::ALT_meas__report:
single_value.field_meas__report = new PacketMeasReport_template;
single_value.field_meas__report->decode_text(text_buf);
break;
case RlcmacUlCtrlUnion::ALT_resource__req:
single_value.field_resource__req = new PacketResourceReq_template;
single_value.field_resource__req->decode_text(text_buf);
break;
case RlcmacUlCtrlUnion::ALT_cell__chg__notif:
single_value.field_cell__chg__notif = new PacketCellChangeNotification_template;
single_value.field_cell__chg__notif->decode_text(text_buf);
break;
case RlcmacUlCtrlUnion::ALT_other:
single_value.field_other = new OCTETSTRING_template;
single_value.field_other->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
}
single_value.union_selection = new_selection;
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new RlcmacUlCtrlUnion_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized selector was received in a template of type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
}
}

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

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

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

void RlcmacUlCtrlUnion_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
switch (single_value.union_selection) {
case RlcmacUlCtrlUnion::ALT_ctrl__ack:
single_value.field_ctrl__ack->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.RlcmacUlCtrlUnion");
return;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack:
single_value.field_dl__ack__nack->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.RlcmacUlCtrlUnion");
return;
case RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs:
single_value.field_dl__ack__nack__egprs->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.RlcmacUlCtrlUnion");
return;
case RlcmacUlCtrlUnion::ALT_ul__dummy:
single_value.field_ul__dummy->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.RlcmacUlCtrlUnion");
return;
case RlcmacUlCtrlUnion::ALT_meas__report:
single_value.field_meas__report->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.RlcmacUlCtrlUnion");
return;
case RlcmacUlCtrlUnion::ALT_resource__req:
single_value.field_resource__req->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.RlcmacUlCtrlUnion");
return;
case RlcmacUlCtrlUnion::ALT_cell__chg__notif:
single_value.field_cell__chg__notif->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.RlcmacUlCtrlUnion");
return;
case RlcmacUlCtrlUnion::ALT_other:
single_value.field_other->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.RlcmacUlCtrlUnion");
return;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @RLCMAC_CSN1_Types.RlcmacUlCtrlUnion.");
}
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 : "@RLCMAC_CSN1_Types.RlcmacUlCtrlUnion");
}

RlcmacUlCtrlMsg::RlcmacUlCtrlMsg()
{
}

RlcmacUlCtrlMsg::RlcmacUlCtrlMsg(const RlcmacUlCtrlMsgType& par_msg__type,
    const RlcmacUlCtrlUnion& par_u)
  :   field_msg__type(par_msg__type),
  field_u(par_u)
{
}

RlcmacUlCtrlMsg::RlcmacUlCtrlMsg(const RlcmacUlCtrlMsg& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RLCMAC_CSN1_Types.RlcmacUlCtrlMsg.");
if (other_value.msg__type().is_bound()) field_msg__type = other_value.msg__type();
else field_msg__type.clean_up();
if (other_value.u().is_bound()) field_u = other_value.u();
else field_u.clean_up();
}

void RlcmacUlCtrlMsg::clean_up()
{
field_msg__type.clean_up();
field_u.clean_up();
}

const TTCN_Typedescriptor_t* RlcmacUlCtrlMsg::get_descriptor() const { return &RlcmacUlCtrlMsg_descr_; }
RlcmacUlCtrlMsg& RlcmacUlCtrlMsg::operator=(const RlcmacUlCtrlMsg& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RLCMAC_CSN1_Types.RlcmacUlCtrlMsg.");
  if (other_value.msg__type().is_bound()) field_msg__type = other_value.msg__type();
  else field_msg__type.clean_up();
  if (other_value.u().is_bound()) field_u = other_value.u();
  else field_u.clean_up();
}
return *this;
}

boolean RlcmacUlCtrlMsg::operator==(const RlcmacUlCtrlMsg& other_value) const
{
return field_msg__type==other_value.field_msg__type
  && field_u==other_value.field_u;
}

boolean RlcmacUlCtrlMsg::is_bound() const
{
return (field_msg__type.is_bound())
  || (field_u.is_bound());
}
boolean RlcmacUlCtrlMsg::is_value() const
{
return field_msg__type.is_value()
  && field_u.is_value();
}
void RlcmacUlCtrlMsg::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ msg_type := ");
field_msg__type.log();
TTCN_Logger::log_event_str(", u := ");
field_u.log();
TTCN_Logger::log_event_str(" }");
}

void RlcmacUlCtrlMsg::set_implicit_omit()
{
if (msg__type().is_bound()) msg__type().set_implicit_omit();
if (u().is_bound()) u().set_implicit_omit();
}

void RlcmacUlCtrlMsg::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 @RLCMAC_CSN1_Types.RlcmacUlCtrlMsg 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) msg__type().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) u().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(), "msg_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          msg__type().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "u")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          u().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @RLCMAC_CSN1_Types.RlcmacUlCtrlMsg: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@RLCMAC_CSN1_Types.RlcmacUlCtrlMsg");
  }
}

void RlcmacUlCtrlMsg::encode_text(Text_Buf& text_buf) const
{
field_msg__type.encode_text(text_buf);
field_u.encode_text(text_buf);
}

void RlcmacUlCtrlMsg::decode_text(Text_Buf& text_buf)
{
field_msg__type.decode_text(text_buf);
field_u.decode_text(text_buf);
}

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

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

int RlcmacUlCtrlMsg::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  int selected_field = -1;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, RlcmacUlCtrlMsg_msg__type_descr_.raw->forceomit);
  decoded_field_length = field_msg__type.RAW_decode(RlcmacUlCtrlMsg_msg__type_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (field_msg__type == RlcmacUlCtrlMsgType::PACKET__CONTROL__ACK) selected_field = 0;
  else if (field_msg__type == RlcmacUlCtrlMsgType::PACKET__DL__ACK__NACK) selected_field = 1;
  else if (field_msg__type == RlcmacUlCtrlMsgType::PACKET__EGPRS__DL__ACK__NACK) selected_field = 2;
  else if (field_msg__type == RlcmacUlCtrlMsgType::PACKET__UL__DUMMY__CTRL) selected_field = 3;
  else if (field_msg__type == RlcmacUlCtrlMsgType::PACKET__MEASUREMENT__REPORT) selected_field = 4;
  else if (field_msg__type == RlcmacUlCtrlMsgType::PACKET__RESOURCE__REQUEST) selected_field = 5;
  else if (field_msg__type == RlcmacUlCtrlMsgType::PACKET__CELL__CHANGE__NOTIFICATION) selected_field = 6;
  else selected_field = 7;
  RAW_Force_Omit field_1_force_omit(1, force_omit, RlcmacUlCtrlMsg_u_descr_.raw->forceomit);
  decoded_field_length = field_u.RAW_decode(RlcmacUlCtrlMsg_u_descr_, p_buf, limit, local_top_order, no_err, selected_field, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int RlcmacUlCtrlMsg::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 2;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, RlcmacUlCtrlMsg_msg__type_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, RlcmacUlCtrlMsg_u_descr_.raw);
  encoded_length += field_msg__type.RAW_encode(RlcmacUlCtrlMsg_msg__type_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_u.RAW_encode(RlcmacUlCtrlMsg_u_descr_, *myleaf.body.node.nodes[1]);
  switch (field_u.get_selection()) {
  case RlcmacUlCtrlUnion::ALT_ctrl__ack:
  if (field_msg__type != RlcmacUlCtrlMsgType::PACKET__CONTROL__ACK) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  RlcmacUlCtrlMsgType new_val(RlcmacUlCtrlMsgType::PACKET__CONTROL__ACK);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(RlcmacUlCtrlMsg_msg__type_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case RlcmacUlCtrlUnion::ALT_dl__ack__nack:
  if (field_msg__type != RlcmacUlCtrlMsgType::PACKET__DL__ACK__NACK) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  RlcmacUlCtrlMsgType new_val(RlcmacUlCtrlMsgType::PACKET__DL__ACK__NACK);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(RlcmacUlCtrlMsg_msg__type_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case RlcmacUlCtrlUnion::ALT_dl__ack__nack__egprs:
  if (field_msg__type != RlcmacUlCtrlMsgType::PACKET__EGPRS__DL__ACK__NACK) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  RlcmacUlCtrlMsgType new_val(RlcmacUlCtrlMsgType::PACKET__EGPRS__DL__ACK__NACK);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(RlcmacUlCtrlMsg_msg__type_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case RlcmacUlCtrlUnion::ALT_ul__dummy:
  if (field_msg__type != RlcmacUlCtrlMsgType::PACKET__UL__DUMMY__CTRL) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  RlcmacUlCtrlMsgType new_val(RlcmacUlCtrlMsgType::PACKET__UL__DUMMY__CTRL);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(RlcmacUlCtrlMsg_msg__type_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case RlcmacUlCtrlUnion::ALT_meas__report:
  if (field_msg__type != RlcmacUlCtrlMsgType::PACKET__MEASUREMENT__REPORT) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  RlcmacUlCtrlMsgType new_val(RlcmacUlCtrlMsgType::PACKET__MEASUREMENT__REPORT);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(RlcmacUlCtrlMsg_msg__type_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case RlcmacUlCtrlUnion::ALT_resource__req:
  if (field_msg__type != RlcmacUlCtrlMsgType::PACKET__RESOURCE__REQUEST) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  RlcmacUlCtrlMsgType new_val(RlcmacUlCtrlMsgType::PACKET__RESOURCE__REQUEST);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(RlcmacUlCtrlMsg_msg__type_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  case RlcmacUlCtrlUnion::ALT_cell__chg__notif:
  if (field_msg__type != RlcmacUlCtrlMsgType::PACKET__CELL__CHANGE__NOTIFICATION) {
  RAW_enc_tr_pos pr_pos;
  pr_pos.level = myleaf.curr_pos.level + 1;
  int new_pos[] = { 0 };
  pr_pos.pos = init_new_tree_pos(myleaf.curr_pos, 1, new_pos);
  RlcmacUlCtrlMsgType new_val(RlcmacUlCtrlMsgType::PACKET__CELL__CHANGE__NOTIFICATION);
  RAW_enc_tree* temp_leaf = myleaf.get_node(pr_pos);
  if (temp_leaf != NULL)
    new_val.RAW_encode(RlcmacUlCtrlMsg_msg__type_descr_,*temp_leaf);
  else
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  free_tree_pos(pr_pos.pos);
  }
  break;
  default:;
  }
  return myleaf.length = encoded_length;
}

struct RlcmacUlCtrlMsg_template::single_value_struct {
RlcmacUlCtrlMsgType_template field_msg__type;
RlcmacUlCtrlUnion_template field_u;
};

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

void RlcmacUlCtrlMsg_template::copy_value(const RlcmacUlCtrlMsg& other_value)
{
single_value = new single_value_struct;
if (other_value.msg__type().is_bound()) {
  single_value->field_msg__type = other_value.msg__type();
} else {
  single_value->field_msg__type.clean_up();
}
if (other_value.u().is_bound()) {
  single_value->field_u = other_value.u();
} else {
  single_value->field_u.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void RlcmacUlCtrlMsg_template::copy_template(const RlcmacUlCtrlMsg_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.msg__type().get_selection()) {
single_value->field_msg__type = other_value.msg__type();
} else {
single_value->field_msg__type.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.u().get_selection()) {
single_value->field_u = other_value.u();
} else {
single_value->field_u.clean_up();
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
value_list.n_values = other_value.value_list.n_values;
value_list.list_value = new RlcmacUlCtrlMsg_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 RlcmacUlCtrlMsg_template(*other_value.implication_.precondition);
implication_.implied_template = new RlcmacUlCtrlMsg_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 @RLCMAC_CSN1_Types.RlcmacUlCtrlMsg.");
break;
}
set_selection(other_value);
}

RlcmacUlCtrlMsg_template::RlcmacUlCtrlMsg_template()
{
}

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

RlcmacUlCtrlMsg_template::RlcmacUlCtrlMsg_template(const RlcmacUlCtrlMsg& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

RlcmacUlCtrlMsg RlcmacUlCtrlMsg_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 @RLCMAC_CSN1_Types.RlcmacUlCtrlMsg.");
RlcmacUlCtrlMsg ret_val;
if (single_value->field_msg__type.is_bound()) {
ret_val.msg__type() = single_value->field_msg__type.valueof();
}
if (single_value->field_u.is_bound()) {
ret_val.u() = single_value->field_u.valueof();
}
return ret_val;
}

void RlcmacUlCtrlMsg_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 @RLCMAC_CSN1_Types.RlcmacUlCtrlMsg.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new RlcmacUlCtrlMsg_template[list_length];
}

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

RlcmacUlCtrlMsgType_template& RlcmacUlCtrlMsg_template::msg__type()
{
set_specific();
return single_value->field_msg__type;
}

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

RlcmacUlCtrlUnion_template& RlcmacUlCtrlMsg_template::u()
{
set_specific();
return single_value->field_u;
}

const RlcmacUlCtrlUnion_template& RlcmacUlCtrlMsg_template::u() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field u of a non-specific template of type @RLCMAC_CSN1_Types.RlcmacUlCtrlMsg.");
return single_value->field_u;
}

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

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

void RlcmacUlCtrlMsg_template::log_match(const RlcmacUlCtrlMsg& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
if(match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
} else{
if (template_selection == SPECIFIC_VALUE) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
if(!single_value->field_msg__type.match(match_value.msg__type(), legacy)){
TTCN_Logger::log_logmatch_info(".msg_type");
single_value->field_msg__type.log_match(match_value.msg__type(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_u.match(match_value.u(), legacy)){
TTCN_Logger::log_logmatch_info(".u");
single_value->field_u.log_match(match_value.u(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ msg_type := ");
single_value->field_msg__type.log_match(match_value.msg__type(), legacy);
TTCN_Logger::log_event_str(", u := ");
single_value->field_u.log_match(match_value.u(), legacy);
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void RlcmacUlCtrlMsg_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (msg__type().is_bound()) msg__type().set_implicit_omit();
if (u().is_bound()) u().set_implicit_omit();
}

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

void RlcmacUlCtrlMsg_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
single_value->field_msg__type.decode_text(text_buf);
single_value->field_u.decode_text(text_buf);
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new RlcmacUlCtrlMsg_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 @RLCMAC_CSN1_Types.RlcmacUlCtrlMsg.");
}
}

void RlcmacUlCtrlMsg_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: {
    RlcmacUlCtrlMsg_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 @RLCMAC_CSN1_Types.RlcmacUlCtrlMsg 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) msg__type().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) u().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(), "msg_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          msg__type().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "u")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          u().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) if (!value_used[val_idx]) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      curr_param->error("Non existent field name in type @RLCMAC_CSN1_Types.RlcmacUlCtrlMsg: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    RlcmacUlCtrlMsg_template* precondition = new RlcmacUlCtrlMsg_template;
    precondition->set_param(*param.get_elem(0));
    RlcmacUlCtrlMsg_template* implied_template = new RlcmacUlCtrlMsg_template;
    implied_template->set_param(*param.get_elem(1));
    *this = RlcmacUlCtrlMsg_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@RLCMAC_CSN1_Types.RlcmacUlCtrlMsg");
  }
  is_ifpresent = param.get_ifpresent();
}

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

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

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

GprsPowerControlParameters::GprsPowerControlParameters()
{
}

GprsPowerControlParameters::GprsPowerControlParameters(const INTEGER& par_alpha,
    const BITSTRING& par_t__avg__w,
    const BITSTRING& par_t__avg__t,
    const BITSTRING& par_pc__meas__chan,
    const BITSTRING& par_n__avg__i)
  :   field_alpha(par_alpha),
  field_t__avg__w(par_t__avg__w),
  field_t__avg__t(par_t__avg__t),
  field_pc__meas__chan(par_pc__meas__chan),
  field_n__avg__i(par_n__avg__i)
{
}

GprsPowerControlParameters::GprsPowerControlParameters(const GprsPowerControlParameters& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RLCMAC_CSN1_Types.GprsPowerControlParameters.");
if (other_value.alpha().is_bound()) field_alpha = other_value.alpha();
else field_alpha.clean_up();
if (other_value.t__avg__w().is_bound()) field_t__avg__w = other_value.t__avg__w();
else field_t__avg__w.clean_up();
if (other_value.t__avg__t().is_bound()) field_t__avg__t = other_value.t__avg__t();
else field_t__avg__t.clean_up();
if (other_value.pc__meas__chan().is_bound()) field_pc__meas__chan = other_value.pc__meas__chan();
else field_pc__meas__chan.clean_up();
if (other_value.n__avg__i().is_bound()) field_n__avg__i = other_value.n__avg__i();
else field_n__avg__i.clean_up();
}

void GprsPowerControlParameters::clean_up()
{
field_alpha.clean_up();
field_t__avg__w.clean_up();
field_t__avg__t.clean_up();
field_pc__meas__chan.clean_up();
field_n__avg__i.clean_up();
}

const TTCN_Typedescriptor_t* GprsPowerControlParameters::get_descriptor() const { return &GprsPowerControlParameters_descr_; }
GprsPowerControlParameters& GprsPowerControlParameters::operator=(const GprsPowerControlParameters& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RLCMAC_CSN1_Types.GprsPowerControlParameters.");
  if (other_value.alpha().is_bound()) field_alpha = other_value.alpha();
  else field_alpha.clean_up();
  if (other_value.t__avg__w().is_bound()) field_t__avg__w = other_value.t__avg__w();
  else field_t__avg__w.clean_up();
  if (other_value.t__avg__t().is_bound()) field_t__avg__t = other_value.t__avg__t();
  else field_t__avg__t.clean_up();
  if (other_value.pc__meas__chan().is_bound()) field_pc__meas__chan = other_value.pc__meas__chan();
  else field_pc__meas__chan.clean_up();
  if (other_value.n__avg__i().is_bound()) field_n__avg__i = other_value.n__avg__i();
  else field_n__avg__i.clean_up();
}
return *this;
}

boolean GprsPowerControlParameters::operator==(const GprsPowerControlParameters& other_value) const
{
return field_alpha==other_value.field_alpha
  && field_t__avg__w==other_value.field_t__avg__w
  && field_t__avg__t==other_value.field_t__avg__t
  && field_pc__meas__chan==other_value.field_pc__meas__chan
  && field_n__avg__i==other_value.field_n__avg__i;
}

boolean GprsPowerControlParameters::is_bound() const
{
return (field_alpha.is_bound())
  || (field_t__avg__w.is_bound())
  || (field_t__avg__t.is_bound())
  || (field_pc__meas__chan.is_bound())
  || (field_n__avg__i.is_bound());
}
boolean GprsPowerControlParameters::is_value() const
{
return field_alpha.is_value()
  && field_t__avg__w.is_value()
  && field_t__avg__t.is_value()
  && field_pc__meas__chan.is_value()
  && field_n__avg__i.is_value();
}
void GprsPowerControlParameters::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ alpha := ");
field_alpha.log();
TTCN_Logger::log_event_str(", t_avg_w := ");
field_t__avg__w.log();
TTCN_Logger::log_event_str(", t_avg_t := ");
field_t__avg__t.log();
TTCN_Logger::log_event_str(", pc_meas_chan := ");
field_pc__meas__chan.log();
TTCN_Logger::log_event_str(", n_avg_i := ");
field_n__avg__i.log();
TTCN_Logger::log_event_str(" }");
}

void GprsPowerControlParameters::set_implicit_omit()
{
if (alpha().is_bound()) alpha().set_implicit_omit();
if (t__avg__w().is_bound()) t__avg__w().set_implicit_omit();
if (t__avg__t().is_bound()) t__avg__t().set_implicit_omit();
if (pc__meas__chan().is_bound()) pc__meas__chan().set_implicit_omit();
if (n__avg__i().is_bound()) n__avg__i().set_implicit_omit();
}

void GprsPowerControlParameters::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (5<param.get_size()) {
      param.error("record value of type @RLCMAC_CSN1_Types.GprsPowerControlParameters has 5 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) alpha().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) t__avg__w().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) t__avg__t().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) pc__meas__chan().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) n__avg__i().set_param(*param.get_elem(4));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "alpha")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          alpha().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(), "t_avg_w")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t__avg__w().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(), "t_avg_t")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t__avg__t().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(), "pc_meas_chan")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pc__meas__chan().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(), "n_avg_i")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          n__avg__i().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 @RLCMAC_CSN1_Types.GprsPowerControlParameters: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@RLCMAC_CSN1_Types.GprsPowerControlParameters");
  }
}

void GprsPowerControlParameters::encode_text(Text_Buf& text_buf) const
{
field_alpha.encode_text(text_buf);
field_t__avg__w.encode_text(text_buf);
field_t__avg__t.encode_text(text_buf);
field_pc__meas__chan.encode_text(text_buf);
field_n__avg__i.encode_text(text_buf);
}

void GprsPowerControlParameters::decode_text(Text_Buf& text_buf)
{
field_alpha.decode_text(text_buf);
field_t__avg__w.decode_text(text_buf);
field_t__avg__t.decode_text(text_buf);
field_pc__meas__chan.decode_text(text_buf);
field_n__avg__i.decode_text(text_buf);
}

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

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

int GprsPowerControlParameters::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, GprsPowerControlParameters_alpha_descr_.raw->forceomit);
  decoded_field_length = field_alpha.RAW_decode(GprsPowerControlParameters_alpha_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, GprsPowerControlParameters_t__avg__w_descr_.raw->forceomit);
  decoded_field_length = field_t__avg__w.RAW_decode(GprsPowerControlParameters_t__avg__w_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, GprsPowerControlParameters_t__avg__t_descr_.raw->forceomit);
  decoded_field_length = field_t__avg__t.RAW_decode(GprsPowerControlParameters_t__avg__t_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, GprsPowerControlParameters_pc__meas__chan_descr_.raw->forceomit);
  decoded_field_length = field_pc__meas__chan.RAW_decode(GprsPowerControlParameters_pc__meas__chan_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_4_force_omit(4, force_omit, GprsPowerControlParameters_n__avg__i_descr_.raw->forceomit);
  decoded_field_length = field_n__avg__i.RAW_decode(GprsPowerControlParameters_n__avg__i_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int GprsPowerControlParameters::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 5;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(5);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, GprsPowerControlParameters_alpha_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, GprsPowerControlParameters_t__avg__w_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, GprsPowerControlParameters_t__avg__t_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, GprsPowerControlParameters_pc__meas__chan_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, GprsPowerControlParameters_n__avg__i_descr_.raw);
  encoded_length += field_alpha.RAW_encode(GprsPowerControlParameters_alpha_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_t__avg__w.RAW_encode(GprsPowerControlParameters_t__avg__w_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_t__avg__t.RAW_encode(GprsPowerControlParameters_t__avg__t_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_pc__meas__chan.RAW_encode(GprsPowerControlParameters_pc__meas__chan_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_n__avg__i.RAW_encode(GprsPowerControlParameters_n__avg__i_descr_, *myleaf.body.node.nodes[4]);
  return myleaf.length = encoded_length;
}

struct GprsPowerControlParameters_template::single_value_struct {
INTEGER_template field_alpha;
BITSTRING_template field_t__avg__w;
BITSTRING_template field_t__avg__t;
BITSTRING_template field_pc__meas__chan;
BITSTRING_template field_n__avg__i;
};

void GprsPowerControlParameters_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_alpha = ANY_VALUE;
single_value->field_t__avg__w = ANY_VALUE;
single_value->field_t__avg__t = ANY_VALUE;
single_value->field_pc__meas__chan = ANY_VALUE;
single_value->field_n__avg__i = ANY_VALUE;
}
}
}

void GprsPowerControlParameters_template::copy_value(const GprsPowerControlParameters& other_value)
{
single_value = new single_value_struct;
if (other_value.alpha().is_bound()) {
  single_value->field_alpha = other_value.alpha();
} else {
  single_value->field_alpha.clean_up();
}
if (other_value.t__avg__w().is_bound()) {
  single_value->field_t__avg__w = other_value.t__avg__w();
} else {
  single_value->field_t__avg__w.clean_up();
}
if (other_value.t__avg__t().is_bound()) {
  single_value->field_t__avg__t = other_value.t__avg__t();
} else {
  single_value->field_t__avg__t.clean_up();
}
if (other_value.pc__meas__chan().is_bound()) {
  single_value->field_pc__meas__chan = other_value.pc__meas__chan();
} else {
  single_value->field_pc__meas__chan.clean_up();
}
if (other_value.n__avg__i().is_bound()) {
  single_value->field_n__avg__i = other_value.n__avg__i();
} else {
  single_value->field_n__avg__i.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void GprsPowerControlParameters_template::copy_template(const GprsPowerControlParameters_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.alpha().get_selection()) {
single_value->field_alpha = other_value.alpha();
} else {
single_value->field_alpha.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.t__avg__w().get_selection()) {
single_value->field_t__avg__w = other_value.t__avg__w();
} else {
single_value->field_t__avg__w.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.t__avg__t().get_selection()) {
single_value->field_t__avg__t = other_value.t__avg__t();
} else {
single_value->field_t__avg__t.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.pc__meas__chan().get_selection()) {
single_value->field_pc__meas__chan = other_value.pc__meas__chan();
} else {
single_value->field_pc__meas__chan.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.n__avg__i().get_selection()) {
single_value->field_n__avg__i = other_value.n__avg__i();
} else {
single_value->field_n__avg__i.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 GprsPowerControlParameters_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 GprsPowerControlParameters_template(*other_value.implication_.precondition);
implication_.implied_template = new GprsPowerControlParameters_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 @RLCMAC_CSN1_Types.GprsPowerControlParameters.");
break;
}
set_selection(other_value);
}

GprsPowerControlParameters_template::GprsPowerControlParameters_template()
{
}

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

GprsPowerControlParameters_template::GprsPowerControlParameters_template(const GprsPowerControlParameters& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean GprsPowerControlParameters_template::match(const GprsPowerControlParameters& 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.alpha().is_bound()) return FALSE;
if(!single_value->field_alpha.match(other_value.alpha(), legacy))return FALSE;
if(!other_value.t__avg__w().is_bound()) return FALSE;
if(!single_value->field_t__avg__w.match(other_value.t__avg__w(), legacy))return FALSE;
if(!other_value.t__avg__t().is_bound()) return FALSE;
if(!single_value->field_t__avg__t.match(other_value.t__avg__t(), legacy))return FALSE;
if(!other_value.pc__meas__chan().is_bound()) return FALSE;
if(!single_value->field_pc__meas__chan.match(other_value.pc__meas__chan(), legacy))return FALSE;
if(!other_value.n__avg__i().is_bound()) return FALSE;
if(!single_value->field_n__avg__i.match(other_value.n__avg__i(), 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 @RLCMAC_CSN1_Types.GprsPowerControlParameters.");
}
return FALSE;
}

boolean GprsPowerControlParameters_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_alpha.is_bound()
 || single_value->field_t__avg__w.is_bound()
 || single_value->field_t__avg__t.is_bound()
 || single_value->field_pc__meas__chan.is_bound()
 || single_value->field_n__avg__i.is_bound();
}

boolean GprsPowerControlParameters_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_alpha.is_value()
 && single_value->field_t__avg__w.is_value()
 && single_value->field_t__avg__t.is_value()
 && single_value->field_pc__meas__chan.is_value()
 && single_value->field_n__avg__i.is_value();
}

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

GprsPowerControlParameters GprsPowerControlParameters_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 @RLCMAC_CSN1_Types.GprsPowerControlParameters.");
GprsPowerControlParameters ret_val;
if (single_value->field_alpha.is_bound()) {
ret_val.alpha() = single_value->field_alpha.valueof();
}
if (single_value->field_t__avg__w.is_bound()) {
ret_val.t__avg__w() = single_value->field_t__avg__w.valueof();
}
if (single_value->field_t__avg__t.is_bound()) {
ret_val.t__avg__t() = single_value->field_t__avg__t.valueof();
}
if (single_value->field_pc__meas__chan.is_bound()) {
ret_val.pc__meas__chan() = single_value->field_pc__meas__chan.valueof();
}
if (single_value->field_n__avg__i.is_bound()) {
ret_val.n__avg__i() = single_value->field_n__avg__i.valueof();
}
return ret_val;
}

void GprsPowerControlParameters_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 @RLCMAC_CSN1_Types.GprsPowerControlParameters.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new GprsPowerControlParameters_template[list_length];
}

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

INTEGER_template& GprsPowerControlParameters_template::alpha()
{
set_specific();
return single_value->field_alpha;
}

const INTEGER_template& GprsPowerControlParameters_template::alpha() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field alpha of a non-specific template of type @RLCMAC_CSN1_Types.GprsPowerControlParameters.");
return single_value->field_alpha;
}

BITSTRING_template& GprsPowerControlParameters_template::t__avg__w()
{
set_specific();
return single_value->field_t__avg__w;
}

const BITSTRING_template& GprsPowerControlParameters_template::t__avg__w() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field t_avg_w of a non-specific template of type @RLCMAC_CSN1_Types.GprsPowerControlParameters.");
return single_value->field_t__avg__w;
}

BITSTRING_template& GprsPowerControlParameters_template::t__avg__t()
{
set_specific();
return single_value->field_t__avg__t;
}

const BITSTRING_template& GprsPowerControlParameters_template::t__avg__t() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field t_avg_t of a non-specific template of type @RLCMAC_CSN1_Types.GprsPowerControlParameters.");
return single_value->field_t__avg__t;
}

BITSTRING_template& GprsPowerControlParameters_template::pc__meas__chan()
{
set_specific();
return single_value->field_pc__meas__chan;
}

const BITSTRING_template& GprsPowerControlParameters_template::pc__meas__chan() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pc_meas_chan of a non-specific template of type @RLCMAC_CSN1_Types.GprsPowerControlParameters.");
return single_value->field_pc__meas__chan;
}

BITSTRING_template& GprsPowerControlParameters_template::n__avg__i()
{
set_specific();
return single_value->field_n__avg__i;
}

const BITSTRING_template& GprsPowerControlParameters_template::n__avg__i() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field n_avg_i of a non-specific template of type @RLCMAC_CSN1_Types.GprsPowerControlParameters.");
return single_value->field_n__avg__i;
}

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

void GprsPowerControlParameters_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ alpha := ");
single_value->field_alpha.log();
TTCN_Logger::log_event_str(", t_avg_w := ");
single_value->field_t__avg__w.log();
TTCN_Logger::log_event_str(", t_avg_t := ");
single_value->field_t__avg__t.log();
TTCN_Logger::log_event_str(", pc_meas_chan := ");
single_value->field_pc__meas__chan.log();
TTCN_Logger::log_event_str(", n_avg_i := ");
single_value->field_n__avg__i.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 GprsPowerControlParameters_template::log_match(const GprsPowerControlParameters& 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_alpha.match(match_value.alpha(), legacy)){
TTCN_Logger::log_logmatch_info(".alpha");
single_value->field_alpha.log_match(match_value.alpha(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_t__avg__w.match(match_value.t__avg__w(), legacy)){
TTCN_Logger::log_logmatch_info(".t_avg_w");
single_value->field_t__avg__w.log_match(match_value.t__avg__w(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_t__avg__t.match(match_value.t__avg__t(), legacy)){
TTCN_Logger::log_logmatch_info(".t_avg_t");
single_value->field_t__avg__t.log_match(match_value.t__avg__t(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_pc__meas__chan.match(match_value.pc__meas__chan(), legacy)){
TTCN_Logger::log_logmatch_info(".pc_meas_chan");
single_value->field_pc__meas__chan.log_match(match_value.pc__meas__chan(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_n__avg__i.match(match_value.n__avg__i(), legacy)){
TTCN_Logger::log_logmatch_info(".n_avg_i");
single_value->field_n__avg__i.log_match(match_value.n__avg__i(), 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("{ alpha := ");
single_value->field_alpha.log_match(match_value.alpha(), legacy);
TTCN_Logger::log_event_str(", t_avg_w := ");
single_value->field_t__avg__w.log_match(match_value.t__avg__w(), legacy);
TTCN_Logger::log_event_str(", t_avg_t := ");
single_value->field_t__avg__t.log_match(match_value.t__avg__t(), legacy);
TTCN_Logger::log_event_str(", pc_meas_chan := ");
single_value->field_pc__meas__chan.log_match(match_value.pc__meas__chan(), legacy);
TTCN_Logger::log_event_str(", n_avg_i := ");
single_value->field_n__avg__i.log_match(match_value.n__avg__i(), 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 GprsPowerControlParameters_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (alpha().is_bound()) alpha().set_implicit_omit();
if (t__avg__w().is_bound()) t__avg__w().set_implicit_omit();
if (t__avg__t().is_bound()) t__avg__t().set_implicit_omit();
if (pc__meas__chan().is_bound()) pc__meas__chan().set_implicit_omit();
if (n__avg__i().is_bound()) n__avg__i().set_implicit_omit();
}

void GprsPowerControlParameters_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_alpha.encode_text(text_buf);
single_value->field_t__avg__w.encode_text(text_buf);
single_value->field_t__avg__t.encode_text(text_buf);
single_value->field_pc__meas__chan.encode_text(text_buf);
single_value->field_n__avg__i.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 @RLCMAC_CSN1_Types.GprsPowerControlParameters.");
}
}

void GprsPowerControlParameters_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_alpha.decode_text(text_buf);
single_value->field_t__avg__w.decode_text(text_buf);
single_value->field_t__avg__t.decode_text(text_buf);
single_value->field_pc__meas__chan.decode_text(text_buf);
single_value->field_n__avg__i.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 GprsPowerControlParameters_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 @RLCMAC_CSN1_Types.GprsPowerControlParameters.");
}
}

void GprsPowerControlParameters_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: {
    GprsPowerControlParameters_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (5<param.get_size()) {
      param.error("record template of type @RLCMAC_CSN1_Types.GprsPowerControlParameters has 5 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) alpha().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) t__avg__w().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) t__avg__t().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) pc__meas__chan().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) n__avg__i().set_param(*param.get_elem(4));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "alpha")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          alpha().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(), "t_avg_w")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t__avg__w().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(), "t_avg_t")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t__avg__t().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(), "pc_meas_chan")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pc__meas__chan().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(), "n_avg_i")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          n__avg__i().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 @RLCMAC_CSN1_Types.GprsPowerControlParameters: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    GprsPowerControlParameters_template* precondition = new GprsPowerControlParameters_template;
    precondition->set_param(*param.get_elem(0));
    GprsPowerControlParameters_template* implied_template = new GprsPowerControlParameters_template;
    implied_template->set_param(*param.get_elem(1));
    *this = GprsPowerControlParameters_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@RLCMAC_CSN1_Types.GprsPowerControlParameters");
  }
  is_ifpresent = param.get_ifpresent();
}

void GprsPowerControlParameters_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_alpha.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsPowerControlParameters");
single_value->field_t__avg__w.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsPowerControlParameters");
single_value->field_t__avg__t.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsPowerControlParameters");
single_value->field_pc__meas__chan.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsPowerControlParameters");
single_value->field_n__avg__i.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsPowerControlParameters");
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 : "@RLCMAC_CSN1_Types.GprsPowerControlParameters");
}

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

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

ExtensionInformation::ExtensionInformation()
{
}

ExtensionInformation::ExtensionInformation(const BITSTRING& par_egprs__supported,
    const OPTIONAL< BITSTRING >& par_egprs__pkt__channel__req,
    const OPTIONAL< BITSTRING >& par_bep__period,
    const BITSTRING& par_pfc__feature__mode,
    const BITSTRING& par_dtm__support,
    const BITSTRING& par_bss__paging__coordination,
    const OPTIONAL< BITSTRING >& par_ccn__active,
    const OPTIONAL< BITSTRING >& par_nw__ext__utbf)
  :   field_egprs__supported(par_egprs__supported),
  field_egprs__pkt__channel__req(par_egprs__pkt__channel__req),
  field_bep__period(par_bep__period),
  field_pfc__feature__mode(par_pfc__feature__mode),
  field_dtm__support(par_dtm__support),
  field_bss__paging__coordination(par_bss__paging__coordination),
  field_ccn__active(par_ccn__active),
  field_nw__ext__utbf(par_nw__ext__utbf)
{
}

ExtensionInformation::ExtensionInformation(const ExtensionInformation& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RLCMAC_CSN1_Types.ExtensionInformation.");
if (other_value.egprs__supported().is_bound()) field_egprs__supported = other_value.egprs__supported();
else field_egprs__supported.clean_up();
if (other_value.egprs__pkt__channel__req().is_bound()) field_egprs__pkt__channel__req = other_value.egprs__pkt__channel__req();
else field_egprs__pkt__channel__req.clean_up();
if (other_value.bep__period().is_bound()) field_bep__period = other_value.bep__period();
else field_bep__period.clean_up();
if (other_value.pfc__feature__mode().is_bound()) field_pfc__feature__mode = other_value.pfc__feature__mode();
else field_pfc__feature__mode.clean_up();
if (other_value.dtm__support().is_bound()) field_dtm__support = other_value.dtm__support();
else field_dtm__support.clean_up();
if (other_value.bss__paging__coordination().is_bound()) field_bss__paging__coordination = other_value.bss__paging__coordination();
else field_bss__paging__coordination.clean_up();
if (other_value.ccn__active().is_bound()) field_ccn__active = other_value.ccn__active();
else field_ccn__active.clean_up();
if (other_value.nw__ext__utbf().is_bound()) field_nw__ext__utbf = other_value.nw__ext__utbf();
else field_nw__ext__utbf.clean_up();
}

void ExtensionInformation::clean_up()
{
field_egprs__supported.clean_up();
field_egprs__pkt__channel__req.clean_up();
field_bep__period.clean_up();
field_pfc__feature__mode.clean_up();
field_dtm__support.clean_up();
field_bss__paging__coordination.clean_up();
field_ccn__active.clean_up();
field_nw__ext__utbf.clean_up();
}

const TTCN_Typedescriptor_t* ExtensionInformation::get_descriptor() const { return &ExtensionInformation_descr_; }
ExtensionInformation& ExtensionInformation::operator=(const ExtensionInformation& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RLCMAC_CSN1_Types.ExtensionInformation.");
  if (other_value.egprs__supported().is_bound()) field_egprs__supported = other_value.egprs__supported();
  else field_egprs__supported.clean_up();
  if (other_value.egprs__pkt__channel__req().is_bound()) field_egprs__pkt__channel__req = other_value.egprs__pkt__channel__req();
  else field_egprs__pkt__channel__req.clean_up();
  if (other_value.bep__period().is_bound()) field_bep__period = other_value.bep__period();
  else field_bep__period.clean_up();
  if (other_value.pfc__feature__mode().is_bound()) field_pfc__feature__mode = other_value.pfc__feature__mode();
  else field_pfc__feature__mode.clean_up();
  if (other_value.dtm__support().is_bound()) field_dtm__support = other_value.dtm__support();
  else field_dtm__support.clean_up();
  if (other_value.bss__paging__coordination().is_bound()) field_bss__paging__coordination = other_value.bss__paging__coordination();
  else field_bss__paging__coordination.clean_up();
  if (other_value.ccn__active().is_bound()) field_ccn__active = other_value.ccn__active();
  else field_ccn__active.clean_up();
  if (other_value.nw__ext__utbf().is_bound()) field_nw__ext__utbf = other_value.nw__ext__utbf();
  else field_nw__ext__utbf.clean_up();
}
return *this;
}

boolean ExtensionInformation::operator==(const ExtensionInformation& other_value) const
{
return field_egprs__supported==other_value.field_egprs__supported
  && field_egprs__pkt__channel__req==other_value.field_egprs__pkt__channel__req
  && field_bep__period==other_value.field_bep__period
  && field_pfc__feature__mode==other_value.field_pfc__feature__mode
  && field_dtm__support==other_value.field_dtm__support
  && field_bss__paging__coordination==other_value.field_bss__paging__coordination
  && field_ccn__active==other_value.field_ccn__active
  && field_nw__ext__utbf==other_value.field_nw__ext__utbf;
}

boolean ExtensionInformation::is_bound() const
{
return (field_egprs__supported.is_bound())
  || (OPTIONAL_OMIT == field_egprs__pkt__channel__req.get_selection() || field_egprs__pkt__channel__req.is_bound())
  || (OPTIONAL_OMIT == field_bep__period.get_selection() || field_bep__period.is_bound())
  || (field_pfc__feature__mode.is_bound())
  || (field_dtm__support.is_bound())
  || (field_bss__paging__coordination.is_bound())
  || (OPTIONAL_OMIT == field_ccn__active.get_selection() || field_ccn__active.is_bound())
  || (OPTIONAL_OMIT == field_nw__ext__utbf.get_selection() || field_nw__ext__utbf.is_bound());
}
boolean ExtensionInformation::is_value() const
{
return field_egprs__supported.is_value()
  && (OPTIONAL_OMIT == field_egprs__pkt__channel__req.get_selection() || field_egprs__pkt__channel__req.is_value())
  && (OPTIONAL_OMIT == field_bep__period.get_selection() || field_bep__period.is_value())
  && field_pfc__feature__mode.is_value()
  && field_dtm__support.is_value()
  && field_bss__paging__coordination.is_value()
  && (OPTIONAL_OMIT == field_ccn__active.get_selection() || field_ccn__active.is_value())
  && (OPTIONAL_OMIT == field_nw__ext__utbf.get_selection() || field_nw__ext__utbf.is_value());
}
int ExtensionInformation::size_of() const
{
  int ret_val = 4;
  if (field_egprs__pkt__channel__req.ispresent()) ret_val++;
  if (field_bep__period.ispresent()) ret_val++;
  if (field_ccn__active.ispresent()) ret_val++;
  if (field_nw__ext__utbf.ispresent()) ret_val++;
  return ret_val;
}

void ExtensionInformation::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ egprs_supported := ");
field_egprs__supported.log();
TTCN_Logger::log_event_str(", egprs_pkt_channel_req := ");
field_egprs__pkt__channel__req.log();
TTCN_Logger::log_event_str(", bep_period := ");
field_bep__period.log();
TTCN_Logger::log_event_str(", pfc_feature_mode := ");
field_pfc__feature__mode.log();
TTCN_Logger::log_event_str(", dtm_support := ");
field_dtm__support.log();
TTCN_Logger::log_event_str(", bss_paging_coordination := ");
field_bss__paging__coordination.log();
TTCN_Logger::log_event_str(", ccn_active := ");
field_ccn__active.log();
TTCN_Logger::log_event_str(", nw_ext_utbf := ");
field_nw__ext__utbf.log();
TTCN_Logger::log_event_str(" }");
}

void ExtensionInformation::set_implicit_omit()
{
if (egprs__supported().is_bound()) egprs__supported().set_implicit_omit();
if (!egprs__pkt__channel__req().is_bound()) egprs__pkt__channel__req() = OMIT_VALUE;
else egprs__pkt__channel__req().set_implicit_omit();
if (!bep__period().is_bound()) bep__period() = OMIT_VALUE;
else bep__period().set_implicit_omit();
if (pfc__feature__mode().is_bound()) pfc__feature__mode().set_implicit_omit();
if (dtm__support().is_bound()) dtm__support().set_implicit_omit();
if (bss__paging__coordination().is_bound()) bss__paging__coordination().set_implicit_omit();
if (!ccn__active().is_bound()) ccn__active() = OMIT_VALUE;
else ccn__active().set_implicit_omit();
if (!nw__ext__utbf().is_bound()) nw__ext__utbf() = OMIT_VALUE;
else nw__ext__utbf().set_implicit_omit();
}

void ExtensionInformation::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 (8<param.get_size()) {
      param.error("record value of type @RLCMAC_CSN1_Types.ExtensionInformation has 8 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) egprs__supported().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) egprs__pkt__channel__req().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) bep__period().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) pfc__feature__mode().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) dtm__support().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) bss__paging__coordination().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) ccn__active().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) nw__ext__utbf().set_param(*param.get_elem(7));
    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(), "egprs_supported")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          egprs__supported().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(), "egprs_pkt_channel_req")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          egprs__pkt__channel__req().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(), "bep_period")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bep__period().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(), "pfc_feature_mode")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pfc__feature__mode().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(), "dtm_support")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          dtm__support().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(), "bss_paging_coordination")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bss__paging__coordination().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(), "ccn_active")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ccn__active().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(), "nw_ext_utbf")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nw__ext__utbf().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 @RLCMAC_CSN1_Types.ExtensionInformation: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@RLCMAC_CSN1_Types.ExtensionInformation");
  }
}

void ExtensionInformation::encode_text(Text_Buf& text_buf) const
{
field_egprs__supported.encode_text(text_buf);
field_egprs__pkt__channel__req.encode_text(text_buf);
field_bep__period.encode_text(text_buf);
field_pfc__feature__mode.encode_text(text_buf);
field_dtm__support.encode_text(text_buf);
field_bss__paging__coordination.encode_text(text_buf);
field_ccn__active.encode_text(text_buf);
field_nw__ext__utbf.encode_text(text_buf);
}

void ExtensionInformation::decode_text(Text_Buf& text_buf)
{
field_egprs__supported.decode_text(text_buf);
field_egprs__pkt__channel__req.decode_text(text_buf);
field_bep__period.decode_text(text_buf);
field_pfc__feature__mode.decode_text(text_buf);
field_dtm__support.decode_text(text_buf);
field_bss__paging__coordination.decode_text(text_buf);
field_ccn__active.decode_text(text_buf);
field_nw__ext__utbf.decode_text(text_buf);
}

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

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

int ExtensionInformation::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, ExtensionInformation_egprs__supported_descr_.raw->forceomit);
  decoded_field_length = field_egprs__supported.RAW_decode(ExtensionInformation_egprs__supported_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (limit > 0 && field_egprs__supported ==  bs_0){
  if (force_omit != NULL && (*force_omit)(1)) {
    field_egprs__pkt__channel__req = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_1_force_omit(1, force_omit, ExtensionInformation_egprs__pkt__channel__req_descr_.raw->forceomit);
  decoded_field_length = field_egprs__pkt__channel__req().RAW_decode(ExtensionInformation_egprs__pkt__channel__req_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 1) {
  field_egprs__pkt__channel__req = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_egprs__pkt__channel__req=OMIT_VALUE;
  if (limit > 0 && field_egprs__supported ==  bs_0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_bep__period = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, ExtensionInformation_bep__period_descr_.raw->forceomit);
  decoded_field_length = field_bep__period().RAW_decode(ExtensionInformation_bep__period_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_bep__period = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_bep__period=OMIT_VALUE;
  RAW_Force_Omit field_3_force_omit(3, force_omit, ExtensionInformation_pfc__feature__mode_descr_.raw->forceomit);
  decoded_field_length = field_pfc__feature__mode.RAW_decode(ExtensionInformation_pfc__feature__mode_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_4_force_omit(4, force_omit, ExtensionInformation_dtm__support_descr_.raw->forceomit);
  decoded_field_length = field_dtm__support.RAW_decode(ExtensionInformation_dtm__support_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_5_force_omit(5, force_omit, ExtensionInformation_bss__paging__coordination_descr_.raw->forceomit);
  decoded_field_length = field_bss__paging__coordination.RAW_decode(ExtensionInformation_bss__paging__coordination_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_ccn__active = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, ExtensionInformation_ccn__active_descr_.raw->forceomit);
  decoded_field_length = field_ccn__active().RAW_decode(ExtensionInformation_ccn__active_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_ccn__active = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_ccn__active=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(7)) {
    field_nw__ext__utbf = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_7_force_omit(7, force_omit, ExtensionInformation_nw__ext__utbf_descr_.raw->forceomit);
  decoded_field_length = field_nw__ext__utbf().RAW_decode(ExtensionInformation_nw__ext__utbf_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 1) {
  field_nw__ext__utbf = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_nw__ext__utbf=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int ExtensionInformation::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 8;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(8);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, ExtensionInformation_egprs__supported_descr_.raw);
  if (field_egprs__pkt__channel__req.ispresent()) {
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, ExtensionInformation_egprs__pkt__channel__req_descr_.raw);
  }
  else myleaf.body.node.nodes[1] = NULL;
  if (field_bep__period.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, ExtensionInformation_bep__period_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, ExtensionInformation_pfc__feature__mode_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, ExtensionInformation_dtm__support_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, ExtensionInformation_bss__paging__coordination_descr_.raw);
  if (field_ccn__active.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, ExtensionInformation_ccn__active_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  if (field_nw__ext__utbf.ispresent()) {
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, ExtensionInformation_nw__ext__utbf_descr_.raw);
  }
  else myleaf.body.node.nodes[7] = NULL;
  encoded_length += field_egprs__supported.RAW_encode(ExtensionInformation_egprs__supported_descr_, *myleaf.body.node.nodes[0]);
  if (field_egprs__pkt__channel__req.ispresent()) {
  encoded_length += field_egprs__pkt__channel__req().RAW_encode(ExtensionInformation_egprs__pkt__channel__req_descr_, *myleaf.body.node.nodes[1]);
  }
  if (field_bep__period.ispresent()) {
  encoded_length += field_bep__period().RAW_encode(ExtensionInformation_bep__period_descr_, *myleaf.body.node.nodes[2]);
  }
  encoded_length += field_pfc__feature__mode.RAW_encode(ExtensionInformation_pfc__feature__mode_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_dtm__support.RAW_encode(ExtensionInformation_dtm__support_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_bss__paging__coordination.RAW_encode(ExtensionInformation_bss__paging__coordination_descr_, *myleaf.body.node.nodes[5]);
  if (field_ccn__active.ispresent()) {
  encoded_length += field_ccn__active().RAW_encode(ExtensionInformation_ccn__active_descr_, *myleaf.body.node.nodes[6]);
  }
  if (field_nw__ext__utbf.ispresent()) {
  encoded_length += field_nw__ext__utbf().RAW_encode(ExtensionInformation_nw__ext__utbf_descr_, *myleaf.body.node.nodes[7]);
  }
  if (field_egprs__pkt__channel__req.ispresent() && (field_egprs__supported !=  bs_0)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_0.RAW_encode(ExtensionInformation_egprs__supported_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  if (field_bep__period.ispresent() && (field_egprs__supported !=  bs_0)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_0.RAW_encode(ExtensionInformation_egprs__supported_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  return myleaf.length = encoded_length;
}

struct ExtensionInformation_template::single_value_struct {
BITSTRING_template field_egprs__supported;
BITSTRING_template field_egprs__pkt__channel__req;
BITSTRING_template field_bep__period;
BITSTRING_template field_pfc__feature__mode;
BITSTRING_template field_dtm__support;
BITSTRING_template field_bss__paging__coordination;
BITSTRING_template field_ccn__active;
BITSTRING_template field_nw__ext__utbf;
};

void ExtensionInformation_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_egprs__supported = ANY_VALUE;
single_value->field_egprs__pkt__channel__req = ANY_OR_OMIT;
single_value->field_bep__period = ANY_OR_OMIT;
single_value->field_pfc__feature__mode = ANY_VALUE;
single_value->field_dtm__support = ANY_VALUE;
single_value->field_bss__paging__coordination = ANY_VALUE;
single_value->field_ccn__active = ANY_OR_OMIT;
single_value->field_nw__ext__utbf = ANY_OR_OMIT;
}
}
}

void ExtensionInformation_template::copy_value(const ExtensionInformation& other_value)
{
single_value = new single_value_struct;
if (other_value.egprs__supported().is_bound()) {
  single_value->field_egprs__supported = other_value.egprs__supported();
} else {
  single_value->field_egprs__supported.clean_up();
}
if (other_value.egprs__pkt__channel__req().is_bound()) {
  if (other_value.egprs__pkt__channel__req().ispresent()) single_value->field_egprs__pkt__channel__req = other_value.egprs__pkt__channel__req()();
  else single_value->field_egprs__pkt__channel__req = OMIT_VALUE;
} else {
  single_value->field_egprs__pkt__channel__req.clean_up();
}
if (other_value.bep__period().is_bound()) {
  if (other_value.bep__period().ispresent()) single_value->field_bep__period = other_value.bep__period()();
  else single_value->field_bep__period = OMIT_VALUE;
} else {
  single_value->field_bep__period.clean_up();
}
if (other_value.pfc__feature__mode().is_bound()) {
  single_value->field_pfc__feature__mode = other_value.pfc__feature__mode();
} else {
  single_value->field_pfc__feature__mode.clean_up();
}
if (other_value.dtm__support().is_bound()) {
  single_value->field_dtm__support = other_value.dtm__support();
} else {
  single_value->field_dtm__support.clean_up();
}
if (other_value.bss__paging__coordination().is_bound()) {
  single_value->field_bss__paging__coordination = other_value.bss__paging__coordination();
} else {
  single_value->field_bss__paging__coordination.clean_up();
}
if (other_value.ccn__active().is_bound()) {
  if (other_value.ccn__active().ispresent()) single_value->field_ccn__active = other_value.ccn__active()();
  else single_value->field_ccn__active = OMIT_VALUE;
} else {
  single_value->field_ccn__active.clean_up();
}
if (other_value.nw__ext__utbf().is_bound()) {
  if (other_value.nw__ext__utbf().ispresent()) single_value->field_nw__ext__utbf = other_value.nw__ext__utbf()();
  else single_value->field_nw__ext__utbf = OMIT_VALUE;
} else {
  single_value->field_nw__ext__utbf.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void ExtensionInformation_template::copy_template(const ExtensionInformation_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.egprs__supported().get_selection()) {
single_value->field_egprs__supported = other_value.egprs__supported();
} else {
single_value->field_egprs__supported.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.egprs__pkt__channel__req().get_selection()) {
single_value->field_egprs__pkt__channel__req = other_value.egprs__pkt__channel__req();
} else {
single_value->field_egprs__pkt__channel__req.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.bep__period().get_selection()) {
single_value->field_bep__period = other_value.bep__period();
} else {
single_value->field_bep__period.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.pfc__feature__mode().get_selection()) {
single_value->field_pfc__feature__mode = other_value.pfc__feature__mode();
} else {
single_value->field_pfc__feature__mode.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.dtm__support().get_selection()) {
single_value->field_dtm__support = other_value.dtm__support();
} else {
single_value->field_dtm__support.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.bss__paging__coordination().get_selection()) {
single_value->field_bss__paging__coordination = other_value.bss__paging__coordination();
} else {
single_value->field_bss__paging__coordination.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ccn__active().get_selection()) {
single_value->field_ccn__active = other_value.ccn__active();
} else {
single_value->field_ccn__active.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nw__ext__utbf().get_selection()) {
single_value->field_nw__ext__utbf = other_value.nw__ext__utbf();
} else {
single_value->field_nw__ext__utbf.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 ExtensionInformation_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 ExtensionInformation_template(*other_value.implication_.precondition);
implication_.implied_template = new ExtensionInformation_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 @RLCMAC_CSN1_Types.ExtensionInformation.");
break;
}
set_selection(other_value);
}

ExtensionInformation_template::ExtensionInformation_template()
{
}

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

ExtensionInformation_template::ExtensionInformation_template(const ExtensionInformation& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean ExtensionInformation_template::match(const ExtensionInformation& 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.egprs__supported().is_bound()) return FALSE;
if(!single_value->field_egprs__supported.match(other_value.egprs__supported(), legacy))return FALSE;
if(!other_value.egprs__pkt__channel__req().is_bound()) return FALSE;
if((other_value.egprs__pkt__channel__req().ispresent() ? !single_value->field_egprs__pkt__channel__req.match((const BITSTRING&)other_value.egprs__pkt__channel__req(), legacy) : !single_value->field_egprs__pkt__channel__req.match_omit(legacy)))return FALSE;
if(!other_value.bep__period().is_bound()) return FALSE;
if((other_value.bep__period().ispresent() ? !single_value->field_bep__period.match((const BITSTRING&)other_value.bep__period(), legacy) : !single_value->field_bep__period.match_omit(legacy)))return FALSE;
if(!other_value.pfc__feature__mode().is_bound()) return FALSE;
if(!single_value->field_pfc__feature__mode.match(other_value.pfc__feature__mode(), legacy))return FALSE;
if(!other_value.dtm__support().is_bound()) return FALSE;
if(!single_value->field_dtm__support.match(other_value.dtm__support(), legacy))return FALSE;
if(!other_value.bss__paging__coordination().is_bound()) return FALSE;
if(!single_value->field_bss__paging__coordination.match(other_value.bss__paging__coordination(), legacy))return FALSE;
if(!other_value.ccn__active().is_bound()) return FALSE;
if((other_value.ccn__active().ispresent() ? !single_value->field_ccn__active.match((const BITSTRING&)other_value.ccn__active(), legacy) : !single_value->field_ccn__active.match_omit(legacy)))return FALSE;
if(!other_value.nw__ext__utbf().is_bound()) return FALSE;
if((other_value.nw__ext__utbf().ispresent() ? !single_value->field_nw__ext__utbf.match((const BITSTRING&)other_value.nw__ext__utbf(), legacy) : !single_value->field_nw__ext__utbf.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @RLCMAC_CSN1_Types.ExtensionInformation.");
}
return FALSE;
}

boolean ExtensionInformation_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_egprs__supported.is_bound()
 || (single_value->field_egprs__pkt__channel__req.is_omit() || single_value->field_egprs__pkt__channel__req.is_bound())
 || (single_value->field_bep__period.is_omit() || single_value->field_bep__period.is_bound())
 || single_value->field_pfc__feature__mode.is_bound()
 || single_value->field_dtm__support.is_bound()
 || single_value->field_bss__paging__coordination.is_bound()
 || (single_value->field_ccn__active.is_omit() || single_value->field_ccn__active.is_bound())
 || (single_value->field_nw__ext__utbf.is_omit() || single_value->field_nw__ext__utbf.is_bound());
}

boolean ExtensionInformation_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_egprs__supported.is_value()
 && (single_value->field_egprs__pkt__channel__req.is_omit() || single_value->field_egprs__pkt__channel__req.is_value())
 && (single_value->field_bep__period.is_omit() || single_value->field_bep__period.is_value())
 && single_value->field_pfc__feature__mode.is_value()
 && single_value->field_dtm__support.is_value()
 && single_value->field_bss__paging__coordination.is_value()
 && (single_value->field_ccn__active.is_omit() || single_value->field_ccn__active.is_value())
 && (single_value->field_nw__ext__utbf.is_omit() || single_value->field_nw__ext__utbf.is_value());
}

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

ExtensionInformation ExtensionInformation_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 @RLCMAC_CSN1_Types.ExtensionInformation.");
ExtensionInformation ret_val;
if (single_value->field_egprs__supported.is_bound()) {
ret_val.egprs__supported() = single_value->field_egprs__supported.valueof();
}
if (single_value->field_egprs__pkt__channel__req.is_omit()) ret_val.egprs__pkt__channel__req() = OMIT_VALUE;
else if (single_value->field_egprs__pkt__channel__req.is_bound()) {
ret_val.egprs__pkt__channel__req() = single_value->field_egprs__pkt__channel__req.valueof();
}
if (single_value->field_bep__period.is_omit()) ret_val.bep__period() = OMIT_VALUE;
else if (single_value->field_bep__period.is_bound()) {
ret_val.bep__period() = single_value->field_bep__period.valueof();
}
if (single_value->field_pfc__feature__mode.is_bound()) {
ret_val.pfc__feature__mode() = single_value->field_pfc__feature__mode.valueof();
}
if (single_value->field_dtm__support.is_bound()) {
ret_val.dtm__support() = single_value->field_dtm__support.valueof();
}
if (single_value->field_bss__paging__coordination.is_bound()) {
ret_val.bss__paging__coordination() = single_value->field_bss__paging__coordination.valueof();
}
if (single_value->field_ccn__active.is_omit()) ret_val.ccn__active() = OMIT_VALUE;
else if (single_value->field_ccn__active.is_bound()) {
ret_val.ccn__active() = single_value->field_ccn__active.valueof();
}
if (single_value->field_nw__ext__utbf.is_omit()) ret_val.nw__ext__utbf() = OMIT_VALUE;
else if (single_value->field_nw__ext__utbf.is_bound()) {
ret_val.nw__ext__utbf() = single_value->field_nw__ext__utbf.valueof();
}
return ret_val;
}

void ExtensionInformation_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 @RLCMAC_CSN1_Types.ExtensionInformation.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new ExtensionInformation_template[list_length];
}

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

BITSTRING_template& ExtensionInformation_template::egprs__supported()
{
set_specific();
return single_value->field_egprs__supported;
}

const BITSTRING_template& ExtensionInformation_template::egprs__supported() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field egprs_supported of a non-specific template of type @RLCMAC_CSN1_Types.ExtensionInformation.");
return single_value->field_egprs__supported;
}

BITSTRING_template& ExtensionInformation_template::egprs__pkt__channel__req()
{
set_specific();
return single_value->field_egprs__pkt__channel__req;
}

const BITSTRING_template& ExtensionInformation_template::egprs__pkt__channel__req() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field egprs_pkt_channel_req of a non-specific template of type @RLCMAC_CSN1_Types.ExtensionInformation.");
return single_value->field_egprs__pkt__channel__req;
}

BITSTRING_template& ExtensionInformation_template::bep__period()
{
set_specific();
return single_value->field_bep__period;
}

const BITSTRING_template& ExtensionInformation_template::bep__period() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field bep_period of a non-specific template of type @RLCMAC_CSN1_Types.ExtensionInformation.");
return single_value->field_bep__period;
}

BITSTRING_template& ExtensionInformation_template::pfc__feature__mode()
{
set_specific();
return single_value->field_pfc__feature__mode;
}

const BITSTRING_template& ExtensionInformation_template::pfc__feature__mode() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pfc_feature_mode of a non-specific template of type @RLCMAC_CSN1_Types.ExtensionInformation.");
return single_value->field_pfc__feature__mode;
}

BITSTRING_template& ExtensionInformation_template::dtm__support()
{
set_specific();
return single_value->field_dtm__support;
}

const BITSTRING_template& ExtensionInformation_template::dtm__support() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field dtm_support of a non-specific template of type @RLCMAC_CSN1_Types.ExtensionInformation.");
return single_value->field_dtm__support;
}

BITSTRING_template& ExtensionInformation_template::bss__paging__coordination()
{
set_specific();
return single_value->field_bss__paging__coordination;
}

const BITSTRING_template& ExtensionInformation_template::bss__paging__coordination() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field bss_paging_coordination of a non-specific template of type @RLCMAC_CSN1_Types.ExtensionInformation.");
return single_value->field_bss__paging__coordination;
}

BITSTRING_template& ExtensionInformation_template::ccn__active()
{
set_specific();
return single_value->field_ccn__active;
}

const BITSTRING_template& ExtensionInformation_template::ccn__active() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ccn_active of a non-specific template of type @RLCMAC_CSN1_Types.ExtensionInformation.");
return single_value->field_ccn__active;
}

BITSTRING_template& ExtensionInformation_template::nw__ext__utbf()
{
set_specific();
return single_value->field_nw__ext__utbf;
}

const BITSTRING_template& ExtensionInformation_template::nw__ext__utbf() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nw_ext_utbf of a non-specific template of type @RLCMAC_CSN1_Types.ExtensionInformation.");
return single_value->field_nw__ext__utbf;
}

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

void ExtensionInformation_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ egprs_supported := ");
single_value->field_egprs__supported.log();
TTCN_Logger::log_event_str(", egprs_pkt_channel_req := ");
single_value->field_egprs__pkt__channel__req.log();
TTCN_Logger::log_event_str(", bep_period := ");
single_value->field_bep__period.log();
TTCN_Logger::log_event_str(", pfc_feature_mode := ");
single_value->field_pfc__feature__mode.log();
TTCN_Logger::log_event_str(", dtm_support := ");
single_value->field_dtm__support.log();
TTCN_Logger::log_event_str(", bss_paging_coordination := ");
single_value->field_bss__paging__coordination.log();
TTCN_Logger::log_event_str(", ccn_active := ");
single_value->field_ccn__active.log();
TTCN_Logger::log_event_str(", nw_ext_utbf := ");
single_value->field_nw__ext__utbf.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 ExtensionInformation_template::log_match(const ExtensionInformation& 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_egprs__supported.match(match_value.egprs__supported(), legacy)){
TTCN_Logger::log_logmatch_info(".egprs_supported");
single_value->field_egprs__supported.log_match(match_value.egprs__supported(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.egprs__pkt__channel__req().ispresent()){
if(!single_value->field_egprs__pkt__channel__req.match(match_value.egprs__pkt__channel__req(), legacy)){
TTCN_Logger::log_logmatch_info(".egprs_pkt_channel_req");
single_value->field_egprs__pkt__channel__req.log_match(match_value.egprs__pkt__channel__req(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_egprs__pkt__channel__req.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".egprs_pkt_channel_req := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_egprs__pkt__channel__req.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.bep__period().ispresent()){
if(!single_value->field_bep__period.match(match_value.bep__period(), legacy)){
TTCN_Logger::log_logmatch_info(".bep_period");
single_value->field_bep__period.log_match(match_value.bep__period(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_bep__period.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".bep_period := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_bep__period.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_pfc__feature__mode.match(match_value.pfc__feature__mode(), legacy)){
TTCN_Logger::log_logmatch_info(".pfc_feature_mode");
single_value->field_pfc__feature__mode.log_match(match_value.pfc__feature__mode(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_dtm__support.match(match_value.dtm__support(), legacy)){
TTCN_Logger::log_logmatch_info(".dtm_support");
single_value->field_dtm__support.log_match(match_value.dtm__support(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_bss__paging__coordination.match(match_value.bss__paging__coordination(), legacy)){
TTCN_Logger::log_logmatch_info(".bss_paging_coordination");
single_value->field_bss__paging__coordination.log_match(match_value.bss__paging__coordination(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.ccn__active().ispresent()){
if(!single_value->field_ccn__active.match(match_value.ccn__active(), legacy)){
TTCN_Logger::log_logmatch_info(".ccn_active");
single_value->field_ccn__active.log_match(match_value.ccn__active(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_ccn__active.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".ccn_active := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_ccn__active.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nw__ext__utbf().ispresent()){
if(!single_value->field_nw__ext__utbf.match(match_value.nw__ext__utbf(), legacy)){
TTCN_Logger::log_logmatch_info(".nw_ext_utbf");
single_value->field_nw__ext__utbf.log_match(match_value.nw__ext__utbf(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nw__ext__utbf.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nw_ext_utbf := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nw__ext__utbf.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ egprs_supported := ");
single_value->field_egprs__supported.log_match(match_value.egprs__supported(), legacy);
TTCN_Logger::log_event_str(", egprs_pkt_channel_req := ");
if (match_value.egprs__pkt__channel__req().ispresent()) {
single_value->field_egprs__pkt__channel__req.log_match(match_value.egprs__pkt__channel__req(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_egprs__pkt__channel__req.log();
if (single_value->field_egprs__pkt__channel__req.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", bep_period := ");
if (match_value.bep__period().ispresent()) {
single_value->field_bep__period.log_match(match_value.bep__period(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_bep__period.log();
if (single_value->field_bep__period.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", pfc_feature_mode := ");
single_value->field_pfc__feature__mode.log_match(match_value.pfc__feature__mode(), legacy);
TTCN_Logger::log_event_str(", dtm_support := ");
single_value->field_dtm__support.log_match(match_value.dtm__support(), legacy);
TTCN_Logger::log_event_str(", bss_paging_coordination := ");
single_value->field_bss__paging__coordination.log_match(match_value.bss__paging__coordination(), legacy);
TTCN_Logger::log_event_str(", ccn_active := ");
if (match_value.ccn__active().ispresent()) {
single_value->field_ccn__active.log_match(match_value.ccn__active(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_ccn__active.log();
if (single_value->field_ccn__active.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nw_ext_utbf := ");
if (match_value.nw__ext__utbf().ispresent()) {
single_value->field_nw__ext__utbf.log_match(match_value.nw__ext__utbf(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nw__ext__utbf.log();
if (single_value->field_nw__ext__utbf.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void ExtensionInformation_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (egprs__supported().is_bound()) egprs__supported().set_implicit_omit();
if (!egprs__pkt__channel__req().is_bound()) egprs__pkt__channel__req() = OMIT_VALUE;
else egprs__pkt__channel__req().set_implicit_omit();
if (!bep__period().is_bound()) bep__period() = OMIT_VALUE;
else bep__period().set_implicit_omit();
if (pfc__feature__mode().is_bound()) pfc__feature__mode().set_implicit_omit();
if (dtm__support().is_bound()) dtm__support().set_implicit_omit();
if (bss__paging__coordination().is_bound()) bss__paging__coordination().set_implicit_omit();
if (!ccn__active().is_bound()) ccn__active() = OMIT_VALUE;
else ccn__active().set_implicit_omit();
if (!nw__ext__utbf().is_bound()) nw__ext__utbf() = OMIT_VALUE;
else nw__ext__utbf().set_implicit_omit();
}

void ExtensionInformation_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_egprs__supported.encode_text(text_buf);
single_value->field_egprs__pkt__channel__req.encode_text(text_buf);
single_value->field_bep__period.encode_text(text_buf);
single_value->field_pfc__feature__mode.encode_text(text_buf);
single_value->field_dtm__support.encode_text(text_buf);
single_value->field_bss__paging__coordination.encode_text(text_buf);
single_value->field_ccn__active.encode_text(text_buf);
single_value->field_nw__ext__utbf.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 @RLCMAC_CSN1_Types.ExtensionInformation.");
}
}

void ExtensionInformation_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_egprs__supported.decode_text(text_buf);
single_value->field_egprs__pkt__channel__req.decode_text(text_buf);
single_value->field_bep__period.decode_text(text_buf);
single_value->field_pfc__feature__mode.decode_text(text_buf);
single_value->field_dtm__support.decode_text(text_buf);
single_value->field_bss__paging__coordination.decode_text(text_buf);
single_value->field_ccn__active.decode_text(text_buf);
single_value->field_nw__ext__utbf.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 ExtensionInformation_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 @RLCMAC_CSN1_Types.ExtensionInformation.");
}
}

void ExtensionInformation_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: {
    ExtensionInformation_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 (8<param.get_size()) {
      param.error("record template of type @RLCMAC_CSN1_Types.ExtensionInformation has 8 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) egprs__supported().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) egprs__pkt__channel__req().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) bep__period().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) pfc__feature__mode().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) dtm__support().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) bss__paging__coordination().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) ccn__active().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) nw__ext__utbf().set_param(*param.get_elem(7));
    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(), "egprs_supported")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          egprs__supported().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(), "egprs_pkt_channel_req")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          egprs__pkt__channel__req().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(), "bep_period")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bep__period().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(), "pfc_feature_mode")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pfc__feature__mode().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(), "dtm_support")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          dtm__support().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(), "bss_paging_coordination")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bss__paging__coordination().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(), "ccn_active")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ccn__active().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(), "nw_ext_utbf")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nw__ext__utbf().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 @RLCMAC_CSN1_Types.ExtensionInformation: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    ExtensionInformation_template* precondition = new ExtensionInformation_template;
    precondition->set_param(*param.get_elem(0));
    ExtensionInformation_template* implied_template = new ExtensionInformation_template;
    implied_template->set_param(*param.get_elem(1));
    *this = ExtensionInformation_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@RLCMAC_CSN1_Types.ExtensionInformation");
  }
  is_ifpresent = param.get_ifpresent();
}

void ExtensionInformation_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_egprs__supported.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.ExtensionInformation");
single_value->field_egprs__pkt__channel__req.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.ExtensionInformation");
single_value->field_bep__period.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.ExtensionInformation");
single_value->field_pfc__feature__mode.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.ExtensionInformation");
single_value->field_dtm__support.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.ExtensionInformation");
single_value->field_bss__paging__coordination.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.ExtensionInformation");
single_value->field_ccn__active.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.ExtensionInformation");
single_value->field_nw__ext__utbf.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.ExtensionInformation");
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 : "@RLCMAC_CSN1_Types.ExtensionInformation");
}

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

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

GprsCellOptions::GprsCellOptions()
{
}

GprsCellOptions::GprsCellOptions(const BITSTRING& par_nmo,
    const BITSTRING& par_t3168,
    const BITSTRING& par_t3192,
    const BITSTRING& par_drx__timer__max,
    const BITSTRING& par_access__burst__type,
    const BITSTRING& par_control__ack__type,
    const INTEGER& par_bs__cv__max,
    const BITSTRING& par_pan__presence,
    const OPTIONAL< INTEGER >& par_pan__dec,
    const OPTIONAL< INTEGER >& par_pan__inc,
    const OPTIONAL< BITSTRING >& par_pan__max,
    const BITSTRING& par_ext__info__presence,
    const OPTIONAL< BITSTRING >& par_ext__info__length,
    const OPTIONAL< ExtensionInformation >& par_ext__info)
  :   field_nmo(par_nmo),
  field_t3168(par_t3168),
  field_t3192(par_t3192),
  field_drx__timer__max(par_drx__timer__max),
  field_access__burst__type(par_access__burst__type),
  field_control__ack__type(par_control__ack__type),
  field_bs__cv__max(par_bs__cv__max),
  field_pan__presence(par_pan__presence),
  field_pan__dec(par_pan__dec),
  field_pan__inc(par_pan__inc),
  field_pan__max(par_pan__max),
  field_ext__info__presence(par_ext__info__presence),
  field_ext__info__length(par_ext__info__length),
  field_ext__info(par_ext__info)
{
}

GprsCellOptions::GprsCellOptions(const GprsCellOptions& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RLCMAC_CSN1_Types.GprsCellOptions.");
if (other_value.nmo().is_bound()) field_nmo = other_value.nmo();
else field_nmo.clean_up();
if (other_value.t3168().is_bound()) field_t3168 = other_value.t3168();
else field_t3168.clean_up();
if (other_value.t3192().is_bound()) field_t3192 = other_value.t3192();
else field_t3192.clean_up();
if (other_value.drx__timer__max().is_bound()) field_drx__timer__max = other_value.drx__timer__max();
else field_drx__timer__max.clean_up();
if (other_value.access__burst__type().is_bound()) field_access__burst__type = other_value.access__burst__type();
else field_access__burst__type.clean_up();
if (other_value.control__ack__type().is_bound()) field_control__ack__type = other_value.control__ack__type();
else field_control__ack__type.clean_up();
if (other_value.bs__cv__max().is_bound()) field_bs__cv__max = other_value.bs__cv__max();
else field_bs__cv__max.clean_up();
if (other_value.pan__presence().is_bound()) field_pan__presence = other_value.pan__presence();
else field_pan__presence.clean_up();
if (other_value.pan__dec().is_bound()) field_pan__dec = other_value.pan__dec();
else field_pan__dec.clean_up();
if (other_value.pan__inc().is_bound()) field_pan__inc = other_value.pan__inc();
else field_pan__inc.clean_up();
if (other_value.pan__max().is_bound()) field_pan__max = other_value.pan__max();
else field_pan__max.clean_up();
if (other_value.ext__info__presence().is_bound()) field_ext__info__presence = other_value.ext__info__presence();
else field_ext__info__presence.clean_up();
if (other_value.ext__info__length().is_bound()) field_ext__info__length = other_value.ext__info__length();
else field_ext__info__length.clean_up();
if (other_value.ext__info().is_bound()) field_ext__info = other_value.ext__info();
else field_ext__info.clean_up();
}

void GprsCellOptions::clean_up()
{
field_nmo.clean_up();
field_t3168.clean_up();
field_t3192.clean_up();
field_drx__timer__max.clean_up();
field_access__burst__type.clean_up();
field_control__ack__type.clean_up();
field_bs__cv__max.clean_up();
field_pan__presence.clean_up();
field_pan__dec.clean_up();
field_pan__inc.clean_up();
field_pan__max.clean_up();
field_ext__info__presence.clean_up();
field_ext__info__length.clean_up();
field_ext__info.clean_up();
}

const TTCN_Typedescriptor_t* GprsCellOptions::get_descriptor() const { return &GprsCellOptions_descr_; }
GprsCellOptions& GprsCellOptions::operator=(const GprsCellOptions& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RLCMAC_CSN1_Types.GprsCellOptions.");
  if (other_value.nmo().is_bound()) field_nmo = other_value.nmo();
  else field_nmo.clean_up();
  if (other_value.t3168().is_bound()) field_t3168 = other_value.t3168();
  else field_t3168.clean_up();
  if (other_value.t3192().is_bound()) field_t3192 = other_value.t3192();
  else field_t3192.clean_up();
  if (other_value.drx__timer__max().is_bound()) field_drx__timer__max = other_value.drx__timer__max();
  else field_drx__timer__max.clean_up();
  if (other_value.access__burst__type().is_bound()) field_access__burst__type = other_value.access__burst__type();
  else field_access__burst__type.clean_up();
  if (other_value.control__ack__type().is_bound()) field_control__ack__type = other_value.control__ack__type();
  else field_control__ack__type.clean_up();
  if (other_value.bs__cv__max().is_bound()) field_bs__cv__max = other_value.bs__cv__max();
  else field_bs__cv__max.clean_up();
  if (other_value.pan__presence().is_bound()) field_pan__presence = other_value.pan__presence();
  else field_pan__presence.clean_up();
  if (other_value.pan__dec().is_bound()) field_pan__dec = other_value.pan__dec();
  else field_pan__dec.clean_up();
  if (other_value.pan__inc().is_bound()) field_pan__inc = other_value.pan__inc();
  else field_pan__inc.clean_up();
  if (other_value.pan__max().is_bound()) field_pan__max = other_value.pan__max();
  else field_pan__max.clean_up();
  if (other_value.ext__info__presence().is_bound()) field_ext__info__presence = other_value.ext__info__presence();
  else field_ext__info__presence.clean_up();
  if (other_value.ext__info__length().is_bound()) field_ext__info__length = other_value.ext__info__length();
  else field_ext__info__length.clean_up();
  if (other_value.ext__info().is_bound()) field_ext__info = other_value.ext__info();
  else field_ext__info.clean_up();
}
return *this;
}

boolean GprsCellOptions::operator==(const GprsCellOptions& other_value) const
{
return field_nmo==other_value.field_nmo
  && field_t3168==other_value.field_t3168
  && field_t3192==other_value.field_t3192
  && field_drx__timer__max==other_value.field_drx__timer__max
  && field_access__burst__type==other_value.field_access__burst__type
  && field_control__ack__type==other_value.field_control__ack__type
  && field_bs__cv__max==other_value.field_bs__cv__max
  && field_pan__presence==other_value.field_pan__presence
  && field_pan__dec==other_value.field_pan__dec
  && field_pan__inc==other_value.field_pan__inc
  && field_pan__max==other_value.field_pan__max
  && field_ext__info__presence==other_value.field_ext__info__presence
  && field_ext__info__length==other_value.field_ext__info__length
  && field_ext__info==other_value.field_ext__info;
}

boolean GprsCellOptions::is_bound() const
{
return (field_nmo.is_bound())
  || (field_t3168.is_bound())
  || (field_t3192.is_bound())
  || (field_drx__timer__max.is_bound())
  || (field_access__burst__type.is_bound())
  || (field_control__ack__type.is_bound())
  || (field_bs__cv__max.is_bound())
  || (field_pan__presence.is_bound())
  || (OPTIONAL_OMIT == field_pan__dec.get_selection() || field_pan__dec.is_bound())
  || (OPTIONAL_OMIT == field_pan__inc.get_selection() || field_pan__inc.is_bound())
  || (OPTIONAL_OMIT == field_pan__max.get_selection() || field_pan__max.is_bound())
  || (field_ext__info__presence.is_bound())
  || (OPTIONAL_OMIT == field_ext__info__length.get_selection() || field_ext__info__length.is_bound())
  || (OPTIONAL_OMIT == field_ext__info.get_selection() || field_ext__info.is_bound());
}
boolean GprsCellOptions::is_value() const
{
return field_nmo.is_value()
  && field_t3168.is_value()
  && field_t3192.is_value()
  && field_drx__timer__max.is_value()
  && field_access__burst__type.is_value()
  && field_control__ack__type.is_value()
  && field_bs__cv__max.is_value()
  && field_pan__presence.is_value()
  && (OPTIONAL_OMIT == field_pan__dec.get_selection() || field_pan__dec.is_value())
  && (OPTIONAL_OMIT == field_pan__inc.get_selection() || field_pan__inc.is_value())
  && (OPTIONAL_OMIT == field_pan__max.get_selection() || field_pan__max.is_value())
  && field_ext__info__presence.is_value()
  && (OPTIONAL_OMIT == field_ext__info__length.get_selection() || field_ext__info__length.is_value())
  && (OPTIONAL_OMIT == field_ext__info.get_selection() || field_ext__info.is_value());
}
int GprsCellOptions::size_of() const
{
  int ret_val = 9;
  if (field_pan__dec.ispresent()) ret_val++;
  if (field_pan__inc.ispresent()) ret_val++;
  if (field_pan__max.ispresent()) ret_val++;
  if (field_ext__info__length.ispresent()) ret_val++;
  if (field_ext__info.ispresent()) ret_val++;
  return ret_val;
}

void GprsCellOptions::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ nmo := ");
field_nmo.log();
TTCN_Logger::log_event_str(", t3168 := ");
field_t3168.log();
TTCN_Logger::log_event_str(", t3192 := ");
field_t3192.log();
TTCN_Logger::log_event_str(", drx_timer_max := ");
field_drx__timer__max.log();
TTCN_Logger::log_event_str(", access_burst_type := ");
field_access__burst__type.log();
TTCN_Logger::log_event_str(", control_ack_type := ");
field_control__ack__type.log();
TTCN_Logger::log_event_str(", bs_cv_max := ");
field_bs__cv__max.log();
TTCN_Logger::log_event_str(", pan_presence := ");
field_pan__presence.log();
TTCN_Logger::log_event_str(", pan_dec := ");
field_pan__dec.log();
TTCN_Logger::log_event_str(", pan_inc := ");
field_pan__inc.log();
TTCN_Logger::log_event_str(", pan_max := ");
field_pan__max.log();
TTCN_Logger::log_event_str(", ext_info_presence := ");
field_ext__info__presence.log();
TTCN_Logger::log_event_str(", ext_info_length := ");
field_ext__info__length.log();
TTCN_Logger::log_event_str(", ext_info := ");
field_ext__info.log();
TTCN_Logger::log_event_str(" }");
}

void GprsCellOptions::set_implicit_omit()
{
if (nmo().is_bound()) nmo().set_implicit_omit();
if (t3168().is_bound()) t3168().set_implicit_omit();
if (t3192().is_bound()) t3192().set_implicit_omit();
if (drx__timer__max().is_bound()) drx__timer__max().set_implicit_omit();
if (access__burst__type().is_bound()) access__burst__type().set_implicit_omit();
if (control__ack__type().is_bound()) control__ack__type().set_implicit_omit();
if (bs__cv__max().is_bound()) bs__cv__max().set_implicit_omit();
if (pan__presence().is_bound()) pan__presence().set_implicit_omit();
if (!pan__dec().is_bound()) pan__dec() = OMIT_VALUE;
else pan__dec().set_implicit_omit();
if (!pan__inc().is_bound()) pan__inc() = OMIT_VALUE;
else pan__inc().set_implicit_omit();
if (!pan__max().is_bound()) pan__max() = OMIT_VALUE;
else pan__max().set_implicit_omit();
if (ext__info__presence().is_bound()) ext__info__presence().set_implicit_omit();
if (!ext__info__length().is_bound()) ext__info__length() = OMIT_VALUE;
else ext__info__length().set_implicit_omit();
if (!ext__info().is_bound()) ext__info() = OMIT_VALUE;
else ext__info().set_implicit_omit();
}

void GprsCellOptions::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 (14<param.get_size()) {
      param.error("record value of type @RLCMAC_CSN1_Types.GprsCellOptions has 14 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) nmo().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) t3168().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) t3192().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) drx__timer__max().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) access__burst__type().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) control__ack__type().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) bs__cv__max().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) pan__presence().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) pan__dec().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) pan__inc().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) pan__max().set_param(*param.get_elem(10));
    if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) ext__info__presence().set_param(*param.get_elem(11));
    if (param.get_size()>12 && param.get_elem(12)->get_type()!=Module_Param::MP_NotUsed) ext__info__length().set_param(*param.get_elem(12));
    if (param.get_size()>13 && param.get_elem(13)->get_type()!=Module_Param::MP_NotUsed) ext__info().set_param(*param.get_elem(13));
    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(), "nmo")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nmo().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(), "t3168")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3168().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(), "t3192")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3192().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(), "drx_timer_max")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          drx__timer__max().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(), "access_burst_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          access__burst__type().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "control_ack_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          control__ack__type().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "bs_cv_max")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bs__cv__max().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(), "pan_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pan__presence().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(), "pan_dec")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pan__dec().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(), "pan_inc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pan__inc().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(), "pan_max")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pan__max().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(), "ext_info_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext__info__presence().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(), "ext_info_length")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext__info__length().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(), "ext_info")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext__info().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 @RLCMAC_CSN1_Types.GprsCellOptions: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@RLCMAC_CSN1_Types.GprsCellOptions");
  }
}

void GprsCellOptions::encode_text(Text_Buf& text_buf) const
{
field_nmo.encode_text(text_buf);
field_t3168.encode_text(text_buf);
field_t3192.encode_text(text_buf);
field_drx__timer__max.encode_text(text_buf);
field_access__burst__type.encode_text(text_buf);
field_control__ack__type.encode_text(text_buf);
field_bs__cv__max.encode_text(text_buf);
field_pan__presence.encode_text(text_buf);
field_pan__dec.encode_text(text_buf);
field_pan__inc.encode_text(text_buf);
field_pan__max.encode_text(text_buf);
field_ext__info__presence.encode_text(text_buf);
field_ext__info__length.encode_text(text_buf);
field_ext__info.encode_text(text_buf);
}

void GprsCellOptions::decode_text(Text_Buf& text_buf)
{
field_nmo.decode_text(text_buf);
field_t3168.decode_text(text_buf);
field_t3192.decode_text(text_buf);
field_drx__timer__max.decode_text(text_buf);
field_access__burst__type.decode_text(text_buf);
field_control__ack__type.decode_text(text_buf);
field_bs__cv__max.decode_text(text_buf);
field_pan__presence.decode_text(text_buf);
field_pan__dec.decode_text(text_buf);
field_pan__inc.decode_text(text_buf);
field_pan__max.decode_text(text_buf);
field_ext__info__presence.decode_text(text_buf);
field_ext__info__length.decode_text(text_buf);
field_ext__info.decode_text(text_buf);
}

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

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

int GprsCellOptions::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, GprsCellOptions_nmo_descr_.raw->forceomit);
  decoded_field_length = field_nmo.RAW_decode(GprsCellOptions_nmo_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, GprsCellOptions_t3168_descr_.raw->forceomit);
  decoded_field_length = field_t3168.RAW_decode(GprsCellOptions_t3168_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, GprsCellOptions_t3192_descr_.raw->forceomit);
  decoded_field_length = field_t3192.RAW_decode(GprsCellOptions_t3192_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, GprsCellOptions_drx__timer__max_descr_.raw->forceomit);
  decoded_field_length = field_drx__timer__max.RAW_decode(GprsCellOptions_drx__timer__max_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_4_force_omit(4, force_omit, GprsCellOptions_access__burst__type_descr_.raw->forceomit);
  decoded_field_length = field_access__burst__type.RAW_decode(GprsCellOptions_access__burst__type_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_5_force_omit(5, force_omit, GprsCellOptions_control__ack__type_descr_.raw->forceomit);
  decoded_field_length = field_control__ack__type.RAW_decode(GprsCellOptions_control__ack__type_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_6_force_omit(6, force_omit, GprsCellOptions_bs__cv__max_descr_.raw->forceomit);
  decoded_field_length = field_bs__cv__max.RAW_decode(GprsCellOptions_bs__cv__max_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_7_force_omit(7, force_omit, GprsCellOptions_pan__presence_descr_.raw->forceomit);
  decoded_field_length = field_pan__presence.RAW_decode(GprsCellOptions_pan__presence_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (limit > 0 && field_pan__presence ==  bs_0){
  if (force_omit != NULL && (*force_omit)(8)) {
    field_pan__dec = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_8_force_omit(8, force_omit, GprsCellOptions_pan__dec_descr_.raw->forceomit);
  decoded_field_length = field_pan__dec().RAW_decode(GprsCellOptions_pan__dec_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_8_force_omit);
  if (decoded_field_length < 1) {
  field_pan__dec = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_pan__dec=OMIT_VALUE;
  if (limit > 0 && field_pan__presence ==  bs_0){
  if (force_omit != NULL && (*force_omit)(9)) {
    field_pan__inc = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_9_force_omit(9, force_omit, GprsCellOptions_pan__inc_descr_.raw->forceomit);
  decoded_field_length = field_pan__inc().RAW_decode(GprsCellOptions_pan__inc_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_9_force_omit);
  if (decoded_field_length < 1) {
  field_pan__inc = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_pan__inc=OMIT_VALUE;
  if (limit > 0 && field_pan__presence ==  bs_0){
  if (force_omit != NULL && (*force_omit)(10)) {
    field_pan__max = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_10_force_omit(10, force_omit, GprsCellOptions_pan__max_descr_.raw->forceomit);
  decoded_field_length = field_pan__max().RAW_decode(GprsCellOptions_pan__max_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_10_force_omit);
  if (decoded_field_length < 1) {
  field_pan__max = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_pan__max=OMIT_VALUE;
  RAW_Force_Omit field_11_force_omit(11, force_omit, GprsCellOptions_ext__info__presence_descr_.raw->forceomit);
  decoded_field_length = field_ext__info__presence.RAW_decode(GprsCellOptions_ext__info__presence_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_11_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (limit > 0 && field_ext__info__presence ==  bs_0){
  if (force_omit != NULL && (*force_omit)(12)) {
    field_ext__info__length = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_12_force_omit(12, force_omit, GprsCellOptions_ext__info__length_descr_.raw->forceomit);
  decoded_field_length = field_ext__info__length().RAW_decode(GprsCellOptions_ext__info__length_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_12_force_omit);
  if (decoded_field_length < 1) {
  field_ext__info__length = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_ext__info__length=OMIT_VALUE;
  if (limit > 0 && field_ext__info__presence ==  bs_0){
  if (force_omit != NULL && (*force_omit)(13)) {
    field_ext__info = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_13_force_omit(13, force_omit, GprsCellOptions_ext__info_descr_.raw->forceomit);
  decoded_field_length = field_ext__info().RAW_decode(GprsCellOptions_ext__info_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_13_force_omit);
  if (decoded_field_length < 1) {
  field_ext__info = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  }
  }
  }
  else field_ext__info=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int GprsCellOptions::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 14;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(14);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, GprsCellOptions_nmo_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, GprsCellOptions_t3168_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, GprsCellOptions_t3192_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, GprsCellOptions_drx__timer__max_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, GprsCellOptions_access__burst__type_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, GprsCellOptions_control__ack__type_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, GprsCellOptions_bs__cv__max_descr_.raw);
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, GprsCellOptions_pan__presence_descr_.raw);
  if (field_pan__dec.ispresent()) {
  myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 8, GprsCellOptions_pan__dec_descr_.raw);
  }
  else myleaf.body.node.nodes[8] = NULL;
  if (field_pan__inc.ispresent()) {
  myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 9, GprsCellOptions_pan__inc_descr_.raw);
  }
  else myleaf.body.node.nodes[9] = NULL;
  if (field_pan__max.ispresent()) {
  myleaf.body.node.nodes[10] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 10, GprsCellOptions_pan__max_descr_.raw);
  }
  else myleaf.body.node.nodes[10] = NULL;
  myleaf.body.node.nodes[11] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 11, GprsCellOptions_ext__info__presence_descr_.raw);
  if (field_ext__info__length.ispresent()) {
  myleaf.body.node.nodes[12] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 12, GprsCellOptions_ext__info__length_descr_.raw);
  }
  else myleaf.body.node.nodes[12] = NULL;
  if (field_ext__info.ispresent()) {
  myleaf.body.node.nodes[13] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 13, GprsCellOptions_ext__info_descr_.raw);
  }
  else myleaf.body.node.nodes[13] = NULL;
  encoded_length += field_nmo.RAW_encode(GprsCellOptions_nmo_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_t3168.RAW_encode(GprsCellOptions_t3168_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_t3192.RAW_encode(GprsCellOptions_t3192_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_drx__timer__max.RAW_encode(GprsCellOptions_drx__timer__max_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_access__burst__type.RAW_encode(GprsCellOptions_access__burst__type_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_control__ack__type.RAW_encode(GprsCellOptions_control__ack__type_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_bs__cv__max.RAW_encode(GprsCellOptions_bs__cv__max_descr_, *myleaf.body.node.nodes[6]);
  encoded_length += field_pan__presence.RAW_encode(GprsCellOptions_pan__presence_descr_, *myleaf.body.node.nodes[7]);
  if (field_pan__dec.ispresent()) {
  encoded_length += field_pan__dec().RAW_encode(GprsCellOptions_pan__dec_descr_, *myleaf.body.node.nodes[8]);
  }
  if (field_pan__inc.ispresent()) {
  encoded_length += field_pan__inc().RAW_encode(GprsCellOptions_pan__inc_descr_, *myleaf.body.node.nodes[9]);
  }
  if (field_pan__max.ispresent()) {
  encoded_length += field_pan__max().RAW_encode(GprsCellOptions_pan__max_descr_, *myleaf.body.node.nodes[10]);
  }
  encoded_length += field_ext__info__presence.RAW_encode(GprsCellOptions_ext__info__presence_descr_, *myleaf.body.node.nodes[11]);
  if (field_ext__info__length.ispresent()) {
  encoded_length += field_ext__info__length().RAW_encode(GprsCellOptions_ext__info__length_descr_, *myleaf.body.node.nodes[12]);
  }
  if (field_ext__info.ispresent()) {
  encoded_length += field_ext__info().RAW_encode(GprsCellOptions_ext__info_descr_, *myleaf.body.node.nodes[13]);
  }
  if (field_pan__dec.ispresent() && (field_pan__presence !=  bs_0)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={7};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_0.RAW_encode(GprsCellOptions_pan__presence_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  if (field_pan__inc.ispresent() && (field_pan__presence !=  bs_0)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={7};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_0.RAW_encode(GprsCellOptions_pan__presence_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  if (field_pan__max.ispresent() && (field_pan__presence !=  bs_0)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={7};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_0.RAW_encode(GprsCellOptions_pan__presence_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  if (field_ext__info__length.ispresent() && (field_ext__info__presence !=  bs_0)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={11};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_0.RAW_encode(GprsCellOptions_ext__info__presence_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  if (field_ext__info.ispresent() && (field_ext__info__presence !=  bs_0)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={11};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_0.RAW_encode(GprsCellOptions_ext__info__presence_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
  }
  return myleaf.length = encoded_length;
}

struct GprsCellOptions_template::single_value_struct {
BITSTRING_template field_nmo;
BITSTRING_template field_t3168;
BITSTRING_template field_t3192;
BITSTRING_template field_drx__timer__max;
BITSTRING_template field_access__burst__type;
BITSTRING_template field_control__ack__type;
INTEGER_template field_bs__cv__max;
BITSTRING_template field_pan__presence;
INTEGER_template field_pan__dec;
INTEGER_template field_pan__inc;
BITSTRING_template field_pan__max;
BITSTRING_template field_ext__info__presence;
BITSTRING_template field_ext__info__length;
ExtensionInformation_template field_ext__info;
};

void GprsCellOptions_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_nmo = ANY_VALUE;
single_value->field_t3168 = ANY_VALUE;
single_value->field_t3192 = ANY_VALUE;
single_value->field_drx__timer__max = ANY_VALUE;
single_value->field_access__burst__type = ANY_VALUE;
single_value->field_control__ack__type = ANY_VALUE;
single_value->field_bs__cv__max = ANY_VALUE;
single_value->field_pan__presence = ANY_VALUE;
single_value->field_pan__dec = ANY_OR_OMIT;
single_value->field_pan__inc = ANY_OR_OMIT;
single_value->field_pan__max = ANY_OR_OMIT;
single_value->field_ext__info__presence = ANY_VALUE;
single_value->field_ext__info__length = ANY_OR_OMIT;
single_value->field_ext__info = ANY_OR_OMIT;
}
}
}

void GprsCellOptions_template::copy_value(const GprsCellOptions& other_value)
{
single_value = new single_value_struct;
if (other_value.nmo().is_bound()) {
  single_value->field_nmo = other_value.nmo();
} else {
  single_value->field_nmo.clean_up();
}
if (other_value.t3168().is_bound()) {
  single_value->field_t3168 = other_value.t3168();
} else {
  single_value->field_t3168.clean_up();
}
if (other_value.t3192().is_bound()) {
  single_value->field_t3192 = other_value.t3192();
} else {
  single_value->field_t3192.clean_up();
}
if (other_value.drx__timer__max().is_bound()) {
  single_value->field_drx__timer__max = other_value.drx__timer__max();
} else {
  single_value->field_drx__timer__max.clean_up();
}
if (other_value.access__burst__type().is_bound()) {
  single_value->field_access__burst__type = other_value.access__burst__type();
} else {
  single_value->field_access__burst__type.clean_up();
}
if (other_value.control__ack__type().is_bound()) {
  single_value->field_control__ack__type = other_value.control__ack__type();
} else {
  single_value->field_control__ack__type.clean_up();
}
if (other_value.bs__cv__max().is_bound()) {
  single_value->field_bs__cv__max = other_value.bs__cv__max();
} else {
  single_value->field_bs__cv__max.clean_up();
}
if (other_value.pan__presence().is_bound()) {
  single_value->field_pan__presence = other_value.pan__presence();
} else {
  single_value->field_pan__presence.clean_up();
}
if (other_value.pan__dec().is_bound()) {
  if (other_value.pan__dec().ispresent()) single_value->field_pan__dec = other_value.pan__dec()();
  else single_value->field_pan__dec = OMIT_VALUE;
} else {
  single_value->field_pan__dec.clean_up();
}
if (other_value.pan__inc().is_bound()) {
  if (other_value.pan__inc().ispresent()) single_value->field_pan__inc = other_value.pan__inc()();
  else single_value->field_pan__inc = OMIT_VALUE;
} else {
  single_value->field_pan__inc.clean_up();
}
if (other_value.pan__max().is_bound()) {
  if (other_value.pan__max().ispresent()) single_value->field_pan__max = other_value.pan__max()();
  else single_value->field_pan__max = OMIT_VALUE;
} else {
  single_value->field_pan__max.clean_up();
}
if (other_value.ext__info__presence().is_bound()) {
  single_value->field_ext__info__presence = other_value.ext__info__presence();
} else {
  single_value->field_ext__info__presence.clean_up();
}
if (other_value.ext__info__length().is_bound()) {
  if (other_value.ext__info__length().ispresent()) single_value->field_ext__info__length = other_value.ext__info__length()();
  else single_value->field_ext__info__length = OMIT_VALUE;
} else {
  single_value->field_ext__info__length.clean_up();
}
if (other_value.ext__info().is_bound()) {
  if (other_value.ext__info().ispresent()) single_value->field_ext__info = other_value.ext__info()();
  else single_value->field_ext__info = OMIT_VALUE;
} else {
  single_value->field_ext__info.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void GprsCellOptions_template::copy_template(const GprsCellOptions_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.nmo().get_selection()) {
single_value->field_nmo = other_value.nmo();
} else {
single_value->field_nmo.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.t3168().get_selection()) {
single_value->field_t3168 = other_value.t3168();
} else {
single_value->field_t3168.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.t3192().get_selection()) {
single_value->field_t3192 = other_value.t3192();
} else {
single_value->field_t3192.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.drx__timer__max().get_selection()) {
single_value->field_drx__timer__max = other_value.drx__timer__max();
} else {
single_value->field_drx__timer__max.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.access__burst__type().get_selection()) {
single_value->field_access__burst__type = other_value.access__burst__type();
} else {
single_value->field_access__burst__type.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.control__ack__type().get_selection()) {
single_value->field_control__ack__type = other_value.control__ack__type();
} else {
single_value->field_control__ack__type.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.bs__cv__max().get_selection()) {
single_value->field_bs__cv__max = other_value.bs__cv__max();
} else {
single_value->field_bs__cv__max.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.pan__presence().get_selection()) {
single_value->field_pan__presence = other_value.pan__presence();
} else {
single_value->field_pan__presence.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.pan__dec().get_selection()) {
single_value->field_pan__dec = other_value.pan__dec();
} else {
single_value->field_pan__dec.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.pan__inc().get_selection()) {
single_value->field_pan__inc = other_value.pan__inc();
} else {
single_value->field_pan__inc.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.pan__max().get_selection()) {
single_value->field_pan__max = other_value.pan__max();
} else {
single_value->field_pan__max.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext__info__presence().get_selection()) {
single_value->field_ext__info__presence = other_value.ext__info__presence();
} else {
single_value->field_ext__info__presence.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext__info__length().get_selection()) {
single_value->field_ext__info__length = other_value.ext__info__length();
} else {
single_value->field_ext__info__length.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.ext__info().get_selection()) {
single_value->field_ext__info = other_value.ext__info();
} else {
single_value->field_ext__info.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 GprsCellOptions_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 GprsCellOptions_template(*other_value.implication_.precondition);
implication_.implied_template = new GprsCellOptions_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 @RLCMAC_CSN1_Types.GprsCellOptions.");
break;
}
set_selection(other_value);
}

GprsCellOptions_template::GprsCellOptions_template()
{
}

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

GprsCellOptions_template::GprsCellOptions_template(const GprsCellOptions& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean GprsCellOptions_template::match(const GprsCellOptions& 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.nmo().is_bound()) return FALSE;
if(!single_value->field_nmo.match(other_value.nmo(), legacy))return FALSE;
if(!other_value.t3168().is_bound()) return FALSE;
if(!single_value->field_t3168.match(other_value.t3168(), legacy))return FALSE;
if(!other_value.t3192().is_bound()) return FALSE;
if(!single_value->field_t3192.match(other_value.t3192(), legacy))return FALSE;
if(!other_value.drx__timer__max().is_bound()) return FALSE;
if(!single_value->field_drx__timer__max.match(other_value.drx__timer__max(), legacy))return FALSE;
if(!other_value.access__burst__type().is_bound()) return FALSE;
if(!single_value->field_access__burst__type.match(other_value.access__burst__type(), legacy))return FALSE;
if(!other_value.control__ack__type().is_bound()) return FALSE;
if(!single_value->field_control__ack__type.match(other_value.control__ack__type(), legacy))return FALSE;
if(!other_value.bs__cv__max().is_bound()) return FALSE;
if(!single_value->field_bs__cv__max.match(other_value.bs__cv__max(), legacy))return FALSE;
if(!other_value.pan__presence().is_bound()) return FALSE;
if(!single_value->field_pan__presence.match(other_value.pan__presence(), legacy))return FALSE;
if(!other_value.pan__dec().is_bound()) return FALSE;
if((other_value.pan__dec().ispresent() ? !single_value->field_pan__dec.match((const INTEGER&)other_value.pan__dec(), legacy) : !single_value->field_pan__dec.match_omit(legacy)))return FALSE;
if(!other_value.pan__inc().is_bound()) return FALSE;
if((other_value.pan__inc().ispresent() ? !single_value->field_pan__inc.match((const INTEGER&)other_value.pan__inc(), legacy) : !single_value->field_pan__inc.match_omit(legacy)))return FALSE;
if(!other_value.pan__max().is_bound()) return FALSE;
if((other_value.pan__max().ispresent() ? !single_value->field_pan__max.match((const BITSTRING&)other_value.pan__max(), legacy) : !single_value->field_pan__max.match_omit(legacy)))return FALSE;
if(!other_value.ext__info__presence().is_bound()) return FALSE;
if(!single_value->field_ext__info__presence.match(other_value.ext__info__presence(), legacy))return FALSE;
if(!other_value.ext__info__length().is_bound()) return FALSE;
if((other_value.ext__info__length().ispresent() ? !single_value->field_ext__info__length.match((const BITSTRING&)other_value.ext__info__length(), legacy) : !single_value->field_ext__info__length.match_omit(legacy)))return FALSE;
if(!other_value.ext__info().is_bound()) return FALSE;
if((other_value.ext__info().ispresent() ? !single_value->field_ext__info.match((const ExtensionInformation&)other_value.ext__info(), legacy) : !single_value->field_ext__info.match_omit(legacy)))return FALSE;
return TRUE;
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error("Matching an uninitialized/unsupported template of type @RLCMAC_CSN1_Types.GprsCellOptions.");
}
return FALSE;
}

boolean GprsCellOptions_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_nmo.is_bound()
 || single_value->field_t3168.is_bound()
 || single_value->field_t3192.is_bound()
 || single_value->field_drx__timer__max.is_bound()
 || single_value->field_access__burst__type.is_bound()
 || single_value->field_control__ack__type.is_bound()
 || single_value->field_bs__cv__max.is_bound()
 || single_value->field_pan__presence.is_bound()
 || (single_value->field_pan__dec.is_omit() || single_value->field_pan__dec.is_bound())
 || (single_value->field_pan__inc.is_omit() || single_value->field_pan__inc.is_bound())
 || (single_value->field_pan__max.is_omit() || single_value->field_pan__max.is_bound())
 || single_value->field_ext__info__presence.is_bound()
 || (single_value->field_ext__info__length.is_omit() || single_value->field_ext__info__length.is_bound())
 || (single_value->field_ext__info.is_omit() || single_value->field_ext__info.is_bound());
}

boolean GprsCellOptions_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_nmo.is_value()
 && single_value->field_t3168.is_value()
 && single_value->field_t3192.is_value()
 && single_value->field_drx__timer__max.is_value()
 && single_value->field_access__burst__type.is_value()
 && single_value->field_control__ack__type.is_value()
 && single_value->field_bs__cv__max.is_value()
 && single_value->field_pan__presence.is_value()
 && (single_value->field_pan__dec.is_omit() || single_value->field_pan__dec.is_value())
 && (single_value->field_pan__inc.is_omit() || single_value->field_pan__inc.is_value())
 && (single_value->field_pan__max.is_omit() || single_value->field_pan__max.is_value())
 && single_value->field_ext__info__presence.is_value()
 && (single_value->field_ext__info__length.is_omit() || single_value->field_ext__info__length.is_value())
 && (single_value->field_ext__info.is_omit() || single_value->field_ext__info.is_value());
}

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

GprsCellOptions GprsCellOptions_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 @RLCMAC_CSN1_Types.GprsCellOptions.");
GprsCellOptions ret_val;
if (single_value->field_nmo.is_bound()) {
ret_val.nmo() = single_value->field_nmo.valueof();
}
if (single_value->field_t3168.is_bound()) {
ret_val.t3168() = single_value->field_t3168.valueof();
}
if (single_value->field_t3192.is_bound()) {
ret_val.t3192() = single_value->field_t3192.valueof();
}
if (single_value->field_drx__timer__max.is_bound()) {
ret_val.drx__timer__max() = single_value->field_drx__timer__max.valueof();
}
if (single_value->field_access__burst__type.is_bound()) {
ret_val.access__burst__type() = single_value->field_access__burst__type.valueof();
}
if (single_value->field_control__ack__type.is_bound()) {
ret_val.control__ack__type() = single_value->field_control__ack__type.valueof();
}
if (single_value->field_bs__cv__max.is_bound()) {
ret_val.bs__cv__max() = single_value->field_bs__cv__max.valueof();
}
if (single_value->field_pan__presence.is_bound()) {
ret_val.pan__presence() = single_value->field_pan__presence.valueof();
}
if (single_value->field_pan__dec.is_omit()) ret_val.pan__dec() = OMIT_VALUE;
else if (single_value->field_pan__dec.is_bound()) {
ret_val.pan__dec() = single_value->field_pan__dec.valueof();
}
if (single_value->field_pan__inc.is_omit()) ret_val.pan__inc() = OMIT_VALUE;
else if (single_value->field_pan__inc.is_bound()) {
ret_val.pan__inc() = single_value->field_pan__inc.valueof();
}
if (single_value->field_pan__max.is_omit()) ret_val.pan__max() = OMIT_VALUE;
else if (single_value->field_pan__max.is_bound()) {
ret_val.pan__max() = single_value->field_pan__max.valueof();
}
if (single_value->field_ext__info__presence.is_bound()) {
ret_val.ext__info__presence() = single_value->field_ext__info__presence.valueof();
}
if (single_value->field_ext__info__length.is_omit()) ret_val.ext__info__length() = OMIT_VALUE;
else if (single_value->field_ext__info__length.is_bound()) {
ret_val.ext__info__length() = single_value->field_ext__info__length.valueof();
}
if (single_value->field_ext__info.is_omit()) ret_val.ext__info() = OMIT_VALUE;
else if (single_value->field_ext__info.is_bound()) {
ret_val.ext__info() = single_value->field_ext__info.valueof();
}
return ret_val;
}

void GprsCellOptions_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 @RLCMAC_CSN1_Types.GprsCellOptions.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new GprsCellOptions_template[list_length];
}

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

BITSTRING_template& GprsCellOptions_template::nmo()
{
set_specific();
return single_value->field_nmo;
}

const BITSTRING_template& GprsCellOptions_template::nmo() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nmo of a non-specific template of type @RLCMAC_CSN1_Types.GprsCellOptions.");
return single_value->field_nmo;
}

BITSTRING_template& GprsCellOptions_template::t3168()
{
set_specific();
return single_value->field_t3168;
}

const BITSTRING_template& GprsCellOptions_template::t3168() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field t3168 of a non-specific template of type @RLCMAC_CSN1_Types.GprsCellOptions.");
return single_value->field_t3168;
}

BITSTRING_template& GprsCellOptions_template::t3192()
{
set_specific();
return single_value->field_t3192;
}

const BITSTRING_template& GprsCellOptions_template::t3192() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field t3192 of a non-specific template of type @RLCMAC_CSN1_Types.GprsCellOptions.");
return single_value->field_t3192;
}

BITSTRING_template& GprsCellOptions_template::drx__timer__max()
{
set_specific();
return single_value->field_drx__timer__max;
}

const BITSTRING_template& GprsCellOptions_template::drx__timer__max() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field drx_timer_max of a non-specific template of type @RLCMAC_CSN1_Types.GprsCellOptions.");
return single_value->field_drx__timer__max;
}

BITSTRING_template& GprsCellOptions_template::access__burst__type()
{
set_specific();
return single_value->field_access__burst__type;
}

const BITSTRING_template& GprsCellOptions_template::access__burst__type() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field access_burst_type of a non-specific template of type @RLCMAC_CSN1_Types.GprsCellOptions.");
return single_value->field_access__burst__type;
}

BITSTRING_template& GprsCellOptions_template::control__ack__type()
{
set_specific();
return single_value->field_control__ack__type;
}

const BITSTRING_template& GprsCellOptions_template::control__ack__type() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field control_ack_type of a non-specific template of type @RLCMAC_CSN1_Types.GprsCellOptions.");
return single_value->field_control__ack__type;
}

INTEGER_template& GprsCellOptions_template::bs__cv__max()
{
set_specific();
return single_value->field_bs__cv__max;
}

const INTEGER_template& GprsCellOptions_template::bs__cv__max() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field bs_cv_max of a non-specific template of type @RLCMAC_CSN1_Types.GprsCellOptions.");
return single_value->field_bs__cv__max;
}

BITSTRING_template& GprsCellOptions_template::pan__presence()
{
set_specific();
return single_value->field_pan__presence;
}

const BITSTRING_template& GprsCellOptions_template::pan__presence() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pan_presence of a non-specific template of type @RLCMAC_CSN1_Types.GprsCellOptions.");
return single_value->field_pan__presence;
}

INTEGER_template& GprsCellOptions_template::pan__dec()
{
set_specific();
return single_value->field_pan__dec;
}

const INTEGER_template& GprsCellOptions_template::pan__dec() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pan_dec of a non-specific template of type @RLCMAC_CSN1_Types.GprsCellOptions.");
return single_value->field_pan__dec;
}

INTEGER_template& GprsCellOptions_template::pan__inc()
{
set_specific();
return single_value->field_pan__inc;
}

const INTEGER_template& GprsCellOptions_template::pan__inc() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pan_inc of a non-specific template of type @RLCMAC_CSN1_Types.GprsCellOptions.");
return single_value->field_pan__inc;
}

BITSTRING_template& GprsCellOptions_template::pan__max()
{
set_specific();
return single_value->field_pan__max;
}

const BITSTRING_template& GprsCellOptions_template::pan__max() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pan_max of a non-specific template of type @RLCMAC_CSN1_Types.GprsCellOptions.");
return single_value->field_pan__max;
}

BITSTRING_template& GprsCellOptions_template::ext__info__presence()
{
set_specific();
return single_value->field_ext__info__presence;
}

const BITSTRING_template& GprsCellOptions_template::ext__info__presence() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext_info_presence of a non-specific template of type @RLCMAC_CSN1_Types.GprsCellOptions.");
return single_value->field_ext__info__presence;
}

BITSTRING_template& GprsCellOptions_template::ext__info__length()
{
set_specific();
return single_value->field_ext__info__length;
}

const BITSTRING_template& GprsCellOptions_template::ext__info__length() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext_info_length of a non-specific template of type @RLCMAC_CSN1_Types.GprsCellOptions.");
return single_value->field_ext__info__length;
}

ExtensionInformation_template& GprsCellOptions_template::ext__info()
{
set_specific();
return single_value->field_ext__info;
}

const ExtensionInformation_template& GprsCellOptions_template::ext__info() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field ext_info of a non-specific template of type @RLCMAC_CSN1_Types.GprsCellOptions.");
return single_value->field_ext__info;
}

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

void GprsCellOptions_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ nmo := ");
single_value->field_nmo.log();
TTCN_Logger::log_event_str(", t3168 := ");
single_value->field_t3168.log();
TTCN_Logger::log_event_str(", t3192 := ");
single_value->field_t3192.log();
TTCN_Logger::log_event_str(", drx_timer_max := ");
single_value->field_drx__timer__max.log();
TTCN_Logger::log_event_str(", access_burst_type := ");
single_value->field_access__burst__type.log();
TTCN_Logger::log_event_str(", control_ack_type := ");
single_value->field_control__ack__type.log();
TTCN_Logger::log_event_str(", bs_cv_max := ");
single_value->field_bs__cv__max.log();
TTCN_Logger::log_event_str(", pan_presence := ");
single_value->field_pan__presence.log();
TTCN_Logger::log_event_str(", pan_dec := ");
single_value->field_pan__dec.log();
TTCN_Logger::log_event_str(", pan_inc := ");
single_value->field_pan__inc.log();
TTCN_Logger::log_event_str(", pan_max := ");
single_value->field_pan__max.log();
TTCN_Logger::log_event_str(", ext_info_presence := ");
single_value->field_ext__info__presence.log();
TTCN_Logger::log_event_str(", ext_info_length := ");
single_value->field_ext__info__length.log();
TTCN_Logger::log_event_str(", ext_info := ");
single_value->field_ext__info.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 GprsCellOptions_template::log_match(const GprsCellOptions& 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_nmo.match(match_value.nmo(), legacy)){
TTCN_Logger::log_logmatch_info(".nmo");
single_value->field_nmo.log_match(match_value.nmo(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_t3168.match(match_value.t3168(), legacy)){
TTCN_Logger::log_logmatch_info(".t3168");
single_value->field_t3168.log_match(match_value.t3168(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_t3192.match(match_value.t3192(), legacy)){
TTCN_Logger::log_logmatch_info(".t3192");
single_value->field_t3192.log_match(match_value.t3192(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_drx__timer__max.match(match_value.drx__timer__max(), legacy)){
TTCN_Logger::log_logmatch_info(".drx_timer_max");
single_value->field_drx__timer__max.log_match(match_value.drx__timer__max(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_access__burst__type.match(match_value.access__burst__type(), legacy)){
TTCN_Logger::log_logmatch_info(".access_burst_type");
single_value->field_access__burst__type.log_match(match_value.access__burst__type(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_control__ack__type.match(match_value.control__ack__type(), legacy)){
TTCN_Logger::log_logmatch_info(".control_ack_type");
single_value->field_control__ack__type.log_match(match_value.control__ack__type(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_bs__cv__max.match(match_value.bs__cv__max(), legacy)){
TTCN_Logger::log_logmatch_info(".bs_cv_max");
single_value->field_bs__cv__max.log_match(match_value.bs__cv__max(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_pan__presence.match(match_value.pan__presence(), legacy)){
TTCN_Logger::log_logmatch_info(".pan_presence");
single_value->field_pan__presence.log_match(match_value.pan__presence(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.pan__dec().ispresent()){
if(!single_value->field_pan__dec.match(match_value.pan__dec(), legacy)){
TTCN_Logger::log_logmatch_info(".pan_dec");
single_value->field_pan__dec.log_match(match_value.pan__dec(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_pan__dec.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".pan_dec := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_pan__dec.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.pan__inc().ispresent()){
if(!single_value->field_pan__inc.match(match_value.pan__inc(), legacy)){
TTCN_Logger::log_logmatch_info(".pan_inc");
single_value->field_pan__inc.log_match(match_value.pan__inc(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_pan__inc.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".pan_inc := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_pan__inc.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.pan__max().ispresent()){
if(!single_value->field_pan__max.match(match_value.pan__max(), legacy)){
TTCN_Logger::log_logmatch_info(".pan_max");
single_value->field_pan__max.log_match(match_value.pan__max(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_pan__max.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".pan_max := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_pan__max.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_ext__info__presence.match(match_value.ext__info__presence(), legacy)){
TTCN_Logger::log_logmatch_info(".ext_info_presence");
single_value->field_ext__info__presence.log_match(match_value.ext__info__presence(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.ext__info__length().ispresent()){
if(!single_value->field_ext__info__length.match(match_value.ext__info__length(), legacy)){
TTCN_Logger::log_logmatch_info(".ext_info_length");
single_value->field_ext__info__length.log_match(match_value.ext__info__length(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_ext__info__length.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".ext_info_length := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_ext__info__length.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.ext__info().ispresent()){
if(!single_value->field_ext__info.match(match_value.ext__info(), legacy)){
TTCN_Logger::log_logmatch_info(".ext_info");
single_value->field_ext__info.log_match(match_value.ext__info(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_ext__info.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".ext_info := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_ext__info.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
}else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
TTCN_Logger::log_event_str(" unmatched");
}
}
return;
}
if (template_selection == SPECIFIC_VALUE) {
TTCN_Logger::log_event_str("{ nmo := ");
single_value->field_nmo.log_match(match_value.nmo(), legacy);
TTCN_Logger::log_event_str(", t3168 := ");
single_value->field_t3168.log_match(match_value.t3168(), legacy);
TTCN_Logger::log_event_str(", t3192 := ");
single_value->field_t3192.log_match(match_value.t3192(), legacy);
TTCN_Logger::log_event_str(", drx_timer_max := ");
single_value->field_drx__timer__max.log_match(match_value.drx__timer__max(), legacy);
TTCN_Logger::log_event_str(", access_burst_type := ");
single_value->field_access__burst__type.log_match(match_value.access__burst__type(), legacy);
TTCN_Logger::log_event_str(", control_ack_type := ");
single_value->field_control__ack__type.log_match(match_value.control__ack__type(), legacy);
TTCN_Logger::log_event_str(", bs_cv_max := ");
single_value->field_bs__cv__max.log_match(match_value.bs__cv__max(), legacy);
TTCN_Logger::log_event_str(", pan_presence := ");
single_value->field_pan__presence.log_match(match_value.pan__presence(), legacy);
TTCN_Logger::log_event_str(", pan_dec := ");
if (match_value.pan__dec().ispresent()) {
single_value->field_pan__dec.log_match(match_value.pan__dec(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_pan__dec.log();
if (single_value->field_pan__dec.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", pan_inc := ");
if (match_value.pan__inc().ispresent()) {
single_value->field_pan__inc.log_match(match_value.pan__inc(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_pan__inc.log();
if (single_value->field_pan__inc.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", pan_max := ");
if (match_value.pan__max().ispresent()) {
single_value->field_pan__max.log_match(match_value.pan__max(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_pan__max.log();
if (single_value->field_pan__max.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", ext_info_presence := ");
single_value->field_ext__info__presence.log_match(match_value.ext__info__presence(), legacy);
TTCN_Logger::log_event_str(", ext_info_length := ");
if (match_value.ext__info__length().ispresent()) {
single_value->field_ext__info__length.log_match(match_value.ext__info__length(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_ext__info__length.log();
if (single_value->field_ext__info__length.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", ext_info := ");
if (match_value.ext__info().ispresent()) {
single_value->field_ext__info.log_match(match_value.ext__info(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_ext__info.log();
if (single_value->field_ext__info.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(" }");
} else {
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void GprsCellOptions_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (nmo().is_bound()) nmo().set_implicit_omit();
if (t3168().is_bound()) t3168().set_implicit_omit();
if (t3192().is_bound()) t3192().set_implicit_omit();
if (drx__timer__max().is_bound()) drx__timer__max().set_implicit_omit();
if (access__burst__type().is_bound()) access__burst__type().set_implicit_omit();
if (control__ack__type().is_bound()) control__ack__type().set_implicit_omit();
if (bs__cv__max().is_bound()) bs__cv__max().set_implicit_omit();
if (pan__presence().is_bound()) pan__presence().set_implicit_omit();
if (!pan__dec().is_bound()) pan__dec() = OMIT_VALUE;
else pan__dec().set_implicit_omit();
if (!pan__inc().is_bound()) pan__inc() = OMIT_VALUE;
else pan__inc().set_implicit_omit();
if (!pan__max().is_bound()) pan__max() = OMIT_VALUE;
else pan__max().set_implicit_omit();
if (ext__info__presence().is_bound()) ext__info__presence().set_implicit_omit();
if (!ext__info__length().is_bound()) ext__info__length() = OMIT_VALUE;
else ext__info__length().set_implicit_omit();
if (!ext__info().is_bound()) ext__info() = OMIT_VALUE;
else ext__info().set_implicit_omit();
}

void GprsCellOptions_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_nmo.encode_text(text_buf);
single_value->field_t3168.encode_text(text_buf);
single_value->field_t3192.encode_text(text_buf);
single_value->field_drx__timer__max.encode_text(text_buf);
single_value->field_access__burst__type.encode_text(text_buf);
single_value->field_control__ack__type.encode_text(text_buf);
single_value->field_bs__cv__max.encode_text(text_buf);
single_value->field_pan__presence.encode_text(text_buf);
single_value->field_pan__dec.encode_text(text_buf);
single_value->field_pan__inc.encode_text(text_buf);
single_value->field_pan__max.encode_text(text_buf);
single_value->field_ext__info__presence.encode_text(text_buf);
single_value->field_ext__info__length.encode_text(text_buf);
single_value->field_ext__info.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 @RLCMAC_CSN1_Types.GprsCellOptions.");
}
}

void GprsCellOptions_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_nmo.decode_text(text_buf);
single_value->field_t3168.decode_text(text_buf);
single_value->field_t3192.decode_text(text_buf);
single_value->field_drx__timer__max.decode_text(text_buf);
single_value->field_access__burst__type.decode_text(text_buf);
single_value->field_control__ack__type.decode_text(text_buf);
single_value->field_bs__cv__max.decode_text(text_buf);
single_value->field_pan__presence.decode_text(text_buf);
single_value->field_pan__dec.decode_text(text_buf);
single_value->field_pan__inc.decode_text(text_buf);
single_value->field_pan__max.decode_text(text_buf);
single_value->field_ext__info__presence.decode_text(text_buf);
single_value->field_ext__info__length.decode_text(text_buf);
single_value->field_ext__info.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 GprsCellOptions_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 @RLCMAC_CSN1_Types.GprsCellOptions.");
}
}

void GprsCellOptions_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: {
    GprsCellOptions_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 (14<param.get_size()) {
      param.error("record template of type @RLCMAC_CSN1_Types.GprsCellOptions has 14 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) nmo().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) t3168().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) t3192().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) drx__timer__max().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) access__burst__type().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) control__ack__type().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) bs__cv__max().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) pan__presence().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) pan__dec().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) pan__inc().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) pan__max().set_param(*param.get_elem(10));
    if (param.get_size()>11 && param.get_elem(11)->get_type()!=Module_Param::MP_NotUsed) ext__info__presence().set_param(*param.get_elem(11));
    if (param.get_size()>12 && param.get_elem(12)->get_type()!=Module_Param::MP_NotUsed) ext__info__length().set_param(*param.get_elem(12));
    if (param.get_size()>13 && param.get_elem(13)->get_type()!=Module_Param::MP_NotUsed) ext__info().set_param(*param.get_elem(13));
    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(), "nmo")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nmo().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(), "t3168")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3168().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(), "t3192")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3192().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(), "drx_timer_max")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          drx__timer__max().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(), "access_burst_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          access__burst__type().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "control_ack_type")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          control__ack__type().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "bs_cv_max")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          bs__cv__max().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(), "pan_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pan__presence().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(), "pan_dec")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pan__dec().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(), "pan_inc")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pan__inc().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(), "pan_max")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pan__max().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(), "ext_info_presence")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext__info__presence().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(), "ext_info_length")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext__info__length().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(), "ext_info")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          ext__info().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 @RLCMAC_CSN1_Types.GprsCellOptions: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    GprsCellOptions_template* precondition = new GprsCellOptions_template;
    precondition->set_param(*param.get_elem(0));
    GprsCellOptions_template* implied_template = new GprsCellOptions_template;
    implied_template->set_param(*param.get_elem(1));
    *this = GprsCellOptions_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@RLCMAC_CSN1_Types.GprsCellOptions");
  }
  is_ifpresent = param.get_ifpresent();
}

void GprsCellOptions_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_nmo.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsCellOptions");
single_value->field_t3168.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsCellOptions");
single_value->field_t3192.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsCellOptions");
single_value->field_drx__timer__max.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsCellOptions");
single_value->field_access__burst__type.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsCellOptions");
single_value->field_control__ack__type.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsCellOptions");
single_value->field_bs__cv__max.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsCellOptions");
single_value->field_pan__presence.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsCellOptions");
single_value->field_pan__dec.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsCellOptions");
single_value->field_pan__inc.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsCellOptions");
single_value->field_pan__max.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsCellOptions");
single_value->field_ext__info__presence.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsCellOptions");
single_value->field_ext__info__length.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsCellOptions");
single_value->field_ext__info.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.GprsCellOptions");
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 : "@RLCMAC_CSN1_Types.GprsCellOptions");
}

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

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

void EGPRSPktChRequest::copy_value(const EGPRSPktChRequest& other_value)
{
switch (other_value.union_selection) {
case ALT_one__phase:
field_one__phase = new EGPRSPktChRequest__MC5P2RB3(*other_value.field_one__phase);
break;
case ALT_short_:
field_short_ = new EGPRSPktChRequest__NOB3P2RB3(*other_value.field_short_);
break;
case ALT_one__phase__red:
field_one__phase__red = new EGPRSPktChRequest__MCG3P2RB3(*other_value.field_one__phase__red);
break;
case ALT_two__phase:
field_two__phase = new EGPRSPktChRequest__P2RB3(*other_value.field_two__phase);
break;
case ALT_signalling:
field_signalling = new EGPRSPktChRequest__RB5(*other_value.field_signalling);
break;
case ALT_one__phase__unack:
field_one__phase__unack = new EGPRSPktChRequest__RB5(*other_value.field_one__phase__unack);
break;
case ALT_dedicated:
field_dedicated = new EGPRSPktChRequest__RB5(*other_value.field_dedicated);
break;
case ALT_emergency:
field_emergency = new EGPRSPktChRequest__RB5(*other_value.field_emergency);
break;
case ALT_two__phase__ipa:
field_two__phase__ipa = new EGPRSPktChRequest__P2RB3(*other_value.field_two__phase__ipa);
break;
case ALT_signalling__ipa:
field_signalling__ipa = new EGPRSPktChRequest__RB5(*other_value.field_signalling__ipa);
break;
default:
TTCN_error("Assignment of an unbound union value of type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
}
union_selection = other_value.union_selection;
}

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

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

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

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

boolean EGPRSPktChRequest::operator==(const EGPRSPktChRequest& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_one__phase:
return *field_one__phase == *other_value.field_one__phase;
case ALT_short_:
return *field_short_ == *other_value.field_short_;
case ALT_one__phase__red:
return *field_one__phase__red == *other_value.field_one__phase__red;
case ALT_two__phase:
return *field_two__phase == *other_value.field_two__phase;
case ALT_signalling:
return *field_signalling == *other_value.field_signalling;
case ALT_one__phase__unack:
return *field_one__phase__unack == *other_value.field_one__phase__unack;
case ALT_dedicated:
return *field_dedicated == *other_value.field_dedicated;
case ALT_emergency:
return *field_emergency == *other_value.field_emergency;
case ALT_two__phase__ipa:
return *field_two__phase__ipa == *other_value.field_two__phase__ipa;
case ALT_signalling__ipa:
return *field_signalling__ipa == *other_value.field_signalling__ipa;
default:
return FALSE;
}
}

EGPRSPktChRequest__MC5P2RB3& EGPRSPktChRequest::one__phase()
{
if (union_selection != ALT_one__phase) {
clean_up();
field_one__phase = new EGPRSPktChRequest__MC5P2RB3;
union_selection = ALT_one__phase;
}
return *field_one__phase;
}

const EGPRSPktChRequest__MC5P2RB3& EGPRSPktChRequest::one__phase() const
{
if (union_selection != ALT_one__phase) TTCN_error("Using non-selected field one_phase in a value of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *field_one__phase;
}

EGPRSPktChRequest__NOB3P2RB3& EGPRSPktChRequest::short_()
{
if (union_selection != ALT_short_) {
clean_up();
field_short_ = new EGPRSPktChRequest__NOB3P2RB3;
union_selection = ALT_short_;
}
return *field_short_;
}

const EGPRSPktChRequest__NOB3P2RB3& EGPRSPktChRequest::short_() const
{
if (union_selection != ALT_short_) TTCN_error("Using non-selected field short in a value of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *field_short_;
}

EGPRSPktChRequest__MCG3P2RB3& EGPRSPktChRequest::one__phase__red()
{
if (union_selection != ALT_one__phase__red) {
clean_up();
field_one__phase__red = new EGPRSPktChRequest__MCG3P2RB3;
union_selection = ALT_one__phase__red;
}
return *field_one__phase__red;
}

const EGPRSPktChRequest__MCG3P2RB3& EGPRSPktChRequest::one__phase__red() const
{
if (union_selection != ALT_one__phase__red) TTCN_error("Using non-selected field one_phase_red in a value of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *field_one__phase__red;
}

EGPRSPktChRequest__P2RB3& EGPRSPktChRequest::two__phase()
{
if (union_selection != ALT_two__phase) {
clean_up();
field_two__phase = new EGPRSPktChRequest__P2RB3;
union_selection = ALT_two__phase;
}
return *field_two__phase;
}

const EGPRSPktChRequest__P2RB3& EGPRSPktChRequest::two__phase() const
{
if (union_selection != ALT_two__phase) TTCN_error("Using non-selected field two_phase in a value of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *field_two__phase;
}

EGPRSPktChRequest__RB5& EGPRSPktChRequest::signalling()
{
if (union_selection != ALT_signalling) {
clean_up();
field_signalling = new EGPRSPktChRequest__RB5;
union_selection = ALT_signalling;
}
return *field_signalling;
}

const EGPRSPktChRequest__RB5& EGPRSPktChRequest::signalling() const
{
if (union_selection != ALT_signalling) TTCN_error("Using non-selected field signalling in a value of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *field_signalling;
}

EGPRSPktChRequest__RB5& EGPRSPktChRequest::one__phase__unack()
{
if (union_selection != ALT_one__phase__unack) {
clean_up();
field_one__phase__unack = new EGPRSPktChRequest__RB5;
union_selection = ALT_one__phase__unack;
}
return *field_one__phase__unack;
}

const EGPRSPktChRequest__RB5& EGPRSPktChRequest::one__phase__unack() const
{
if (union_selection != ALT_one__phase__unack) TTCN_error("Using non-selected field one_phase_unack in a value of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *field_one__phase__unack;
}

EGPRSPktChRequest__RB5& EGPRSPktChRequest::dedicated()
{
if (union_selection != ALT_dedicated) {
clean_up();
field_dedicated = new EGPRSPktChRequest__RB5;
union_selection = ALT_dedicated;
}
return *field_dedicated;
}

const EGPRSPktChRequest__RB5& EGPRSPktChRequest::dedicated() const
{
if (union_selection != ALT_dedicated) TTCN_error("Using non-selected field dedicated in a value of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *field_dedicated;
}

EGPRSPktChRequest__RB5& EGPRSPktChRequest::emergency()
{
if (union_selection != ALT_emergency) {
clean_up();
field_emergency = new EGPRSPktChRequest__RB5;
union_selection = ALT_emergency;
}
return *field_emergency;
}

const EGPRSPktChRequest__RB5& EGPRSPktChRequest::emergency() const
{
if (union_selection != ALT_emergency) TTCN_error("Using non-selected field emergency in a value of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *field_emergency;
}

EGPRSPktChRequest__P2RB3& EGPRSPktChRequest::two__phase__ipa()
{
if (union_selection != ALT_two__phase__ipa) {
clean_up();
field_two__phase__ipa = new EGPRSPktChRequest__P2RB3;
union_selection = ALT_two__phase__ipa;
}
return *field_two__phase__ipa;
}

const EGPRSPktChRequest__P2RB3& EGPRSPktChRequest::two__phase__ipa() const
{
if (union_selection != ALT_two__phase__ipa) TTCN_error("Using non-selected field two_phase_ipa in a value of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *field_two__phase__ipa;
}

EGPRSPktChRequest__RB5& EGPRSPktChRequest::signalling__ipa()
{
if (union_selection != ALT_signalling__ipa) {
clean_up();
field_signalling__ipa = new EGPRSPktChRequest__RB5;
union_selection = ALT_signalling__ipa;
}
return *field_signalling__ipa;
}

const EGPRSPktChRequest__RB5& EGPRSPktChRequest::signalling__ipa() const
{
if (union_selection != ALT_signalling__ipa) TTCN_error("Using non-selected field signalling_ipa in a value of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *field_signalling__ipa;
}

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

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

boolean EGPRSPktChRequest::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_one__phase: return field_one__phase->is_value();
case ALT_short_: return field_short_->is_value();
case ALT_one__phase__red: return field_one__phase__red->is_value();
case ALT_two__phase: return field_two__phase->is_value();
case ALT_signalling: return field_signalling->is_value();
case ALT_one__phase__unack: return field_one__phase__unack->is_value();
case ALT_dedicated: return field_dedicated->is_value();
case ALT_emergency: return field_emergency->is_value();
case ALT_two__phase__ipa: return field_two__phase__ipa->is_value();
case ALT_signalling__ipa: return field_signalling__ipa->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void EGPRSPktChRequest::clean_up()
{
switch (union_selection) {
case ALT_one__phase:
  delete field_one__phase;
  break;
case ALT_short_:
  delete field_short_;
  break;
case ALT_one__phase__red:
  delete field_one__phase__red;
  break;
case ALT_two__phase:
  delete field_two__phase;
  break;
case ALT_signalling:
  delete field_signalling;
  break;
case ALT_one__phase__unack:
  delete field_one__phase__unack;
  break;
case ALT_dedicated:
  delete field_dedicated;
  break;
case ALT_emergency:
  delete field_emergency;
  break;
case ALT_two__phase__ipa:
  delete field_two__phase__ipa;
  break;
case ALT_signalling__ipa:
  delete field_signalling__ipa;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void EGPRSPktChRequest::log() const
{
switch (union_selection) {
case ALT_one__phase:
TTCN_Logger::log_event_str("{ one_phase := ");
field_one__phase->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_short_:
TTCN_Logger::log_event_str("{ short := ");
field_short_->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_one__phase__red:
TTCN_Logger::log_event_str("{ one_phase_red := ");
field_one__phase__red->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_two__phase:
TTCN_Logger::log_event_str("{ two_phase := ");
field_two__phase->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_signalling:
TTCN_Logger::log_event_str("{ signalling := ");
field_signalling->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_one__phase__unack:
TTCN_Logger::log_event_str("{ one_phase_unack := ");
field_one__phase__unack->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_dedicated:
TTCN_Logger::log_event_str("{ dedicated := ");
field_dedicated->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_emergency:
TTCN_Logger::log_event_str("{ emergency := ");
field_emergency->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_two__phase__ipa:
TTCN_Logger::log_event_str("{ two_phase_ipa := ");
field_two__phase__ipa->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_signalling__ipa:
TTCN_Logger::log_event_str("{ signalling_ipa := ");
field_signalling__ipa->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

void EGPRSPktChRequest::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "union value");
  Module_Param_Ptr m_p = &param;
  if (m_p->get_type()==Module_Param::MP_Value_List && m_p->get_size()==0) return;
  if (m_p->get_type()!=Module_Param::MP_Assignment_List) {
    param.error("union value with field name was expected");
  }
  Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1);
  char* last_name = mp_last->get_id()->get_name();
  if (!strcmp(last_name, "one_phase")) {
    one__phase().set_param(*mp_last);
    if (!one__phase().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "short")) {
    short_().set_param(*mp_last);
    if (!short_().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "one_phase_red")) {
    one__phase__red().set_param(*mp_last);
    if (!one__phase__red().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "two_phase")) {
    two__phase().set_param(*mp_last);
    if (!two__phase().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "signalling")) {
    signalling().set_param(*mp_last);
    if (!signalling().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "one_phase_unack")) {
    one__phase__unack().set_param(*mp_last);
    if (!one__phase__unack().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "dedicated")) {
    dedicated().set_param(*mp_last);
    if (!dedicated().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "emergency")) {
    emergency().set_param(*mp_last);
    if (!emergency().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "two_phase_ipa")) {
    two__phase__ipa().set_param(*mp_last);
    if (!two__phase__ipa().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "signalling_ipa")) {
    signalling__ipa().set_param(*mp_last);
    if (!signalling__ipa().is_bound()) clean_up();
    return;
  }
  mp_last->error("Field %s does not exist in type @RLCMAC_CSN1_Types.EGPRSPktChRequest.", last_name);
}

void EGPRSPktChRequest::set_implicit_omit()
{
switch (union_selection) {
case ALT_one__phase:
field_one__phase->set_implicit_omit(); break;
case ALT_short_:
field_short_->set_implicit_omit(); break;
case ALT_one__phase__red:
field_one__phase__red->set_implicit_omit(); break;
case ALT_two__phase:
field_two__phase->set_implicit_omit(); break;
case ALT_signalling:
field_signalling->set_implicit_omit(); break;
case ALT_one__phase__unack:
field_one__phase__unack->set_implicit_omit(); break;
case ALT_dedicated:
field_dedicated->set_implicit_omit(); break;
case ALT_emergency:
field_emergency->set_implicit_omit(); break;
case ALT_two__phase__ipa:
field_two__phase__ipa->set_implicit_omit(); break;
case ALT_signalling__ipa:
field_signalling__ipa->set_implicit_omit(); break;
default: break;
}
}

void EGPRSPktChRequest::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_one__phase:
field_one__phase->encode_text(text_buf);
break;
case ALT_short_:
field_short_->encode_text(text_buf);
break;
case ALT_one__phase__red:
field_one__phase__red->encode_text(text_buf);
break;
case ALT_two__phase:
field_two__phase->encode_text(text_buf);
break;
case ALT_signalling:
field_signalling->encode_text(text_buf);
break;
case ALT_one__phase__unack:
field_one__phase__unack->encode_text(text_buf);
break;
case ALT_dedicated:
field_dedicated->encode_text(text_buf);
break;
case ALT_emergency:
field_emergency->encode_text(text_buf);
break;
case ALT_two__phase__ipa:
field_two__phase__ipa->encode_text(text_buf);
break;
case ALT_signalling__ipa:
field_signalling__ipa->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
}
}

void EGPRSPktChRequest::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_one__phase:
one__phase().decode_text(text_buf);
break;
case ALT_short_:
short_().decode_text(text_buf);
break;
case ALT_one__phase__red:
one__phase__red().decode_text(text_buf);
break;
case ALT_two__phase:
two__phase().decode_text(text_buf);
break;
case ALT_signalling:
signalling().decode_text(text_buf);
break;
case ALT_one__phase__unack:
one__phase__unack().decode_text(text_buf);
break;
case ALT_dedicated:
dedicated().decode_text(text_buf);
break;
case ALT_emergency:
emergency().decode_text(text_buf);
break;
case ALT_two__phase__ipa:
two__phase__ipa().decode_text(text_buf);
break;
case ALT_signalling__ipa:
signalling__ipa().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
}
}

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

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

int EGPRSPktChRequest::RAW_decode(
const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, 
raw_order_t top_bit_ord, boolean no_err, int sel_field, boolean, const RAW_Force_Omit* force_omit)
{
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  int decoded_length=0;
  int starting_pos=p_buf.get_pos_bit();
  if(sel_field!=-1){
    switch(sel_field){
    case 0: {
      RAW_Force_Omit field_force_omit(0, force_omit, EGPRSPktChRequest_one__phase_descr_.raw->forceomit);
      decoded_length = one__phase().RAW_decode(EGPRSPktChRequest_one__phase_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 1: {
      RAW_Force_Omit field_force_omit(1, force_omit, EGPRSPktChRequest_short__descr_.raw->forceomit);
      decoded_length = short_().RAW_decode(EGPRSPktChRequest_short__descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 2: {
      RAW_Force_Omit field_force_omit(2, force_omit, EGPRSPktChRequest_one__phase__red_descr_.raw->forceomit);
      decoded_length = one__phase__red().RAW_decode(EGPRSPktChRequest_one__phase__red_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 3: {
      RAW_Force_Omit field_force_omit(3, force_omit, EGPRSPktChRequest_two__phase_descr_.raw->forceomit);
      decoded_length = two__phase().RAW_decode(EGPRSPktChRequest_two__phase_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 4: {
      RAW_Force_Omit field_force_omit(4, force_omit, EGPRSPktChRequest_signalling_descr_.raw->forceomit);
      decoded_length = signalling().RAW_decode(EGPRSPktChRequest_signalling_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 5: {
      RAW_Force_Omit field_force_omit(5, force_omit, EGPRSPktChRequest_one__phase__unack_descr_.raw->forceomit);
      decoded_length = one__phase__unack().RAW_decode(EGPRSPktChRequest_one__phase__unack_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 6: {
      RAW_Force_Omit field_force_omit(6, force_omit, EGPRSPktChRequest_dedicated_descr_.raw->forceomit);
      decoded_length = dedicated().RAW_decode(EGPRSPktChRequest_dedicated_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 7: {
      RAW_Force_Omit field_force_omit(7, force_omit, EGPRSPktChRequest_emergency_descr_.raw->forceomit);
      decoded_length = emergency().RAW_decode(EGPRSPktChRequest_emergency_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 8: {
      RAW_Force_Omit field_force_omit(8, force_omit, EGPRSPktChRequest_two__phase__ipa_descr_.raw->forceomit);
      decoded_length = two__phase__ipa().RAW_decode(EGPRSPktChRequest_two__phase__ipa_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 9: {
      RAW_Force_Omit field_force_omit(9, force_omit, EGPRSPktChRequest_signalling__ipa_descr_.raw->forceomit);
      decoded_length = signalling__ipa().RAW_decode(EGPRSPktChRequest_signalling__ipa_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    default: break;
    }
    return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
  } else {
    boolean already_failed = FALSE;
    BITSTRING temporal_3;
    int decoded_3_length;
    BITSTRING temporal_4;
    int decoded_4_length;
    already_failed = FALSE;
    if (!already_failed) {
      BITSTRING temporal_0;
      int decoded_0_length;
      p_buf.set_pos_bit(starting_pos + 0);
      decoded_0_length = temporal_0.RAW_decode(EGPRSPktChRequest__MC5P2RB3_tag_descr_, p_buf, limit, top_bit_ord, TRUE);
      if (decoded_0_length > 0) {
        if (temporal_0 ==  bs_1) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(0, force_omit, EGPRSPktChRequest_one__phase_descr_.raw->forceomit);
          decoded_length = one__phase().RAW_decode(EGPRSPktChRequest_one__phase_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_one__phase).tag() ==  bs_1) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
    already_failed = FALSE;
    if (!already_failed) {
      BITSTRING temporal_1;
      int decoded_1_length;
      p_buf.set_pos_bit(starting_pos + 0);
      decoded_1_length = temporal_1.RAW_decode(EGPRSPktChRequest__NOB3P2RB3_tag_descr_, p_buf, limit, top_bit_ord, TRUE);
      if (decoded_1_length > 0) {
        if (temporal_1 ==  bs_7) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(1, force_omit, EGPRSPktChRequest_short__descr_.raw->forceomit);
          decoded_length = short_().RAW_decode(EGPRSPktChRequest_short__descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_short_).tag() ==  bs_7) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
    already_failed = FALSE;
    if (!already_failed) {
      BITSTRING temporal_2;
      int decoded_2_length;
      p_buf.set_pos_bit(starting_pos + 0);
      decoded_2_length = temporal_2.RAW_decode(EGPRSPktChRequest__MCG3P2RB3_tag_descr_, p_buf, limit, top_bit_ord, TRUE);
      if (decoded_2_length > 0) {
        if (temporal_2 ==  bs_8) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(2, force_omit, EGPRSPktChRequest_one__phase__red_descr_.raw->forceomit);
          decoded_length = one__phase__red().RAW_decode(EGPRSPktChRequest_one__phase__red_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_one__phase__red).tag() ==  bs_8) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
    already_failed = FALSE;
    if (!already_failed) {
      p_buf.set_pos_bit(starting_pos + 0);
      decoded_3_length = temporal_3.RAW_decode(EGPRSPktChRequest__P2RB3_tag_descr_, p_buf, limit, top_bit_ord, TRUE);
      if (decoded_3_length > 0) {
        if (temporal_3 ==  bs_9) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(3, force_omit, EGPRSPktChRequest_two__phase_descr_.raw->forceomit);
          decoded_length = two__phase().RAW_decode(EGPRSPktChRequest_two__phase_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_two__phase).tag() ==  bs_9) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
    already_failed = FALSE;
    if (!already_failed) {
      p_buf.set_pos_bit(starting_pos + 0);
      decoded_4_length = temporal_4.RAW_decode(EGPRSPktChRequest__RB5_tag_descr_, p_buf, limit, top_bit_ord, TRUE);
      if (decoded_4_length > 0) {
        if (temporal_4 ==  bs_10) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(4, force_omit, EGPRSPktChRequest_signalling_descr_.raw->forceomit);
          decoded_length = signalling().RAW_decode(EGPRSPktChRequest_signalling_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_signalling).tag() ==  bs_10) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
    already_failed = FALSE;
    if (!already_failed) {
      if (decoded_4_length > 0) {
        if (temporal_4 ==  bs_11) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(5, force_omit, EGPRSPktChRequest_one__phase__unack_descr_.raw->forceomit);
          decoded_length = one__phase__unack().RAW_decode(EGPRSPktChRequest_one__phase__unack_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_one__phase__unack).tag() ==  bs_11) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
    already_failed = FALSE;
    if (!already_failed) {
      if (decoded_4_length > 0) {
        if (temporal_4 ==  bs_12) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(6, force_omit, EGPRSPktChRequest_dedicated_descr_.raw->forceomit);
          decoded_length = dedicated().RAW_decode(EGPRSPktChRequest_dedicated_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_dedicated).tag() ==  bs_12) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
    already_failed = FALSE;
    if (!already_failed) {
      if (decoded_4_length > 0) {
        if (temporal_4 ==  bs_13) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(7, force_omit, EGPRSPktChRequest_emergency_descr_.raw->forceomit);
          decoded_length = emergency().RAW_decode(EGPRSPktChRequest_emergency_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_emergency).tag() ==  bs_13) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
    already_failed = FALSE;
    if (!already_failed) {
      if (decoded_3_length > 0) {
        if (temporal_3 ==  bs_14) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(8, force_omit, EGPRSPktChRequest_two__phase__ipa_descr_.raw->forceomit);
          decoded_length = two__phase__ipa().RAW_decode(EGPRSPktChRequest_two__phase__ipa_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_two__phase__ipa).tag() ==  bs_14) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
    already_failed = FALSE;
    if (!already_failed) {
      if (decoded_4_length > 0) {
        if (temporal_4 ==  bs_15) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(9, force_omit, EGPRSPktChRequest_signalling__ipa_descr_.raw->forceomit);
          decoded_length = signalling__ipa().RAW_decode(EGPRSPktChRequest_signalling__ipa_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_signalling__ipa).tag() ==  bs_15) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
 }
 clean_up();
 return -1;
}

int EGPRSPktChRequest::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
{
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 10;  myleaf.body.node.nodes = init_nodes_of_enc_tree(10);
  memset(myleaf.body.node.nodes, 0, 10 * sizeof(RAW_enc_tree *));
  switch (union_selection) {
  case ALT_one__phase:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, EGPRSPktChRequest_one__phase_descr_.raw);
    encoded_length = field_one__phase->RAW_encode(EGPRSPktChRequest_one__phase_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &EGPRSPktChRequest_one__phase_descr_;
    if ((*field_one__phase).tag() !=  bs_1) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={0,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_1.RAW_encode(EGPRSPktChRequest__MC5P2RB3_tag_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  case ALT_short_:
    myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, EGPRSPktChRequest_short__descr_.raw);
    encoded_length = field_short_->RAW_encode(EGPRSPktChRequest_short__descr_, *myleaf.body.node.nodes[1]);
    myleaf.body.node.nodes[1]->coding_descr = &EGPRSPktChRequest_short__descr_;
    if ((*field_short_).tag() !=  bs_7) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={1,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_7.RAW_encode(EGPRSPktChRequest__NOB3P2RB3_tag_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  case ALT_one__phase__red:
    myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, EGPRSPktChRequest_one__phase__red_descr_.raw);
    encoded_length = field_one__phase__red->RAW_encode(EGPRSPktChRequest_one__phase__red_descr_, *myleaf.body.node.nodes[2]);
    myleaf.body.node.nodes[2]->coding_descr = &EGPRSPktChRequest_one__phase__red_descr_;
    if ((*field_one__phase__red).tag() !=  bs_8) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={2,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_8.RAW_encode(EGPRSPktChRequest__MCG3P2RB3_tag_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  case ALT_two__phase:
    myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 3, EGPRSPktChRequest_two__phase_descr_.raw);
    encoded_length = field_two__phase->RAW_encode(EGPRSPktChRequest_two__phase_descr_, *myleaf.body.node.nodes[3]);
    myleaf.body.node.nodes[3]->coding_descr = &EGPRSPktChRequest_two__phase_descr_;
    if ((*field_two__phase).tag() !=  bs_9) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={3,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_9.RAW_encode(EGPRSPktChRequest__P2RB3_tag_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  case ALT_signalling:
    myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 4, EGPRSPktChRequest_signalling_descr_.raw);
    encoded_length = field_signalling->RAW_encode(EGPRSPktChRequest_signalling_descr_, *myleaf.body.node.nodes[4]);
    myleaf.body.node.nodes[4]->coding_descr = &EGPRSPktChRequest_signalling_descr_;
    if ((*field_signalling).tag() !=  bs_10) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={4,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_10.RAW_encode(EGPRSPktChRequest__RB5_tag_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  case ALT_one__phase__unack:
    myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 5, EGPRSPktChRequest_one__phase__unack_descr_.raw);
    encoded_length = field_one__phase__unack->RAW_encode(EGPRSPktChRequest_one__phase__unack_descr_, *myleaf.body.node.nodes[5]);
    myleaf.body.node.nodes[5]->coding_descr = &EGPRSPktChRequest_one__phase__unack_descr_;
    if ((*field_one__phase__unack).tag() !=  bs_11) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={5,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_11.RAW_encode(EGPRSPktChRequest__RB5_tag_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  case ALT_dedicated:
    myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 6, EGPRSPktChRequest_dedicated_descr_.raw);
    encoded_length = field_dedicated->RAW_encode(EGPRSPktChRequest_dedicated_descr_, *myleaf.body.node.nodes[6]);
    myleaf.body.node.nodes[6]->coding_descr = &EGPRSPktChRequest_dedicated_descr_;
    if ((*field_dedicated).tag() !=  bs_12) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={6,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_12.RAW_encode(EGPRSPktChRequest__RB5_tag_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  case ALT_emergency:
    myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 7, EGPRSPktChRequest_emergency_descr_.raw);
    encoded_length = field_emergency->RAW_encode(EGPRSPktChRequest_emergency_descr_, *myleaf.body.node.nodes[7]);
    myleaf.body.node.nodes[7]->coding_descr = &EGPRSPktChRequest_emergency_descr_;
    if ((*field_emergency).tag() !=  bs_13) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={7,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_13.RAW_encode(EGPRSPktChRequest__RB5_tag_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  case ALT_two__phase__ipa:
    myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 8, EGPRSPktChRequest_two__phase__ipa_descr_.raw);
    encoded_length = field_two__phase__ipa->RAW_encode(EGPRSPktChRequest_two__phase__ipa_descr_, *myleaf.body.node.nodes[8]);
    myleaf.body.node.nodes[8]->coding_descr = &EGPRSPktChRequest_two__phase__ipa_descr_;
    if ((*field_two__phase__ipa).tag() !=  bs_14) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={8,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_14.RAW_encode(EGPRSPktChRequest__P2RB3_tag_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  case ALT_signalling__ipa:
    myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 9, EGPRSPktChRequest_signalling__ipa_descr_.raw);
    encoded_length = field_signalling__ipa->RAW_encode(EGPRSPktChRequest_signalling__ipa_descr_, *myleaf.body.node.nodes[9]);
    myleaf.body.node.nodes[9]->coding_descr = &EGPRSPktChRequest_signalling__ipa_descr_;
    if ((*field_signalling__ipa).tag() !=  bs_15) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={9,0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,2,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_15.RAW_encode(EGPRSPktChRequest__RB5_tag_descr_,*temp_leaf);
  } else {
    TTCN_EncDec_ErrorContext::error
      (TTCN_EncDec::ET_OMITTED_TAG, "Encoding a tagged, but omitted value.");
  }
  free_tree_pos(pr_pos0.pos);
  }
    }
    break;
  default:
    TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  }
  return encoded_length;
}

void EGPRSPktChRequest_template::copy_value(const EGPRSPktChRequest& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case EGPRSPktChRequest::ALT_one__phase:
single_value.field_one__phase = new EGPRSPktChRequest__MC5P2RB3_template(other_value.one__phase());
break;
case EGPRSPktChRequest::ALT_short_:
single_value.field_short_ = new EGPRSPktChRequest__NOB3P2RB3_template(other_value.short_());
break;
case EGPRSPktChRequest::ALT_one__phase__red:
single_value.field_one__phase__red = new EGPRSPktChRequest__MCG3P2RB3_template(other_value.one__phase__red());
break;
case EGPRSPktChRequest::ALT_two__phase:
single_value.field_two__phase = new EGPRSPktChRequest__P2RB3_template(other_value.two__phase());
break;
case EGPRSPktChRequest::ALT_signalling:
single_value.field_signalling = new EGPRSPktChRequest__RB5_template(other_value.signalling());
break;
case EGPRSPktChRequest::ALT_one__phase__unack:
single_value.field_one__phase__unack = new EGPRSPktChRequest__RB5_template(other_value.one__phase__unack());
break;
case EGPRSPktChRequest::ALT_dedicated:
single_value.field_dedicated = new EGPRSPktChRequest__RB5_template(other_value.dedicated());
break;
case EGPRSPktChRequest::ALT_emergency:
single_value.field_emergency = new EGPRSPktChRequest__RB5_template(other_value.emergency());
break;
case EGPRSPktChRequest::ALT_two__phase__ipa:
single_value.field_two__phase__ipa = new EGPRSPktChRequest__P2RB3_template(other_value.two__phase__ipa());
break;
case EGPRSPktChRequest::ALT_signalling__ipa:
single_value.field_signalling__ipa = new EGPRSPktChRequest__RB5_template(other_value.signalling__ipa());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
}
set_selection(SPECIFIC_VALUE);
}

void EGPRSPktChRequest_template::copy_template(const EGPRSPktChRequest_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value.union_selection = other_value.single_value.union_selection;
switch (single_value.union_selection) {
case EGPRSPktChRequest::ALT_one__phase:
single_value.field_one__phase = new EGPRSPktChRequest__MC5P2RB3_template(*other_value.single_value.field_one__phase);
break;
case EGPRSPktChRequest::ALT_short_:
single_value.field_short_ = new EGPRSPktChRequest__NOB3P2RB3_template(*other_value.single_value.field_short_);
break;
case EGPRSPktChRequest::ALT_one__phase__red:
single_value.field_one__phase__red = new EGPRSPktChRequest__MCG3P2RB3_template(*other_value.single_value.field_one__phase__red);
break;
case EGPRSPktChRequest::ALT_two__phase:
single_value.field_two__phase = new EGPRSPktChRequest__P2RB3_template(*other_value.single_value.field_two__phase);
break;
case EGPRSPktChRequest::ALT_signalling:
single_value.field_signalling = new EGPRSPktChRequest__RB5_template(*other_value.single_value.field_signalling);
break;
case EGPRSPktChRequest::ALT_one__phase__unack:
single_value.field_one__phase__unack = new EGPRSPktChRequest__RB5_template(*other_value.single_value.field_one__phase__unack);
break;
case EGPRSPktChRequest::ALT_dedicated:
single_value.field_dedicated = new EGPRSPktChRequest__RB5_template(*other_value.single_value.field_dedicated);
break;
case EGPRSPktChRequest::ALT_emergency:
single_value.field_emergency = new EGPRSPktChRequest__RB5_template(*other_value.single_value.field_emergency);
break;
case EGPRSPktChRequest::ALT_two__phase__ipa:
single_value.field_two__phase__ipa = new EGPRSPktChRequest__P2RB3_template(*other_value.single_value.field_two__phase__ipa);
break;
case EGPRSPktChRequest::ALT_signalling__ipa:
single_value.field_signalling__ipa = new EGPRSPktChRequest__RB5_template(*other_value.single_value.field_signalling__ipa);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
}
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 EGPRSPktChRequest_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 EGPRSPktChRequest_template(*other_value.implication_.precondition);
implication_.implied_template = new EGPRSPktChRequest_template(*other_value.implication_.implied_template);
break;
case DYNAMIC_MATCH:
dyn_match = other_value.dyn_match;
dyn_match->ref_count++;
break;
default:
TTCN_error("Copying an uninitialized template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
}
set_selection(other_value);
}

EGPRSPktChRequest_template::EGPRSPktChRequest_template()
{
}

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

EGPRSPktChRequest_template::EGPRSPktChRequest_template(const EGPRSPktChRequest& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void EGPRSPktChRequest_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case EGPRSPktChRequest::ALT_one__phase:
delete single_value.field_one__phase;
break;
case EGPRSPktChRequest::ALT_short_:
delete single_value.field_short_;
break;
case EGPRSPktChRequest::ALT_one__phase__red:
delete single_value.field_one__phase__red;
break;
case EGPRSPktChRequest::ALT_two__phase:
delete single_value.field_two__phase;
break;
case EGPRSPktChRequest::ALT_signalling:
delete single_value.field_signalling;
break;
case EGPRSPktChRequest::ALT_one__phase__unack:
delete single_value.field_one__phase__unack;
break;
case EGPRSPktChRequest::ALT_dedicated:
delete single_value.field_dedicated;
break;
case EGPRSPktChRequest::ALT_emergency:
delete single_value.field_emergency;
break;
case EGPRSPktChRequest::ALT_two__phase__ipa:
delete single_value.field_two__phase__ipa;
break;
case EGPRSPktChRequest::ALT_signalling__ipa:
delete single_value.field_signalling__ipa;
default:
break;
}
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
case CONJUNCTION_MATCH:
delete [] value_list.list_value;
break;
case IMPLICATION_MATCH:
delete implication_.precondition;
delete implication_.implied_template;
break;
case DYNAMIC_MATCH:
dyn_match->ref_count--;
if (dyn_match->ref_count == 0) {
delete dyn_match->ptr;
delete dyn_match;
}
break;
default:
break;
}
template_selection = UNINITIALIZED_TEMPLATE;
}

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

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

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

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

boolean EGPRSPktChRequest_template::match(const EGPRSPktChRequest& 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:
{
EGPRSPktChRequest::union_selection_type value_selection = other_value.get_selection();
if (value_selection == EGPRSPktChRequest::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case EGPRSPktChRequest::ALT_one__phase:
return single_value.field_one__phase->match(other_value.one__phase(), legacy);
case EGPRSPktChRequest::ALT_short_:
return single_value.field_short_->match(other_value.short_(), legacy);
case EGPRSPktChRequest::ALT_one__phase__red:
return single_value.field_one__phase__red->match(other_value.one__phase__red(), legacy);
case EGPRSPktChRequest::ALT_two__phase:
return single_value.field_two__phase->match(other_value.two__phase(), legacy);
case EGPRSPktChRequest::ALT_signalling:
return single_value.field_signalling->match(other_value.signalling(), legacy);
case EGPRSPktChRequest::ALT_one__phase__unack:
return single_value.field_one__phase__unack->match(other_value.one__phase__unack(), legacy);
case EGPRSPktChRequest::ALT_dedicated:
return single_value.field_dedicated->match(other_value.dedicated(), legacy);
case EGPRSPktChRequest::ALT_emergency:
return single_value.field_emergency->match(other_value.emergency(), legacy);
case EGPRSPktChRequest::ALT_two__phase__ipa:
return single_value.field_two__phase__ipa->match(other_value.two__phase__ipa(), legacy);
case EGPRSPktChRequest::ALT_signalling__ipa:
return single_value.field_signalling__ipa->match(other_value.signalling__ipa(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
}
}
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
case CONJUNCTION_MATCH:
for (unsigned int i = 0; i < value_list.n_values; i++) {
if (!value_list.list_value[i].match(other_value)) {
return FALSE;
}
}
return TRUE;
case IMPLICATION_MATCH:
return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value);
case DYNAMIC_MATCH:
return dyn_match->ptr->match(other_value);
default:
TTCN_error ("Matching an uninitialized template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
}
return FALSE;
}

boolean EGPRSPktChRequest_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case EGPRSPktChRequest::ALT_one__phase:
return single_value.field_one__phase->is_value();
case EGPRSPktChRequest::ALT_short_:
return single_value.field_short_->is_value();
case EGPRSPktChRequest::ALT_one__phase__red:
return single_value.field_one__phase__red->is_value();
case EGPRSPktChRequest::ALT_two__phase:
return single_value.field_two__phase->is_value();
case EGPRSPktChRequest::ALT_signalling:
return single_value.field_signalling->is_value();
case EGPRSPktChRequest::ALT_one__phase__unack:
return single_value.field_one__phase__unack->is_value();
case EGPRSPktChRequest::ALT_dedicated:
return single_value.field_dedicated->is_value();
case EGPRSPktChRequest::ALT_emergency:
return single_value.field_emergency->is_value();
case EGPRSPktChRequest::ALT_two__phase__ipa:
return single_value.field_two__phase__ipa->is_value();
case EGPRSPktChRequest::ALT_signalling__ipa:
return single_value.field_signalling__ipa->is_value();
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
}
}

EGPRSPktChRequest EGPRSPktChRequest_template::valueof() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent)
TTCN_error("Performing a valueof or send operation on a non-specific template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
EGPRSPktChRequest ret_val;
switch (single_value.union_selection) {
case EGPRSPktChRequest::ALT_one__phase:
ret_val.one__phase() = single_value.field_one__phase->valueof();
break;
case EGPRSPktChRequest::ALT_short_:
ret_val.short_() = single_value.field_short_->valueof();
break;
case EGPRSPktChRequest::ALT_one__phase__red:
ret_val.one__phase__red() = single_value.field_one__phase__red->valueof();
break;
case EGPRSPktChRequest::ALT_two__phase:
ret_val.two__phase() = single_value.field_two__phase->valueof();
break;
case EGPRSPktChRequest::ALT_signalling:
ret_val.signalling() = single_value.field_signalling->valueof();
break;
case EGPRSPktChRequest::ALT_one__phase__unack:
ret_val.one__phase__unack() = single_value.field_one__phase__unack->valueof();
break;
case EGPRSPktChRequest::ALT_dedicated:
ret_val.dedicated() = single_value.field_dedicated->valueof();
break;
case EGPRSPktChRequest::ALT_emergency:
ret_val.emergency() = single_value.field_emergency->valueof();
break;
case EGPRSPktChRequest::ALT_two__phase__ipa:
ret_val.two__phase__ipa() = single_value.field_two__phase__ipa->valueof();
break;
case EGPRSPktChRequest::ALT_signalling__ipa:
ret_val.signalling__ipa() = single_value.field_signalling__ipa->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
}
return ret_val;
}

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

EGPRSPktChRequest__MC5P2RB3_template& EGPRSPktChRequest_template::one__phase()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != EGPRSPktChRequest::ALT_one__phase) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_one__phase = new EGPRSPktChRequest__MC5P2RB3_template(ANY_VALUE);
else single_value.field_one__phase = new EGPRSPktChRequest__MC5P2RB3_template;
single_value.union_selection = EGPRSPktChRequest::ALT_one__phase;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_one__phase;
}

const EGPRSPktChRequest__MC5P2RB3_template& EGPRSPktChRequest_template::one__phase() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field one_phase in a non-specific template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
if (single_value.union_selection != EGPRSPktChRequest::ALT_one__phase) TTCN_error("Accessing non-selected field one_phase in a template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *single_value.field_one__phase;
}

EGPRSPktChRequest__NOB3P2RB3_template& EGPRSPktChRequest_template::short_()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != EGPRSPktChRequest::ALT_short_) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_short_ = new EGPRSPktChRequest__NOB3P2RB3_template(ANY_VALUE);
else single_value.field_short_ = new EGPRSPktChRequest__NOB3P2RB3_template;
single_value.union_selection = EGPRSPktChRequest::ALT_short_;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_short_;
}

const EGPRSPktChRequest__NOB3P2RB3_template& EGPRSPktChRequest_template::short_() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field short in a non-specific template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
if (single_value.union_selection != EGPRSPktChRequest::ALT_short_) TTCN_error("Accessing non-selected field short in a template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *single_value.field_short_;
}

EGPRSPktChRequest__MCG3P2RB3_template& EGPRSPktChRequest_template::one__phase__red()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != EGPRSPktChRequest::ALT_one__phase__red) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_one__phase__red = new EGPRSPktChRequest__MCG3P2RB3_template(ANY_VALUE);
else single_value.field_one__phase__red = new EGPRSPktChRequest__MCG3P2RB3_template;
single_value.union_selection = EGPRSPktChRequest::ALT_one__phase__red;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_one__phase__red;
}

const EGPRSPktChRequest__MCG3P2RB3_template& EGPRSPktChRequest_template::one__phase__red() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field one_phase_red in a non-specific template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
if (single_value.union_selection != EGPRSPktChRequest::ALT_one__phase__red) TTCN_error("Accessing non-selected field one_phase_red in a template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *single_value.field_one__phase__red;
}

EGPRSPktChRequest__P2RB3_template& EGPRSPktChRequest_template::two__phase()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != EGPRSPktChRequest::ALT_two__phase) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_two__phase = new EGPRSPktChRequest__P2RB3_template(ANY_VALUE);
else single_value.field_two__phase = new EGPRSPktChRequest__P2RB3_template;
single_value.union_selection = EGPRSPktChRequest::ALT_two__phase;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_two__phase;
}

const EGPRSPktChRequest__P2RB3_template& EGPRSPktChRequest_template::two__phase() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field two_phase in a non-specific template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
if (single_value.union_selection != EGPRSPktChRequest::ALT_two__phase) TTCN_error("Accessing non-selected field two_phase in a template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *single_value.field_two__phase;
}

EGPRSPktChRequest__RB5_template& EGPRSPktChRequest_template::signalling()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != EGPRSPktChRequest::ALT_signalling) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_signalling = new EGPRSPktChRequest__RB5_template(ANY_VALUE);
else single_value.field_signalling = new EGPRSPktChRequest__RB5_template;
single_value.union_selection = EGPRSPktChRequest::ALT_signalling;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_signalling;
}

const EGPRSPktChRequest__RB5_template& EGPRSPktChRequest_template::signalling() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field signalling in a non-specific template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
if (single_value.union_selection != EGPRSPktChRequest::ALT_signalling) TTCN_error("Accessing non-selected field signalling in a template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *single_value.field_signalling;
}

EGPRSPktChRequest__RB5_template& EGPRSPktChRequest_template::one__phase__unack()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != EGPRSPktChRequest::ALT_one__phase__unack) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_one__phase__unack = new EGPRSPktChRequest__RB5_template(ANY_VALUE);
else single_value.field_one__phase__unack = new EGPRSPktChRequest__RB5_template;
single_value.union_selection = EGPRSPktChRequest::ALT_one__phase__unack;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_one__phase__unack;
}

const EGPRSPktChRequest__RB5_template& EGPRSPktChRequest_template::one__phase__unack() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field one_phase_unack in a non-specific template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
if (single_value.union_selection != EGPRSPktChRequest::ALT_one__phase__unack) TTCN_error("Accessing non-selected field one_phase_unack in a template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *single_value.field_one__phase__unack;
}

EGPRSPktChRequest__RB5_template& EGPRSPktChRequest_template::dedicated()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != EGPRSPktChRequest::ALT_dedicated) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_dedicated = new EGPRSPktChRequest__RB5_template(ANY_VALUE);
else single_value.field_dedicated = new EGPRSPktChRequest__RB5_template;
single_value.union_selection = EGPRSPktChRequest::ALT_dedicated;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_dedicated;
}

const EGPRSPktChRequest__RB5_template& EGPRSPktChRequest_template::dedicated() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dedicated in a non-specific template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
if (single_value.union_selection != EGPRSPktChRequest::ALT_dedicated) TTCN_error("Accessing non-selected field dedicated in a template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *single_value.field_dedicated;
}

EGPRSPktChRequest__RB5_template& EGPRSPktChRequest_template::emergency()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != EGPRSPktChRequest::ALT_emergency) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_emergency = new EGPRSPktChRequest__RB5_template(ANY_VALUE);
else single_value.field_emergency = new EGPRSPktChRequest__RB5_template;
single_value.union_selection = EGPRSPktChRequest::ALT_emergency;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_emergency;
}

const EGPRSPktChRequest__RB5_template& EGPRSPktChRequest_template::emergency() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field emergency in a non-specific template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
if (single_value.union_selection != EGPRSPktChRequest::ALT_emergency) TTCN_error("Accessing non-selected field emergency in a template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *single_value.field_emergency;
}

EGPRSPktChRequest__P2RB3_template& EGPRSPktChRequest_template::two__phase__ipa()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != EGPRSPktChRequest::ALT_two__phase__ipa) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_two__phase__ipa = new EGPRSPktChRequest__P2RB3_template(ANY_VALUE);
else single_value.field_two__phase__ipa = new EGPRSPktChRequest__P2RB3_template;
single_value.union_selection = EGPRSPktChRequest::ALT_two__phase__ipa;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_two__phase__ipa;
}

const EGPRSPktChRequest__P2RB3_template& EGPRSPktChRequest_template::two__phase__ipa() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field two_phase_ipa in a non-specific template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
if (single_value.union_selection != EGPRSPktChRequest::ALT_two__phase__ipa) TTCN_error("Accessing non-selected field two_phase_ipa in a template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *single_value.field_two__phase__ipa;
}

EGPRSPktChRequest__RB5_template& EGPRSPktChRequest_template::signalling__ipa()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != EGPRSPktChRequest::ALT_signalling__ipa) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_signalling__ipa = new EGPRSPktChRequest__RB5_template(ANY_VALUE);
else single_value.field_signalling__ipa = new EGPRSPktChRequest__RB5_template;
single_value.union_selection = EGPRSPktChRequest::ALT_signalling__ipa;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_signalling__ipa;
}

const EGPRSPktChRequest__RB5_template& EGPRSPktChRequest_template::signalling__ipa() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field signalling_ipa in a non-specific template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
if (single_value.union_selection != EGPRSPktChRequest::ALT_signalling__ipa) TTCN_error("Accessing non-selected field signalling_ipa in a template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
return *single_value.field_signalling__ipa;
}

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

void EGPRSPktChRequest_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case EGPRSPktChRequest::ALT_one__phase:
TTCN_Logger::log_event_str("{ one_phase := ");
single_value.field_one__phase->log();
TTCN_Logger::log_event_str(" }");
break;
case EGPRSPktChRequest::ALT_short_:
TTCN_Logger::log_event_str("{ short := ");
single_value.field_short_->log();
TTCN_Logger::log_event_str(" }");
break;
case EGPRSPktChRequest::ALT_one__phase__red:
TTCN_Logger::log_event_str("{ one_phase_red := ");
single_value.field_one__phase__red->log();
TTCN_Logger::log_event_str(" }");
break;
case EGPRSPktChRequest::ALT_two__phase:
TTCN_Logger::log_event_str("{ two_phase := ");
single_value.field_two__phase->log();
TTCN_Logger::log_event_str(" }");
break;
case EGPRSPktChRequest::ALT_signalling:
TTCN_Logger::log_event_str("{ signalling := ");
single_value.field_signalling->log();
TTCN_Logger::log_event_str(" }");
break;
case EGPRSPktChRequest::ALT_one__phase__unack:
TTCN_Logger::log_event_str("{ one_phase_unack := ");
single_value.field_one__phase__unack->log();
TTCN_Logger::log_event_str(" }");
break;
case EGPRSPktChRequest::ALT_dedicated:
TTCN_Logger::log_event_str("{ dedicated := ");
single_value.field_dedicated->log();
TTCN_Logger::log_event_str(" }");
break;
case EGPRSPktChRequest::ALT_emergency:
TTCN_Logger::log_event_str("{ emergency := ");
single_value.field_emergency->log();
TTCN_Logger::log_event_str(" }");
break;
case EGPRSPktChRequest::ALT_two__phase__ipa:
TTCN_Logger::log_event_str("{ two_phase_ipa := ");
single_value.field_two__phase__ipa->log();
TTCN_Logger::log_event_str(" }");
break;
case EGPRSPktChRequest::ALT_signalling__ipa:
TTCN_Logger::log_event_str("{ signalling_ipa := ");
single_value.field_signalling__ipa->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_str("<invalid selector>");
}
break;
case COMPLEMENTED_LIST:
TTCN_Logger::log_event_str("complement");
case CONJUNCTION_MATCH:
if (template_selection == CONJUNCTION_MATCH) {
TTCN_Logger::log_event_str("conjunct");
}
case VALUE_LIST:
TTCN_Logger::log_char('(');
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) {
if (list_count > 0) TTCN_Logger::log_event_str(", ");
value_list.list_value[list_count].log();
}
TTCN_Logger::log_char(')');
break;
case IMPLICATION_MATCH:
implication_.precondition->log();
TTCN_Logger::log_event_str(" implies ");
implication_.implied_template->log();
break;
case DYNAMIC_MATCH:
TTCN_Logger::log_event_str("@dynamic template");
break;
default:
log_generic();
}
log_ifpresent();
}

void EGPRSPktChRequest_template::log_match(const EGPRSPktChRequest& match_value, boolean legacy) const
{
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity() && match(match_value, legacy)){
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str(" matched");
return;
}
if (template_selection == SPECIFIC_VALUE && single_value.union_selection == match_value.get_selection()) {
size_t previous_size = TTCN_Logger::get_logmatch_buffer_len();
switch (single_value.union_selection) {
case EGPRSPktChRequest::ALT_one__phase:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".one_phase");
single_value.field_one__phase->log_match(match_value.one__phase(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ one_phase := ");
single_value.field_one__phase->log_match(match_value.one__phase(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case EGPRSPktChRequest::ALT_short_:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".short");
single_value.field_short_->log_match(match_value.short_(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ short := ");
single_value.field_short_->log_match(match_value.short_(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case EGPRSPktChRequest::ALT_one__phase__red:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".one_phase_red");
single_value.field_one__phase__red->log_match(match_value.one__phase__red(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ one_phase_red := ");
single_value.field_one__phase__red->log_match(match_value.one__phase__red(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case EGPRSPktChRequest::ALT_two__phase:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".two_phase");
single_value.field_two__phase->log_match(match_value.two__phase(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ two_phase := ");
single_value.field_two__phase->log_match(match_value.two__phase(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case EGPRSPktChRequest::ALT_signalling:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".signalling");
single_value.field_signalling->log_match(match_value.signalling(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ signalling := ");
single_value.field_signalling->log_match(match_value.signalling(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case EGPRSPktChRequest::ALT_one__phase__unack:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".one_phase_unack");
single_value.field_one__phase__unack->log_match(match_value.one__phase__unack(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ one_phase_unack := ");
single_value.field_one__phase__unack->log_match(match_value.one__phase__unack(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case EGPRSPktChRequest::ALT_dedicated:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".dedicated");
single_value.field_dedicated->log_match(match_value.dedicated(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ dedicated := ");
single_value.field_dedicated->log_match(match_value.dedicated(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case EGPRSPktChRequest::ALT_emergency:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".emergency");
single_value.field_emergency->log_match(match_value.emergency(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ emergency := ");
single_value.field_emergency->log_match(match_value.emergency(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case EGPRSPktChRequest::ALT_two__phase__ipa:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".two_phase_ipa");
single_value.field_two__phase__ipa->log_match(match_value.two__phase__ipa(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ two_phase_ipa := ");
single_value.field_two__phase__ipa->log_match(match_value.two__phase__ipa(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case EGPRSPktChRequest::ALT_signalling__ipa:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".signalling_ipa");
single_value.field_signalling__ipa->log_match(match_value.signalling__ipa(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ signalling_ipa := ");
single_value.field_signalling__ipa->log_match(match_value.signalling__ipa(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
default:
TTCN_Logger::print_logmatch_buffer();
TTCN_Logger::log_event_str("<invalid selector>");
}
} else {
TTCN_Logger::print_logmatch_buffer();
match_value.log();
TTCN_Logger::log_event_str(" with ");
log();
if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
}

void EGPRSPktChRequest_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
switch (single_value.union_selection) {
case EGPRSPktChRequest::ALT_one__phase:
single_value.field_one__phase->set_implicit_omit(); break;
case EGPRSPktChRequest::ALT_short_:
single_value.field_short_->set_implicit_omit(); break;
case EGPRSPktChRequest::ALT_one__phase__red:
single_value.field_one__phase__red->set_implicit_omit(); break;
case EGPRSPktChRequest::ALT_two__phase:
single_value.field_two__phase->set_implicit_omit(); break;
case EGPRSPktChRequest::ALT_signalling:
single_value.field_signalling->set_implicit_omit(); break;
case EGPRSPktChRequest::ALT_one__phase__unack:
single_value.field_one__phase__unack->set_implicit_omit(); break;
case EGPRSPktChRequest::ALT_dedicated:
single_value.field_dedicated->set_implicit_omit(); break;
case EGPRSPktChRequest::ALT_emergency:
single_value.field_emergency->set_implicit_omit(); break;
case EGPRSPktChRequest::ALT_two__phase__ipa:
single_value.field_two__phase__ipa->set_implicit_omit(); break;
case EGPRSPktChRequest::ALT_signalling__ipa:
single_value.field_signalling__ipa->set_implicit_omit(); break;
default: break;
}
}

void EGPRSPktChRequest_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
text_buf.push_int(single_value.union_selection);
switch (single_value.union_selection) {
case EGPRSPktChRequest::ALT_one__phase:
single_value.field_one__phase->encode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_short_:
single_value.field_short_->encode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_one__phase__red:
single_value.field_one__phase__red->encode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_two__phase:
single_value.field_two__phase->encode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_signalling:
single_value.field_signalling->encode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_one__phase__unack:
single_value.field_one__phase__unack->encode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_dedicated:
single_value.field_dedicated->encode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_emergency:
single_value.field_emergency->encode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_two__phase__ipa:
single_value.field_two__phase__ipa->encode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_signalling__ipa:
single_value.field_signalling__ipa->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
text_buf.push_int(value_list.n_values);
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an uninitialized template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
}
}

void EGPRSPktChRequest_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
{
single_value.union_selection = EGPRSPktChRequest::UNBOUND_VALUE;
EGPRSPktChRequest::union_selection_type new_selection = (EGPRSPktChRequest::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case EGPRSPktChRequest::ALT_one__phase:
single_value.field_one__phase = new EGPRSPktChRequest__MC5P2RB3_template;
single_value.field_one__phase->decode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_short_:
single_value.field_short_ = new EGPRSPktChRequest__NOB3P2RB3_template;
single_value.field_short_->decode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_one__phase__red:
single_value.field_one__phase__red = new EGPRSPktChRequest__MCG3P2RB3_template;
single_value.field_one__phase__red->decode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_two__phase:
single_value.field_two__phase = new EGPRSPktChRequest__P2RB3_template;
single_value.field_two__phase->decode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_signalling:
single_value.field_signalling = new EGPRSPktChRequest__RB5_template;
single_value.field_signalling->decode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_one__phase__unack:
single_value.field_one__phase__unack = new EGPRSPktChRequest__RB5_template;
single_value.field_one__phase__unack->decode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_dedicated:
single_value.field_dedicated = new EGPRSPktChRequest__RB5_template;
single_value.field_dedicated->decode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_emergency:
single_value.field_emergency = new EGPRSPktChRequest__RB5_template;
single_value.field_emergency->decode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_two__phase__ipa:
single_value.field_two__phase__ipa = new EGPRSPktChRequest__P2RB3_template;
single_value.field_two__phase__ipa->decode_text(text_buf);
break;
case EGPRSPktChRequest::ALT_signalling__ipa:
single_value.field_signalling__ipa = new EGPRSPktChRequest__RB5_template;
single_value.field_signalling__ipa->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
}
single_value.union_selection = new_selection;
}
case OMIT_VALUE:
case ANY_VALUE:
case ANY_OR_OMIT:
break;
case VALUE_LIST:
case COMPLEMENTED_LIST:
value_list.n_values = text_buf.pull_int().get_val();
value_list.list_value = new EGPRSPktChRequest_template[value_list.n_values];
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
value_list.list_value[list_count].decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized selector was received in a template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
}
}

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

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

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

void EGPRSPktChRequest_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const
{
if (template_selection==UNINITIALIZED_TEMPLATE) return;
switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) {
case TR_OMIT:
if (template_selection==OMIT_VALUE) return;
case TR_VALUE:
if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break;
switch (single_value.union_selection) {
case EGPRSPktChRequest::ALT_one__phase:
single_value.field_one__phase->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest");
return;
case EGPRSPktChRequest::ALT_short_:
single_value.field_short_->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest");
return;
case EGPRSPktChRequest::ALT_one__phase__red:
single_value.field_one__phase__red->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest");
return;
case EGPRSPktChRequest::ALT_two__phase:
single_value.field_two__phase->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest");
return;
case EGPRSPktChRequest::ALT_signalling:
single_value.field_signalling->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest");
return;
case EGPRSPktChRequest::ALT_one__phase__unack:
single_value.field_one__phase__unack->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest");
return;
case EGPRSPktChRequest::ALT_dedicated:
single_value.field_dedicated->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest");
return;
case EGPRSPktChRequest::ALT_emergency:
single_value.field_emergency->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest");
return;
case EGPRSPktChRequest::ALT_two__phase__ipa:
single_value.field_two__phase__ipa->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest");
return;
case EGPRSPktChRequest::ALT_signalling__ipa:
single_value.field_signalling__ipa->check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest");
return;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @RLCMAC_CSN1_Types.EGPRSPktChRequest.");
}
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 : "@RLCMAC_CSN1_Types.EGPRSPktChRequest");
}

EGPRSPktChRequest__MC5P2RB3::EGPRSPktChRequest__MC5P2RB3()
{
}

EGPRSPktChRequest__MC5P2RB3::EGPRSPktChRequest__MC5P2RB3(const BITSTRING& par_tag,
    const BITSTRING& par_multislot__class,
    const BITSTRING& par_priority,
    const BITSTRING& par_random__bits)
  :   field_tag(par_tag),
  field_multislot__class(par_multislot__class),
  field_priority(par_priority),
  field_random__bits(par_random__bits)
{
}

EGPRSPktChRequest__MC5P2RB3::EGPRSPktChRequest__MC5P2RB3(const EGPRSPktChRequest__MC5P2RB3& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3.");
if (other_value.tag().is_bound()) field_tag = other_value.tag();
else field_tag.clean_up();
if (other_value.multislot__class().is_bound()) field_multislot__class = other_value.multislot__class();
else field_multislot__class.clean_up();
if (other_value.priority().is_bound()) field_priority = other_value.priority();
else field_priority.clean_up();
if (other_value.random__bits().is_bound()) field_random__bits = other_value.random__bits();
else field_random__bits.clean_up();
}

void EGPRSPktChRequest__MC5P2RB3::clean_up()
{
field_tag.clean_up();
field_multislot__class.clean_up();
field_priority.clean_up();
field_random__bits.clean_up();
}

const TTCN_Typedescriptor_t* EGPRSPktChRequest__MC5P2RB3::get_descriptor() const { return &EGPRSPktChRequest__MC5P2RB3_descr_; }
EGPRSPktChRequest__MC5P2RB3& EGPRSPktChRequest__MC5P2RB3::operator=(const EGPRSPktChRequest__MC5P2RB3& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3.");
  if (other_value.tag().is_bound()) field_tag = other_value.tag();
  else field_tag.clean_up();
  if (other_value.multislot__class().is_bound()) field_multislot__class = other_value.multislot__class();
  else field_multislot__class.clean_up();
  if (other_value.priority().is_bound()) field_priority = other_value.priority();
  else field_priority.clean_up();
  if (other_value.random__bits().is_bound()) field_random__bits = other_value.random__bits();
  else field_random__bits.clean_up();
}
return *this;
}

boolean EGPRSPktChRequest__MC5P2RB3::operator==(const EGPRSPktChRequest__MC5P2RB3& other_value) const
{
return field_tag==other_value.field_tag
  && field_multislot__class==other_value.field_multislot__class
  && field_priority==other_value.field_priority
  && field_random__bits==other_value.field_random__bits;
}

boolean EGPRSPktChRequest__MC5P2RB3::is_bound() const
{
return (field_tag.is_bound())
  || (field_multislot__class.is_bound())
  || (field_priority.is_bound())
  || (field_random__bits.is_bound());
}
boolean EGPRSPktChRequest__MC5P2RB3::is_value() const
{
return field_tag.is_value()
  && field_multislot__class.is_value()
  && field_priority.is_value()
  && field_random__bits.is_value();
}
void EGPRSPktChRequest__MC5P2RB3::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ tag := ");
field_tag.log();
TTCN_Logger::log_event_str(", multislot_class := ");
field_multislot__class.log();
TTCN_Logger::log_event_str(", priority := ");
field_priority.log();
TTCN_Logger::log_event_str(", random_bits := ");
field_random__bits.log();
TTCN_Logger::log_event_str(" }");
}

void EGPRSPktChRequest__MC5P2RB3::set_implicit_omit()
{
if (tag().is_bound()) tag().set_implicit_omit();
if (multislot__class().is_bound()) multislot__class().set_implicit_omit();
if (priority().is_bound()) priority().set_implicit_omit();
if (random__bits().is_bound()) random__bits().set_implicit_omit();
}

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

void EGPRSPktChRequest__MC5P2RB3::encode_text(Text_Buf& text_buf) const
{
field_tag.encode_text(text_buf);
field_multislot__class.encode_text(text_buf);
field_priority.encode_text(text_buf);
field_random__bits.encode_text(text_buf);
}

void EGPRSPktChRequest__MC5P2RB3::decode_text(Text_Buf& text_buf)
{
field_tag.decode_text(text_buf);
field_multislot__class.decode_text(text_buf);
field_priority.decode_text(text_buf);
field_random__bits.decode_text(text_buf);
}

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

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

int EGPRSPktChRequest__MC5P2RB3::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, EGPRSPktChRequest__MC5P2RB3_tag_descr_.raw->forceomit);
  decoded_field_length = field_tag.RAW_decode(EGPRSPktChRequest__MC5P2RB3_tag_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, EGPRSPktChRequest__MC5P2RB3_multislot__class_descr_.raw->forceomit);
  decoded_field_length = field_multislot__class.RAW_decode(EGPRSPktChRequest__MC5P2RB3_multislot__class_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, EGPRSPktChRequest__MC5P2RB3_priority_descr_.raw->forceomit);
  decoded_field_length = field_priority.RAW_decode(EGPRSPktChRequest__MC5P2RB3_priority_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, EGPRSPktChRequest__MC5P2RB3_random__bits_descr_.raw->forceomit);
  decoded_field_length = field_random__bits.RAW_decode(EGPRSPktChRequest__MC5P2RB3_random__bits_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int EGPRSPktChRequest__MC5P2RB3::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 4;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(4);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, EGPRSPktChRequest__MC5P2RB3_tag_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, EGPRSPktChRequest__MC5P2RB3_multislot__class_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, EGPRSPktChRequest__MC5P2RB3_priority_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, EGPRSPktChRequest__MC5P2RB3_random__bits_descr_.raw);
  encoded_length += field_tag.RAW_encode(EGPRSPktChRequest__MC5P2RB3_tag_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_multislot__class.RAW_encode(EGPRSPktChRequest__MC5P2RB3_multislot__class_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_priority.RAW_encode(EGPRSPktChRequest__MC5P2RB3_priority_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_random__bits.RAW_encode(EGPRSPktChRequest__MC5P2RB3_random__bits_descr_, *myleaf.body.node.nodes[3]);
  return myleaf.length = encoded_length;
}

struct EGPRSPktChRequest__MC5P2RB3_template::single_value_struct {
BITSTRING_template field_tag;
BITSTRING_template field_multislot__class;
BITSTRING_template field_priority;
BITSTRING_template field_random__bits;
};

void EGPRSPktChRequest__MC5P2RB3_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_tag = ANY_VALUE;
single_value->field_multislot__class = ANY_VALUE;
single_value->field_priority = ANY_VALUE;
single_value->field_random__bits = ANY_VALUE;
}
}
}

void EGPRSPktChRequest__MC5P2RB3_template::copy_value(const EGPRSPktChRequest__MC5P2RB3& other_value)
{
single_value = new single_value_struct;
if (other_value.tag().is_bound()) {
  single_value->field_tag = other_value.tag();
} else {
  single_value->field_tag.clean_up();
}
if (other_value.multislot__class().is_bound()) {
  single_value->field_multislot__class = other_value.multislot__class();
} else {
  single_value->field_multislot__class.clean_up();
}
if (other_value.priority().is_bound()) {
  single_value->field_priority = other_value.priority();
} else {
  single_value->field_priority.clean_up();
}
if (other_value.random__bits().is_bound()) {
  single_value->field_random__bits = other_value.random__bits();
} else {
  single_value->field_random__bits.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void EGPRSPktChRequest__MC5P2RB3_template::copy_template(const EGPRSPktChRequest__MC5P2RB3_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.tag().get_selection()) {
single_value->field_tag = other_value.tag();
} else {
single_value->field_tag.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.multislot__class().get_selection()) {
single_value->field_multislot__class = other_value.multislot__class();
} else {
single_value->field_multislot__class.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.priority().get_selection()) {
single_value->field_priority = other_value.priority();
} else {
single_value->field_priority.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.random__bits().get_selection()) {
single_value->field_random__bits = other_value.random__bits();
} else {
single_value->field_random__bits.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 EGPRSPktChRequest__MC5P2RB3_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 EGPRSPktChRequest__MC5P2RB3_template(*other_value.implication_.precondition);
implication_.implied_template = new EGPRSPktChRequest__MC5P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3.");
break;
}
set_selection(other_value);
}

EGPRSPktChRequest__MC5P2RB3_template::EGPRSPktChRequest__MC5P2RB3_template()
{
}

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

EGPRSPktChRequest__MC5P2RB3_template::EGPRSPktChRequest__MC5P2RB3_template(const EGPRSPktChRequest__MC5P2RB3& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean EGPRSPktChRequest__MC5P2RB3_template::match(const EGPRSPktChRequest__MC5P2RB3& 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.tag().is_bound()) return FALSE;
if(!single_value->field_tag.match(other_value.tag(), legacy))return FALSE;
if(!other_value.multislot__class().is_bound()) return FALSE;
if(!single_value->field_multislot__class.match(other_value.multislot__class(), legacy))return FALSE;
if(!other_value.priority().is_bound()) return FALSE;
if(!single_value->field_priority.match(other_value.priority(), legacy))return FALSE;
if(!other_value.random__bits().is_bound()) return FALSE;
if(!single_value->field_random__bits.match(other_value.random__bits(), 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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3.");
}
return FALSE;
}

boolean EGPRSPktChRequest__MC5P2RB3_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_tag.is_bound()
 || single_value->field_multislot__class.is_bound()
 || single_value->field_priority.is_bound()
 || single_value->field_random__bits.is_bound();
}

boolean EGPRSPktChRequest__MC5P2RB3_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_tag.is_value()
 && single_value->field_multislot__class.is_value()
 && single_value->field_priority.is_value()
 && single_value->field_random__bits.is_value();
}

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

EGPRSPktChRequest__MC5P2RB3 EGPRSPktChRequest__MC5P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3.");
EGPRSPktChRequest__MC5P2RB3 ret_val;
if (single_value->field_tag.is_bound()) {
ret_val.tag() = single_value->field_tag.valueof();
}
if (single_value->field_multislot__class.is_bound()) {
ret_val.multislot__class() = single_value->field_multislot__class.valueof();
}
if (single_value->field_priority.is_bound()) {
ret_val.priority() = single_value->field_priority.valueof();
}
if (single_value->field_random__bits.is_bound()) {
ret_val.random__bits() = single_value->field_random__bits.valueof();
}
return ret_val;
}

void EGPRSPktChRequest__MC5P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new EGPRSPktChRequest__MC5P2RB3_template[list_length];
}

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

BITSTRING_template& EGPRSPktChRequest__MC5P2RB3_template::tag()
{
set_specific();
return single_value->field_tag;
}

const BITSTRING_template& EGPRSPktChRequest__MC5P2RB3_template::tag() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tag of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3.");
return single_value->field_tag;
}

BITSTRING_template& EGPRSPktChRequest__MC5P2RB3_template::multislot__class()
{
set_specific();
return single_value->field_multislot__class;
}

const BITSTRING_template& EGPRSPktChRequest__MC5P2RB3_template::multislot__class() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field multislot_class of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3.");
return single_value->field_multislot__class;
}

BITSTRING_template& EGPRSPktChRequest__MC5P2RB3_template::priority()
{
set_specific();
return single_value->field_priority;
}

const BITSTRING_template& EGPRSPktChRequest__MC5P2RB3_template::priority() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field priority of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3.");
return single_value->field_priority;
}

BITSTRING_template& EGPRSPktChRequest__MC5P2RB3_template::random__bits()
{
set_specific();
return single_value->field_random__bits;
}

const BITSTRING_template& EGPRSPktChRequest__MC5P2RB3_template::random__bits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field random_bits of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3.");
return single_value->field_random__bits;
}

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

void EGPRSPktChRequest__MC5P2RB3_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ tag := ");
single_value->field_tag.log();
TTCN_Logger::log_event_str(", multislot_class := ");
single_value->field_multislot__class.log();
TTCN_Logger::log_event_str(", priority := ");
single_value->field_priority.log();
TTCN_Logger::log_event_str(", random_bits := ");
single_value->field_random__bits.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 EGPRSPktChRequest__MC5P2RB3_template::log_match(const EGPRSPktChRequest__MC5P2RB3& 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_tag.match(match_value.tag(), legacy)){
TTCN_Logger::log_logmatch_info(".tag");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_multislot__class.match(match_value.multislot__class(), legacy)){
TTCN_Logger::log_logmatch_info(".multislot_class");
single_value->field_multislot__class.log_match(match_value.multislot__class(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_priority.match(match_value.priority(), legacy)){
TTCN_Logger::log_logmatch_info(".priority");
single_value->field_priority.log_match(match_value.priority(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_random__bits.match(match_value.random__bits(), legacy)){
TTCN_Logger::log_logmatch_info(".random_bits");
single_value->field_random__bits.log_match(match_value.random__bits(), 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("{ tag := ");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::log_event_str(", multislot_class := ");
single_value->field_multislot__class.log_match(match_value.multislot__class(), legacy);
TTCN_Logger::log_event_str(", priority := ");
single_value->field_priority.log_match(match_value.priority(), legacy);
TTCN_Logger::log_event_str(", random_bits := ");
single_value->field_random__bits.log_match(match_value.random__bits(), 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 EGPRSPktChRequest__MC5P2RB3_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (tag().is_bound()) tag().set_implicit_omit();
if (multislot__class().is_bound()) multislot__class().set_implicit_omit();
if (priority().is_bound()) priority().set_implicit_omit();
if (random__bits().is_bound()) random__bits().set_implicit_omit();
}

void EGPRSPktChRequest__MC5P2RB3_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_tag.encode_text(text_buf);
single_value->field_multislot__class.encode_text(text_buf);
single_value->field_priority.encode_text(text_buf);
single_value->field_random__bits.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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3.");
}
}

void EGPRSPktChRequest__MC5P2RB3_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_tag.decode_text(text_buf);
single_value->field_multislot__class.decode_text(text_buf);
single_value->field_priority.decode_text(text_buf);
single_value->field_random__bits.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 EGPRSPktChRequest__MC5P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3.");
}
}

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

void EGPRSPktChRequest__MC5P2RB3_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_tag.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3");
single_value->field_multislot__class.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3");
single_value->field_priority.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3");
single_value->field_random__bits.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3");
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 : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_MC5P2RB3");
}

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

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

EGPRSPktChRequest__NOB3P2RB3::EGPRSPktChRequest__NOB3P2RB3()
{
}

EGPRSPktChRequest__NOB3P2RB3::EGPRSPktChRequest__NOB3P2RB3(const BITSTRING& par_tag,
    const BITSTRING& par_nr__of__blocks,
    const BITSTRING& par_priority,
    const BITSTRING& par_random__bits)
  :   field_tag(par_tag),
  field_nr__of__blocks(par_nr__of__blocks),
  field_priority(par_priority),
  field_random__bits(par_random__bits)
{
}

EGPRSPktChRequest__NOB3P2RB3::EGPRSPktChRequest__NOB3P2RB3(const EGPRSPktChRequest__NOB3P2RB3& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3.");
if (other_value.tag().is_bound()) field_tag = other_value.tag();
else field_tag.clean_up();
if (other_value.nr__of__blocks().is_bound()) field_nr__of__blocks = other_value.nr__of__blocks();
else field_nr__of__blocks.clean_up();
if (other_value.priority().is_bound()) field_priority = other_value.priority();
else field_priority.clean_up();
if (other_value.random__bits().is_bound()) field_random__bits = other_value.random__bits();
else field_random__bits.clean_up();
}

void EGPRSPktChRequest__NOB3P2RB3::clean_up()
{
field_tag.clean_up();
field_nr__of__blocks.clean_up();
field_priority.clean_up();
field_random__bits.clean_up();
}

const TTCN_Typedescriptor_t* EGPRSPktChRequest__NOB3P2RB3::get_descriptor() const { return &EGPRSPktChRequest__NOB3P2RB3_descr_; }
EGPRSPktChRequest__NOB3P2RB3& EGPRSPktChRequest__NOB3P2RB3::operator=(const EGPRSPktChRequest__NOB3P2RB3& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3.");
  if (other_value.tag().is_bound()) field_tag = other_value.tag();
  else field_tag.clean_up();
  if (other_value.nr__of__blocks().is_bound()) field_nr__of__blocks = other_value.nr__of__blocks();
  else field_nr__of__blocks.clean_up();
  if (other_value.priority().is_bound()) field_priority = other_value.priority();
  else field_priority.clean_up();
  if (other_value.random__bits().is_bound()) field_random__bits = other_value.random__bits();
  else field_random__bits.clean_up();
}
return *this;
}

boolean EGPRSPktChRequest__NOB3P2RB3::operator==(const EGPRSPktChRequest__NOB3P2RB3& other_value) const
{
return field_tag==other_value.field_tag
  && field_nr__of__blocks==other_value.field_nr__of__blocks
  && field_priority==other_value.field_priority
  && field_random__bits==other_value.field_random__bits;
}

boolean EGPRSPktChRequest__NOB3P2RB3::is_bound() const
{
return (field_tag.is_bound())
  || (field_nr__of__blocks.is_bound())
  || (field_priority.is_bound())
  || (field_random__bits.is_bound());
}
boolean EGPRSPktChRequest__NOB3P2RB3::is_value() const
{
return field_tag.is_value()
  && field_nr__of__blocks.is_value()
  && field_priority.is_value()
  && field_random__bits.is_value();
}
void EGPRSPktChRequest__NOB3P2RB3::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ tag := ");
field_tag.log();
TTCN_Logger::log_event_str(", nr_of_blocks := ");
field_nr__of__blocks.log();
TTCN_Logger::log_event_str(", priority := ");
field_priority.log();
TTCN_Logger::log_event_str(", random_bits := ");
field_random__bits.log();
TTCN_Logger::log_event_str(" }");
}

void EGPRSPktChRequest__NOB3P2RB3::set_implicit_omit()
{
if (tag().is_bound()) tag().set_implicit_omit();
if (nr__of__blocks().is_bound()) nr__of__blocks().set_implicit_omit();
if (priority().is_bound()) priority().set_implicit_omit();
if (random__bits().is_bound()) random__bits().set_implicit_omit();
}

void EGPRSPktChRequest__NOB3P2RB3::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (4<param.get_size()) {
      param.error("record value of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3 has 4 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) tag().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) nr__of__blocks().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) priority().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) random__bits().set_param(*param.get_elem(3));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tag")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tag().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(), "nr_of_blocks")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nr__of__blocks().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(), "priority")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          priority().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(), "random_bits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          random__bits().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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3");
  }
}

void EGPRSPktChRequest__NOB3P2RB3::encode_text(Text_Buf& text_buf) const
{
field_tag.encode_text(text_buf);
field_nr__of__blocks.encode_text(text_buf);
field_priority.encode_text(text_buf);
field_random__bits.encode_text(text_buf);
}

void EGPRSPktChRequest__NOB3P2RB3::decode_text(Text_Buf& text_buf)
{
field_tag.decode_text(text_buf);
field_nr__of__blocks.decode_text(text_buf);
field_priority.decode_text(text_buf);
field_random__bits.decode_text(text_buf);
}

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

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

int EGPRSPktChRequest__NOB3P2RB3::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, EGPRSPktChRequest__NOB3P2RB3_tag_descr_.raw->forceomit);
  decoded_field_length = field_tag.RAW_decode(EGPRSPktChRequest__NOB3P2RB3_tag_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, EGPRSPktChRequest__NOB3P2RB3_nr__of__blocks_descr_.raw->forceomit);
  decoded_field_length = field_nr__of__blocks.RAW_decode(EGPRSPktChRequest__NOB3P2RB3_nr__of__blocks_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, EGPRSPktChRequest__NOB3P2RB3_priority_descr_.raw->forceomit);
  decoded_field_length = field_priority.RAW_decode(EGPRSPktChRequest__NOB3P2RB3_priority_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, EGPRSPktChRequest__NOB3P2RB3_random__bits_descr_.raw->forceomit);
  decoded_field_length = field_random__bits.RAW_decode(EGPRSPktChRequest__NOB3P2RB3_random__bits_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int EGPRSPktChRequest__NOB3P2RB3::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 4;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(4);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, EGPRSPktChRequest__NOB3P2RB3_tag_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, EGPRSPktChRequest__NOB3P2RB3_nr__of__blocks_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, EGPRSPktChRequest__NOB3P2RB3_priority_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, EGPRSPktChRequest__NOB3P2RB3_random__bits_descr_.raw);
  encoded_length += field_tag.RAW_encode(EGPRSPktChRequest__NOB3P2RB3_tag_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_nr__of__blocks.RAW_encode(EGPRSPktChRequest__NOB3P2RB3_nr__of__blocks_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_priority.RAW_encode(EGPRSPktChRequest__NOB3P2RB3_priority_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_random__bits.RAW_encode(EGPRSPktChRequest__NOB3P2RB3_random__bits_descr_, *myleaf.body.node.nodes[3]);
  return myleaf.length = encoded_length;
}

struct EGPRSPktChRequest__NOB3P2RB3_template::single_value_struct {
BITSTRING_template field_tag;
BITSTRING_template field_nr__of__blocks;
BITSTRING_template field_priority;
BITSTRING_template field_random__bits;
};

void EGPRSPktChRequest__NOB3P2RB3_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_tag = ANY_VALUE;
single_value->field_nr__of__blocks = ANY_VALUE;
single_value->field_priority = ANY_VALUE;
single_value->field_random__bits = ANY_VALUE;
}
}
}

void EGPRSPktChRequest__NOB3P2RB3_template::copy_value(const EGPRSPktChRequest__NOB3P2RB3& other_value)
{
single_value = new single_value_struct;
if (other_value.tag().is_bound()) {
  single_value->field_tag = other_value.tag();
} else {
  single_value->field_tag.clean_up();
}
if (other_value.nr__of__blocks().is_bound()) {
  single_value->field_nr__of__blocks = other_value.nr__of__blocks();
} else {
  single_value->field_nr__of__blocks.clean_up();
}
if (other_value.priority().is_bound()) {
  single_value->field_priority = other_value.priority();
} else {
  single_value->field_priority.clean_up();
}
if (other_value.random__bits().is_bound()) {
  single_value->field_random__bits = other_value.random__bits();
} else {
  single_value->field_random__bits.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void EGPRSPktChRequest__NOB3P2RB3_template::copy_template(const EGPRSPktChRequest__NOB3P2RB3_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.tag().get_selection()) {
single_value->field_tag = other_value.tag();
} else {
single_value->field_tag.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nr__of__blocks().get_selection()) {
single_value->field_nr__of__blocks = other_value.nr__of__blocks();
} else {
single_value->field_nr__of__blocks.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.priority().get_selection()) {
single_value->field_priority = other_value.priority();
} else {
single_value->field_priority.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.random__bits().get_selection()) {
single_value->field_random__bits = other_value.random__bits();
} else {
single_value->field_random__bits.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 EGPRSPktChRequest__NOB3P2RB3_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 EGPRSPktChRequest__NOB3P2RB3_template(*other_value.implication_.precondition);
implication_.implied_template = new EGPRSPktChRequest__NOB3P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3.");
break;
}
set_selection(other_value);
}

EGPRSPktChRequest__NOB3P2RB3_template::EGPRSPktChRequest__NOB3P2RB3_template()
{
}

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

EGPRSPktChRequest__NOB3P2RB3_template::EGPRSPktChRequest__NOB3P2RB3_template(const EGPRSPktChRequest__NOB3P2RB3& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean EGPRSPktChRequest__NOB3P2RB3_template::match(const EGPRSPktChRequest__NOB3P2RB3& 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.tag().is_bound()) return FALSE;
if(!single_value->field_tag.match(other_value.tag(), legacy))return FALSE;
if(!other_value.nr__of__blocks().is_bound()) return FALSE;
if(!single_value->field_nr__of__blocks.match(other_value.nr__of__blocks(), legacy))return FALSE;
if(!other_value.priority().is_bound()) return FALSE;
if(!single_value->field_priority.match(other_value.priority(), legacy))return FALSE;
if(!other_value.random__bits().is_bound()) return FALSE;
if(!single_value->field_random__bits.match(other_value.random__bits(), 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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3.");
}
return FALSE;
}

boolean EGPRSPktChRequest__NOB3P2RB3_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_tag.is_bound()
 || single_value->field_nr__of__blocks.is_bound()
 || single_value->field_priority.is_bound()
 || single_value->field_random__bits.is_bound();
}

boolean EGPRSPktChRequest__NOB3P2RB3_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_tag.is_value()
 && single_value->field_nr__of__blocks.is_value()
 && single_value->field_priority.is_value()
 && single_value->field_random__bits.is_value();
}

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

EGPRSPktChRequest__NOB3P2RB3 EGPRSPktChRequest__NOB3P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3.");
EGPRSPktChRequest__NOB3P2RB3 ret_val;
if (single_value->field_tag.is_bound()) {
ret_val.tag() = single_value->field_tag.valueof();
}
if (single_value->field_nr__of__blocks.is_bound()) {
ret_val.nr__of__blocks() = single_value->field_nr__of__blocks.valueof();
}
if (single_value->field_priority.is_bound()) {
ret_val.priority() = single_value->field_priority.valueof();
}
if (single_value->field_random__bits.is_bound()) {
ret_val.random__bits() = single_value->field_random__bits.valueof();
}
return ret_val;
}

void EGPRSPktChRequest__NOB3P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new EGPRSPktChRequest__NOB3P2RB3_template[list_length];
}

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

BITSTRING_template& EGPRSPktChRequest__NOB3P2RB3_template::tag()
{
set_specific();
return single_value->field_tag;
}

const BITSTRING_template& EGPRSPktChRequest__NOB3P2RB3_template::tag() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tag of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3.");
return single_value->field_tag;
}

BITSTRING_template& EGPRSPktChRequest__NOB3P2RB3_template::nr__of__blocks()
{
set_specific();
return single_value->field_nr__of__blocks;
}

const BITSTRING_template& EGPRSPktChRequest__NOB3P2RB3_template::nr__of__blocks() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nr_of_blocks of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3.");
return single_value->field_nr__of__blocks;
}

BITSTRING_template& EGPRSPktChRequest__NOB3P2RB3_template::priority()
{
set_specific();
return single_value->field_priority;
}

const BITSTRING_template& EGPRSPktChRequest__NOB3P2RB3_template::priority() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field priority of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3.");
return single_value->field_priority;
}

BITSTRING_template& EGPRSPktChRequest__NOB3P2RB3_template::random__bits()
{
set_specific();
return single_value->field_random__bits;
}

const BITSTRING_template& EGPRSPktChRequest__NOB3P2RB3_template::random__bits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field random_bits of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3.");
return single_value->field_random__bits;
}

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

void EGPRSPktChRequest__NOB3P2RB3_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ tag := ");
single_value->field_tag.log();
TTCN_Logger::log_event_str(", nr_of_blocks := ");
single_value->field_nr__of__blocks.log();
TTCN_Logger::log_event_str(", priority := ");
single_value->field_priority.log();
TTCN_Logger::log_event_str(", random_bits := ");
single_value->field_random__bits.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 EGPRSPktChRequest__NOB3P2RB3_template::log_match(const EGPRSPktChRequest__NOB3P2RB3& 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_tag.match(match_value.tag(), legacy)){
TTCN_Logger::log_logmatch_info(".tag");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_nr__of__blocks.match(match_value.nr__of__blocks(), legacy)){
TTCN_Logger::log_logmatch_info(".nr_of_blocks");
single_value->field_nr__of__blocks.log_match(match_value.nr__of__blocks(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_priority.match(match_value.priority(), legacy)){
TTCN_Logger::log_logmatch_info(".priority");
single_value->field_priority.log_match(match_value.priority(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_random__bits.match(match_value.random__bits(), legacy)){
TTCN_Logger::log_logmatch_info(".random_bits");
single_value->field_random__bits.log_match(match_value.random__bits(), 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("{ tag := ");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::log_event_str(", nr_of_blocks := ");
single_value->field_nr__of__blocks.log_match(match_value.nr__of__blocks(), legacy);
TTCN_Logger::log_event_str(", priority := ");
single_value->field_priority.log_match(match_value.priority(), legacy);
TTCN_Logger::log_event_str(", random_bits := ");
single_value->field_random__bits.log_match(match_value.random__bits(), 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 EGPRSPktChRequest__NOB3P2RB3_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (tag().is_bound()) tag().set_implicit_omit();
if (nr__of__blocks().is_bound()) nr__of__blocks().set_implicit_omit();
if (priority().is_bound()) priority().set_implicit_omit();
if (random__bits().is_bound()) random__bits().set_implicit_omit();
}

void EGPRSPktChRequest__NOB3P2RB3_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_tag.encode_text(text_buf);
single_value->field_nr__of__blocks.encode_text(text_buf);
single_value->field_priority.encode_text(text_buf);
single_value->field_random__bits.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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3.");
}
}

void EGPRSPktChRequest__NOB3P2RB3_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_tag.decode_text(text_buf);
single_value->field_nr__of__blocks.decode_text(text_buf);
single_value->field_priority.decode_text(text_buf);
single_value->field_random__bits.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 EGPRSPktChRequest__NOB3P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3.");
}
}

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

void EGPRSPktChRequest__NOB3P2RB3_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_tag.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3");
single_value->field_nr__of__blocks.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3");
single_value->field_priority.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3");
single_value->field_random__bits.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3");
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 : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_NOB3P2RB3");
}

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

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

EGPRSPktChRequest__MCG3P2RB3::EGPRSPktChRequest__MCG3P2RB3()
{
}

EGPRSPktChRequest__MCG3P2RB3::EGPRSPktChRequest__MCG3P2RB3(const BITSTRING& par_tag,
    const BITSTRING& par_multislot__class__group,
    const BITSTRING& par_priority,
    const BITSTRING& par_random__bits)
  :   field_tag(par_tag),
  field_multislot__class__group(par_multislot__class__group),
  field_priority(par_priority),
  field_random__bits(par_random__bits)
{
}

EGPRSPktChRequest__MCG3P2RB3::EGPRSPktChRequest__MCG3P2RB3(const EGPRSPktChRequest__MCG3P2RB3& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3.");
if (other_value.tag().is_bound()) field_tag = other_value.tag();
else field_tag.clean_up();
if (other_value.multislot__class__group().is_bound()) field_multislot__class__group = other_value.multislot__class__group();
else field_multislot__class__group.clean_up();
if (other_value.priority().is_bound()) field_priority = other_value.priority();
else field_priority.clean_up();
if (other_value.random__bits().is_bound()) field_random__bits = other_value.random__bits();
else field_random__bits.clean_up();
}

void EGPRSPktChRequest__MCG3P2RB3::clean_up()
{
field_tag.clean_up();
field_multislot__class__group.clean_up();
field_priority.clean_up();
field_random__bits.clean_up();
}

const TTCN_Typedescriptor_t* EGPRSPktChRequest__MCG3P2RB3::get_descriptor() const { return &EGPRSPktChRequest__MCG3P2RB3_descr_; }
EGPRSPktChRequest__MCG3P2RB3& EGPRSPktChRequest__MCG3P2RB3::operator=(const EGPRSPktChRequest__MCG3P2RB3& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3.");
  if (other_value.tag().is_bound()) field_tag = other_value.tag();
  else field_tag.clean_up();
  if (other_value.multislot__class__group().is_bound()) field_multislot__class__group = other_value.multislot__class__group();
  else field_multislot__class__group.clean_up();
  if (other_value.priority().is_bound()) field_priority = other_value.priority();
  else field_priority.clean_up();
  if (other_value.random__bits().is_bound()) field_random__bits = other_value.random__bits();
  else field_random__bits.clean_up();
}
return *this;
}

boolean EGPRSPktChRequest__MCG3P2RB3::operator==(const EGPRSPktChRequest__MCG3P2RB3& other_value) const
{
return field_tag==other_value.field_tag
  && field_multislot__class__group==other_value.field_multislot__class__group
  && field_priority==other_value.field_priority
  && field_random__bits==other_value.field_random__bits;
}

boolean EGPRSPktChRequest__MCG3P2RB3::is_bound() const
{
return (field_tag.is_bound())
  || (field_multislot__class__group.is_bound())
  || (field_priority.is_bound())
  || (field_random__bits.is_bound());
}
boolean EGPRSPktChRequest__MCG3P2RB3::is_value() const
{
return field_tag.is_value()
  && field_multislot__class__group.is_value()
  && field_priority.is_value()
  && field_random__bits.is_value();
}
void EGPRSPktChRequest__MCG3P2RB3::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ tag := ");
field_tag.log();
TTCN_Logger::log_event_str(", multislot_class_group := ");
field_multislot__class__group.log();
TTCN_Logger::log_event_str(", priority := ");
field_priority.log();
TTCN_Logger::log_event_str(", random_bits := ");
field_random__bits.log();
TTCN_Logger::log_event_str(" }");
}

void EGPRSPktChRequest__MCG3P2RB3::set_implicit_omit()
{
if (tag().is_bound()) tag().set_implicit_omit();
if (multislot__class__group().is_bound()) multislot__class__group().set_implicit_omit();
if (priority().is_bound()) priority().set_implicit_omit();
if (random__bits().is_bound()) random__bits().set_implicit_omit();
}

void EGPRSPktChRequest__MCG3P2RB3::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (4<param.get_size()) {
      param.error("record value of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3 has 4 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) tag().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) multislot__class__group().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) priority().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) random__bits().set_param(*param.get_elem(3));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tag")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tag().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(), "multislot_class_group")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          multislot__class__group().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(), "priority")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          priority().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(), "random_bits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          random__bits().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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3");
  }
}

void EGPRSPktChRequest__MCG3P2RB3::encode_text(Text_Buf& text_buf) const
{
field_tag.encode_text(text_buf);
field_multislot__class__group.encode_text(text_buf);
field_priority.encode_text(text_buf);
field_random__bits.encode_text(text_buf);
}

void EGPRSPktChRequest__MCG3P2RB3::decode_text(Text_Buf& text_buf)
{
field_tag.decode_text(text_buf);
field_multislot__class__group.decode_text(text_buf);
field_priority.decode_text(text_buf);
field_random__bits.decode_text(text_buf);
}

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

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

int EGPRSPktChRequest__MCG3P2RB3::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, EGPRSPktChRequest__MCG3P2RB3_tag_descr_.raw->forceomit);
  decoded_field_length = field_tag.RAW_decode(EGPRSPktChRequest__MCG3P2RB3_tag_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, EGPRSPktChRequest__MCG3P2RB3_multislot__class__group_descr_.raw->forceomit);
  decoded_field_length = field_multislot__class__group.RAW_decode(EGPRSPktChRequest__MCG3P2RB3_multislot__class__group_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, EGPRSPktChRequest__MCG3P2RB3_priority_descr_.raw->forceomit);
  decoded_field_length = field_priority.RAW_decode(EGPRSPktChRequest__MCG3P2RB3_priority_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_3_force_omit(3, force_omit, EGPRSPktChRequest__MCG3P2RB3_random__bits_descr_.raw->forceomit);
  decoded_field_length = field_random__bits.RAW_decode(EGPRSPktChRequest__MCG3P2RB3_random__bits_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int EGPRSPktChRequest__MCG3P2RB3::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 4;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(4);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, EGPRSPktChRequest__MCG3P2RB3_tag_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, EGPRSPktChRequest__MCG3P2RB3_multislot__class__group_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, EGPRSPktChRequest__MCG3P2RB3_priority_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, EGPRSPktChRequest__MCG3P2RB3_random__bits_descr_.raw);
  encoded_length += field_tag.RAW_encode(EGPRSPktChRequest__MCG3P2RB3_tag_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_multislot__class__group.RAW_encode(EGPRSPktChRequest__MCG3P2RB3_multislot__class__group_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_priority.RAW_encode(EGPRSPktChRequest__MCG3P2RB3_priority_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_random__bits.RAW_encode(EGPRSPktChRequest__MCG3P2RB3_random__bits_descr_, *myleaf.body.node.nodes[3]);
  return myleaf.length = encoded_length;
}

struct EGPRSPktChRequest__MCG3P2RB3_template::single_value_struct {
BITSTRING_template field_tag;
BITSTRING_template field_multislot__class__group;
BITSTRING_template field_priority;
BITSTRING_template field_random__bits;
};

void EGPRSPktChRequest__MCG3P2RB3_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_tag = ANY_VALUE;
single_value->field_multislot__class__group = ANY_VALUE;
single_value->field_priority = ANY_VALUE;
single_value->field_random__bits = ANY_VALUE;
}
}
}

void EGPRSPktChRequest__MCG3P2RB3_template::copy_value(const EGPRSPktChRequest__MCG3P2RB3& other_value)
{
single_value = new single_value_struct;
if (other_value.tag().is_bound()) {
  single_value->field_tag = other_value.tag();
} else {
  single_value->field_tag.clean_up();
}
if (other_value.multislot__class__group().is_bound()) {
  single_value->field_multislot__class__group = other_value.multislot__class__group();
} else {
  single_value->field_multislot__class__group.clean_up();
}
if (other_value.priority().is_bound()) {
  single_value->field_priority = other_value.priority();
} else {
  single_value->field_priority.clean_up();
}
if (other_value.random__bits().is_bound()) {
  single_value->field_random__bits = other_value.random__bits();
} else {
  single_value->field_random__bits.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void EGPRSPktChRequest__MCG3P2RB3_template::copy_template(const EGPRSPktChRequest__MCG3P2RB3_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.tag().get_selection()) {
single_value->field_tag = other_value.tag();
} else {
single_value->field_tag.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.multislot__class__group().get_selection()) {
single_value->field_multislot__class__group = other_value.multislot__class__group();
} else {
single_value->field_multislot__class__group.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.priority().get_selection()) {
single_value->field_priority = other_value.priority();
} else {
single_value->field_priority.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.random__bits().get_selection()) {
single_value->field_random__bits = other_value.random__bits();
} else {
single_value->field_random__bits.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 EGPRSPktChRequest__MCG3P2RB3_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 EGPRSPktChRequest__MCG3P2RB3_template(*other_value.implication_.precondition);
implication_.implied_template = new EGPRSPktChRequest__MCG3P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3.");
break;
}
set_selection(other_value);
}

EGPRSPktChRequest__MCG3P2RB3_template::EGPRSPktChRequest__MCG3P2RB3_template()
{
}

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

EGPRSPktChRequest__MCG3P2RB3_template::EGPRSPktChRequest__MCG3P2RB3_template(const EGPRSPktChRequest__MCG3P2RB3& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean EGPRSPktChRequest__MCG3P2RB3_template::match(const EGPRSPktChRequest__MCG3P2RB3& 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.tag().is_bound()) return FALSE;
if(!single_value->field_tag.match(other_value.tag(), legacy))return FALSE;
if(!other_value.multislot__class__group().is_bound()) return FALSE;
if(!single_value->field_multislot__class__group.match(other_value.multislot__class__group(), legacy))return FALSE;
if(!other_value.priority().is_bound()) return FALSE;
if(!single_value->field_priority.match(other_value.priority(), legacy))return FALSE;
if(!other_value.random__bits().is_bound()) return FALSE;
if(!single_value->field_random__bits.match(other_value.random__bits(), 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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3.");
}
return FALSE;
}

boolean EGPRSPktChRequest__MCG3P2RB3_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_tag.is_bound()
 || single_value->field_multislot__class__group.is_bound()
 || single_value->field_priority.is_bound()
 || single_value->field_random__bits.is_bound();
}

boolean EGPRSPktChRequest__MCG3P2RB3_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_tag.is_value()
 && single_value->field_multislot__class__group.is_value()
 && single_value->field_priority.is_value()
 && single_value->field_random__bits.is_value();
}

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

EGPRSPktChRequest__MCG3P2RB3 EGPRSPktChRequest__MCG3P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3.");
EGPRSPktChRequest__MCG3P2RB3 ret_val;
if (single_value->field_tag.is_bound()) {
ret_val.tag() = single_value->field_tag.valueof();
}
if (single_value->field_multislot__class__group.is_bound()) {
ret_val.multislot__class__group() = single_value->field_multislot__class__group.valueof();
}
if (single_value->field_priority.is_bound()) {
ret_val.priority() = single_value->field_priority.valueof();
}
if (single_value->field_random__bits.is_bound()) {
ret_val.random__bits() = single_value->field_random__bits.valueof();
}
return ret_val;
}

void EGPRSPktChRequest__MCG3P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new EGPRSPktChRequest__MCG3P2RB3_template[list_length];
}

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

BITSTRING_template& EGPRSPktChRequest__MCG3P2RB3_template::tag()
{
set_specific();
return single_value->field_tag;
}

const BITSTRING_template& EGPRSPktChRequest__MCG3P2RB3_template::tag() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tag of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3.");
return single_value->field_tag;
}

BITSTRING_template& EGPRSPktChRequest__MCG3P2RB3_template::multislot__class__group()
{
set_specific();
return single_value->field_multislot__class__group;
}

const BITSTRING_template& EGPRSPktChRequest__MCG3P2RB3_template::multislot__class__group() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field multislot_class_group of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3.");
return single_value->field_multislot__class__group;
}

BITSTRING_template& EGPRSPktChRequest__MCG3P2RB3_template::priority()
{
set_specific();
return single_value->field_priority;
}

const BITSTRING_template& EGPRSPktChRequest__MCG3P2RB3_template::priority() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field priority of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3.");
return single_value->field_priority;
}

BITSTRING_template& EGPRSPktChRequest__MCG3P2RB3_template::random__bits()
{
set_specific();
return single_value->field_random__bits;
}

const BITSTRING_template& EGPRSPktChRequest__MCG3P2RB3_template::random__bits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field random_bits of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3.");
return single_value->field_random__bits;
}

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

void EGPRSPktChRequest__MCG3P2RB3_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ tag := ");
single_value->field_tag.log();
TTCN_Logger::log_event_str(", multislot_class_group := ");
single_value->field_multislot__class__group.log();
TTCN_Logger::log_event_str(", priority := ");
single_value->field_priority.log();
TTCN_Logger::log_event_str(", random_bits := ");
single_value->field_random__bits.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 EGPRSPktChRequest__MCG3P2RB3_template::log_match(const EGPRSPktChRequest__MCG3P2RB3& 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_tag.match(match_value.tag(), legacy)){
TTCN_Logger::log_logmatch_info(".tag");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_multislot__class__group.match(match_value.multislot__class__group(), legacy)){
TTCN_Logger::log_logmatch_info(".multislot_class_group");
single_value->field_multislot__class__group.log_match(match_value.multislot__class__group(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_priority.match(match_value.priority(), legacy)){
TTCN_Logger::log_logmatch_info(".priority");
single_value->field_priority.log_match(match_value.priority(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_random__bits.match(match_value.random__bits(), legacy)){
TTCN_Logger::log_logmatch_info(".random_bits");
single_value->field_random__bits.log_match(match_value.random__bits(), 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("{ tag := ");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::log_event_str(", multislot_class_group := ");
single_value->field_multislot__class__group.log_match(match_value.multislot__class__group(), legacy);
TTCN_Logger::log_event_str(", priority := ");
single_value->field_priority.log_match(match_value.priority(), legacy);
TTCN_Logger::log_event_str(", random_bits := ");
single_value->field_random__bits.log_match(match_value.random__bits(), 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 EGPRSPktChRequest__MCG3P2RB3_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (tag().is_bound()) tag().set_implicit_omit();
if (multislot__class__group().is_bound()) multislot__class__group().set_implicit_omit();
if (priority().is_bound()) priority().set_implicit_omit();
if (random__bits().is_bound()) random__bits().set_implicit_omit();
}

void EGPRSPktChRequest__MCG3P2RB3_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_tag.encode_text(text_buf);
single_value->field_multislot__class__group.encode_text(text_buf);
single_value->field_priority.encode_text(text_buf);
single_value->field_random__bits.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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3.");
}
}

void EGPRSPktChRequest__MCG3P2RB3_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_tag.decode_text(text_buf);
single_value->field_multislot__class__group.decode_text(text_buf);
single_value->field_priority.decode_text(text_buf);
single_value->field_random__bits.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 EGPRSPktChRequest__MCG3P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3.");
}
}

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

void EGPRSPktChRequest__MCG3P2RB3_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_tag.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3");
single_value->field_multislot__class__group.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3");
single_value->field_priority.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3");
single_value->field_random__bits.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3");
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 : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_MCG3P2RB3");
}

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

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

EGPRSPktChRequest__P2RB3::EGPRSPktChRequest__P2RB3()
{
}

EGPRSPktChRequest__P2RB3::EGPRSPktChRequest__P2RB3(const BITSTRING& par_tag,
    const BITSTRING& par_priority,
    const BITSTRING& par_random__bits)
  :   field_tag(par_tag),
  field_priority(par_priority),
  field_random__bits(par_random__bits)
{
}

EGPRSPktChRequest__P2RB3::EGPRSPktChRequest__P2RB3(const EGPRSPktChRequest__P2RB3& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3.");
if (other_value.tag().is_bound()) field_tag = other_value.tag();
else field_tag.clean_up();
if (other_value.priority().is_bound()) field_priority = other_value.priority();
else field_priority.clean_up();
if (other_value.random__bits().is_bound()) field_random__bits = other_value.random__bits();
else field_random__bits.clean_up();
}

void EGPRSPktChRequest__P2RB3::clean_up()
{
field_tag.clean_up();
field_priority.clean_up();
field_random__bits.clean_up();
}

const TTCN_Typedescriptor_t* EGPRSPktChRequest__P2RB3::get_descriptor() const { return &EGPRSPktChRequest__P2RB3_descr_; }
EGPRSPktChRequest__P2RB3& EGPRSPktChRequest__P2RB3::operator=(const EGPRSPktChRequest__P2RB3& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3.");
  if (other_value.tag().is_bound()) field_tag = other_value.tag();
  else field_tag.clean_up();
  if (other_value.priority().is_bound()) field_priority = other_value.priority();
  else field_priority.clean_up();
  if (other_value.random__bits().is_bound()) field_random__bits = other_value.random__bits();
  else field_random__bits.clean_up();
}
return *this;
}

boolean EGPRSPktChRequest__P2RB3::operator==(const EGPRSPktChRequest__P2RB3& other_value) const
{
return field_tag==other_value.field_tag
  && field_priority==other_value.field_priority
  && field_random__bits==other_value.field_random__bits;
}

boolean EGPRSPktChRequest__P2RB3::is_bound() const
{
return (field_tag.is_bound())
  || (field_priority.is_bound())
  || (field_random__bits.is_bound());
}
boolean EGPRSPktChRequest__P2RB3::is_value() const
{
return field_tag.is_value()
  && field_priority.is_value()
  && field_random__bits.is_value();
}
void EGPRSPktChRequest__P2RB3::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ tag := ");
field_tag.log();
TTCN_Logger::log_event_str(", priority := ");
field_priority.log();
TTCN_Logger::log_event_str(", random_bits := ");
field_random__bits.log();
TTCN_Logger::log_event_str(" }");
}

void EGPRSPktChRequest__P2RB3::set_implicit_omit()
{
if (tag().is_bound()) tag().set_implicit_omit();
if (priority().is_bound()) priority().set_implicit_omit();
if (random__bits().is_bound()) random__bits().set_implicit_omit();
}

void EGPRSPktChRequest__P2RB3::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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3 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) tag().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) priority().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) random__bits().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(), "tag")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tag().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(), "priority")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          priority().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(), "random_bits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          random__bits().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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3");
  }
}

void EGPRSPktChRequest__P2RB3::encode_text(Text_Buf& text_buf) const
{
field_tag.encode_text(text_buf);
field_priority.encode_text(text_buf);
field_random__bits.encode_text(text_buf);
}

void EGPRSPktChRequest__P2RB3::decode_text(Text_Buf& text_buf)
{
field_tag.decode_text(text_buf);
field_priority.decode_text(text_buf);
field_random__bits.decode_text(text_buf);
}

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

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

int EGPRSPktChRequest__P2RB3::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, EGPRSPktChRequest__P2RB3_tag_descr_.raw->forceomit);
  decoded_field_length = field_tag.RAW_decode(EGPRSPktChRequest__P2RB3_tag_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, EGPRSPktChRequest__P2RB3_priority_descr_.raw->forceomit);
  decoded_field_length = field_priority.RAW_decode(EGPRSPktChRequest__P2RB3_priority_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_2_force_omit(2, force_omit, EGPRSPktChRequest__P2RB3_random__bits_descr_.raw->forceomit);
  decoded_field_length = field_random__bits.RAW_decode(EGPRSPktChRequest__P2RB3_random__bits_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int EGPRSPktChRequest__P2RB3::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 3;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(3);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, EGPRSPktChRequest__P2RB3_tag_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, EGPRSPktChRequest__P2RB3_priority_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, EGPRSPktChRequest__P2RB3_random__bits_descr_.raw);
  encoded_length += field_tag.RAW_encode(EGPRSPktChRequest__P2RB3_tag_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_priority.RAW_encode(EGPRSPktChRequest__P2RB3_priority_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_random__bits.RAW_encode(EGPRSPktChRequest__P2RB3_random__bits_descr_, *myleaf.body.node.nodes[2]);
  return myleaf.length = encoded_length;
}

struct EGPRSPktChRequest__P2RB3_template::single_value_struct {
BITSTRING_template field_tag;
BITSTRING_template field_priority;
BITSTRING_template field_random__bits;
};

void EGPRSPktChRequest__P2RB3_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_tag = ANY_VALUE;
single_value->field_priority = ANY_VALUE;
single_value->field_random__bits = ANY_VALUE;
}
}
}

void EGPRSPktChRequest__P2RB3_template::copy_value(const EGPRSPktChRequest__P2RB3& other_value)
{
single_value = new single_value_struct;
if (other_value.tag().is_bound()) {
  single_value->field_tag = other_value.tag();
} else {
  single_value->field_tag.clean_up();
}
if (other_value.priority().is_bound()) {
  single_value->field_priority = other_value.priority();
} else {
  single_value->field_priority.clean_up();
}
if (other_value.random__bits().is_bound()) {
  single_value->field_random__bits = other_value.random__bits();
} else {
  single_value->field_random__bits.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void EGPRSPktChRequest__P2RB3_template::copy_template(const EGPRSPktChRequest__P2RB3_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.tag().get_selection()) {
single_value->field_tag = other_value.tag();
} else {
single_value->field_tag.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.priority().get_selection()) {
single_value->field_priority = other_value.priority();
} else {
single_value->field_priority.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.random__bits().get_selection()) {
single_value->field_random__bits = other_value.random__bits();
} else {
single_value->field_random__bits.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 EGPRSPktChRequest__P2RB3_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 EGPRSPktChRequest__P2RB3_template(*other_value.implication_.precondition);
implication_.implied_template = new EGPRSPktChRequest__P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3.");
break;
}
set_selection(other_value);
}

EGPRSPktChRequest__P2RB3_template::EGPRSPktChRequest__P2RB3_template()
{
}

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

EGPRSPktChRequest__P2RB3_template::EGPRSPktChRequest__P2RB3_template(const EGPRSPktChRequest__P2RB3& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean EGPRSPktChRequest__P2RB3_template::match(const EGPRSPktChRequest__P2RB3& 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.tag().is_bound()) return FALSE;
if(!single_value->field_tag.match(other_value.tag(), legacy))return FALSE;
if(!other_value.priority().is_bound()) return FALSE;
if(!single_value->field_priority.match(other_value.priority(), legacy))return FALSE;
if(!other_value.random__bits().is_bound()) return FALSE;
if(!single_value->field_random__bits.match(other_value.random__bits(), 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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3.");
}
return FALSE;
}

boolean EGPRSPktChRequest__P2RB3_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_tag.is_bound()
 || single_value->field_priority.is_bound()
 || single_value->field_random__bits.is_bound();
}

boolean EGPRSPktChRequest__P2RB3_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_tag.is_value()
 && single_value->field_priority.is_value()
 && single_value->field_random__bits.is_value();
}

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

EGPRSPktChRequest__P2RB3 EGPRSPktChRequest__P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3.");
EGPRSPktChRequest__P2RB3 ret_val;
if (single_value->field_tag.is_bound()) {
ret_val.tag() = single_value->field_tag.valueof();
}
if (single_value->field_priority.is_bound()) {
ret_val.priority() = single_value->field_priority.valueof();
}
if (single_value->field_random__bits.is_bound()) {
ret_val.random__bits() = single_value->field_random__bits.valueof();
}
return ret_val;
}

void EGPRSPktChRequest__P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new EGPRSPktChRequest__P2RB3_template[list_length];
}

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

BITSTRING_template& EGPRSPktChRequest__P2RB3_template::tag()
{
set_specific();
return single_value->field_tag;
}

const BITSTRING_template& EGPRSPktChRequest__P2RB3_template::tag() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tag of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3.");
return single_value->field_tag;
}

BITSTRING_template& EGPRSPktChRequest__P2RB3_template::priority()
{
set_specific();
return single_value->field_priority;
}

const BITSTRING_template& EGPRSPktChRequest__P2RB3_template::priority() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field priority of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3.");
return single_value->field_priority;
}

BITSTRING_template& EGPRSPktChRequest__P2RB3_template::random__bits()
{
set_specific();
return single_value->field_random__bits;
}

const BITSTRING_template& EGPRSPktChRequest__P2RB3_template::random__bits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field random_bits of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3.");
return single_value->field_random__bits;
}

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

void EGPRSPktChRequest__P2RB3_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ tag := ");
single_value->field_tag.log();
TTCN_Logger::log_event_str(", priority := ");
single_value->field_priority.log();
TTCN_Logger::log_event_str(", random_bits := ");
single_value->field_random__bits.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 EGPRSPktChRequest__P2RB3_template::log_match(const EGPRSPktChRequest__P2RB3& 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_tag.match(match_value.tag(), legacy)){
TTCN_Logger::log_logmatch_info(".tag");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_priority.match(match_value.priority(), legacy)){
TTCN_Logger::log_logmatch_info(".priority");
single_value->field_priority.log_match(match_value.priority(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_random__bits.match(match_value.random__bits(), legacy)){
TTCN_Logger::log_logmatch_info(".random_bits");
single_value->field_random__bits.log_match(match_value.random__bits(), 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("{ tag := ");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::log_event_str(", priority := ");
single_value->field_priority.log_match(match_value.priority(), legacy);
TTCN_Logger::log_event_str(", random_bits := ");
single_value->field_random__bits.log_match(match_value.random__bits(), 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 EGPRSPktChRequest__P2RB3_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (tag().is_bound()) tag().set_implicit_omit();
if (priority().is_bound()) priority().set_implicit_omit();
if (random__bits().is_bound()) random__bits().set_implicit_omit();
}

void EGPRSPktChRequest__P2RB3_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_tag.encode_text(text_buf);
single_value->field_priority.encode_text(text_buf);
single_value->field_random__bits.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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3.");
}
}

void EGPRSPktChRequest__P2RB3_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_tag.decode_text(text_buf);
single_value->field_priority.decode_text(text_buf);
single_value->field_random__bits.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 EGPRSPktChRequest__P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3.");
}
}

void EGPRSPktChRequest__P2RB3_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: {
    EGPRSPktChRequest__P2RB3_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3 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) tag().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) priority().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) random__bits().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(), "tag")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tag().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(), "priority")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          priority().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(), "random_bits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          random__bits().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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    EGPRSPktChRequest__P2RB3_template* precondition = new EGPRSPktChRequest__P2RB3_template;
    precondition->set_param(*param.get_elem(0));
    EGPRSPktChRequest__P2RB3_template* implied_template = new EGPRSPktChRequest__P2RB3_template;
    implied_template->set_param(*param.get_elem(1));
    *this = EGPRSPktChRequest__P2RB3_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3");
  }
  is_ifpresent = param.get_ifpresent();
}

void EGPRSPktChRequest__P2RB3_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_tag.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3");
single_value->field_priority.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3");
single_value->field_random__bits.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3");
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 : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_P2RB3");
}

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

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

EGPRSPktChRequest__RB5::EGPRSPktChRequest__RB5()
{
}

EGPRSPktChRequest__RB5::EGPRSPktChRequest__RB5(const BITSTRING& par_tag,
    const BITSTRING& par_random__bits)
  :   field_tag(par_tag),
  field_random__bits(par_random__bits)
{
}

EGPRSPktChRequest__RB5::EGPRSPktChRequest__RB5(const EGPRSPktChRequest__RB5& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5.");
if (other_value.tag().is_bound()) field_tag = other_value.tag();
else field_tag.clean_up();
if (other_value.random__bits().is_bound()) field_random__bits = other_value.random__bits();
else field_random__bits.clean_up();
}

void EGPRSPktChRequest__RB5::clean_up()
{
field_tag.clean_up();
field_random__bits.clean_up();
}

const TTCN_Typedescriptor_t* EGPRSPktChRequest__RB5::get_descriptor() const { return &EGPRSPktChRequest__RB5_descr_; }
EGPRSPktChRequest__RB5& EGPRSPktChRequest__RB5::operator=(const EGPRSPktChRequest__RB5& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5.");
  if (other_value.tag().is_bound()) field_tag = other_value.tag();
  else field_tag.clean_up();
  if (other_value.random__bits().is_bound()) field_random__bits = other_value.random__bits();
  else field_random__bits.clean_up();
}
return *this;
}

boolean EGPRSPktChRequest__RB5::operator==(const EGPRSPktChRequest__RB5& other_value) const
{
return field_tag==other_value.field_tag
  && field_random__bits==other_value.field_random__bits;
}

boolean EGPRSPktChRequest__RB5::is_bound() const
{
return (field_tag.is_bound())
  || (field_random__bits.is_bound());
}
boolean EGPRSPktChRequest__RB5::is_value() const
{
return field_tag.is_value()
  && field_random__bits.is_value();
}
void EGPRSPktChRequest__RB5::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ tag := ");
field_tag.log();
TTCN_Logger::log_event_str(", random_bits := ");
field_random__bits.log();
TTCN_Logger::log_event_str(" }");
}

void EGPRSPktChRequest__RB5::set_implicit_omit()
{
if (tag().is_bound()) tag().set_implicit_omit();
if (random__bits().is_bound()) random__bits().set_implicit_omit();
}

void EGPRSPktChRequest__RB5::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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5 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) tag().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) random__bits().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(), "tag")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tag().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(), "random_bits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          random__bits().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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5");
  }
}

void EGPRSPktChRequest__RB5::encode_text(Text_Buf& text_buf) const
{
field_tag.encode_text(text_buf);
field_random__bits.encode_text(text_buf);
}

void EGPRSPktChRequest__RB5::decode_text(Text_Buf& text_buf)
{
field_tag.decode_text(text_buf);
field_random__bits.decode_text(text_buf);
}

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

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

int EGPRSPktChRequest__RB5::RAW_decode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf, int limit, raw_order_t top_bit_ord, boolean no_err, int, boolean, const RAW_Force_Omit* force_omit)
{ (void)no_err;
  int prepaddlength=p_buf.increase_pos_padd(p_td.raw->prepadding);
  limit-=prepaddlength;
  size_t last_decoded_pos = p_buf.get_pos_bit();
  int decoded_length = 0;
  int decoded_field_length = 0;
  raw_order_t local_top_order;
  if(p_td.raw->top_bit_order==TOP_BIT_INHERITED)local_top_order=top_bit_ord;
  else if(p_td.raw->top_bit_order==TOP_BIT_RIGHT)local_top_order=ORDER_MSB;
  else local_top_order=ORDER_LSB;
  RAW_Force_Omit field_0_force_omit(0, force_omit, EGPRSPktChRequest__RB5_tag_descr_.raw->forceomit);
  decoded_field_length = field_tag.RAW_decode(EGPRSPktChRequest__RB5_tag_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_0_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  RAW_Force_Omit field_1_force_omit(1, force_omit, EGPRSPktChRequest__RB5_random__bits_descr_.raw->forceomit);
  decoded_field_length = field_random__bits.RAW_decode(EGPRSPktChRequest__RB5_random__bits_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int EGPRSPktChRequest__RB5::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 2;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(2);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, EGPRSPktChRequest__RB5_tag_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, EGPRSPktChRequest__RB5_random__bits_descr_.raw);
  encoded_length += field_tag.RAW_encode(EGPRSPktChRequest__RB5_tag_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_random__bits.RAW_encode(EGPRSPktChRequest__RB5_random__bits_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct EGPRSPktChRequest__RB5_template::single_value_struct {
BITSTRING_template field_tag;
BITSTRING_template field_random__bits;
};

void EGPRSPktChRequest__RB5_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_tag = ANY_VALUE;
single_value->field_random__bits = ANY_VALUE;
}
}
}

void EGPRSPktChRequest__RB5_template::copy_value(const EGPRSPktChRequest__RB5& other_value)
{
single_value = new single_value_struct;
if (other_value.tag().is_bound()) {
  single_value->field_tag = other_value.tag();
} else {
  single_value->field_tag.clean_up();
}
if (other_value.random__bits().is_bound()) {
  single_value->field_random__bits = other_value.random__bits();
} else {
  single_value->field_random__bits.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void EGPRSPktChRequest__RB5_template::copy_template(const EGPRSPktChRequest__RB5_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.tag().get_selection()) {
single_value->field_tag = other_value.tag();
} else {
single_value->field_tag.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.random__bits().get_selection()) {
single_value->field_random__bits = other_value.random__bits();
} else {
single_value->field_random__bits.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 EGPRSPktChRequest__RB5_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 EGPRSPktChRequest__RB5_template(*other_value.implication_.precondition);
implication_.implied_template = new EGPRSPktChRequest__RB5_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5.");
break;
}
set_selection(other_value);
}

EGPRSPktChRequest__RB5_template::EGPRSPktChRequest__RB5_template()
{
}

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

EGPRSPktChRequest__RB5_template::EGPRSPktChRequest__RB5_template(const EGPRSPktChRequest__RB5& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean EGPRSPktChRequest__RB5_template::match(const EGPRSPktChRequest__RB5& 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.tag().is_bound()) return FALSE;
if(!single_value->field_tag.match(other_value.tag(), legacy))return FALSE;
if(!other_value.random__bits().is_bound()) return FALSE;
if(!single_value->field_random__bits.match(other_value.random__bits(), 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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5.");
}
return FALSE;
}

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

boolean EGPRSPktChRequest__RB5_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_tag.is_value()
 && single_value->field_random__bits.is_value();
}

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

EGPRSPktChRequest__RB5 EGPRSPktChRequest__RB5_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5.");
EGPRSPktChRequest__RB5 ret_val;
if (single_value->field_tag.is_bound()) {
ret_val.tag() = single_value->field_tag.valueof();
}
if (single_value->field_random__bits.is_bound()) {
ret_val.random__bits() = single_value->field_random__bits.valueof();
}
return ret_val;
}

void EGPRSPktChRequest__RB5_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new EGPRSPktChRequest__RB5_template[list_length];
}

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

BITSTRING_template& EGPRSPktChRequest__RB5_template::tag()
{
set_specific();
return single_value->field_tag;
}

const BITSTRING_template& EGPRSPktChRequest__RB5_template::tag() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tag of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5.");
return single_value->field_tag;
}

BITSTRING_template& EGPRSPktChRequest__RB5_template::random__bits()
{
set_specific();
return single_value->field_random__bits;
}

const BITSTRING_template& EGPRSPktChRequest__RB5_template::random__bits() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field random_bits of a non-specific template of type @RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5.");
return single_value->field_random__bits;
}

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

void EGPRSPktChRequest__RB5_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ tag := ");
single_value->field_tag.log();
TTCN_Logger::log_event_str(", random_bits := ");
single_value->field_random__bits.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 EGPRSPktChRequest__RB5_template::log_match(const EGPRSPktChRequest__RB5& 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_tag.match(match_value.tag(), legacy)){
TTCN_Logger::log_logmatch_info(".tag");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_random__bits.match(match_value.random__bits(), legacy)){
TTCN_Logger::log_logmatch_info(".random_bits");
single_value->field_random__bits.log_match(match_value.random__bits(), 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("{ tag := ");
single_value->field_tag.log_match(match_value.tag(), legacy);
TTCN_Logger::log_event_str(", random_bits := ");
single_value->field_random__bits.log_match(match_value.random__bits(), 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 EGPRSPktChRequest__RB5_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (tag().is_bound()) tag().set_implicit_omit();
if (random__bits().is_bound()) random__bits().set_implicit_omit();
}

void EGPRSPktChRequest__RB5_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_tag.encode_text(text_buf);
single_value->field_random__bits.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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5.");
}
}

void EGPRSPktChRequest__RB5_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_tag.decode_text(text_buf);
single_value->field_random__bits.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 EGPRSPktChRequest__RB5_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5.");
}
}

void EGPRSPktChRequest__RB5_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: {
    EGPRSPktChRequest__RB5_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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5 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) tag().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) random__bits().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(), "tag")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tag().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(), "random_bits")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          random__bits().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 @RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    EGPRSPktChRequest__RB5_template* precondition = new EGPRSPktChRequest__RB5_template;
    precondition->set_param(*param.get_elem(0));
    EGPRSPktChRequest__RB5_template* implied_template = new EGPRSPktChRequest__RB5_template;
    implied_template->set_param(*param.get_elem(1));
    *this = EGPRSPktChRequest__RB5_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5");
  }
  is_ifpresent = param.get_ifpresent();
}

void EGPRSPktChRequest__RB5_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_tag.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5");
single_value->field_random__bits.check_restriction(t_res, t_name ? t_name : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5");
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 : "@RLCMAC_CSN1_Types.EGPRSPktChRequest_RB5");
}

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

boolean EGPRSPktChRequest__RB5_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 RlcmacDlCtrlMsgType_encoder(const RlcmacDlCtrlMsgType& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RlcmacDlCtrlMsgType' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RlcmacDlCtrlMsgType_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RlcmacDlCtrlMsgType_decoder(OCTETSTRING& input_stream, RlcmacDlCtrlMsgType& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RlcmacDlCtrlMsgType' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RlcmacDlCtrlMsgType_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RlcmacUlCtrlMsgType_encoder(const RlcmacUlCtrlMsgType& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RlcmacUlCtrlMsgType' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RlcmacUlCtrlMsgType_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RlcmacUlCtrlMsgType_decoder(OCTETSTRING& input_stream, RlcmacUlCtrlMsgType& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RlcmacUlCtrlMsgType' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RlcmacUlCtrlMsgType_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void EgprsChCodingCommand_encoder(const EgprsChCodingCommand& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.EgprsChCodingCommand' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(EgprsChCodingCommand_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER EgprsChCodingCommand_decoder(OCTETSTRING& input_stream, EgprsChCodingCommand& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.EgprsChCodingCommand' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(EgprsChCodingCommand_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void EgprsWindowSize_encoder(const EgprsWindowSize& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.EgprsWindowSize' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(EgprsWindowSize_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER EgprsWindowSize_decoder(OCTETSTRING& input_stream, EgprsWindowSize& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.EgprsWindowSize' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(EgprsWindowSize_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NullGlobalTfi_presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NullGlobalTfi_presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NullGlobalTfi_presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NullGlobalTfi_presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalTfi_is__dl__tfi_encoder(const BOOLEAN& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `boolean' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalTfi_is__dl__tfi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalTfi_is__dl__tfi_decoder(OCTETSTRING& input_stream, BOOLEAN& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `boolean' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalTfi_is__dl__tfi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalTfi_tfi_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalTfi_tfi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalTfi_tfi_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalTfi_tfi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalTfi_encoder(const GlobalTfi& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalTfi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalTfi_decoder(OCTETSTRING& input_stream, GlobalTfi& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalTfi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NullGlobalTfi_global__tfi_encoder(const GlobalTfi& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NullGlobalTfi_global__tfi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NullGlobalTfi_global__tfi_decoder(OCTETSTRING& input_stream, GlobalTfi& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NullGlobalTfi_global__tfi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NullGlobalTfi_encoder(const NullGlobalTfi& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NullGlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NullGlobalTfi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NullGlobalTfi_decoder(OCTETSTRING& input_stream, NullGlobalTfi& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NullGlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NullGlobalTfi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TenTlli_presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TenTlli_presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TenTlli_presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TenTlli_presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TenTlli_tlli_encoder(const OCTETSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TenTlli_tlli_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TenTlli_tlli_decoder(OCTETSTRING& input_stream, OCTETSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TenTlli_tlli_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TenTlli_encoder(const TenTlli& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TenTlli' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TenTlli_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TenTlli_decoder(OCTETSTRING& input_stream, TenTlli& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TenTlli' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TenTlli_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalTfiOrTlli_global__tfi_encoder(const NullGlobalTfi& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NullGlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalTfiOrTlli_global__tfi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalTfiOrTlli_global__tfi_decoder(OCTETSTRING& input_stream, NullGlobalTfi& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NullGlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalTfiOrTlli_global__tfi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalTfiOrTlli_tlli_encoder(const TenTlli& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TenTlli' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalTfiOrTlli_tlli_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalTfiOrTlli_tlli_decoder(OCTETSTRING& input_stream, TenTlli& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TenTlli' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalTfiOrTlli_tlli_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalTfiOrTlli_encoder(const GlobalTfiOrTlli& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfiOrTlli' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalTfiOrTlli_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalTfiOrTlli_decoder(OCTETSTRING& input_stream, GlobalTfiOrTlli& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfiOrTlli' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalTfiOrTlli_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageMode_encoder(const PageMode& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageMode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageMode_decoder(OCTETSTRING& input_stream, PageMode& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageMode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_page__mode_encoder(const PageMode& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_page__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_page__mode_decoder(OCTETSTRING& input_stream, PageMode& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_page__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_pres1_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_pres1_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_pres1_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_pres1_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_tfi__or__tlli_encoder(const GlobalTfiOrTlli& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfiOrTlli' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_tfi__or__tlli_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_tfi__or__tlli_decoder(OCTETSTRING& input_stream, GlobalTfiOrTlli& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfiOrTlli' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_tfi__or__tlli_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_egprs2_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_egprs2_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_egprs2_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_egprs2_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_mac__mode_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_mac__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_mac__mode_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_mac__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_rlc__mode_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_rlc__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_rlc__mode_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_rlc__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_control__ack_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_control__ack_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_control__ack_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_control__ack_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_timeslot__alloc_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_timeslot__alloc_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_timeslot__alloc_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_timeslot__alloc_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketTimingAdvance_val__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketTimingAdvance_val__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketTimingAdvance_val__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketTimingAdvance_val__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketTimingAdvance_idx__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketTimingAdvance_idx__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketTimingAdvance_idx__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketTimingAdvance_idx__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketTimingAdvance_val_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketTimingAdvance_val_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketTimingAdvance_val_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketTimingAdvance_val_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketTimingAdvance_idx_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketTimingAdvance_idx_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketTimingAdvance_idx_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketTimingAdvance_idx_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketTimingAdvance_timeslot__nr_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketTimingAdvance_timeslot__nr_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketTimingAdvance_timeslot__nr_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketTimingAdvance_timeslot__nr_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketTimingAdvance_encoder(const PacketTimingAdvance& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketTimingAdvance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketTimingAdvance_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketTimingAdvance_decoder(OCTETSTRING& input_stream, PacketTimingAdvance& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketTimingAdvance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketTimingAdvance_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_pkt__ta_encoder(const PacketTimingAdvance& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketTimingAdvance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_pkt__ta_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_pkt__ta_decoder(OCTETSTRING& input_stream, PacketTimingAdvance& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketTimingAdvance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_pkt__ta_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_p0__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_p0__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_p0__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_p0__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_freq__par__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_freq__par__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_freq__par__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_freq__par__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_dl__tfi__ass__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_dl__tfi__ass__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_dl__tfi__ass__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_dl__tfi__ass__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_pwr__ctrl__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_pwr__ctrl__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_pwr__ctrl__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_pwr__ctrl__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_tbf__starting__time__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_tbf__starting__time__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_tbf__starting__time__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_tbf__starting__time__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_spare_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_spare_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_spare_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_spare_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PersistenceLevels_0_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PersistenceLevels_0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PersistenceLevels_0_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PersistenceLevels_0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PersistenceLevels_encoder(const PersistenceLevels& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PersistenceLevels' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PersistenceLevels_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PersistenceLevels_decoder(OCTETSTRING& input_stream, PersistenceLevels& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PersistenceLevels' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PersistenceLevels_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_persistence__levels_encoder(const PersistenceLevels& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PersistenceLevels' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_persistence__levels_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_persistence__levels_decoder(OCTETSTRING& input_stream, PersistenceLevels& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PersistenceLevels' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_persistence__levels_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_p0_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_p0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_p0_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_p0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_reserved_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_reserved_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_reserved_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_reserved_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_pr__mode_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_pr__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_pr__mode_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_pr__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FrequencyParameters_tsc_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FrequencyParameters_tsc_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FrequencyParameters_tsc_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FrequencyParameters_tsc_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FrequencyParameters_presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FrequencyParameters_presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FrequencyParameters_presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FrequencyParameters_presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FrequencyParameters_arfcn_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FrequencyParameters_arfcn_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FrequencyParameters_arfcn_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FrequencyParameters_arfcn_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqIndirect_maio_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqIndirect_maio_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqIndirect_maio_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqIndirect_maio_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqIndirect_ma__number_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqIndirect_ma__number_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqIndirect_ma__number_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqIndirect_ma__number_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqIndirect_change__mark1__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqIndirect_change__mark1__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqIndirect_change__mark1__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqIndirect_change__mark1__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqIndirect_change__mark2__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqIndirect_change__mark2__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqIndirect_change__mark2__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqIndirect_change__mark2__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqIndirect_change__mark1_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqIndirect_change__mark1_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqIndirect_change__mark1_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqIndirect_change__mark1_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqIndirect_change__mark2_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqIndirect_change__mark2_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqIndirect_change__mark2_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqIndirect_change__mark2_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqIndirect_encoder(const FreqIndirect& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqIndirect' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqIndirect_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqIndirect_decoder(OCTETSTRING& input_stream, FreqIndirect& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqIndirect' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqIndirect_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FrequencyParameters_indirect_encoder(const FreqIndirect& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqIndirect' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FrequencyParameters_indirect_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FrequencyParameters_indirect_decoder(OCTETSTRING& input_stream, FreqIndirect& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqIndirect' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FrequencyParameters_indirect_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqDirect1_maio_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqDirect1_maio_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqDirect1_maio_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqDirect1_maio_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GprsMobileAllocation_hsn_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GprsMobileAllocation_hsn_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GprsMobileAllocation_hsn_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GprsMobileAllocation_hsn_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GprsMobileAllocation_rfl__number__list__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GprsMobileAllocation_rfl__number__list__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GprsMobileAllocation_rfl__number__list__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GprsMobileAllocation_rfl__number__list__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GprsMobileAllocation_ma__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GprsMobileAllocation_ma__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GprsMobileAllocation_ma__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GprsMobileAllocation_ma__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RflNumberList_rfl__number_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RflNumberList_rfl__number_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RflNumberList_rfl__number_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RflNumberList_rfl__number_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RflNumberList_presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RflNumberList_presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RflNumberList_presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RflNumberList_presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RflNumberList_rfl__number__list_encoder(const RflNumberList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RflNumberList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RflNumberList_rfl__number__list_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RflNumberList_rfl__number__list_decoder(OCTETSTRING& input_stream, RflNumberList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RflNumberList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RflNumberList_rfl__number__list_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RflNumberList_encoder(const RflNumberList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RflNumberList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RflNumberList_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RflNumberList_decoder(OCTETSTRING& input_stream, RflNumberList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RflNumberList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RflNumberList_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GprsMobileAllocation_rfl__number__list_encoder(const RflNumberList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RflNumberList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GprsMobileAllocation_rfl__number__list_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GprsMobileAllocation_rfl__number__list_decoder(OCTETSTRING& input_stream, RflNumberList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RflNumberList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GprsMobileAllocation_rfl__number__list_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GprsMobileAllocation_ma__length_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GprsMobileAllocation_ma__length_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GprsMobileAllocation_ma__length_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GprsMobileAllocation_ma__length_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GprsMobileAllocation_ma__bitmap_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GprsMobileAllocation_ma__bitmap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GprsMobileAllocation_ma__bitmap_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GprsMobileAllocation_ma__bitmap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GprsMobileAllocation_encoder(const GprsMobileAllocation& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GprsMobileAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GprsMobileAllocation_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GprsMobileAllocation_decoder(OCTETSTRING& input_stream, GprsMobileAllocation& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GprsMobileAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GprsMobileAllocation_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqDirect1_mobile__allocation_encoder(const GprsMobileAllocation& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GprsMobileAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqDirect1_mobile__allocation_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqDirect1_mobile__allocation_decoder(OCTETSTRING& input_stream, GprsMobileAllocation& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GprsMobileAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqDirect1_mobile__allocation_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqDirect1_encoder(const FreqDirect1& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqDirect1' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqDirect1_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqDirect1_decoder(OCTETSTRING& input_stream, FreqDirect1& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqDirect1' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqDirect1_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FrequencyParameters_direct1_encoder(const FreqDirect1& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqDirect1' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FrequencyParameters_direct1_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FrequencyParameters_direct1_decoder(OCTETSTRING& input_stream, FreqDirect1& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqDirect1' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FrequencyParameters_direct1_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqDirect2_maio_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqDirect2_maio_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqDirect2_maio_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqDirect2_maio_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqDirect2_hsn_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqDirect2_hsn_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqDirect2_hsn_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqDirect2_hsn_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqDirect2_ma__freq__len_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqDirect2_ma__freq__len_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqDirect2_ma__freq__len_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqDirect2_ma__freq__len_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqDirect2_m1__freq__list_encoder(const OCTETSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqDirect2_m1__freq__list_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqDirect2_m1__freq__list_decoder(OCTETSTRING& input_stream, OCTETSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqDirect2_m1__freq__list_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqDirect2_encoder(const FreqDirect2& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqDirect2' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqDirect2_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqDirect2_decoder(OCTETSTRING& input_stream, FreqDirect2& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqDirect2' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqDirect2_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FrequencyParameters_direct2_encoder(const FreqDirect2& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqDirect2' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FrequencyParameters_direct2_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FrequencyParameters_direct2_decoder(OCTETSTRING& input_stream, FreqDirect2& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqDirect2' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FrequencyParameters_direct2_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FrequencyParameters_encoder(const FrequencyParameters& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FrequencyParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FrequencyParameters_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FrequencyParameters_decoder(OCTETSTRING& input_stream, FrequencyParameters& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FrequencyParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FrequencyParameters_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_freq__par_encoder(const FrequencyParameters& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FrequencyParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_freq__par_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_freq__par_decoder(OCTETSTRING& input_stream, FrequencyParameters& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FrequencyParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_freq__par_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_dl__tfi__assignment_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_dl__tfi__assignment_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_dl__tfi__assignment_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_dl__tfi__assignment_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PowerControlParameters_alpha_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PowerControlParameters_alpha_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PowerControlParameters_alpha_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PowerControlParameters_alpha_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

boolean operator==(null_type, const ZeroOneGammas& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @RLCMAC_CSN1_Types.ZeroOneGammas.");
return other_value.val_ptr->n_elements == 0;
}

void ZeroOneGamma_gamma__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ZeroOneGamma_gamma__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ZeroOneGamma_gamma__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ZeroOneGamma_gamma__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ZeroOneGamma_gamma_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ZeroOneGamma_gamma_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ZeroOneGamma_gamma_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ZeroOneGamma_gamma_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ZeroOneGamma_encoder(const ZeroOneGamma& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ZeroOneGamma' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ZeroOneGamma_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ZeroOneGamma_decoder(OCTETSTRING& input_stream, ZeroOneGamma& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ZeroOneGamma' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ZeroOneGamma_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ZeroOneGammas_0_encoder(const ZeroOneGamma& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ZeroOneGamma' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ZeroOneGammas_0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ZeroOneGammas_0_decoder(OCTETSTRING& input_stream, ZeroOneGamma& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ZeroOneGamma' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ZeroOneGammas_0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ZeroOneGammas_encoder(const ZeroOneGammas& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ZeroOneGammas' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ZeroOneGammas_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ZeroOneGammas_decoder(OCTETSTRING& input_stream, ZeroOneGammas& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ZeroOneGammas' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ZeroOneGammas_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PowerControlParameters_gamma_encoder(const ZeroOneGammas& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ZeroOneGammas' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PowerControlParameters_gamma_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PowerControlParameters_gamma_decoder(OCTETSTRING& input_stream, ZeroOneGammas& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ZeroOneGammas' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PowerControlParameters_gamma_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PowerControlParameters_encoder(const PowerControlParameters& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PowerControlParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PowerControlParameters_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PowerControlParameters_decoder(OCTETSTRING& input_stream, PowerControlParameters& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PowerControlParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PowerControlParameters_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_pwr__ctrl_encoder(const PowerControlParameters& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PowerControlParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_pwr__ctrl_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_pwr__ctrl_decoder(OCTETSTRING& input_stream, PowerControlParameters& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PowerControlParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_pwr__ctrl_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void StartingFnDesc_presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(StartingFnDesc_presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER StartingFnDesc_presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(StartingFnDesc_presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void StartingFnDesc_absolute__starting__time_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(StartingFnDesc_absolute__starting__time_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER StartingFnDesc_absolute__starting__time_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(StartingFnDesc_absolute__starting__time_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void StartingFnDesc_relative__k_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(StartingFnDesc_relative__k_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER StartingFnDesc_relative__k_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(StartingFnDesc_relative__k_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void StartingFnDesc_encoder(const StartingFnDesc& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.StartingFnDesc' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(StartingFnDesc_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER StartingFnDesc_decoder(OCTETSTRING& input_stream, StartingFnDesc& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.StartingFnDesc' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(StartingFnDesc_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_tbf__starting__time_encoder(const StartingFnDesc& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.StartingFnDesc' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_tbf__starting__time_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_tbf__starting__time_decoder(OCTETSTRING& input_stream, StartingFnDesc& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.StartingFnDesc' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_tbf__starting__time_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktDlAssRelAdditions_rel99__presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktDlAssRelAdditions_rel99__presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktDlAssRelAdditions_rel99__presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktDlAssRelAdditions_rel99__presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktDlAssR99Additions_egprs__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktDlAssR99Additions_egprs__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktDlAssR99Additions_egprs__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktDlAssR99Additions_egprs__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktDlAssR99Additions_pkt__ext__ta__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktDlAssR99Additions_pkt__ext__ta__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktDlAssR99Additions_pkt__ext__ta__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktDlAssR99Additions_pkt__ext__ta__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktDlAssR99Additions_compact__reduced__ma__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktDlAssR99Additions_compact__reduced__ma__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktDlAssR99Additions_compact__reduced__ma__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktDlAssR99Additions_compact__reduced__ma__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktDlAssR99EGPRS_window__size_encoder(const EgprsWindowSize& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.EgprsWindowSize' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktDlAssR99EGPRS_window__size_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktDlAssR99EGPRS_window__size_decoder(OCTETSTRING& input_stream, EgprsWindowSize& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.EgprsWindowSize' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktDlAssR99EGPRS_window__size_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktDlAssR99EGPRS_link__quality__meas__mode_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktDlAssR99EGPRS_link__quality__meas__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktDlAssR99EGPRS_link__quality__meas__mode_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktDlAssR99EGPRS_link__quality__meas__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktDlAssR99EGPRS_bep__period2__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktDlAssR99EGPRS_bep__period2__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktDlAssR99EGPRS_bep__period2__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktDlAssR99EGPRS_bep__period2__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktDlAssR99EGPRS_bep__period2_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktDlAssR99EGPRS_bep__period2_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktDlAssR99EGPRS_bep__period2_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktDlAssR99EGPRS_bep__period2_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktDlAssR99EGPRS_encoder(const PktDlAssR99EGPRS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktDlAssR99EGPRS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktDlAssR99EGPRS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktDlAssR99EGPRS_decoder(OCTETSTRING& input_stream, PktDlAssR99EGPRS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktDlAssR99EGPRS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktDlAssR99EGPRS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktDlAssR99Additions_egprs_encoder(const PktDlAssR99EGPRS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktDlAssR99EGPRS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktDlAssR99Additions_egprs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktDlAssR99Additions_egprs_decoder(OCTETSTRING& input_stream, PktDlAssR99EGPRS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktDlAssR99EGPRS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktDlAssR99Additions_egprs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktDlAssR99Additions_pkt__ext__ta_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktDlAssR99Additions_pkt__ext__ta_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktDlAssR99Additions_pkt__ext__ta_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktDlAssR99Additions_pkt__ext__ta_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void COMPACTreducedMA_ma__bitmap__length_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(COMPACTreducedMA_ma__bitmap__length_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER COMPACTreducedMA_ma__bitmap__length_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(COMPACTreducedMA_ma__bitmap__length_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void COMPACTreducedMA_ma__bitmap_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(COMPACTreducedMA_ma__bitmap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER COMPACTreducedMA_ma__bitmap_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(COMPACTreducedMA_ma__bitmap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void COMPACTreducedMA_maio__2__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(COMPACTreducedMA_maio__2__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER COMPACTreducedMA_maio__2__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(COMPACTreducedMA_maio__2__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void COMPACTreducedMA_maio__2_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(COMPACTreducedMA_maio__2_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER COMPACTreducedMA_maio__2_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(COMPACTreducedMA_maio__2_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void COMPACTreducedMA_encoder(const COMPACTreducedMA& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.COMPACTreducedMA' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(COMPACTreducedMA_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER COMPACTreducedMA_decoder(OCTETSTRING& input_stream, COMPACTreducedMA& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.COMPACTreducedMA' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(COMPACTreducedMA_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktDlAssR99Additions_compact__reduced__ma_encoder(const COMPACTreducedMA& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.COMPACTreducedMA' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktDlAssR99Additions_compact__reduced__ma_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktDlAssR99Additions_compact__reduced__ma_decoder(OCTETSTRING& input_stream, COMPACTreducedMA& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.COMPACTreducedMA' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktDlAssR99Additions_compact__reduced__ma_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktDlAssR99Additions_encoder(const PktDlAssR99Additions& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktDlAssR99Additions' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktDlAssR99Additions_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktDlAssR99Additions_decoder(OCTETSTRING& input_stream, PktDlAssR99Additions& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktDlAssR99Additions' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktDlAssR99Additions_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktDlAssRelAdditions_rel99_encoder(const PktDlAssR99Additions& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktDlAssR99Additions' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktDlAssRelAdditions_rel99_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktDlAssRelAdditions_rel99_decoder(OCTETSTRING& input_stream, PktDlAssR99Additions& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktDlAssR99Additions' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktDlAssRelAdditions_rel99_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktDlAssRelAdditions_encoder(const PktDlAssRelAdditions& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktDlAssRelAdditions' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktDlAssRelAdditions_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktDlAssRelAdditions_decoder(OCTETSTRING& input_stream, PktDlAssRelAdditions& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktDlAssRelAdditions' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktDlAssRelAdditions_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_rel__additions_encoder(const PktDlAssRelAdditions& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktDlAssRelAdditions' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_rel__additions_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_rel__additions_decoder(OCTETSTRING& input_stream, PktDlAssRelAdditions& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktDlAssRelAdditions' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_rel__additions_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlAssignment_encoder(const PacketDlAssignment& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketDlAssignment' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlAssignment_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlAssignment_decoder(OCTETSTRING& input_stream, PacketDlAssignment& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketDlAssignment' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlAssignment_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NetworkControlOrder_encoder(const NetworkControlOrder& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NetworkControlOrder' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NetworkControlOrder_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NetworkControlOrder_decoder(OCTETSTRING& input_stream, NetworkControlOrder& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NetworkControlOrder' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NetworkControlOrder_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CellSelection_cell__barr__access__2_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CellSelection_cell__barr__access__2_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CellSelection_cell__barr__access__2_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CellSelection_cell__barr__access__2_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CellSelection_exc__acc_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CellSelection_exc__acc_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CellSelection_exc__acc_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CellSelection_exc__acc_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CellSelection_same__ra__as__serving__cell_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CellSelection_same__ra__as__serving__cell_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CellSelection_same__ra__as__serving__cell_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CellSelection_same__ra__as__serving__cell_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CellSelection_gprs__rxlev__access__min__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CellSelection_gprs__rxlev__access__min__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CellSelection_gprs__rxlev__access__min__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CellSelection_gprs__rxlev__access__min__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CellSelection_gprs__temporary__offset__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CellSelection_gprs__temporary__offset__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CellSelection_gprs__temporary__offset__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CellSelection_gprs__temporary__offset__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CellSelection_gprs__reselct__offset__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CellSelection_gprs__reselct__offset__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CellSelection_gprs__reselct__offset__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CellSelection_gprs__reselct__offset__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CellSelection_hcs__params__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CellSelection_hcs__params__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CellSelection_hcs__params__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CellSelection_hcs__params__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CellSelection_si13__pbcch__location__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CellSelection_si13__pbcch__location__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CellSelection_si13__pbcch__location__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CellSelection_si13__pbcch__location__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CellSelection_encoder(const CellSelection& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.CellSelection' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CellSelection_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CellSelection_decoder(OCTETSTRING& input_stream, CellSelection& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.CellSelection' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CellSelection_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AddFrequency_start__frequency_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AddFrequency_start__frequency_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AddFrequency_start__frequency_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AddFrequency_start__frequency_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AddFrequency_bsic_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AddFrequency_bsic_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AddFrequency_bsic_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AddFrequency_bsic_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AddFrequency_cell__sel__par__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AddFrequency_cell__sel__par__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AddFrequency_cell__sel__par__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AddFrequency_cell__sel__par__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AddFrequency_nr__of__frequencies_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AddFrequency_nr__of__frequencies_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AddFrequency_nr__of__frequencies_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AddFrequency_nr__of__frequencies_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AddFrequency_freq__diff__length_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AddFrequency_freq__diff__length_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AddFrequency_freq__diff__length_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AddFrequency_freq__diff__length_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AddFrequency_cell__sel__par_encoder(const CellSelection& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.CellSelection' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AddFrequency_cell__sel__par_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AddFrequency_cell__sel__par_decoder(OCTETSTRING& input_stream, CellSelection& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.CellSelection' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AddFrequency_cell__sel__par_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AddFrequency_encoder(const AddFrequency& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AddFrequency' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AddFrequency_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AddFrequency_decoder(OCTETSTRING& input_stream, AddFrequency& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AddFrequency' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AddFrequency_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RepeatedAddFrequencyItem_presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RepeatedAddFrequencyItem_presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RepeatedAddFrequencyItem_presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RepeatedAddFrequencyItem_presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RepeatedAddFrequencyItem_item_encoder(const AddFrequency& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AddFrequency' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RepeatedAddFrequencyItem_item_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RepeatedAddFrequencyItem_item_decoder(OCTETSTRING& input_stream, AddFrequency& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AddFrequency' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RepeatedAddFrequencyItem_item_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RepeatedAddFrequencyItem_encoder(const RepeatedAddFrequencyItem& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedAddFrequencyItem' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RepeatedAddFrequencyItem_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RepeatedAddFrequencyItem_decoder(OCTETSTRING& input_stream, RepeatedAddFrequencyItem& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedAddFrequencyItem' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RepeatedAddFrequencyItem_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqIndexList_0_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqIndexList_0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqIndexList_0_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqIndexList_0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FreqIndexList_encoder(const FreqIndexList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqIndexList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FreqIndexList_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FreqIndexList_decoder(OCTETSTRING& input_stream, FreqIndexList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqIndexList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FreqIndexList_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

boolean operator==(null_type, const RepeatedAddFrequencyItemList& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @RLCMAC_CSN1_Types.RepeatedAddFrequencyItemList.");
return other_value.val_ptr->n_elements == 0;
}

void RepeatedAddFrequencyItemList_0_encoder(const RepeatedAddFrequencyItem& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedAddFrequencyItem' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RepeatedAddFrequencyItemList_0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RepeatedAddFrequencyItemList_0_decoder(OCTETSTRING& input_stream, RepeatedAddFrequencyItem& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedAddFrequencyItem' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RepeatedAddFrequencyItemList_0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RepeatedAddFrequencyItemList_encoder(const RepeatedAddFrequencyItemList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedAddFrequencyItemList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RepeatedAddFrequencyItemList_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RepeatedAddFrequencyItemList_decoder(OCTETSTRING& input_stream, RepeatedAddFrequencyItemList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedAddFrequencyItemList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RepeatedAddFrequencyItemList_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NCFrequencyList_removed__freq__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NCFrequencyList_removed__freq__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NCFrequencyList_removed__freq__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NCFrequencyList_removed__freq__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NCFrequencyList_repeated__add__frequency__term_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NCFrequencyList_repeated__add__frequency__term_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NCFrequencyList_repeated__add__frequency__term_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NCFrequencyList_repeated__add__frequency__term_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NCFrequencyList_nr__of__removed__freq_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NCFrequencyList_nr__of__removed__freq_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NCFrequencyList_nr__of__removed__freq_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NCFrequencyList_nr__of__removed__freq_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NCFrequencyList_removed__freq__index_encoder(const FreqIndexList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqIndexList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NCFrequencyList_removed__freq__index_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NCFrequencyList_removed__freq__index_decoder(OCTETSTRING& input_stream, FreqIndexList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FreqIndexList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NCFrequencyList_removed__freq__index_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NCFrequencyList_repeated__add__frequency_encoder(const RepeatedAddFrequencyItemList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedAddFrequencyItemList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NCFrequencyList_repeated__add__frequency_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NCFrequencyList_repeated__add__frequency_decoder(OCTETSTRING& input_stream, RepeatedAddFrequencyItemList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedAddFrequencyItemList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NCFrequencyList_repeated__add__frequency_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NCFrequencyList_encoder(const NCFrequencyList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NCFrequencyList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NCFrequencyList_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NCFrequencyList_decoder(OCTETSTRING& input_stream, NCFrequencyList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NCFrequencyList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NCFrequencyList_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NCMeasurementParameters_nco_encoder(const NetworkControlOrder& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NetworkControlOrder' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NCMeasurementParameters_nco_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NCMeasurementParameters_nco_decoder(OCTETSTRING& input_stream, NetworkControlOrder& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NetworkControlOrder' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NCMeasurementParameters_nco_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NCMeasurementParameters_nc__period__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NCMeasurementParameters_nc__period__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NCMeasurementParameters_nc__period__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NCMeasurementParameters_nc__period__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NCMeasurementParameters_nc__freq__list__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NCMeasurementParameters_nc__freq__list__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NCMeasurementParameters_nc__freq__list__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NCMeasurementParameters_nc__freq__list__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NCMeasurementParameters_nc__non__drx__period_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NCMeasurementParameters_nc__non__drx__period_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NCMeasurementParameters_nc__non__drx__period_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NCMeasurementParameters_nc__non__drx__period_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NCMeasurementParameters_nc__reporting__period__i_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NCMeasurementParameters_nc__reporting__period__i_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NCMeasurementParameters_nc__reporting__period__i_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NCMeasurementParameters_nc__reporting__period__i_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NCMeasurementParameters_nc__reporting__period__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NCMeasurementParameters_nc__reporting__period__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NCMeasurementParameters_nc__reporting__period__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NCMeasurementParameters_nc__reporting__period__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NCMeasurementParameters_nc__freq__list_encoder(const NCFrequencyList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NCFrequencyList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NCMeasurementParameters_nc__freq__list_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NCMeasurementParameters_nc__freq__list_decoder(OCTETSTRING& input_stream, NCFrequencyList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NCFrequencyList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NCMeasurementParameters_nc__freq__list_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NCMeasurementParameters_encoder(const NCMeasurementParameters& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NCMeasurementParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NCMeasurementParameters_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NCMeasurementParameters_decoder(OCTETSTRING& input_stream, NCMeasurementParameters& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NCMeasurementParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NCMeasurementParameters_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketMeasOrder_page__mode_encoder(const PageMode& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketMeasOrder_page__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketMeasOrder_page__mode_decoder(OCTETSTRING& input_stream, PageMode& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketMeasOrder_page__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketMeasOrder_tfi__or__tlli_encoder(const GlobalTfiOrTlli& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfiOrTlli' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketMeasOrder_tfi__or__tlli_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketMeasOrder_tfi__or__tlli_decoder(OCTETSTRING& input_stream, GlobalTfiOrTlli& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfiOrTlli' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketMeasOrder_tfi__or__tlli_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketMeasOrder_pmo__index_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketMeasOrder_pmo__index_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketMeasOrder_pmo__index_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketMeasOrder_pmo__index_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketMeasOrder_pmo__count_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketMeasOrder_pmo__count_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketMeasOrder_pmo__count_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketMeasOrder_pmo__count_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketMeasOrder_nc__meas__param__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketMeasOrder_nc__meas__param__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketMeasOrder_nc__meas__param__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketMeasOrder_nc__meas__param__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketMeasOrder_zero_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketMeasOrder_zero_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketMeasOrder_zero_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketMeasOrder_zero_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketMeasOrder_nc__meas__param_encoder(const NCMeasurementParameters& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NCMeasurementParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketMeasOrder_nc__meas__param_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketMeasOrder_nc__meas__param_decoder(OCTETSTRING& input_stream, NCMeasurementParameters& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NCMeasurementParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketMeasOrder_nc__meas__param_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketMeasOrder_encoder(const PacketMeasOrder& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketMeasOrder' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketMeasOrder_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketMeasOrder_decoder(OCTETSTRING& input_stream, PacketMeasOrder& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketMeasOrder' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketMeasOrder_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void O__Gtfi_presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(O__Gtfi_presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER O__Gtfi_presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(O__Gtfi_presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void O__Gtfi_global__tfi_encoder(const GlobalTfi& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(O__Gtfi_global__tfi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER O__Gtfi_global__tfi_decoder(OCTETSTRING& input_stream, GlobalTfi& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(O__Gtfi_global__tfi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void O__Gtfi_encoder(const O__Gtfi& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.O_Gtfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(O__Gtfi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER O__Gtfi_decoder(OCTETSTRING& input_stream, O__Gtfi& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.O_Gtfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(O__Gtfi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void IO__Tlli_presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(IO__Tlli_presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER IO__Tlli_presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(IO__Tlli_presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void IO__Tlli_tlli_encoder(const OCTETSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(IO__Tlli_tlli_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER IO__Tlli_tlli_decoder(OCTETSTRING& input_stream, OCTETSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(IO__Tlli_tlli_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void IO__Tlli_encoder(const IO__Tlli& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.IO_Tlli' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(IO__Tlli_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER IO__Tlli_decoder(OCTETSTRING& input_stream, IO__Tlli& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.IO_Tlli' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(IO__Tlli_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void IIO__Tqi_presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(IIO__Tqi_presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER IIO__Tqi_presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(IIO__Tqi_presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketRequestReference_ra__info_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketRequestReference_ra__info_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketRequestReference_ra__info_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketRequestReference_ra__info_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketRequestReference_frame__nr_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketRequestReference_frame__nr_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketRequestReference_frame__nr_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketRequestReference_frame__nr_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketRequestReference_encoder(const PacketRequestReference& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketRequestReference' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketRequestReference_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketRequestReference_decoder(OCTETSTRING& input_stream, PacketRequestReference& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketRequestReference' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketRequestReference_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void IIO__Tqi_pkt__req__ref_encoder(const PacketRequestReference& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketRequestReference' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(IIO__Tqi_pkt__req__ref_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER IIO__Tqi_pkt__req__ref_decoder(OCTETSTRING& input_stream, PacketRequestReference& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketRequestReference' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(IIO__Tqi_pkt__req__ref_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void IIO__Tqi_encoder(const IIO__Tqi& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.IIO_Tqi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(IIO__Tqi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER IIO__Tqi_decoder(OCTETSTRING& input_stream, IIO__Tqi& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.IIO_Tqi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(IIO__Tqi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssUnion_global__tfi_encoder(const O__Gtfi& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.O_Gtfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssUnion_global__tfi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssUnion_global__tfi_decoder(OCTETSTRING& input_stream, O__Gtfi& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.O_Gtfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssUnion_global__tfi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssUnion_tlli_encoder(const IO__Tlli& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.IO_Tlli' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssUnion_tlli_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssUnion_tlli_decoder(OCTETSTRING& input_stream, IO__Tlli& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.IO_Tlli' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssUnion_tlli_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssUnion_tqi_encoder(const IIO__Tqi& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.IIO_Tqi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssUnion_tqi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssUnion_tqi_decoder(OCTETSTRING& input_stream, IIO__Tqi& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.IIO_Tqi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssUnion_tqi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssUnion_encoder(const PktUlAssUnion& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktUlAssUnion' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssUnion_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssUnion_decoder(OCTETSTRING& input_stream, PktUlAssUnion& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktUlAssUnion' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssUnion_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DynamicAllocation_extd__dyn__alloc_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DynamicAllocation_extd__dyn__alloc_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DynamicAllocation_extd__dyn__alloc_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DynamicAllocation_extd__dyn__alloc_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DynamicAllocation_p0__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DynamicAllocation_p0__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DynamicAllocation_p0__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DynamicAllocation_p0__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DynamicAllocation_usf__granularity_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DynamicAllocation_usf__granularity_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DynamicAllocation_usf__granularity_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DynamicAllocation_usf__granularity_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DynamicAllocation_ul__tfi__ass__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DynamicAllocation_ul__tfi__ass__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DynamicAllocation_ul__tfi__ass__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DynamicAllocation_ul__tfi__ass__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DynamicAllocation_reserved_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DynamicAllocation_reserved_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DynamicAllocation_reserved_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DynamicAllocation_reserved_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DynamicAllocation_tbf__starting__time__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DynamicAllocation_tbf__starting__time__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DynamicAllocation_tbf__starting__time__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DynamicAllocation_tbf__starting__time__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TsAllocationUnion_presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TsAllocationUnion_presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TsAllocationUnion_presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TsAllocationUnion_presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

boolean operator==(null_type, const TsAllocationTsArr& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @RLCMAC_CSN1_Types.TsAllocationTsArr.");
return other_value.val_ptr->n_elements == 0;
}

void TsAllocationTs_presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TsAllocationTs_presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TsAllocationTs_presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TsAllocationTs_presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TsAllocationTs_usf__tn_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TsAllocationTs_usf__tn_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TsAllocationTs_usf__tn_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TsAllocationTs_usf__tn_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TsAllocationTs_encoder(const TsAllocationTs& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationTs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TsAllocationTs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TsAllocationTs_decoder(OCTETSTRING& input_stream, TsAllocationTs& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationTs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TsAllocationTs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TsAllocationTsArr_0_encoder(const TsAllocationTs& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationTs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TsAllocationTsArr_0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TsAllocationTsArr_0_decoder(OCTETSTRING& input_stream, TsAllocationTs& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationTs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TsAllocationTsArr_0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TsAllocationTsArr_encoder(const TsAllocationTsArr& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationTsArr' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TsAllocationTsArr_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TsAllocationTsArr_decoder(OCTETSTRING& input_stream, TsAllocationTsArr& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationTsArr' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TsAllocationTsArr_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TsAllocationUnion_ts_encoder(const TsAllocationTsArr& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationTsArr' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TsAllocationUnion_ts_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TsAllocationUnion_ts_decoder(OCTETSTRING& input_stream, TsAllocationTsArr& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationTsArr' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TsAllocationUnion_ts_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TsAllocationPwr_alpha_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TsAllocationPwr_alpha_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TsAllocationPwr_alpha_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TsAllocationPwr_alpha_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TnGamma_presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TnGamma_presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TnGamma_presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TnGamma_presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TnGamma_usf__tn_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TnGamma_usf__tn_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TnGamma_usf__tn_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TnGamma_usf__tn_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TnGamma_gamma__tn_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TnGamma_gamma__tn_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TnGamma_gamma__tn_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TnGamma_gamma__tn_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TnGamma_encoder(const TnGamma& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TnGamma' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TnGamma_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TnGamma_decoder(OCTETSTRING& input_stream, TnGamma& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TnGamma' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TnGamma_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TsAllocationPwr_tn__gamma_encoder(const TnGamma& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TnGamma' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TsAllocationPwr_tn__gamma_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TsAllocationPwr_tn__gamma_decoder(OCTETSTRING& input_stream, TnGamma& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TnGamma' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TsAllocationPwr_tn__gamma_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TsAllocationPwr_encoder(const TsAllocationPwr& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationPwr' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TsAllocationPwr_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TsAllocationPwr_decoder(OCTETSTRING& input_stream, TsAllocationPwr& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationPwr' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TsAllocationPwr_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TsAllocationUnion_ts__with__pwr_encoder(const TsAllocationPwr& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationPwr' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TsAllocationUnion_ts__with__pwr_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TsAllocationUnion_ts__with__pwr_decoder(OCTETSTRING& input_stream, TsAllocationPwr& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationPwr' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TsAllocationUnion_ts__with__pwr_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TsAllocationUnion_encoder(const TsAllocationUnion& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationUnion' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TsAllocationUnion_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TsAllocationUnion_decoder(OCTETSTRING& input_stream, TsAllocationUnion& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationUnion' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TsAllocationUnion_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DynamicAllocation_ts__allocation_encoder(const TsAllocationUnion& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationUnion' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DynamicAllocation_ts__allocation_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DynamicAllocation_ts__allocation_decoder(OCTETSTRING& input_stream, TsAllocationUnion& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TsAllocationUnion' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DynamicAllocation_ts__allocation_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DynamicAllocation_p0_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DynamicAllocation_p0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DynamicAllocation_p0_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DynamicAllocation_p0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DynamicAllocation_pr__mode_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DynamicAllocation_pr__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DynamicAllocation_pr__mode_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DynamicAllocation_pr__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DynamicAllocation_ul__tfi__assignment_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DynamicAllocation_ul__tfi__assignment_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DynamicAllocation_ul__tfi__assignment_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DynamicAllocation_ul__tfi__assignment_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DynamicAllocation_tbf__starting__time_encoder(const StartingFnDesc& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.StartingFnDesc' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DynamicAllocation_tbf__starting__time_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DynamicAllocation_tbf__starting__time_decoder(OCTETSTRING& input_stream, StartingFnDesc& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.StartingFnDesc' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DynamicAllocation_tbf__starting__time_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DynamicAllocation_encoder(const DynamicAllocation& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.DynamicAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DynamicAllocation_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DynamicAllocation_decoder(OCTETSTRING& input_stream, DynamicAllocation& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.DynamicAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DynamicAllocation_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

boolean operator==(null_type, const TnGamma8& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @RLCMAC_CSN1_Types.TnGamma8.");
return other_value.val_ptr->n_elements == 0;
}

void TnGamma8_0_encoder(const TnGamma& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TnGamma' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TnGamma8_0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TnGamma8_0_decoder(OCTETSTRING& input_stream, TnGamma& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TnGamma' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TnGamma8_0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TnGamma8_encoder(const TnGamma8& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TnGamma8' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TnGamma8_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TnGamma8_decoder(OCTETSTRING& input_stream, TnGamma8& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TnGamma8' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TnGamma8_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void SingleBlockAllocation_timeslot__nr_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(SingleBlockAllocation_timeslot__nr_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER SingleBlockAllocation_timeslot__nr_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(SingleBlockAllocation_timeslot__nr_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void SingleBlockAllocation_alpha__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(SingleBlockAllocation_alpha__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER SingleBlockAllocation_alpha__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(SingleBlockAllocation_alpha__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void SingleBlockAllocation_gamma__tn_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(SingleBlockAllocation_gamma__tn_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER SingleBlockAllocation_gamma__tn_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(SingleBlockAllocation_gamma__tn_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void SingleBlockAllocation_p0__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(SingleBlockAllocation_p0__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER SingleBlockAllocation_p0__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(SingleBlockAllocation_p0__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void SingleBlockAllocation_tbf__starting__time_encoder(const StartingFnDesc& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.StartingFnDesc' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(SingleBlockAllocation_tbf__starting__time_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER SingleBlockAllocation_tbf__starting__time_decoder(OCTETSTRING& input_stream, StartingFnDesc& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.StartingFnDesc' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(SingleBlockAllocation_tbf__starting__time_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void SingleBlockAllocation_alpha_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(SingleBlockAllocation_alpha_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER SingleBlockAllocation_alpha_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(SingleBlockAllocation_alpha_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void SingleBlockAllocation_p0_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(SingleBlockAllocation_p0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER SingleBlockAllocation_p0_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(SingleBlockAllocation_p0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void SingleBlockAllocation_reserved_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(SingleBlockAllocation_reserved_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER SingleBlockAllocation_reserved_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(SingleBlockAllocation_reserved_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void SingleBlockAllocation_pr__mode_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(SingleBlockAllocation_pr__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER SingleBlockAllocation_pr__mode_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(SingleBlockAllocation_pr__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void SingleBlockAllocation_encoder(const SingleBlockAllocation& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.SingleBlockAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(SingleBlockAllocation_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER SingleBlockAllocation_decoder(OCTETSTRING& input_stream, SingleBlockAllocation& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.SingleBlockAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(SingleBlockAllocation_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ChCodingCommand_encoder(const ChCodingCommand& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ChCodingCommand' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ChCodingCommand_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ChCodingCommand_decoder(OCTETSTRING& input_stream, ChCodingCommand& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ChCodingCommand' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ChCodingCommand_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssGprs_ch__coding__cmd_encoder(const ChCodingCommand& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ChCodingCommand' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssGprs_ch__coding__cmd_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssGprs_ch__coding__cmd_decoder(OCTETSTRING& input_stream, ChCodingCommand& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ChCodingCommand' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssGprs_ch__coding__cmd_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssGprs_tlli__block__chan__coding_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssGprs_tlli__block__chan__coding_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssGprs_tlli__block__chan__coding_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssGprs_tlli__block__chan__coding_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssGprs_pkt__ta_encoder(const PacketTimingAdvance& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketTimingAdvance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssGprs_pkt__ta_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssGprs_pkt__ta_decoder(OCTETSTRING& input_stream, PacketTimingAdvance& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketTimingAdvance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssGprs_pkt__ta_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssGprs_freq__par__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssGprs_freq__par__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssGprs_freq__par__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssGprs_freq__par__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssGprs_alloc__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssGprs_alloc__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssGprs_alloc__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssGprs_alloc__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssGprs_freq__par_encoder(const FrequencyParameters& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FrequencyParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssGprs_freq__par_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssGprs_freq__par_decoder(OCTETSTRING& input_stream, FrequencyParameters& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FrequencyParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssGprs_freq__par_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssGprs_dyn__block__alloc_encoder(const DynamicAllocation& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.DynamicAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssGprs_dyn__block__alloc_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssGprs_dyn__block__alloc_decoder(OCTETSTRING& input_stream, DynamicAllocation& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.DynamicAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssGprs_dyn__block__alloc_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssGprs_sgl__block__alloc_encoder(const SingleBlockAllocation& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.SingleBlockAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssGprs_sgl__block__alloc_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssGprs_sgl__block__alloc_decoder(OCTETSTRING& input_stream, SingleBlockAllocation& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.SingleBlockAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssGprs_sgl__block__alloc_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssGprs_encoder(const PktUlAssGprs& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktUlAssGprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssGprs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssGprs_decoder(OCTETSTRING& input_stream, PktUlAssGprs& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktUlAssGprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssGprs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

boolean operator==(null_type, const AccessTechnologiesRequestRepetition& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @RLCMAC_CSN1_Types.AccessTechnologiesRequestRepetition.");
return other_value.val_ptr->n_elements == 0;
}

void AccessTechnologiesRequest_accessTechnType_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessTechnologiesRequest_accessTechnType_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessTechnologiesRequest_accessTechnType_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessTechnologiesRequest_accessTechnType_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessTechnologiesRequest_extensionBit_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessTechnologiesRequest_extensionBit_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessTechnologiesRequest_extensionBit_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessTechnologiesRequest_extensionBit_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessTechnologiesRequest_encoder(const AccessTechnologiesRequest& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AccessTechnologiesRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessTechnologiesRequest_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessTechnologiesRequest_decoder(OCTETSTRING& input_stream, AccessTechnologiesRequest& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AccessTechnologiesRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessTechnologiesRequest_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessTechnologiesRequestRepetition_0_encoder(const AccessTechnologiesRequest& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AccessTechnologiesRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessTechnologiesRequestRepetition_0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessTechnologiesRequestRepetition_0_decoder(OCTETSTRING& input_stream, AccessTechnologiesRequest& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AccessTechnologiesRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessTechnologiesRequestRepetition_0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessTechnologiesRequestRepetition_encoder(const AccessTechnologiesRequestRepetition& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AccessTechnologiesRequestRepetition' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessTechnologiesRequestRepetition_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessTechnologiesRequestRepetition_decoder(OCTETSTRING& input_stream, AccessTechnologiesRequestRepetition& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AccessTechnologiesRequestRepetition' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessTechnologiesRequestRepetition_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultiBlockAllocation_timeslot__nr_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultiBlockAllocation_timeslot__nr_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultiBlockAllocation_timeslot__nr_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultiBlockAllocation_timeslot__nr_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultiBlockAllocation_alpha__gamma__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultiBlockAllocation_alpha__gamma__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultiBlockAllocation_alpha__gamma__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultiBlockAllocation_alpha__gamma__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultiBlockAllocation_p0__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultiBlockAllocation_p0__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultiBlockAllocation_p0__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultiBlockAllocation_p0__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultiBlockAllocation_tbf__starting__time_encoder(const StartingFnDesc& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.StartingFnDesc' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultiBlockAllocation_tbf__starting__time_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultiBlockAllocation_tbf__starting__time_decoder(OCTETSTRING& input_stream, StartingFnDesc& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.StartingFnDesc' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultiBlockAllocation_tbf__starting__time_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultiBlockAllocation_num__radio__blocks__alloc_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultiBlockAllocation_num__radio__blocks__alloc_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultiBlockAllocation_num__radio__blocks__alloc_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultiBlockAllocation_num__radio__blocks__alloc_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultiBlockAllocation_alpha_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultiBlockAllocation_alpha_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultiBlockAllocation_alpha_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultiBlockAllocation_alpha_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultiBlockAllocation_gamma__tn_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultiBlockAllocation_gamma__tn_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultiBlockAllocation_gamma__tn_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultiBlockAllocation_gamma__tn_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultiBlockAllocation_p0_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultiBlockAllocation_p0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultiBlockAllocation_p0_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultiBlockAllocation_p0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultiBlockAllocation_reserved_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultiBlockAllocation_reserved_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultiBlockAllocation_reserved_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultiBlockAllocation_reserved_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultiBlockAllocation_pr__mode_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultiBlockAllocation_pr__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultiBlockAllocation_pr__mode_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultiBlockAllocation_pr__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultiBlockAllocation_encoder(const MultiBlockAllocation& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.MultiBlockAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultiBlockAllocation_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultiBlockAllocation_decoder(OCTETSTRING& input_stream, MultiBlockAllocation& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.MultiBlockAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultiBlockAllocation_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_dual__carrier_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_dual__carrier_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_dual__carrier_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_dual__carrier_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_tlli__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_tlli__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_tlli__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_tlli__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_compact__reduced__ma__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_compact__reduced__ma__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_compact__reduced__ma__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_compact__reduced__ma__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_chan__coding__cmd_encoder(const EgprsChCodingCommand& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.EgprsChCodingCommand' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_chan__coding__cmd_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_chan__coding__cmd_decoder(OCTETSTRING& input_stream, EgprsChCodingCommand& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.EgprsChCodingCommand' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_chan__coding__cmd_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_resegment_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_resegment_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_resegment_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_resegment_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_window__size_encoder(const EgprsWindowSize& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.EgprsWindowSize' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_window__size_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_window__size_decoder(OCTETSTRING& input_stream, EgprsWindowSize& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.EgprsWindowSize' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_window__size_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_ats__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_ats__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_ats__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_ats__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_arac__retrans__req_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_arac__retrans__req_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_arac__retrans__req_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_arac__retrans__req_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_tlli__block__chan__coding_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_tlli__block__chan__coding_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_tlli__block__chan__coding_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_tlli__block__chan__coding_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_bep__period2__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_bep__period2__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_bep__period2__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_bep__period2__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_pkt__ta_encoder(const PacketTimingAdvance& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketTimingAdvance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_pkt__ta_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_pkt__ta_decoder(OCTETSTRING& input_stream, PacketTimingAdvance& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketTimingAdvance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_pkt__ta_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_pkt__ext__ta__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_pkt__ext__ta__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_pkt__ext__ta__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_pkt__ext__ta__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_freq__par__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_freq__par__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_freq__par__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_freq__par__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_alloc__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_alloc__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_alloc__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_alloc__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_tlli_encoder(const OCTETSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_tlli_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_tlli_decoder(OCTETSTRING& input_stream, OCTETSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_tlli_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_compact__reduced__ma_encoder(const COMPACTreducedMA& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.COMPACTreducedMA' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_compact__reduced__ma_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_compact__reduced__ma_decoder(OCTETSTRING& input_stream, COMPACTreducedMA& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.COMPACTreducedMA' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_compact__reduced__ma_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_ats_encoder(const AccessTechnologiesRequestRepetition& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AccessTechnologiesRequestRepetition' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_ats_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_ats_decoder(OCTETSTRING& input_stream, AccessTechnologiesRequestRepetition& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AccessTechnologiesRequestRepetition' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_ats_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_bep__period2_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_bep__period2_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_bep__period2_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_bep__period2_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_pkt__ext__ta_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_pkt__ext__ta_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_pkt__ext__ta_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_pkt__ext__ta_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_freq__par_encoder(const FrequencyParameters& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FrequencyParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_freq__par_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_freq__par_decoder(OCTETSTRING& input_stream, FrequencyParameters& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.FrequencyParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_freq__par_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_dyn__block__alloc_encoder(const DynamicAllocation& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.DynamicAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_dyn__block__alloc_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_dyn__block__alloc_decoder(OCTETSTRING& input_stream, DynamicAllocation& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.DynamicAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_dyn__block__alloc_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_multi__block__alloc_encoder(const MultiBlockAllocation& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.MultiBlockAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_multi__block__alloc_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_multi__block__alloc_decoder(OCTETSTRING& input_stream, MultiBlockAllocation& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.MultiBlockAllocation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_multi__block__alloc_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PktUlAssEgprs_encoder(const PktUlAssEgprs& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktUlAssEgprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PktUlAssEgprs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PktUlAssEgprs_decoder(OCTETSTRING& input_stream, PktUlAssEgprs& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktUlAssEgprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PktUlAssEgprs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketUlAssignment_page__mode_encoder(const PageMode& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketUlAssignment_page__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketUlAssignment_page__mode_decoder(OCTETSTRING& input_stream, PageMode& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketUlAssignment_page__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketUlAssignment_persistence__levels__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketUlAssignment_persistence__levels__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketUlAssignment_persistence__levels__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketUlAssignment_persistence__levels__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketUlAssignment_identity_encoder(const PktUlAssUnion& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktUlAssUnion' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketUlAssignment_identity_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketUlAssignment_identity_decoder(OCTETSTRING& input_stream, PktUlAssUnion& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktUlAssUnion' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketUlAssignment_identity_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketUlAssignment_is__egprs_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketUlAssignment_is__egprs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketUlAssignment_is__egprs_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketUlAssignment_is__egprs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketUlAssignment_persistence__levels_encoder(const PersistenceLevels& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PersistenceLevels' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketUlAssignment_persistence__levels_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketUlAssignment_persistence__levels_decoder(OCTETSTRING& input_stream, PersistenceLevels& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PersistenceLevels' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketUlAssignment_persistence__levels_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketUlAssignment_gprs_encoder(const PktUlAssGprs& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktUlAssGprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketUlAssignment_gprs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketUlAssignment_gprs_decoder(OCTETSTRING& input_stream, PktUlAssGprs& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktUlAssGprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketUlAssignment_gprs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketUlAssignment_egprs_encoder(const PktUlAssEgprs& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktUlAssEgprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketUlAssignment_egprs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketUlAssignment_egprs_decoder(OCTETSTRING& input_stream, PktUlAssEgprs& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PktUlAssEgprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketUlAssignment_egprs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketUlAssignment_encoder(const PacketUlAssignment& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketUlAssignment' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketUlAssignment_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketUlAssignment_decoder(OCTETSTRING& input_stream, PacketUlAssignment& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketUlAssignment' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketUlAssignment_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MobileIdentityLV__Paging_len_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MobileIdentityLV__Paging_len_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MobileIdentityLV__Paging_len_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MobileIdentityLV__Paging_len_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MobileIdentityLV__Paging_mobile__id_encoder(const OCTETSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MobileIdentityLV__Paging_mobile__id_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MobileIdentityLV__Paging_mobile__id_decoder(OCTETSTRING& input_stream, OCTETSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MobileIdentityLV__Paging_mobile__id_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MobileIdentityLV__Paging_encoder(const MobileIdentityLV__Paging& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.MobileIdentityLV_Paging' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MobileIdentityLV__Paging_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MobileIdentityLV__Paging_decoder(OCTETSTRING& input_stream, MobileIdentityLV__Paging& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.MobileIdentityLV_Paging' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MobileIdentityLV__Paging_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfoPs_presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfoPs_presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfoPs_presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfoPs_presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfoPs_ptmsi__or__mobile__id_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfoPs_ptmsi__or__mobile__id_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfoPs_ptmsi__or__mobile__id_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfoPs_ptmsi__or__mobile__id_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfoPs_ptmsi_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfoPs_ptmsi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfoPs_ptmsi_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfoPs_ptmsi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfoPs_mobile__identity_encoder(const MobileIdentityLV__Paging& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.MobileIdentityLV_Paging' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfoPs_mobile__identity_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfoPs_mobile__identity_decoder(OCTETSTRING& input_stream, MobileIdentityLV__Paging& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.MobileIdentityLV_Paging' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfoPs_mobile__identity_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfoPs_encoder(const PageInfoPs& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageInfoPs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfoPs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfoPs_decoder(OCTETSTRING& input_stream, PageInfoPs& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageInfoPs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfoPs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfoCs_presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfoCs_presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfoCs_presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfoCs_presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfoCs_tmsi__or__mobile__id_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfoCs_tmsi__or__mobile__id_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfoCs_tmsi__or__mobile__id_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfoCs_tmsi__or__mobile__id_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfoCs_chan__needed_encoder(const GSM__Types::ChannelNeeded& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@GSM_Types.ChannelNeeded' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfoCs_chan__needed_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfoCs_chan__needed_decoder(OCTETSTRING& input_stream, GSM__Types::ChannelNeeded& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@GSM_Types.ChannelNeeded' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfoCs_chan__needed_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfoCs_emlpp__prio__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfoCs_emlpp__prio__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfoCs_emlpp__prio__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfoCs_emlpp__prio__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfoCs_tmsi_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfoCs_tmsi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfoCs_tmsi_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfoCs_tmsi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfoCs_mobile__identity_encoder(const MobileIdentityLV__Paging& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.MobileIdentityLV_Paging' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfoCs_mobile__identity_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfoCs_mobile__identity_decoder(OCTETSTRING& input_stream, MobileIdentityLV__Paging& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.MobileIdentityLV_Paging' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfoCs_mobile__identity_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfoCs_emlpp__prio_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfoCs_emlpp__prio_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfoCs_emlpp__prio_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfoCs_emlpp__prio_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfoCs_encoder(const PageInfoCs& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageInfoCs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfoCs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfoCs_decoder(OCTETSTRING& input_stream, PageInfoCs& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageInfoCs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfoCs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfo_ps_encoder(const PageInfoPs& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageInfoPs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfo_ps_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfo_ps_decoder(OCTETSTRING& input_stream, PageInfoPs& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageInfoPs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfo_ps_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfo_cs_encoder(const PageInfoCs& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageInfoCs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfo_cs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfo_cs_decoder(OCTETSTRING& input_stream, PageInfoCs& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageInfoCs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfo_cs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PageInfo_encoder(const PageInfo& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageInfo' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageInfo_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageInfo_decoder(OCTETSTRING& input_stream, PageInfo& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageInfo' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageInfo_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RepeatedPageInfoItem_presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RepeatedPageInfoItem_presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RepeatedPageInfoItem_presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RepeatedPageInfoItem_presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RepeatedPageInfoItem_item_encoder(const PageInfo& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageInfo' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RepeatedPageInfoItem_item_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RepeatedPageInfoItem_item_decoder(OCTETSTRING& input_stream, PageInfo& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageInfo' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RepeatedPageInfoItem_item_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RepeatedPageInfoItem_encoder(const RepeatedPageInfoItem& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedPageInfoItem' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RepeatedPageInfoItem_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RepeatedPageInfoItem_decoder(OCTETSTRING& input_stream, RepeatedPageInfoItem& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedPageInfoItem' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RepeatedPageInfoItem_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

boolean operator==(null_type, const RepeatedPageInfo& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @RLCMAC_CSN1_Types.RepeatedPageInfo.");
return other_value.val_ptr->n_elements == 0;
}

void RepeatedPageInfo_0_encoder(const RepeatedPageInfoItem& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedPageInfoItem' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RepeatedPageInfo_0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RepeatedPageInfo_0_decoder(OCTETSTRING& input_stream, RepeatedPageInfoItem& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedPageInfoItem' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RepeatedPageInfo_0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RepeatedPageInfo_encoder(const RepeatedPageInfo& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedPageInfo' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RepeatedPageInfo_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RepeatedPageInfo_decoder(OCTETSTRING& input_stream, RepeatedPageInfo& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedPageInfo' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RepeatedPageInfo_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPagingReq_page__mode_encoder(const PageMode& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPagingReq_page__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPagingReq_page__mode_decoder(OCTETSTRING& input_stream, PageMode& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPagingReq_page__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPagingReq_persistence__levels__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPagingReq_persistence__levels__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPagingReq_persistence__levels__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPagingReq_persistence__levels__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPagingReq_nln__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPagingReq_nln__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPagingReq_nln__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPagingReq_nln__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPagingReq_repeated__pageinfo__term_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPagingReq_repeated__pageinfo__term_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPagingReq_repeated__pageinfo__term_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPagingReq_repeated__pageinfo__term_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPagingReq_persistence__levels_encoder(const PersistenceLevels& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PersistenceLevels' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPagingReq_persistence__levels_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPagingReq_persistence__levels_decoder(OCTETSTRING& input_stream, PersistenceLevels& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PersistenceLevels' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPagingReq_persistence__levels_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPagingReq_nln_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPagingReq_nln_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPagingReq_nln_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPagingReq_nln_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPagingReq_repeated__pageinfo_encoder(const RepeatedPageInfo& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedPageInfo' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPagingReq_repeated__pageinfo_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPagingReq_repeated__pageinfo_decoder(OCTETSTRING& input_stream, RepeatedPageInfo& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.RepeatedPageInfo' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPagingReq_repeated__pageinfo_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPagingReq_encoder(const PacketPagingReq& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketPagingReq' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPagingReq_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPagingReq_decoder(OCTETSTRING& input_stream, PacketPagingReq& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketPagingReq' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPagingReq_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ExtensionBits_extension__length_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ExtensionBits_extension__length_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ExtensionBits_extension__length_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ExtensionBits_extension__length_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ExtensionBits_spare__bits_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ExtensionBits_spare__bits_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ExtensionBits_spare__bits_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ExtensionBits_spare__bits_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ExtensionBits_encoder(const ExtensionBits& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ExtensionBits' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ExtensionBits_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ExtensionBits_decoder(OCTETSTRING& input_stream, ExtensionBits& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ExtensionBits' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ExtensionBits_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprsAdditionsRel99_ext__pkt__ta__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprsAdditionsRel99_ext__pkt__ta__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprsAdditionsRel99_ext__pkt__ta__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprsAdditionsRel99_ext__pkt__ta__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprsAdditionsRel99_tbf__est_encoder(const BOOLEAN& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `boolean' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprsAdditionsRel99_tbf__est_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprsAdditionsRel99_tbf__est_decoder(OCTETSTRING& input_stream, BOOLEAN& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `boolean' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprsAdditionsRel99_tbf__est_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprsAdditionsRel99_ext__pkt__ta_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprsAdditionsRel99_ext__pkt__ta_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprsAdditionsRel99_ext__pkt__ta_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprsAdditionsRel99_ext__pkt__ta_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprsAdditionsRel99_encoder(const UlAckNackGprsAdditionsRel99& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.UlAckNackGprsAdditionsRel99' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprsAdditionsRel99_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprsAdditionsRel99_decoder(OCTETSTRING& input_stream, UlAckNackGprsAdditionsRel99& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.UlAckNackGprsAdditionsRel99' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprsAdditionsRel99_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprs_ch__coding__cmd_encoder(const ChCodingCommand& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ChCodingCommand' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprs_ch__coding__cmd_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprs_ch__coding__cmd_decoder(OCTETSTRING& input_stream, ChCodingCommand& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ChCodingCommand' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprs_ch__coding__cmd_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AckNackDescription_final__ack_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AckNackDescription_final__ack_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AckNackDescription_final__ack_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AckNackDescription_final__ack_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AckNackDescription_starting__seq__nr_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AckNackDescription_starting__seq__nr_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AckNackDescription_starting__seq__nr_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AckNackDescription_starting__seq__nr_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ReceivedBlockBitmap_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ReceivedBlockBitmap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ReceivedBlockBitmap_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ReceivedBlockBitmap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AckNackDescription_receive__block__bitmap_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AckNackDescription_receive__block__bitmap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AckNackDescription_receive__block__bitmap_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AckNackDescription_receive__block__bitmap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AckNackDescription_encoder(const AckNackDescription& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AckNackDescription' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AckNackDescription_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AckNackDescription_decoder(OCTETSTRING& input_stream, AckNackDescription& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AckNackDescription' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AckNackDescription_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprs_ack__nack__desc_encoder(const AckNackDescription& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AckNackDescription' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprs_ack__nack__desc_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprs_ack__nack__desc_decoder(OCTETSTRING& input_stream, AckNackDescription& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.AckNackDescription' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprs_ack__nack__desc_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprs_cont__res__tlli__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprs_cont__res__tlli__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprs_cont__res__tlli__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprs_cont__res__tlli__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprs_pkt__ta__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprs_pkt__ta__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprs_pkt__ta__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprs_pkt__ta__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprs_pwr__ctrl__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprs_pwr__ctrl__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprs_pwr__ctrl__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprs_pwr__ctrl__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprs_extension__bits__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprs_extension__bits__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprs_extension__bits__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprs_extension__bits__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprs_not__used_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprs_not__used_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprs_not__used_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprs_not__used_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprs_rel99__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprs_rel99__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprs_rel99__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprs_rel99__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprs_cont__res__tlli_encoder(const OCTETSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprs_cont__res__tlli_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprs_cont__res__tlli_decoder(OCTETSTRING& input_stream, OCTETSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprs_cont__res__tlli_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprs_pkt__ta_encoder(const PacketTimingAdvance& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketTimingAdvance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprs_pkt__ta_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprs_pkt__ta_decoder(OCTETSTRING& input_stream, PacketTimingAdvance& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketTimingAdvance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprs_pkt__ta_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprs_pwr__ctrl_encoder(const PowerControlParameters& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PowerControlParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprs_pwr__ctrl_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprs_pwr__ctrl_decoder(OCTETSTRING& input_stream, PowerControlParameters& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PowerControlParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprs_pwr__ctrl_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprs_extension__bits_encoder(const ExtensionBits& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ExtensionBits' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprs_extension__bits_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprs_extension__bits_decoder(OCTETSTRING& input_stream, ExtensionBits& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.ExtensionBits' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprs_extension__bits_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprs_rel99_encoder(const UlAckNackGprsAdditionsRel99& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.UlAckNackGprsAdditionsRel99' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprs_rel99_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprs_rel99_decoder(OCTETSTRING& input_stream, UlAckNackGprsAdditionsRel99& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.UlAckNackGprsAdditionsRel99' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprs_rel99_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackGprs_encoder(const UlAckNackGprs& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.UlAckNackGprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackGprs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackGprs_decoder(OCTETSTRING& input_stream, UlAckNackGprs& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.UlAckNackGprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackGprs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_msg__excape_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_msg__excape_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_msg__excape_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_msg__excape_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_ch__coding__cmd_encoder(const EgprsChCodingCommand& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.EgprsChCodingCommand' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_ch__coding__cmd_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_ch__coding__cmd_decoder(OCTETSTRING& input_stream, EgprsChCodingCommand& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.EgprsChCodingCommand' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_ch__coding__cmd_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_resegment_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_resegment_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_resegment_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_resegment_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_preemptive__tx_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_preemptive__tx_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_preemptive__tx_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_preemptive__tx_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_prr__retrans__req_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_prr__retrans__req_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_prr__retrans__req_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_prr__retrans__req_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_arac__retrans__req_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_arac__retrans__req_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_arac__retrans__req_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_arac__retrans__req_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_cont__res__tlli__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_cont__res__tlli__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_cont__res__tlli__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_cont__res__tlli__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_tbf__est_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_tbf__est_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_tbf__est_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_tbf__est_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_pkt__ta__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_pkt__ta__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_pkt__ta__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_pkt__ta__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_pkt__ext__ta__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_pkt__ext__ta__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_pkt__ext__ta__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_pkt__ext__ta__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_pwr__ctrl__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_pwr__ctrl__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_pwr__ctrl__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_pwr__ctrl__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_cont__res__tlli_encoder(const OCTETSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_cont__res__tlli_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_cont__res__tlli_decoder(OCTETSTRING& input_stream, OCTETSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_cont__res__tlli_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_pkt__ta_encoder(const PacketTimingAdvance& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketTimingAdvance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_pkt__ta_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_pkt__ta_decoder(OCTETSTRING& input_stream, PacketTimingAdvance& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketTimingAdvance' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_pkt__ta_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_pkt__ext__ta_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_pkt__ext__ta_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_pkt__ext__ta_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_pkt__ext__ta_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_pwr__ctrl_encoder(const PowerControlParameters& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PowerControlParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_pwr__ctrl_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_pwr__ctrl_decoder(OCTETSTRING& input_stream, PowerControlParameters& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PowerControlParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_pwr__ctrl_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UlAckNackEgprs_encoder(const UlAckNackEgprs& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.UlAckNackEgprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UlAckNackEgprs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UlAckNackEgprs_decoder(OCTETSTRING& input_stream, UlAckNackEgprs& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.UlAckNackEgprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UlAckNackEgprs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketUlAckNack_page__mode_encoder(const PageMode& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketUlAckNack_page__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketUlAckNack_page__mode_decoder(OCTETSTRING& input_stream, PageMode& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketUlAckNack_page__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketUlAckNack_msg__excape_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketUlAckNack_msg__excape_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketUlAckNack_msg__excape_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketUlAckNack_msg__excape_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketUlAckNack_uplink__tfi_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketUlAckNack_uplink__tfi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketUlAckNack_uplink__tfi_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketUlAckNack_uplink__tfi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketUlAckNack_is__egprs_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketUlAckNack_is__egprs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketUlAckNack_is__egprs_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketUlAckNack_is__egprs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketUlAckNack_gprs_encoder(const UlAckNackGprs& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.UlAckNackGprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketUlAckNack_gprs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketUlAckNack_gprs_decoder(OCTETSTRING& input_stream, UlAckNackGprs& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.UlAckNackGprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketUlAckNack_gprs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketUlAckNack_egprs_encoder(const UlAckNackEgprs& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.UlAckNackEgprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketUlAckNack_egprs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketUlAckNack_egprs_decoder(OCTETSTRING& input_stream, UlAckNackEgprs& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.UlAckNackEgprs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketUlAckNack_egprs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketUlAckNack_encoder(const PacketUlAckNack& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketUlAckNack' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketUlAckNack_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketUlAckNack_decoder(OCTETSTRING& input_stream, PacketUlAckNack& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketUlAckNack' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketUlAckNack_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlDummy_page__mode_encoder(const PageMode& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlDummy_page__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlDummy_page__mode_decoder(OCTETSTRING& input_stream, PageMode& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlDummy_page__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlDummy_persistence__levels__present_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlDummy_persistence__levels__present_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlDummy_persistence__levels__present_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlDummy_persistence__levels__present_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlDummy_persistence__levels_encoder(const PersistenceLevels& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PersistenceLevels' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlDummy_persistence__levels_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlDummy_persistence__levels_decoder(OCTETSTRING& input_stream, PersistenceLevels& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PersistenceLevels' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlDummy_persistence__levels_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketDlDummy_encoder(const PacketDlDummy& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketDlDummy' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketDlDummy_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketDlDummy_decoder(OCTETSTRING& input_stream, PacketDlDummy& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketDlDummy' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketDlDummy_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalPwrCtrlParams_alpha_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalPwrCtrlParams_alpha_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalPwrCtrlParams_alpha_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalPwrCtrlParams_alpha_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalPwrCtrlParams_t__avg__v_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalPwrCtrlParams_t__avg__v_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalPwrCtrlParams_t__avg__v_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalPwrCtrlParams_t__avg__v_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalPwrCtrlParams_t__avg__t_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalPwrCtrlParams_t__avg__t_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalPwrCtrlParams_t__avg__t_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalPwrCtrlParams_t__avg__t_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalPwrCtrlParams_pb_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalPwrCtrlParams_pb_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalPwrCtrlParams_pb_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalPwrCtrlParams_pb_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalPwrCtrlParams_pc__meas__chan_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalPwrCtrlParams_pc__meas__chan_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalPwrCtrlParams_pc__meas__chan_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalPwrCtrlParams_pc__meas__chan_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalPwrCtrlParams_spare_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalPwrCtrlParams_spare_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalPwrCtrlParams_spare_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalPwrCtrlParams_spare_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalPwrCtrlParams_n__avg__i_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalPwrCtrlParams_n__avg__i_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalPwrCtrlParams_n__avg__i_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalPwrCtrlParams_n__avg__i_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalPwrCtrlParams_encoder(const GlobalPwrCtrlParams& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalPwrCtrlParams' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalPwrCtrlParams_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalPwrCtrlParams_decoder(OCTETSTRING& input_stream, GlobalPwrCtrlParams& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalPwrCtrlParams' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalPwrCtrlParams_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TimingAdvanceIdxTN_ta__idx_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TimingAdvanceIdxTN_ta__idx_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TimingAdvanceIdxTN_ta__idx_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TimingAdvanceIdxTN_ta__idx_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TimingAdvanceIdxTN_ts__num_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TimingAdvanceIdxTN_ts__num_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TimingAdvanceIdxTN_ts__num_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TimingAdvanceIdxTN_ts__num_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TimingAdvanceIdxTN_encoder(const TimingAdvanceIdxTN& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TimingAdvanceIdxTN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TimingAdvanceIdxTN_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TimingAdvanceIdxTN_decoder(OCTETSTRING& input_stream, TimingAdvanceIdxTN& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TimingAdvanceIdxTN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TimingAdvanceIdxTN_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalPacketTA_ta__val__presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalPacketTA_ta__val__presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalPacketTA_ta__val__presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalPacketTA_ta__val__presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalPacketTA_ul__presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalPacketTA_ul__presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalPacketTA_ul__presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalPacketTA_ul__presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalPacketTA_dl__presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalPacketTA_dl__presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalPacketTA_dl__presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalPacketTA_dl__presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalPacketTA_ta__val_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalPacketTA_ta__val_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalPacketTA_ta__val_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalPacketTA_ta__val_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalPacketTA_ul_encoder(const TimingAdvanceIdxTN& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TimingAdvanceIdxTN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalPacketTA_ul_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalPacketTA_ul_decoder(OCTETSTRING& input_stream, TimingAdvanceIdxTN& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TimingAdvanceIdxTN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalPacketTA_ul_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalPacketTA_dl_encoder(const TimingAdvanceIdxTN& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TimingAdvanceIdxTN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalPacketTA_dl_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalPacketTA_dl_decoder(OCTETSTRING& input_stream, TimingAdvanceIdxTN& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.TimingAdvanceIdxTN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalPacketTA_dl_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GlobalPacketTA_encoder(const GlobalPacketTA& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalPacketTA' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GlobalPacketTA_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GlobalPacketTA_decoder(OCTETSTRING& input_stream, GlobalPacketTA& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalPacketTA' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GlobalPacketTA_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPwrControlTAMsg_g__pwr__ctrl__presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPwrControlTAMsg_g__pwr__ctrl__presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPwrControlTAMsg_g__pwr__ctrl__presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPwrControlTAMsg_g__pwr__ctrl__presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPwrControlTAMsg_split_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPwrControlTAMsg_split_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPwrControlTAMsg_split_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPwrControlTAMsg_split_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPwrControlTAMsg_g__pwr__ctrl_encoder(const GlobalPwrCtrlParams& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalPwrCtrlParams' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPwrControlTAMsg_g__pwr__ctrl_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPwrControlTAMsg_g__pwr__ctrl_decoder(OCTETSTRING& input_stream, GlobalPwrCtrlParams& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalPwrCtrlParams' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPwrControlTAMsg_g__pwr__ctrl_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPwrControlTAMsg_split__desc_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPwrControlTAMsg_split__desc_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPwrControlTAMsg_split__desc_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPwrControlTAMsg_split__desc_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPwrControlTAMsg_g__pkt__ta_encoder(const GlobalPacketTA& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalPacketTA' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPwrControlTAMsg_g__pkt__ta_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPwrControlTAMsg_g__pkt__ta_decoder(OCTETSTRING& input_stream, GlobalPacketTA& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalPacketTA' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPwrControlTAMsg_g__pkt__ta_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPwrControlTAMsg_pwr__ctrl_encoder(const PowerControlParameters& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PowerControlParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPwrControlTAMsg_pwr__ctrl_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPwrControlTAMsg_pwr__ctrl_decoder(OCTETSTRING& input_stream, PowerControlParameters& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PowerControlParameters' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPwrControlTAMsg_pwr__ctrl_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPwrControlTAMsg_encoder(const PacketPwrControlTAMsg& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketPwrControlTAMsg' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPwrControlTAMsg_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPwrControlTAMsg_decoder(OCTETSTRING& input_stream, PacketPwrControlTAMsg& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketPwrControlTAMsg' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPwrControlTAMsg_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPwrControlTA_page__mode_encoder(const PageMode& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPwrControlTA_page__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPwrControlTA_page__mode_decoder(OCTETSTRING& input_stream, PageMode& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPwrControlTA_page__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPwrControlTA_global__tfi_encoder(const NullGlobalTfi& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NullGlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPwrControlTA_global__tfi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPwrControlTA_global__tfi_decoder(OCTETSTRING& input_stream, NullGlobalTfi& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.NullGlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPwrControlTA_global__tfi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPwrControlTA_msg__escape_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPwrControlTA_msg__escape_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPwrControlTA_msg__escape_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPwrControlTA_msg__escape_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPwrControlTA_msg_encoder(const PacketPwrControlTAMsg& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketPwrControlTAMsg' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPwrControlTA_msg_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPwrControlTA_msg_decoder(OCTETSTRING& input_stream, PacketPwrControlTAMsg& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketPwrControlTAMsg' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPwrControlTA_msg_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketPwrControlTA_encoder(const PacketPwrControlTA& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketPwrControlTA' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketPwrControlTA_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketPwrControlTA_decoder(OCTETSTRING& input_stream, PacketPwrControlTA& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketPwrControlTA' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketPwrControlTA_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketCellChangeContinue_page__mode_encoder(const PageMode& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketCellChangeContinue_page__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketCellChangeContinue_page__mode_decoder(OCTETSTRING& input_stream, PageMode& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketCellChangeContinue_page__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketCellChangeContinue_zero_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketCellChangeContinue_zero_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketCellChangeContinue_zero_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketCellChangeContinue_zero_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketCellChangeContinue_gtfi_encoder(const GlobalTfi& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketCellChangeContinue_gtfi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketCellChangeContinue_gtfi_decoder(OCTETSTRING& input_stream, GlobalTfi& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketCellChangeContinue_gtfi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketCellChangeContinue_arfcn__bsic__presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketCellChangeContinue_arfcn__bsic__presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketCellChangeContinue_arfcn__bsic__presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketCellChangeContinue_arfcn__bsic__presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketCellChangeContinue_arfcn_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketCellChangeContinue_arfcn_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketCellChangeContinue_arfcn_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketCellChangeContinue_arfcn_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketCellChangeContinue_bsic_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketCellChangeContinue_bsic_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketCellChangeContinue_bsic_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketCellChangeContinue_bsic_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketCellChangeContinue_container__id_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketCellChangeContinue_container__id_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketCellChangeContinue_container__id_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketCellChangeContinue_container__id_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketCellChangeContinue_encoder(const PacketCellChangeContinue& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketCellChangeContinue' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketCellChangeContinue_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketCellChangeContinue_decoder(OCTETSTRING& input_stream, PacketCellChangeContinue& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketCellChangeContinue' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketCellChangeContinue_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellDataContainer_pd_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellDataContainer_pd_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellDataContainer_pd_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellDataContainer_pd_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellDataContainer_cd__length_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellDataContainer_cd__length_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellDataContainer_cd__length_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellDataContainer_cd__length_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellDataContainer_container__data_encoder(const OCTETSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellDataContainer_container__data_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellDataContainer_container__data_decoder(OCTETSTRING& input_stream, OCTETSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellDataContainer_container__data_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellDataContainer_encoder(const PacketNeighbourCellDataContainer& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketNeighbourCellDataContainer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellDataContainer_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellDataContainer_decoder(OCTETSTRING& input_stream, PacketNeighbourCellDataContainer& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketNeighbourCellDataContainer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellDataContainer_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

boolean operator==(null_type, const PacketNeighbourCellDataContainerList& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @RLCMAC_CSN1_Types.PacketNeighbourCellDataContainerList.");
return other_value.val_ptr->n_elements == 0;
}

void PacketNeighbourCellDataContainerList_0_encoder(const PacketNeighbourCellDataContainer& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketNeighbourCellDataContainer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellDataContainerList_0_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellDataContainerList_0_decoder(OCTETSTRING& input_stream, PacketNeighbourCellDataContainer& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketNeighbourCellDataContainer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellDataContainerList_0_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellDataContainerList_encoder(const PacketNeighbourCellDataContainerList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketNeighbourCellDataContainerList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellDataContainerList_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellDataContainerList_decoder(OCTETSTRING& input_stream, PacketNeighbourCellDataContainerList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketNeighbourCellDataContainerList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellDataContainerList_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellData_page__mode_encoder(const PageMode& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellData_page__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellData_page__mode_decoder(OCTETSTRING& input_stream, PageMode& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellData_page__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellData_zero_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellData_zero_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellData_zero_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellData_zero_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellData_gtfi_encoder(const GlobalTfi& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellData_gtfi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellData_gtfi_decoder(OCTETSTRING& input_stream, GlobalTfi& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellData_gtfi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellData_container__id_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellData_container__id_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellData_container__id_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellData_container__id_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellData_spare_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellData_spare_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellData_spare_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellData_spare_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellData_container__index_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellData_container__index_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellData_container__index_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellData_container__index_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellData_arfcn__bsic__presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellData_arfcn__bsic__presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellData_arfcn__bsic__presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellData_arfcn__bsic__presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellData_container__list_encoder(const PacketNeighbourCellDataContainerList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketNeighbourCellDataContainerList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellData_container__list_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellData_container__list_decoder(OCTETSTRING& input_stream, PacketNeighbourCellDataContainerList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketNeighbourCellDataContainerList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellData_container__list_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellData_arfcn_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellData_arfcn_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellData_arfcn_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellData_arfcn_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellData_bsic_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellData_bsic_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellData_bsic_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellData_bsic_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketNeighbourCellData_encoder(const PacketNeighbourCellData& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketNeighbourCellData' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketNeighbourCellData_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketNeighbourCellData_decoder(OCTETSTRING& input_stream, PacketNeighbourCellData& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketNeighbourCellData' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketNeighbourCellData_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessReject_page__mode_encoder(const PageMode& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessReject_page__mode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessReject_page__mode_decoder(OCTETSTRING& input_stream, PageMode& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PageMode' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessReject_page__mode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessRejectStruct_id__type_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessRejectStruct_id__type_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessRejectStruct_id__type_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessRejectStruct_id__type_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessRejectID_tlli_encoder(const OCTETSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessRejectID_tlli_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessRejectID_tlli_decoder(OCTETSTRING& input_stream, OCTETSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `octetstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessRejectID_tlli_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessRejectIDSub_id__type_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessRejectIDSub_id__type_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessRejectIDSub_id__type_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessRejectIDSub_id__type_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessRejectIDSub_req__ref_encoder(const PacketRequestReference& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketRequestReference' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessRejectIDSub_req__ref_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessRejectIDSub_req__ref_decoder(OCTETSTRING& input_stream, PacketRequestReference& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketRequestReference' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessRejectIDSub_req__ref_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessRejectIDSub_gtfi_encoder(const GlobalTfi& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessRejectIDSub_gtfi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessRejectIDSub_gtfi_decoder(OCTETSTRING& input_stream, GlobalTfi& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.GlobalTfi' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessRejectIDSub_gtfi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessRejectIDSub_encoder(const PacketAccessRejectIDSub& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessRejectIDSub' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessRejectIDSub_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessRejectIDSub_decoder(OCTETSTRING& input_stream, PacketAccessRejectIDSub& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessRejectIDSub' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessRejectIDSub_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessRejectID_id__sub_encoder(const PacketAccessRejectIDSub& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessRejectIDSub' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessRejectID_id__sub_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessRejectID_id__sub_decoder(OCTETSTRING& input_stream, PacketAccessRejectIDSub& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessRejectIDSub' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessRejectID_id__sub_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessRejectID_encoder(const PacketAccessRejectID& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessRejectID' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessRejectID_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessRejectID_decoder(OCTETSTRING& input_stream, PacketAccessRejectID& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessRejectID' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessRejectID_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessRejectStruct_id_encoder(const PacketAccessRejectID& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessRejectID' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessRejectStruct_id_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessRejectStruct_id_decoder(OCTETSTRING& input_stream, PacketAccessRejectID& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessRejectID' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessRejectStruct_id_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessRejectStruct_wait__ind__presence_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessRejectStruct_wait__ind__presence_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessRejectStruct_wait__ind__presence_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessRejectStruct_wait__ind__presence_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessRejectStruct_wait__ind_encoder(const INTEGER& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessRejectStruct_wait__ind_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessRejectStruct_wait__ind_decoder(OCTETSTRING& input_stream, INTEGER& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `integer' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessRejectStruct_wait__ind_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessRejectStruct_wait__ind__size_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessRejectStruct_wait__ind__size_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessRejectStruct_wait__ind__size_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessRejectStruct_wait__ind__size_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessRejectStruct_encoder(const PacketAccessRejectStruct& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessRejectStruct' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessRejectStruct_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessRejectStruct_decoder(OCTETSTRING& input_stream, PacketAccessRejectStruct& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessRejectStruct' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessRejectStruct_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessReject_reject__struct_encoder(const PacketAccessRejectStruct& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessRejectStruct' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessReject_reject__struct_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessReject_reject__struct_decoder(OCTETSTRING& input_stream, PacketAccessRejectStruct& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessRejectStruct' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessReject_reject__struct_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketAccessReject_encoder(const PacketAccessReject& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketAccessReject_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketAccessReject_decoder(OCTETSTRING& input_stream, PacketAccessReject& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketAccessReject_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RlcmacDlCtrlUnion_access__reject_encoder(const PacketAccessReject& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RlcmacDlCtrlUnion_access__reject_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RlcmacDlCtrlUnion_access__reject_decoder(OCTETSTRING& input_stream, PacketAccessReject& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketAccessReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RlcmacDlCtrlUnion_access__reject_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RlcmacDlCtrlUnion_dl__assignment_encoder(const PacketDlAssignment& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketDlAssignment' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RlcmacDlCtrlUnion_dl__assignment_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RlcmacDlCtrlUnion_dl__assignment_decoder(OCTETSTRING& input_stream, PacketDlAssignment& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketDlAssignment' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RlcmacDlCtrlUnion_dl__assignment_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RlcmacDlCtrlUnion_meas__order_encoder(const PacketMeasOrder& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketMeasOrder' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RlcmacDlCtrlUnion_meas__order_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RlcmacDlCtrlUnion_meas__order_decoder(OCTETSTRING& input_stream, PacketMeasOrder& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketMeasOrder' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RlcmacDlCtrlUnion_meas__order_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RlcmacDlCtrlUnion_ul__assignment_encoder(const PacketUlAssignment& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketUlAssignment' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RlcmacDlCtrlUnion_ul__assignment_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RlcmacDlCtrlUnion_ul__assignment_decoder(OCTETSTRING& input_stream, PacketUlAssignment& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketUlAssignment' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RlcmacDlCtrlUnion_ul__assignment_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RlcmacDlCtrlUnion_paging_encoder(const PacketPagingReq& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketPagingReq' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RlcmacDlCtrlUnion_paging_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RlcmacDlCtrlUnion_paging_decoder(OCTETSTRING& input_stream, PacketPagingReq& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketPagingReq' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RlcmacDlCtrlUnion_paging_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RlcmacDlCtrlUnion_ul__ack__nack_encoder(const PacketUlAckNack& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketUlAckNack' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RlcmacDlCtrlUnion_ul__ack__nack_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RlcmacDlCtrlUnion_ul__ack__nack_decoder(OCTETSTRING& input_stream, PacketUlAckNack& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketUlAckNack' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RlcmacDlCtrlUnion_ul__ack__nack_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RlcmacDlCtrlUnion_dl__dummy_encoder(const PacketDlDummy& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketDlDummy' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RlcmacDlCtrlUnion_dl__dummy_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RlcmacDlCtrlUnion_dl__dummy_decoder(OCTETSTRING& input_stream, PacketDlDummy& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@RLCMAC_CSN1_Types.PacketDlDummy' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RlcmacDlCtrlUnion_dl__dummy_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}


} /* end of namespace */
