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

namespace MobileL3__RRM__Types {

/* Member functions of C++ classes */

PDU__RRM__PacketNotification__NW__MS::PDU__RRM__PacketNotification__NW__MS()
{
}

PDU__RRM__PacketNotification__NW__MS::PDU__RRM__PacketNotification__NW__MS(const BITSTRING& par_messageType,
    const OPTIONAL< TMSIP__TMSI__TV >& par_p__TMSI,
    const OPTIONAL< MobileL3__CommonIE__Types::MobileIdentityTLV >& par_mobileIdentity)
  :   field_messageType(par_messageType),
  field_p__TMSI(par_p__TMSI),
  field_mobileIdentity(par_mobileIdentity)
{
}

PDU__RRM__PacketNotification__NW__MS::PDU__RRM__PacketNotification__NW__MS(const PDU__RRM__PacketNotification__NW__MS& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.p__TMSI().is_bound()) field_p__TMSI = other_value.p__TMSI();
else field_p__TMSI.clean_up();
if (other_value.mobileIdentity().is_bound()) field_mobileIdentity = other_value.mobileIdentity();
else field_mobileIdentity.clean_up();
}

void PDU__RRM__PacketNotification__NW__MS::clean_up()
{
field_messageType.clean_up();
field_p__TMSI.clean_up();
field_mobileIdentity.clean_up();
}

const TTCN_Typedescriptor_t* PDU__RRM__PacketNotification__NW__MS::get_descriptor() const { return &PDU__RRM__PacketNotification__NW__MS_descr_; }
PDU__RRM__PacketNotification__NW__MS& PDU__RRM__PacketNotification__NW__MS::operator=(const PDU__RRM__PacketNotification__NW__MS& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.p__TMSI().is_bound()) field_p__TMSI = other_value.p__TMSI();
  else field_p__TMSI.clean_up();
  if (other_value.mobileIdentity().is_bound()) field_mobileIdentity = other_value.mobileIdentity();
  else field_mobileIdentity.clean_up();
}
return *this;
}

boolean PDU__RRM__PacketNotification__NW__MS::operator==(const PDU__RRM__PacketNotification__NW__MS& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_p__TMSI==other_value.field_p__TMSI
  && field_mobileIdentity==other_value.field_mobileIdentity;
}

boolean PDU__RRM__PacketNotification__NW__MS::is_bound() const
{
return (field_messageType.is_bound())
  || (OPTIONAL_OMIT == field_p__TMSI.get_selection() || field_p__TMSI.is_bound())
  || (OPTIONAL_OMIT == field_mobileIdentity.get_selection() || field_mobileIdentity.is_bound());
}
boolean PDU__RRM__PacketNotification__NW__MS::is_value() const
{
return field_messageType.is_value()
  && (OPTIONAL_OMIT == field_p__TMSI.get_selection() || field_p__TMSI.is_value())
  && (OPTIONAL_OMIT == field_mobileIdentity.get_selection() || field_mobileIdentity.is_value());
}
int PDU__RRM__PacketNotification__NW__MS::size_of() const
{
  int ret_val = 1;
  if (field_p__TMSI.ispresent()) ret_val++;
  if (field_mobileIdentity.ispresent()) ret_val++;
  return ret_val;
}

void PDU__RRM__PacketNotification__NW__MS::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(", p_TMSI := ");
field_p__TMSI.log();
TTCN_Logger::log_event_str(", mobileIdentity := ");
field_mobileIdentity.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__RRM__PacketNotification__NW__MS::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (!p__TMSI().is_bound()) p__TMSI() = OMIT_VALUE;
else p__TMSI().set_implicit_omit();
if (!mobileIdentity().is_bound()) mobileIdentity() = OMIT_VALUE;
else mobileIdentity().set_implicit_omit();
}

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

void PDU__RRM__PacketNotification__NW__MS::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_p__TMSI.encode_text(text_buf);
field_mobileIdentity.encode_text(text_buf);
}

void PDU__RRM__PacketNotification__NW__MS::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_p__TMSI.decode_text(text_buf);
field_mobileIdentity.decode_text(text_buf);
}

void PDU__RRM__PacketNotification__NW__MS::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 PDU__RRM__PacketNotification__NW__MS::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 PDU__RRM__PacketNotification__NW__MS::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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){
  if (force_omit != NULL && (*force_omit)(1)) {
    field_p__TMSI = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_1_force_omit(1, force_omit, TMSIP__TMSI__TV_descr_.raw->forceomit);
  decoded_field_length = field_p__TMSI().RAW_decode(TMSIP__TMSI__TV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 1) {
  field_p__TMSI = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_p__TMSI.ispresent() || field_p__TMSI().elementIdentifier() !=  os_5){
  field_p__TMSI=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_p__TMSI=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_mobileIdentity = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, MobileL3__CommonIE__Types::MobileIdentityTLV_descr_.raw->forceomit);
  decoded_field_length = field_mobileIdentity().RAW_decode(MobileL3__CommonIE__Types::MobileIdentityTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_mobileIdentity = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_mobileIdentity.ispresent() || field_mobileIdentity().elementIdentifier() !=  bs_12){
  field_mobileIdentity=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_mobileIdentity=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__RRM__PacketNotification__NW__MS::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, General__Types::BIT8_descr_.raw);
  if (field_p__TMSI.ispresent()) {
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, TMSIP__TMSI__TV_descr_.raw);
  }
  else myleaf.body.node.nodes[1] = NULL;
  if (field_mobileIdentity.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, MobileL3__CommonIE__Types::MobileIdentityTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  if (field_p__TMSI.ispresent()) {
  encoded_length += field_p__TMSI().RAW_encode(TMSIP__TMSI__TV_descr_, *myleaf.body.node.nodes[1]);
  }
  if (field_mobileIdentity.ispresent()) {
  encoded_length += field_mobileIdentity().RAW_encode(MobileL3__CommonIE__Types::MobileIdentityTLV_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_p__TMSI.ispresent() && (!field_p__TMSI.ispresent() || field_p__TMSI().elementIdentifier() !=  os_5)) {
  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){
   os_5.RAW_encode(General__Types::OCT1_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_mobileIdentity.ispresent() && (!field_mobileIdentity.ispresent() || field_mobileIdentity().elementIdentifier() !=  bs_12)) {
  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_12.RAW_encode(General__Types::BIT7_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 PDU__RRM__PacketNotification__NW__MS_template::single_value_struct {
BITSTRING_template field_messageType;
TMSIP__TMSI__TV_template field_p__TMSI;
MobileL3__CommonIE__Types::MobileIdentityTLV_template field_mobileIdentity;
};

void PDU__RRM__PacketNotification__NW__MS_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_messageType = ANY_VALUE;
single_value->field_p__TMSI = ANY_OR_OMIT;
single_value->field_mobileIdentity = ANY_OR_OMIT;
}
}
}

void PDU__RRM__PacketNotification__NW__MS_template::copy_value(const PDU__RRM__PacketNotification__NW__MS& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
if (other_value.p__TMSI().is_bound()) {
  if (other_value.p__TMSI().ispresent()) single_value->field_p__TMSI = other_value.p__TMSI()();
  else single_value->field_p__TMSI = OMIT_VALUE;
} else {
  single_value->field_p__TMSI.clean_up();
}
if (other_value.mobileIdentity().is_bound()) {
  if (other_value.mobileIdentity().ispresent()) single_value->field_mobileIdentity = other_value.mobileIdentity()();
  else single_value->field_mobileIdentity = OMIT_VALUE;
} else {
  single_value->field_mobileIdentity.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__PacketNotification__NW__MS_template::copy_template(const PDU__RRM__PacketNotification__NW__MS_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.p__TMSI().get_selection()) {
single_value->field_p__TMSI = other_value.p__TMSI();
} else {
single_value->field_p__TMSI.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mobileIdentity().get_selection()) {
single_value->field_mobileIdentity = other_value.mobileIdentity();
} else {
single_value->field_mobileIdentity.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 PDU__RRM__PacketNotification__NW__MS_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 PDU__RRM__PacketNotification__NW__MS_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__PacketNotification__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS.");
break;
}
set_selection(other_value);
}

PDU__RRM__PacketNotification__NW__MS_template::PDU__RRM__PacketNotification__NW__MS_template()
{
}

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

PDU__RRM__PacketNotification__NW__MS_template::PDU__RRM__PacketNotification__NW__MS_template(const PDU__RRM__PacketNotification__NW__MS& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PDU__RRM__PacketNotification__NW__MS_template::match(const PDU__RRM__PacketNotification__NW__MS& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), legacy))return FALSE;
if(!other_value.p__TMSI().is_bound()) return FALSE;
if((other_value.p__TMSI().ispresent() ? !single_value->field_p__TMSI.match((const TMSIP__TMSI__TV&)other_value.p__TMSI(), legacy) : !single_value->field_p__TMSI.match_omit(legacy)))return FALSE;
if(!other_value.mobileIdentity().is_bound()) return FALSE;
if((other_value.mobileIdentity().ispresent() ? !single_value->field_mobileIdentity.match((const MobileL3__CommonIE__Types::MobileIdentityTLV&)other_value.mobileIdentity(), legacy) : !single_value->field_mobileIdentity.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 @MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS.");
}
return FALSE;
}

boolean PDU__RRM__PacketNotification__NW__MS_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_messageType.is_bound()
 || (single_value->field_p__TMSI.is_omit() || single_value->field_p__TMSI.is_bound())
 || (single_value->field_mobileIdentity.is_omit() || single_value->field_mobileIdentity.is_bound());
}

boolean PDU__RRM__PacketNotification__NW__MS_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && (single_value->field_p__TMSI.is_omit() || single_value->field_p__TMSI.is_value())
 && (single_value->field_mobileIdentity.is_omit() || single_value->field_mobileIdentity.is_value());
}

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

PDU__RRM__PacketNotification__NW__MS PDU__RRM__PacketNotification__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS.");
PDU__RRM__PacketNotification__NW__MS ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_p__TMSI.is_omit()) ret_val.p__TMSI() = OMIT_VALUE;
else if (single_value->field_p__TMSI.is_bound()) {
ret_val.p__TMSI() = single_value->field_p__TMSI.valueof();
}
if (single_value->field_mobileIdentity.is_omit()) ret_val.mobileIdentity() = OMIT_VALUE;
else if (single_value->field_mobileIdentity.is_bound()) {
ret_val.mobileIdentity() = single_value->field_mobileIdentity.valueof();
}
return ret_val;
}

void PDU__RRM__PacketNotification__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__PacketNotification__NW__MS_template[list_length];
}

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

BITSTRING_template& PDU__RRM__PacketNotification__NW__MS_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& PDU__RRM__PacketNotification__NW__MS_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS.");
return single_value->field_messageType;
}

TMSIP__TMSI__TV_template& PDU__RRM__PacketNotification__NW__MS_template::p__TMSI()
{
set_specific();
return single_value->field_p__TMSI;
}

const TMSIP__TMSI__TV_template& PDU__RRM__PacketNotification__NW__MS_template::p__TMSI() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field p_TMSI of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS.");
return single_value->field_p__TMSI;
}

MobileL3__CommonIE__Types::MobileIdentityTLV_template& PDU__RRM__PacketNotification__NW__MS_template::mobileIdentity()
{
set_specific();
return single_value->field_mobileIdentity;
}

const MobileL3__CommonIE__Types::MobileIdentityTLV_template& PDU__RRM__PacketNotification__NW__MS_template::mobileIdentity() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mobileIdentity of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS.");
return single_value->field_mobileIdentity;
}

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

void PDU__RRM__PacketNotification__NW__MS_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.log();
TTCN_Logger::log_event_str(", p_TMSI := ");
single_value->field_p__TMSI.log();
TTCN_Logger::log_event_str(", mobileIdentity := ");
single_value->field_mobileIdentity.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 PDU__RRM__PacketNotification__NW__MS_template::log_match(const PDU__RRM__PacketNotification__NW__MS& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.p__TMSI().ispresent()){
if(!single_value->field_p__TMSI.match(match_value.p__TMSI(), legacy)){
TTCN_Logger::log_logmatch_info(".p_TMSI");
single_value->field_p__TMSI.log_match(match_value.p__TMSI(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_p__TMSI.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".p_TMSI := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_p__TMSI.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.mobileIdentity().ispresent()){
if(!single_value->field_mobileIdentity.match(match_value.mobileIdentity(), legacy)){
TTCN_Logger::log_logmatch_info(".mobileIdentity");
single_value->field_mobileIdentity.log_match(match_value.mobileIdentity(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_mobileIdentity.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".mobileIdentity := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_mobileIdentity.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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::log_event_str(", p_TMSI := ");
if (match_value.p__TMSI().ispresent()) {
single_value->field_p__TMSI.log_match(match_value.p__TMSI(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_p__TMSI.log();
if (single_value->field_p__TMSI.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", mobileIdentity := ");
if (match_value.mobileIdentity().ispresent()) {
single_value->field_mobileIdentity.log_match(match_value.mobileIdentity(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_mobileIdentity.log();
if (single_value->field_mobileIdentity.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 PDU__RRM__PacketNotification__NW__MS_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
if (!p__TMSI().is_bound()) p__TMSI() = OMIT_VALUE;
else p__TMSI().set_implicit_omit();
if (!mobileIdentity().is_bound()) mobileIdentity() = OMIT_VALUE;
else mobileIdentity().set_implicit_omit();
}

void PDU__RRM__PacketNotification__NW__MS_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.encode_text(text_buf);
single_value->field_p__TMSI.encode_text(text_buf);
single_value->field_mobileIdentity.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 @MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS.");
}
}

void PDU__RRM__PacketNotification__NW__MS_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_messageType.decode_text(text_buf);
single_value->field_p__TMSI.decode_text(text_buf);
single_value->field_mobileIdentity.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 PDU__RRM__PacketNotification__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS.");
}
}

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

void PDU__RRM__PacketNotification__NW__MS_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS");
single_value->field_p__TMSI.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS");
single_value->field_mobileIdentity.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS");
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 : "@MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS");
}

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

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

MBMS__Announcement__NW__MS::MBMS__Announcement__NW__MS()
{
}

MBMS__Announcement__NW__MS::MBMS__Announcement__NW__MS(const BITSTRING& par_messageType,
    const MobileL3__GMM__SM__Types::TemporaryMobileGroupIDLV& par_tMGI,
    const OPTIONAL< MBMS__SessionIdentity__TV >& par_mBMS__SessionIdentity,
    const OPTIONAL< MPRACH__Description__TLV >& par_mBMS__CountingChannelDescription,
    const OPTIONAL< MBMS__ptm__ChannelDescription__TLV >& par_mBMS__ptm__ChannelDescription,
    const OPTIONAL< MBMS__SessionParameterList__TLV >& par_mBMS__SessionParameterList,
    const OPTIONAL< RestrictionTimer__TV >& par_restrictionTimer)
  :   field_messageType(par_messageType),
  field_tMGI(par_tMGI),
  field_mBMS__SessionIdentity(par_mBMS__SessionIdentity),
  field_mBMS__CountingChannelDescription(par_mBMS__CountingChannelDescription),
  field_mBMS__ptm__ChannelDescription(par_mBMS__ptm__ChannelDescription),
  field_mBMS__SessionParameterList(par_mBMS__SessionParameterList),
  field_restrictionTimer(par_restrictionTimer)
{
}

MBMS__Announcement__NW__MS::MBMS__Announcement__NW__MS(const MBMS__Announcement__NW__MS& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.MBMS_Announcement_NW_MS.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.tMGI().is_bound()) field_tMGI = other_value.tMGI();
else field_tMGI.clean_up();
if (other_value.mBMS__SessionIdentity().is_bound()) field_mBMS__SessionIdentity = other_value.mBMS__SessionIdentity();
else field_mBMS__SessionIdentity.clean_up();
if (other_value.mBMS__CountingChannelDescription().is_bound()) field_mBMS__CountingChannelDescription = other_value.mBMS__CountingChannelDescription();
else field_mBMS__CountingChannelDescription.clean_up();
if (other_value.mBMS__ptm__ChannelDescription().is_bound()) field_mBMS__ptm__ChannelDescription = other_value.mBMS__ptm__ChannelDescription();
else field_mBMS__ptm__ChannelDescription.clean_up();
if (other_value.mBMS__SessionParameterList().is_bound()) field_mBMS__SessionParameterList = other_value.mBMS__SessionParameterList();
else field_mBMS__SessionParameterList.clean_up();
if (other_value.restrictionTimer().is_bound()) field_restrictionTimer = other_value.restrictionTimer();
else field_restrictionTimer.clean_up();
}

void MBMS__Announcement__NW__MS::clean_up()
{
field_messageType.clean_up();
field_tMGI.clean_up();
field_mBMS__SessionIdentity.clean_up();
field_mBMS__CountingChannelDescription.clean_up();
field_mBMS__ptm__ChannelDescription.clean_up();
field_mBMS__SessionParameterList.clean_up();
field_restrictionTimer.clean_up();
}

const TTCN_Typedescriptor_t* MBMS__Announcement__NW__MS::get_descriptor() const { return &MBMS__Announcement__NW__MS_descr_; }
MBMS__Announcement__NW__MS& MBMS__Announcement__NW__MS::operator=(const MBMS__Announcement__NW__MS& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.MBMS_Announcement_NW_MS.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.tMGI().is_bound()) field_tMGI = other_value.tMGI();
  else field_tMGI.clean_up();
  if (other_value.mBMS__SessionIdentity().is_bound()) field_mBMS__SessionIdentity = other_value.mBMS__SessionIdentity();
  else field_mBMS__SessionIdentity.clean_up();
  if (other_value.mBMS__CountingChannelDescription().is_bound()) field_mBMS__CountingChannelDescription = other_value.mBMS__CountingChannelDescription();
  else field_mBMS__CountingChannelDescription.clean_up();
  if (other_value.mBMS__ptm__ChannelDescription().is_bound()) field_mBMS__ptm__ChannelDescription = other_value.mBMS__ptm__ChannelDescription();
  else field_mBMS__ptm__ChannelDescription.clean_up();
  if (other_value.mBMS__SessionParameterList().is_bound()) field_mBMS__SessionParameterList = other_value.mBMS__SessionParameterList();
  else field_mBMS__SessionParameterList.clean_up();
  if (other_value.restrictionTimer().is_bound()) field_restrictionTimer = other_value.restrictionTimer();
  else field_restrictionTimer.clean_up();
}
return *this;
}

boolean MBMS__Announcement__NW__MS::operator==(const MBMS__Announcement__NW__MS& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_tMGI==other_value.field_tMGI
  && field_mBMS__SessionIdentity==other_value.field_mBMS__SessionIdentity
  && field_mBMS__CountingChannelDescription==other_value.field_mBMS__CountingChannelDescription
  && field_mBMS__ptm__ChannelDescription==other_value.field_mBMS__ptm__ChannelDescription
  && field_mBMS__SessionParameterList==other_value.field_mBMS__SessionParameterList
  && field_restrictionTimer==other_value.field_restrictionTimer;
}

boolean MBMS__Announcement__NW__MS::is_bound() const
{
return (field_messageType.is_bound())
  || (field_tMGI.is_bound())
  || (OPTIONAL_OMIT == field_mBMS__SessionIdentity.get_selection() || field_mBMS__SessionIdentity.is_bound())
  || (OPTIONAL_OMIT == field_mBMS__CountingChannelDescription.get_selection() || field_mBMS__CountingChannelDescription.is_bound())
  || (OPTIONAL_OMIT == field_mBMS__ptm__ChannelDescription.get_selection() || field_mBMS__ptm__ChannelDescription.is_bound())
  || (OPTIONAL_OMIT == field_mBMS__SessionParameterList.get_selection() || field_mBMS__SessionParameterList.is_bound())
  || (OPTIONAL_OMIT == field_restrictionTimer.get_selection() || field_restrictionTimer.is_bound());
}
boolean MBMS__Announcement__NW__MS::is_value() const
{
return field_messageType.is_value()
  && field_tMGI.is_value()
  && (OPTIONAL_OMIT == field_mBMS__SessionIdentity.get_selection() || field_mBMS__SessionIdentity.is_value())
  && (OPTIONAL_OMIT == field_mBMS__CountingChannelDescription.get_selection() || field_mBMS__CountingChannelDescription.is_value())
  && (OPTIONAL_OMIT == field_mBMS__ptm__ChannelDescription.get_selection() || field_mBMS__ptm__ChannelDescription.is_value())
  && (OPTIONAL_OMIT == field_mBMS__SessionParameterList.get_selection() || field_mBMS__SessionParameterList.is_value())
  && (OPTIONAL_OMIT == field_restrictionTimer.get_selection() || field_restrictionTimer.is_value());
}
int MBMS__Announcement__NW__MS::size_of() const
{
  int ret_val = 2;
  if (field_mBMS__SessionIdentity.ispresent()) ret_val++;
  if (field_mBMS__CountingChannelDescription.ispresent()) ret_val++;
  if (field_mBMS__ptm__ChannelDescription.ispresent()) ret_val++;
  if (field_mBMS__SessionParameterList.ispresent()) ret_val++;
  if (field_restrictionTimer.ispresent()) ret_val++;
  return ret_val;
}

void MBMS__Announcement__NW__MS::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(", tMGI := ");
field_tMGI.log();
TTCN_Logger::log_event_str(", mBMS_SessionIdentity := ");
field_mBMS__SessionIdentity.log();
TTCN_Logger::log_event_str(", mBMS_CountingChannelDescription := ");
field_mBMS__CountingChannelDescription.log();
TTCN_Logger::log_event_str(", mBMS_ptm_ChannelDescription := ");
field_mBMS__ptm__ChannelDescription.log();
TTCN_Logger::log_event_str(", mBMS_SessionParameterList := ");
field_mBMS__SessionParameterList.log();
TTCN_Logger::log_event_str(", restrictionTimer := ");
field_restrictionTimer.log();
TTCN_Logger::log_event_str(" }");
}

void MBMS__Announcement__NW__MS::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (tMGI().is_bound()) tMGI().set_implicit_omit();
if (!mBMS__SessionIdentity().is_bound()) mBMS__SessionIdentity() = OMIT_VALUE;
else mBMS__SessionIdentity().set_implicit_omit();
if (!mBMS__CountingChannelDescription().is_bound()) mBMS__CountingChannelDescription() = OMIT_VALUE;
else mBMS__CountingChannelDescription().set_implicit_omit();
if (!mBMS__ptm__ChannelDescription().is_bound()) mBMS__ptm__ChannelDescription() = OMIT_VALUE;
else mBMS__ptm__ChannelDescription().set_implicit_omit();
if (!mBMS__SessionParameterList().is_bound()) mBMS__SessionParameterList() = OMIT_VALUE;
else mBMS__SessionParameterList().set_implicit_omit();
if (!restrictionTimer().is_bound()) restrictionTimer() = OMIT_VALUE;
else restrictionTimer().set_implicit_omit();
}

void MBMS__Announcement__NW__MS::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (7<param.get_size()) {
      param.error("record value of type @MobileL3_RRM_Types.MBMS_Announcement_NW_MS has 7 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) messageType().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) tMGI().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) mBMS__SessionIdentity().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) mBMS__CountingChannelDescription().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) mBMS__ptm__ChannelDescription().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) mBMS__SessionParameterList().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) restrictionTimer().set_param(*param.get_elem(6));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "messageType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          messageType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tMGI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tMGI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMS_SessionIdentity")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMS__SessionIdentity().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMS_CountingChannelDescription")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMS__CountingChannelDescription().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMS_ptm_ChannelDescription")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMS__ptm__ChannelDescription().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMS_SessionParameterList")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMS__SessionParameterList().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "restrictionTimer")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          restrictionTimer().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 @MobileL3_RRM_Types.MBMS_Announcement_NW_MS: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_RRM_Types.MBMS_Announcement_NW_MS");
  }
}

void MBMS__Announcement__NW__MS::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_tMGI.encode_text(text_buf);
field_mBMS__SessionIdentity.encode_text(text_buf);
field_mBMS__CountingChannelDescription.encode_text(text_buf);
field_mBMS__ptm__ChannelDescription.encode_text(text_buf);
field_mBMS__SessionParameterList.encode_text(text_buf);
field_restrictionTimer.encode_text(text_buf);
}

void MBMS__Announcement__NW__MS::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_tMGI.decode_text(text_buf);
field_mBMS__SessionIdentity.decode_text(text_buf);
field_mBMS__CountingChannelDescription.decode_text(text_buf);
field_mBMS__ptm__ChannelDescription.decode_text(text_buf);
field_mBMS__SessionParameterList.decode_text(text_buf);
field_restrictionTimer.decode_text(text_buf);
}

void MBMS__Announcement__NW__MS::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 MBMS__Announcement__NW__MS::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 MBMS__Announcement__NW__MS::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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, MobileL3__GMM__SM__Types::TemporaryMobileGroupIDLV_descr_.raw->forceomit);
  decoded_field_length = field_tMGI.RAW_decode(MobileL3__GMM__SM__Types::TemporaryMobileGroupIDLV_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){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_mBMS__SessionIdentity = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, MBMS__SessionIdentity__TV_descr_.raw->forceomit);
  decoded_field_length = field_mBMS__SessionIdentity().RAW_decode(MBMS__SessionIdentity__TV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_mBMS__SessionIdentity = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_mBMS__SessionIdentity.ispresent() || field_mBMS__SessionIdentity().elementIdentifier() !=  os_21){
  field_mBMS__SessionIdentity=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_mBMS__SessionIdentity=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_mBMS__CountingChannelDescription = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, MPRACH__Description__TLV_descr_.raw->forceomit);
  decoded_field_length = field_mBMS__CountingChannelDescription().RAW_decode(MPRACH__Description__TLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_mBMS__CountingChannelDescription = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_mBMS__CountingChannelDescription.ispresent() || field_mBMS__CountingChannelDescription().elementIdentifier() !=  os_36){
  field_mBMS__CountingChannelDescription=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_mBMS__CountingChannelDescription=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_mBMS__ptm__ChannelDescription = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, MBMS__ptm__ChannelDescription__TLV_descr_.raw->forceomit);
  decoded_field_length = field_mBMS__ptm__ChannelDescription().RAW_decode(MBMS__ptm__ChannelDescription__TLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_mBMS__ptm__ChannelDescription = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_mBMS__ptm__ChannelDescription.ispresent() || field_mBMS__ptm__ChannelDescription().elementIdentifier() !=  os_22){
  field_mBMS__ptm__ChannelDescription=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_mBMS__ptm__ChannelDescription=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_mBMS__SessionParameterList = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, MBMS__SessionParameterList__TLV_descr_.raw->forceomit);
  decoded_field_length = field_mBMS__SessionParameterList().RAW_decode(MBMS__SessionParameterList__TLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_mBMS__SessionParameterList = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_mBMS__SessionParameterList.ispresent() || field_mBMS__SessionParameterList().elementIdentifier() !=  os_23){
  field_mBMS__SessionParameterList=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_mBMS__SessionParameterList=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_restrictionTimer = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, RestrictionTimer__TV_descr_.raw->forceomit);
  decoded_field_length = field_restrictionTimer().RAW_decode(RestrictionTimer__TV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_restrictionTimer = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_restrictionTimer.ispresent() || field_restrictionTimer().elementIdentifier() !=  os_3){
  field_restrictionTimer=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_restrictionTimer=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int MBMS__Announcement__NW__MS::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 = 7;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(7);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, General__Types::BIT8_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, MobileL3__GMM__SM__Types::TemporaryMobileGroupIDLV_descr_.raw);
  if (field_mBMS__SessionIdentity.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, MBMS__SessionIdentity__TV_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_mBMS__CountingChannelDescription.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, MPRACH__Description__TLV_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_mBMS__ptm__ChannelDescription.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, MBMS__ptm__ChannelDescription__TLV_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_mBMS__SessionParameterList.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, MBMS__SessionParameterList__TLV_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_restrictionTimer.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, RestrictionTimer__TV_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_tMGI.RAW_encode(MobileL3__GMM__SM__Types::TemporaryMobileGroupIDLV_descr_, *myleaf.body.node.nodes[1]);
  if (field_mBMS__SessionIdentity.ispresent()) {
  encoded_length += field_mBMS__SessionIdentity().RAW_encode(MBMS__SessionIdentity__TV_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_mBMS__CountingChannelDescription.ispresent()) {
  encoded_length += field_mBMS__CountingChannelDescription().RAW_encode(MPRACH__Description__TLV_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_mBMS__ptm__ChannelDescription.ispresent()) {
  encoded_length += field_mBMS__ptm__ChannelDescription().RAW_encode(MBMS__ptm__ChannelDescription__TLV_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_mBMS__SessionParameterList.ispresent()) {
  encoded_length += field_mBMS__SessionParameterList().RAW_encode(MBMS__SessionParameterList__TLV_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_restrictionTimer.ispresent()) {
  encoded_length += field_restrictionTimer().RAW_encode(RestrictionTimer__TV_descr_, *myleaf.body.node.nodes[6]);
  }
  if (field_mBMS__SessionIdentity.ispresent() && (!field_mBMS__SessionIdentity.ispresent() || field_mBMS__SessionIdentity().elementIdentifier() !=  os_21)) {
  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){
   os_21.RAW_encode(General__Types::OCT1_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_mBMS__CountingChannelDescription.ispresent() && (!field_mBMS__CountingChannelDescription.ispresent() || field_mBMS__CountingChannelDescription().elementIdentifier() !=  os_36)) {
  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){
   os_36.RAW_encode(General__Types::OCT1_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_mBMS__ptm__ChannelDescription.ispresent() && (!field_mBMS__ptm__ChannelDescription.ispresent() || field_mBMS__ptm__ChannelDescription().elementIdentifier() !=  os_22)) {
  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){
   os_22.RAW_encode(General__Types::OCT1_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_mBMS__SessionParameterList.ispresent() && (!field_mBMS__SessionParameterList.ispresent() || field_mBMS__SessionParameterList().elementIdentifier() !=  os_23)) {
  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){
   os_23.RAW_encode(General__Types::OCT1_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_restrictionTimer.ispresent() && (!field_restrictionTimer.ispresent() || field_restrictionTimer().elementIdentifier() !=  os_3)) {
  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){
   os_3.RAW_encode(General__Types::OCT1_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 MBMS__Announcement__NW__MS_template::single_value_struct {
BITSTRING_template field_messageType;
MobileL3__GMM__SM__Types::TemporaryMobileGroupIDLV_template field_tMGI;
MBMS__SessionIdentity__TV_template field_mBMS__SessionIdentity;
MPRACH__Description__TLV_template field_mBMS__CountingChannelDescription;
MBMS__ptm__ChannelDescription__TLV_template field_mBMS__ptm__ChannelDescription;
MBMS__SessionParameterList__TLV_template field_mBMS__SessionParameterList;
RestrictionTimer__TV_template field_restrictionTimer;
};

void MBMS__Announcement__NW__MS_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_messageType = ANY_VALUE;
single_value->field_tMGI = ANY_VALUE;
single_value->field_mBMS__SessionIdentity = ANY_OR_OMIT;
single_value->field_mBMS__CountingChannelDescription = ANY_OR_OMIT;
single_value->field_mBMS__ptm__ChannelDescription = ANY_OR_OMIT;
single_value->field_mBMS__SessionParameterList = ANY_OR_OMIT;
single_value->field_restrictionTimer = ANY_OR_OMIT;
}
}
}

void MBMS__Announcement__NW__MS_template::copy_value(const MBMS__Announcement__NW__MS& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
if (other_value.tMGI().is_bound()) {
  single_value->field_tMGI = other_value.tMGI();
} else {
  single_value->field_tMGI.clean_up();
}
if (other_value.mBMS__SessionIdentity().is_bound()) {
  if (other_value.mBMS__SessionIdentity().ispresent()) single_value->field_mBMS__SessionIdentity = other_value.mBMS__SessionIdentity()();
  else single_value->field_mBMS__SessionIdentity = OMIT_VALUE;
} else {
  single_value->field_mBMS__SessionIdentity.clean_up();
}
if (other_value.mBMS__CountingChannelDescription().is_bound()) {
  if (other_value.mBMS__CountingChannelDescription().ispresent()) single_value->field_mBMS__CountingChannelDescription = other_value.mBMS__CountingChannelDescription()();
  else single_value->field_mBMS__CountingChannelDescription = OMIT_VALUE;
} else {
  single_value->field_mBMS__CountingChannelDescription.clean_up();
}
if (other_value.mBMS__ptm__ChannelDescription().is_bound()) {
  if (other_value.mBMS__ptm__ChannelDescription().ispresent()) single_value->field_mBMS__ptm__ChannelDescription = other_value.mBMS__ptm__ChannelDescription()();
  else single_value->field_mBMS__ptm__ChannelDescription = OMIT_VALUE;
} else {
  single_value->field_mBMS__ptm__ChannelDescription.clean_up();
}
if (other_value.mBMS__SessionParameterList().is_bound()) {
  if (other_value.mBMS__SessionParameterList().ispresent()) single_value->field_mBMS__SessionParameterList = other_value.mBMS__SessionParameterList()();
  else single_value->field_mBMS__SessionParameterList = OMIT_VALUE;
} else {
  single_value->field_mBMS__SessionParameterList.clean_up();
}
if (other_value.restrictionTimer().is_bound()) {
  if (other_value.restrictionTimer().ispresent()) single_value->field_restrictionTimer = other_value.restrictionTimer()();
  else single_value->field_restrictionTimer = OMIT_VALUE;
} else {
  single_value->field_restrictionTimer.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void MBMS__Announcement__NW__MS_template::copy_template(const MBMS__Announcement__NW__MS_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.tMGI().get_selection()) {
single_value->field_tMGI = other_value.tMGI();
} else {
single_value->field_tMGI.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mBMS__SessionIdentity().get_selection()) {
single_value->field_mBMS__SessionIdentity = other_value.mBMS__SessionIdentity();
} else {
single_value->field_mBMS__SessionIdentity.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mBMS__CountingChannelDescription().get_selection()) {
single_value->field_mBMS__CountingChannelDescription = other_value.mBMS__CountingChannelDescription();
} else {
single_value->field_mBMS__CountingChannelDescription.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mBMS__ptm__ChannelDescription().get_selection()) {
single_value->field_mBMS__ptm__ChannelDescription = other_value.mBMS__ptm__ChannelDescription();
} else {
single_value->field_mBMS__ptm__ChannelDescription.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mBMS__SessionParameterList().get_selection()) {
single_value->field_mBMS__SessionParameterList = other_value.mBMS__SessionParameterList();
} else {
single_value->field_mBMS__SessionParameterList.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.restrictionTimer().get_selection()) {
single_value->field_restrictionTimer = other_value.restrictionTimer();
} else {
single_value->field_restrictionTimer.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 MBMS__Announcement__NW__MS_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 MBMS__Announcement__NW__MS_template(*other_value.implication_.precondition);
implication_.implied_template = new MBMS__Announcement__NW__MS_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 @MobileL3_RRM_Types.MBMS_Announcement_NW_MS.");
break;
}
set_selection(other_value);
}

MBMS__Announcement__NW__MS_template::MBMS__Announcement__NW__MS_template()
{
}

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

MBMS__Announcement__NW__MS_template::MBMS__Announcement__NW__MS_template(const MBMS__Announcement__NW__MS& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean MBMS__Announcement__NW__MS_template::match(const MBMS__Announcement__NW__MS& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), legacy))return FALSE;
if(!other_value.tMGI().is_bound()) return FALSE;
if(!single_value->field_tMGI.match(other_value.tMGI(), legacy))return FALSE;
if(!other_value.mBMS__SessionIdentity().is_bound()) return FALSE;
if((other_value.mBMS__SessionIdentity().ispresent() ? !single_value->field_mBMS__SessionIdentity.match((const MBMS__SessionIdentity__TV&)other_value.mBMS__SessionIdentity(), legacy) : !single_value->field_mBMS__SessionIdentity.match_omit(legacy)))return FALSE;
if(!other_value.mBMS__CountingChannelDescription().is_bound()) return FALSE;
if((other_value.mBMS__CountingChannelDescription().ispresent() ? !single_value->field_mBMS__CountingChannelDescription.match((const MPRACH__Description__TLV&)other_value.mBMS__CountingChannelDescription(), legacy) : !single_value->field_mBMS__CountingChannelDescription.match_omit(legacy)))return FALSE;
if(!other_value.mBMS__ptm__ChannelDescription().is_bound()) return FALSE;
if((other_value.mBMS__ptm__ChannelDescription().ispresent() ? !single_value->field_mBMS__ptm__ChannelDescription.match((const MBMS__ptm__ChannelDescription__TLV&)other_value.mBMS__ptm__ChannelDescription(), legacy) : !single_value->field_mBMS__ptm__ChannelDescription.match_omit(legacy)))return FALSE;
if(!other_value.mBMS__SessionParameterList().is_bound()) return FALSE;
if((other_value.mBMS__SessionParameterList().ispresent() ? !single_value->field_mBMS__SessionParameterList.match((const MBMS__SessionParameterList__TLV&)other_value.mBMS__SessionParameterList(), legacy) : !single_value->field_mBMS__SessionParameterList.match_omit(legacy)))return FALSE;
if(!other_value.restrictionTimer().is_bound()) return FALSE;
if((other_value.restrictionTimer().ispresent() ? !single_value->field_restrictionTimer.match((const RestrictionTimer__TV&)other_value.restrictionTimer(), legacy) : !single_value->field_restrictionTimer.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 @MobileL3_RRM_Types.MBMS_Announcement_NW_MS.");
}
return FALSE;
}

boolean MBMS__Announcement__NW__MS_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_messageType.is_bound()
 || single_value->field_tMGI.is_bound()
 || (single_value->field_mBMS__SessionIdentity.is_omit() || single_value->field_mBMS__SessionIdentity.is_bound())
 || (single_value->field_mBMS__CountingChannelDescription.is_omit() || single_value->field_mBMS__CountingChannelDescription.is_bound())
 || (single_value->field_mBMS__ptm__ChannelDescription.is_omit() || single_value->field_mBMS__ptm__ChannelDescription.is_bound())
 || (single_value->field_mBMS__SessionParameterList.is_omit() || single_value->field_mBMS__SessionParameterList.is_bound())
 || (single_value->field_restrictionTimer.is_omit() || single_value->field_restrictionTimer.is_bound());
}

boolean MBMS__Announcement__NW__MS_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_tMGI.is_value()
 && (single_value->field_mBMS__SessionIdentity.is_omit() || single_value->field_mBMS__SessionIdentity.is_value())
 && (single_value->field_mBMS__CountingChannelDescription.is_omit() || single_value->field_mBMS__CountingChannelDescription.is_value())
 && (single_value->field_mBMS__ptm__ChannelDescription.is_omit() || single_value->field_mBMS__ptm__ChannelDescription.is_value())
 && (single_value->field_mBMS__SessionParameterList.is_omit() || single_value->field_mBMS__SessionParameterList.is_value())
 && (single_value->field_restrictionTimer.is_omit() || single_value->field_restrictionTimer.is_value());
}

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

MBMS__Announcement__NW__MS MBMS__Announcement__NW__MS_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 @MobileL3_RRM_Types.MBMS_Announcement_NW_MS.");
MBMS__Announcement__NW__MS ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_tMGI.is_bound()) {
ret_val.tMGI() = single_value->field_tMGI.valueof();
}
if (single_value->field_mBMS__SessionIdentity.is_omit()) ret_val.mBMS__SessionIdentity() = OMIT_VALUE;
else if (single_value->field_mBMS__SessionIdentity.is_bound()) {
ret_val.mBMS__SessionIdentity() = single_value->field_mBMS__SessionIdentity.valueof();
}
if (single_value->field_mBMS__CountingChannelDescription.is_omit()) ret_val.mBMS__CountingChannelDescription() = OMIT_VALUE;
else if (single_value->field_mBMS__CountingChannelDescription.is_bound()) {
ret_val.mBMS__CountingChannelDescription() = single_value->field_mBMS__CountingChannelDescription.valueof();
}
if (single_value->field_mBMS__ptm__ChannelDescription.is_omit()) ret_val.mBMS__ptm__ChannelDescription() = OMIT_VALUE;
else if (single_value->field_mBMS__ptm__ChannelDescription.is_bound()) {
ret_val.mBMS__ptm__ChannelDescription() = single_value->field_mBMS__ptm__ChannelDescription.valueof();
}
if (single_value->field_mBMS__SessionParameterList.is_omit()) ret_val.mBMS__SessionParameterList() = OMIT_VALUE;
else if (single_value->field_mBMS__SessionParameterList.is_bound()) {
ret_val.mBMS__SessionParameterList() = single_value->field_mBMS__SessionParameterList.valueof();
}
if (single_value->field_restrictionTimer.is_omit()) ret_val.restrictionTimer() = OMIT_VALUE;
else if (single_value->field_restrictionTimer.is_bound()) {
ret_val.restrictionTimer() = single_value->field_restrictionTimer.valueof();
}
return ret_val;
}

void MBMS__Announcement__NW__MS_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 @MobileL3_RRM_Types.MBMS_Announcement_NW_MS.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new MBMS__Announcement__NW__MS_template[list_length];
}

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

BITSTRING_template& MBMS__Announcement__NW__MS_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& MBMS__Announcement__NW__MS_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.MBMS_Announcement_NW_MS.");
return single_value->field_messageType;
}

MobileL3__GMM__SM__Types::TemporaryMobileGroupIDLV_template& MBMS__Announcement__NW__MS_template::tMGI()
{
set_specific();
return single_value->field_tMGI;
}

const MobileL3__GMM__SM__Types::TemporaryMobileGroupIDLV_template& MBMS__Announcement__NW__MS_template::tMGI() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tMGI of a non-specific template of type @MobileL3_RRM_Types.MBMS_Announcement_NW_MS.");
return single_value->field_tMGI;
}

MBMS__SessionIdentity__TV_template& MBMS__Announcement__NW__MS_template::mBMS__SessionIdentity()
{
set_specific();
return single_value->field_mBMS__SessionIdentity;
}

const MBMS__SessionIdentity__TV_template& MBMS__Announcement__NW__MS_template::mBMS__SessionIdentity() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mBMS_SessionIdentity of a non-specific template of type @MobileL3_RRM_Types.MBMS_Announcement_NW_MS.");
return single_value->field_mBMS__SessionIdentity;
}

MPRACH__Description__TLV_template& MBMS__Announcement__NW__MS_template::mBMS__CountingChannelDescription()
{
set_specific();
return single_value->field_mBMS__CountingChannelDescription;
}

const MPRACH__Description__TLV_template& MBMS__Announcement__NW__MS_template::mBMS__CountingChannelDescription() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mBMS_CountingChannelDescription of a non-specific template of type @MobileL3_RRM_Types.MBMS_Announcement_NW_MS.");
return single_value->field_mBMS__CountingChannelDescription;
}

MBMS__ptm__ChannelDescription__TLV_template& MBMS__Announcement__NW__MS_template::mBMS__ptm__ChannelDescription()
{
set_specific();
return single_value->field_mBMS__ptm__ChannelDescription;
}

const MBMS__ptm__ChannelDescription__TLV_template& MBMS__Announcement__NW__MS_template::mBMS__ptm__ChannelDescription() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mBMS_ptm_ChannelDescription of a non-specific template of type @MobileL3_RRM_Types.MBMS_Announcement_NW_MS.");
return single_value->field_mBMS__ptm__ChannelDescription;
}

MBMS__SessionParameterList__TLV_template& MBMS__Announcement__NW__MS_template::mBMS__SessionParameterList()
{
set_specific();
return single_value->field_mBMS__SessionParameterList;
}

const MBMS__SessionParameterList__TLV_template& MBMS__Announcement__NW__MS_template::mBMS__SessionParameterList() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mBMS_SessionParameterList of a non-specific template of type @MobileL3_RRM_Types.MBMS_Announcement_NW_MS.");
return single_value->field_mBMS__SessionParameterList;
}

RestrictionTimer__TV_template& MBMS__Announcement__NW__MS_template::restrictionTimer()
{
set_specific();
return single_value->field_restrictionTimer;
}

const RestrictionTimer__TV_template& MBMS__Announcement__NW__MS_template::restrictionTimer() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field restrictionTimer of a non-specific template of type @MobileL3_RRM_Types.MBMS_Announcement_NW_MS.");
return single_value->field_restrictionTimer;
}

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

void MBMS__Announcement__NW__MS_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.log();
TTCN_Logger::log_event_str(", tMGI := ");
single_value->field_tMGI.log();
TTCN_Logger::log_event_str(", mBMS_SessionIdentity := ");
single_value->field_mBMS__SessionIdentity.log();
TTCN_Logger::log_event_str(", mBMS_CountingChannelDescription := ");
single_value->field_mBMS__CountingChannelDescription.log();
TTCN_Logger::log_event_str(", mBMS_ptm_ChannelDescription := ");
single_value->field_mBMS__ptm__ChannelDescription.log();
TTCN_Logger::log_event_str(", mBMS_SessionParameterList := ");
single_value->field_mBMS__SessionParameterList.log();
TTCN_Logger::log_event_str(", restrictionTimer := ");
single_value->field_restrictionTimer.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 MBMS__Announcement__NW__MS_template::log_match(const MBMS__Announcement__NW__MS& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_tMGI.match(match_value.tMGI(), legacy)){
TTCN_Logger::log_logmatch_info(".tMGI");
single_value->field_tMGI.log_match(match_value.tMGI(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.mBMS__SessionIdentity().ispresent()){
if(!single_value->field_mBMS__SessionIdentity.match(match_value.mBMS__SessionIdentity(), legacy)){
TTCN_Logger::log_logmatch_info(".mBMS_SessionIdentity");
single_value->field_mBMS__SessionIdentity.log_match(match_value.mBMS__SessionIdentity(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_mBMS__SessionIdentity.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".mBMS_SessionIdentity := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_mBMS__SessionIdentity.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.mBMS__CountingChannelDescription().ispresent()){
if(!single_value->field_mBMS__CountingChannelDescription.match(match_value.mBMS__CountingChannelDescription(), legacy)){
TTCN_Logger::log_logmatch_info(".mBMS_CountingChannelDescription");
single_value->field_mBMS__CountingChannelDescription.log_match(match_value.mBMS__CountingChannelDescription(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_mBMS__CountingChannelDescription.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".mBMS_CountingChannelDescription := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_mBMS__CountingChannelDescription.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.mBMS__ptm__ChannelDescription().ispresent()){
if(!single_value->field_mBMS__ptm__ChannelDescription.match(match_value.mBMS__ptm__ChannelDescription(), legacy)){
TTCN_Logger::log_logmatch_info(".mBMS_ptm_ChannelDescription");
single_value->field_mBMS__ptm__ChannelDescription.log_match(match_value.mBMS__ptm__ChannelDescription(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_mBMS__ptm__ChannelDescription.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".mBMS_ptm_ChannelDescription := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_mBMS__ptm__ChannelDescription.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.mBMS__SessionParameterList().ispresent()){
if(!single_value->field_mBMS__SessionParameterList.match(match_value.mBMS__SessionParameterList(), legacy)){
TTCN_Logger::log_logmatch_info(".mBMS_SessionParameterList");
single_value->field_mBMS__SessionParameterList.log_match(match_value.mBMS__SessionParameterList(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_mBMS__SessionParameterList.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".mBMS_SessionParameterList := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_mBMS__SessionParameterList.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.restrictionTimer().ispresent()){
if(!single_value->field_restrictionTimer.match(match_value.restrictionTimer(), legacy)){
TTCN_Logger::log_logmatch_info(".restrictionTimer");
single_value->field_restrictionTimer.log_match(match_value.restrictionTimer(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_restrictionTimer.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".restrictionTimer := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_restrictionTimer.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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::log_event_str(", tMGI := ");
single_value->field_tMGI.log_match(match_value.tMGI(), legacy);
TTCN_Logger::log_event_str(", mBMS_SessionIdentity := ");
if (match_value.mBMS__SessionIdentity().ispresent()) {
single_value->field_mBMS__SessionIdentity.log_match(match_value.mBMS__SessionIdentity(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_mBMS__SessionIdentity.log();
if (single_value->field_mBMS__SessionIdentity.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", mBMS_CountingChannelDescription := ");
if (match_value.mBMS__CountingChannelDescription().ispresent()) {
single_value->field_mBMS__CountingChannelDescription.log_match(match_value.mBMS__CountingChannelDescription(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_mBMS__CountingChannelDescription.log();
if (single_value->field_mBMS__CountingChannelDescription.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", mBMS_ptm_ChannelDescription := ");
if (match_value.mBMS__ptm__ChannelDescription().ispresent()) {
single_value->field_mBMS__ptm__ChannelDescription.log_match(match_value.mBMS__ptm__ChannelDescription(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_mBMS__ptm__ChannelDescription.log();
if (single_value->field_mBMS__ptm__ChannelDescription.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", mBMS_SessionParameterList := ");
if (match_value.mBMS__SessionParameterList().ispresent()) {
single_value->field_mBMS__SessionParameterList.log_match(match_value.mBMS__SessionParameterList(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_mBMS__SessionParameterList.log();
if (single_value->field_mBMS__SessionParameterList.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", restrictionTimer := ");
if (match_value.restrictionTimer().ispresent()) {
single_value->field_restrictionTimer.log_match(match_value.restrictionTimer(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_restrictionTimer.log();
if (single_value->field_restrictionTimer.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 MBMS__Announcement__NW__MS_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
if (tMGI().is_bound()) tMGI().set_implicit_omit();
if (!mBMS__SessionIdentity().is_bound()) mBMS__SessionIdentity() = OMIT_VALUE;
else mBMS__SessionIdentity().set_implicit_omit();
if (!mBMS__CountingChannelDescription().is_bound()) mBMS__CountingChannelDescription() = OMIT_VALUE;
else mBMS__CountingChannelDescription().set_implicit_omit();
if (!mBMS__ptm__ChannelDescription().is_bound()) mBMS__ptm__ChannelDescription() = OMIT_VALUE;
else mBMS__ptm__ChannelDescription().set_implicit_omit();
if (!mBMS__SessionParameterList().is_bound()) mBMS__SessionParameterList() = OMIT_VALUE;
else mBMS__SessionParameterList().set_implicit_omit();
if (!restrictionTimer().is_bound()) restrictionTimer() = OMIT_VALUE;
else restrictionTimer().set_implicit_omit();
}

void MBMS__Announcement__NW__MS_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.encode_text(text_buf);
single_value->field_tMGI.encode_text(text_buf);
single_value->field_mBMS__SessionIdentity.encode_text(text_buf);
single_value->field_mBMS__CountingChannelDescription.encode_text(text_buf);
single_value->field_mBMS__ptm__ChannelDescription.encode_text(text_buf);
single_value->field_mBMS__SessionParameterList.encode_text(text_buf);
single_value->field_restrictionTimer.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 @MobileL3_RRM_Types.MBMS_Announcement_NW_MS.");
}
}

void MBMS__Announcement__NW__MS_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_messageType.decode_text(text_buf);
single_value->field_tMGI.decode_text(text_buf);
single_value->field_mBMS__SessionIdentity.decode_text(text_buf);
single_value->field_mBMS__CountingChannelDescription.decode_text(text_buf);
single_value->field_mBMS__ptm__ChannelDescription.decode_text(text_buf);
single_value->field_mBMS__SessionParameterList.decode_text(text_buf);
single_value->field_restrictionTimer.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 MBMS__Announcement__NW__MS_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 @MobileL3_RRM_Types.MBMS_Announcement_NW_MS.");
}
}

void MBMS__Announcement__NW__MS_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: {
    MBMS__Announcement__NW__MS_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (7<param.get_size()) {
      param.error("record template of type @MobileL3_RRM_Types.MBMS_Announcement_NW_MS has 7 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) messageType().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) tMGI().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) mBMS__SessionIdentity().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) mBMS__CountingChannelDescription().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) mBMS__ptm__ChannelDescription().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) mBMS__SessionParameterList().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) restrictionTimer().set_param(*param.get_elem(6));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "messageType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          messageType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tMGI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tMGI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMS_SessionIdentity")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMS__SessionIdentity().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMS_CountingChannelDescription")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMS__CountingChannelDescription().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMS_ptm_ChannelDescription")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMS__ptm__ChannelDescription().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMS_SessionParameterList")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMS__SessionParameterList().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "restrictionTimer")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          restrictionTimer().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 @MobileL3_RRM_Types.MBMS_Announcement_NW_MS: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    MBMS__Announcement__NW__MS_template* precondition = new MBMS__Announcement__NW__MS_template;
    precondition->set_param(*param.get_elem(0));
    MBMS__Announcement__NW__MS_template* implied_template = new MBMS__Announcement__NW__MS_template;
    implied_template->set_param(*param.get_elem(1));
    *this = MBMS__Announcement__NW__MS_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_RRM_Types.MBMS_Announcement_NW_MS");
  }
  is_ifpresent = param.get_ifpresent();
}

void MBMS__Announcement__NW__MS_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.MBMS_Announcement_NW_MS");
single_value->field_tMGI.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.MBMS_Announcement_NW_MS");
single_value->field_mBMS__SessionIdentity.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.MBMS_Announcement_NW_MS");
single_value->field_mBMS__CountingChannelDescription.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.MBMS_Announcement_NW_MS");
single_value->field_mBMS__ptm__ChannelDescription.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.MBMS_Announcement_NW_MS");
single_value->field_mBMS__SessionParameterList.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.MBMS_Announcement_NW_MS");
single_value->field_restrictionTimer.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.MBMS_Announcement_NW_MS");
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 : "@MobileL3_RRM_Types.MBMS_Announcement_NW_MS");
}

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

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

PDU__RRM__PagingReq__Type1__NW__MS::PDU__RRM__PagingReq__Type1__NW__MS()
{
}

PDU__RRM__PagingReq__Type1__NW__MS::PDU__RRM__PagingReq__Type1__NW__MS(const BITSTRING& par_messageType,
    const PageMode__V& par_pageMode,
    const ChannelNeeded__V& par_channelNeeded,
    const MobileL3__CommonIE__Types::MobileIdentityLV& par_mobileIdentity1,
    const OPTIONAL< MobileL3__CommonIE__Types::MobileIdentityTLV >& par_mobileIdentity2,
    const OCTETSTRING& par_p1RestOctets)
  :   field_messageType(par_messageType),
  field_pageMode(par_pageMode),
  field_channelNeeded(par_channelNeeded),
  field_mobileIdentity1(par_mobileIdentity1),
  field_mobileIdentity2(par_mobileIdentity2),
  field_p1RestOctets(par_p1RestOctets)
{
}

PDU__RRM__PagingReq__Type1__NW__MS::PDU__RRM__PagingReq__Type1__NW__MS(const PDU__RRM__PagingReq__Type1__NW__MS& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.pageMode().is_bound()) field_pageMode = other_value.pageMode();
else field_pageMode.clean_up();
if (other_value.channelNeeded().is_bound()) field_channelNeeded = other_value.channelNeeded();
else field_channelNeeded.clean_up();
if (other_value.mobileIdentity1().is_bound()) field_mobileIdentity1 = other_value.mobileIdentity1();
else field_mobileIdentity1.clean_up();
if (other_value.mobileIdentity2().is_bound()) field_mobileIdentity2 = other_value.mobileIdentity2();
else field_mobileIdentity2.clean_up();
if (other_value.p1RestOctets().is_bound()) field_p1RestOctets = other_value.p1RestOctets();
else field_p1RestOctets.clean_up();
}

void PDU__RRM__PagingReq__Type1__NW__MS::clean_up()
{
field_messageType.clean_up();
field_pageMode.clean_up();
field_channelNeeded.clean_up();
field_mobileIdentity1.clean_up();
field_mobileIdentity2.clean_up();
field_p1RestOctets.clean_up();
}

const TTCN_Typedescriptor_t* PDU__RRM__PagingReq__Type1__NW__MS::get_descriptor() const { return &PDU__RRM__PagingReq__Type1__NW__MS_descr_; }
PDU__RRM__PagingReq__Type1__NW__MS& PDU__RRM__PagingReq__Type1__NW__MS::operator=(const PDU__RRM__PagingReq__Type1__NW__MS& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.pageMode().is_bound()) field_pageMode = other_value.pageMode();
  else field_pageMode.clean_up();
  if (other_value.channelNeeded().is_bound()) field_channelNeeded = other_value.channelNeeded();
  else field_channelNeeded.clean_up();
  if (other_value.mobileIdentity1().is_bound()) field_mobileIdentity1 = other_value.mobileIdentity1();
  else field_mobileIdentity1.clean_up();
  if (other_value.mobileIdentity2().is_bound()) field_mobileIdentity2 = other_value.mobileIdentity2();
  else field_mobileIdentity2.clean_up();
  if (other_value.p1RestOctets().is_bound()) field_p1RestOctets = other_value.p1RestOctets();
  else field_p1RestOctets.clean_up();
}
return *this;
}

boolean PDU__RRM__PagingReq__Type1__NW__MS::operator==(const PDU__RRM__PagingReq__Type1__NW__MS& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_pageMode==other_value.field_pageMode
  && field_channelNeeded==other_value.field_channelNeeded
  && field_mobileIdentity1==other_value.field_mobileIdentity1
  && field_mobileIdentity2==other_value.field_mobileIdentity2
  && field_p1RestOctets==other_value.field_p1RestOctets;
}

boolean PDU__RRM__PagingReq__Type1__NW__MS::is_bound() const
{
return (field_messageType.is_bound())
  || (field_pageMode.is_bound())
  || (field_channelNeeded.is_bound())
  || (field_mobileIdentity1.is_bound())
  || (OPTIONAL_OMIT == field_mobileIdentity2.get_selection() || field_mobileIdentity2.is_bound())
  || (field_p1RestOctets.is_bound());
}
boolean PDU__RRM__PagingReq__Type1__NW__MS::is_value() const
{
return field_messageType.is_value()
  && field_pageMode.is_value()
  && field_channelNeeded.is_value()
  && field_mobileIdentity1.is_value()
  && (OPTIONAL_OMIT == field_mobileIdentity2.get_selection() || field_mobileIdentity2.is_value())
  && field_p1RestOctets.is_value();
}
int PDU__RRM__PagingReq__Type1__NW__MS::size_of() const
{
  int ret_val = 5;
  if (field_mobileIdentity2.ispresent()) ret_val++;
  return ret_val;
}

void PDU__RRM__PagingReq__Type1__NW__MS::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(", pageMode := ");
field_pageMode.log();
TTCN_Logger::log_event_str(", channelNeeded := ");
field_channelNeeded.log();
TTCN_Logger::log_event_str(", mobileIdentity1 := ");
field_mobileIdentity1.log();
TTCN_Logger::log_event_str(", mobileIdentity2 := ");
field_mobileIdentity2.log();
TTCN_Logger::log_event_str(", p1RestOctets := ");
field_p1RestOctets.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__RRM__PagingReq__Type1__NW__MS::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (pageMode().is_bound()) pageMode().set_implicit_omit();
if (channelNeeded().is_bound()) channelNeeded().set_implicit_omit();
if (mobileIdentity1().is_bound()) mobileIdentity1().set_implicit_omit();
if (!mobileIdentity2().is_bound()) mobileIdentity2() = OMIT_VALUE;
else mobileIdentity2().set_implicit_omit();
if (p1RestOctets().is_bound()) p1RestOctets().set_implicit_omit();
}

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

void PDU__RRM__PagingReq__Type1__NW__MS::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_pageMode.encode_text(text_buf);
field_channelNeeded.encode_text(text_buf);
field_mobileIdentity1.encode_text(text_buf);
field_mobileIdentity2.encode_text(text_buf);
field_p1RestOctets.encode_text(text_buf);
}

void PDU__RRM__PagingReq__Type1__NW__MS::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_pageMode.decode_text(text_buf);
field_channelNeeded.decode_text(text_buf);
field_mobileIdentity1.decode_text(text_buf);
field_mobileIdentity2.decode_text(text_buf);
field_p1RestOctets.decode_text(text_buf);
}

void PDU__RRM__PagingReq__Type1__NW__MS::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 PDU__RRM__PagingReq__Type1__NW__MS::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 PDU__RRM__PagingReq__Type1__NW__MS::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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, PageMode__V_descr_.raw->forceomit);
  decoded_field_length = field_pageMode.RAW_decode(PageMode__V_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, ChannelNeeded__V_descr_.raw->forceomit);
  decoded_field_length = field_channelNeeded.RAW_decode(ChannelNeeded__V_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, MobileL3__CommonIE__Types::MobileIdentityLV_descr_.raw->forceomit);
  decoded_field_length = field_mobileIdentity1.RAW_decode(MobileL3__CommonIE__Types::MobileIdentityLV_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());
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_mobileIdentity2 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, MobileL3__CommonIE__Types::MobileIdentityTLV_descr_.raw->forceomit);
  decoded_field_length = field_mobileIdentity2().RAW_decode(MobileL3__CommonIE__Types::MobileIdentityTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_mobileIdentity2 = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_mobileIdentity2.ispresent() || field_mobileIdentity2().elementIdentifier() !=  bs_5){
  field_mobileIdentity2=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_mobileIdentity2=OMIT_VALUE;
  RAW_Force_Omit field_5_force_omit(5, force_omit, P1RestOctets_descr_.raw->forceomit);
  decoded_field_length = field_p1RestOctets.RAW_decode(P1RestOctets_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());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__RRM__PagingReq__Type1__NW__MS::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 = 6;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(6);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, General__Types::BIT8_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PageMode__V_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, ChannelNeeded__V_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, MobileL3__CommonIE__Types::MobileIdentityLV_descr_.raw);
  if (field_mobileIdentity2.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, MobileL3__CommonIE__Types::MobileIdentityTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, P1RestOctets_descr_.raw);
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_pageMode.RAW_encode(PageMode__V_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_channelNeeded.RAW_encode(ChannelNeeded__V_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_mobileIdentity1.RAW_encode(MobileL3__CommonIE__Types::MobileIdentityLV_descr_, *myleaf.body.node.nodes[3]);
  if (field_mobileIdentity2.ispresent()) {
  encoded_length += field_mobileIdentity2().RAW_encode(MobileL3__CommonIE__Types::MobileIdentityTLV_descr_, *myleaf.body.node.nodes[4]);
  }
  encoded_length += field_p1RestOctets.RAW_encode(P1RestOctets_descr_, *myleaf.body.node.nodes[5]);
  if (field_mobileIdentity2.ispresent() && (!field_mobileIdentity2.ispresent() || field_mobileIdentity2().elementIdentifier() !=  bs_5)) {
  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_5.RAW_encode(General__Types::BIT7_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 PDU__RRM__PagingReq__Type1__NW__MS_template::single_value_struct {
BITSTRING_template field_messageType;
PageMode__V_template field_pageMode;
ChannelNeeded__V_template field_channelNeeded;
MobileL3__CommonIE__Types::MobileIdentityLV_template field_mobileIdentity1;
MobileL3__CommonIE__Types::MobileIdentityTLV_template field_mobileIdentity2;
OCTETSTRING_template field_p1RestOctets;
};

void PDU__RRM__PagingReq__Type1__NW__MS_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_messageType = ANY_VALUE;
single_value->field_pageMode = ANY_VALUE;
single_value->field_channelNeeded = ANY_VALUE;
single_value->field_mobileIdentity1 = ANY_VALUE;
single_value->field_mobileIdentity2 = ANY_OR_OMIT;
single_value->field_p1RestOctets = ANY_VALUE;
}
}
}

void PDU__RRM__PagingReq__Type1__NW__MS_template::copy_value(const PDU__RRM__PagingReq__Type1__NW__MS& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
if (other_value.pageMode().is_bound()) {
  single_value->field_pageMode = other_value.pageMode();
} else {
  single_value->field_pageMode.clean_up();
}
if (other_value.channelNeeded().is_bound()) {
  single_value->field_channelNeeded = other_value.channelNeeded();
} else {
  single_value->field_channelNeeded.clean_up();
}
if (other_value.mobileIdentity1().is_bound()) {
  single_value->field_mobileIdentity1 = other_value.mobileIdentity1();
} else {
  single_value->field_mobileIdentity1.clean_up();
}
if (other_value.mobileIdentity2().is_bound()) {
  if (other_value.mobileIdentity2().ispresent()) single_value->field_mobileIdentity2 = other_value.mobileIdentity2()();
  else single_value->field_mobileIdentity2 = OMIT_VALUE;
} else {
  single_value->field_mobileIdentity2.clean_up();
}
if (other_value.p1RestOctets().is_bound()) {
  single_value->field_p1RestOctets = other_value.p1RestOctets();
} else {
  single_value->field_p1RestOctets.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__PagingReq__Type1__NW__MS_template::copy_template(const PDU__RRM__PagingReq__Type1__NW__MS_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.pageMode().get_selection()) {
single_value->field_pageMode = other_value.pageMode();
} else {
single_value->field_pageMode.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.channelNeeded().get_selection()) {
single_value->field_channelNeeded = other_value.channelNeeded();
} else {
single_value->field_channelNeeded.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mobileIdentity1().get_selection()) {
single_value->field_mobileIdentity1 = other_value.mobileIdentity1();
} else {
single_value->field_mobileIdentity1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mobileIdentity2().get_selection()) {
single_value->field_mobileIdentity2 = other_value.mobileIdentity2();
} else {
single_value->field_mobileIdentity2.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.p1RestOctets().get_selection()) {
single_value->field_p1RestOctets = other_value.p1RestOctets();
} else {
single_value->field_p1RestOctets.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 PDU__RRM__PagingReq__Type1__NW__MS_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 PDU__RRM__PagingReq__Type1__NW__MS_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__PagingReq__Type1__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS.");
break;
}
set_selection(other_value);
}

PDU__RRM__PagingReq__Type1__NW__MS_template::PDU__RRM__PagingReq__Type1__NW__MS_template()
{
}

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

PDU__RRM__PagingReq__Type1__NW__MS_template::PDU__RRM__PagingReq__Type1__NW__MS_template(const PDU__RRM__PagingReq__Type1__NW__MS& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PDU__RRM__PagingReq__Type1__NW__MS_template::match(const PDU__RRM__PagingReq__Type1__NW__MS& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), legacy))return FALSE;
if(!other_value.pageMode().is_bound()) return FALSE;
if(!single_value->field_pageMode.match(other_value.pageMode(), legacy))return FALSE;
if(!other_value.channelNeeded().is_bound()) return FALSE;
if(!single_value->field_channelNeeded.match(other_value.channelNeeded(), legacy))return FALSE;
if(!other_value.mobileIdentity1().is_bound()) return FALSE;
if(!single_value->field_mobileIdentity1.match(other_value.mobileIdentity1(), legacy))return FALSE;
if(!other_value.mobileIdentity2().is_bound()) return FALSE;
if((other_value.mobileIdentity2().ispresent() ? !single_value->field_mobileIdentity2.match((const MobileL3__CommonIE__Types::MobileIdentityTLV&)other_value.mobileIdentity2(), legacy) : !single_value->field_mobileIdentity2.match_omit(legacy)))return FALSE;
if(!other_value.p1RestOctets().is_bound()) return FALSE;
if(!single_value->field_p1RestOctets.match(other_value.p1RestOctets(), 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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS.");
}
return FALSE;
}

boolean PDU__RRM__PagingReq__Type1__NW__MS_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_messageType.is_bound()
 || single_value->field_pageMode.is_bound()
 || single_value->field_channelNeeded.is_bound()
 || single_value->field_mobileIdentity1.is_bound()
 || (single_value->field_mobileIdentity2.is_omit() || single_value->field_mobileIdentity2.is_bound())
 || single_value->field_p1RestOctets.is_bound();
}

boolean PDU__RRM__PagingReq__Type1__NW__MS_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_pageMode.is_value()
 && single_value->field_channelNeeded.is_value()
 && single_value->field_mobileIdentity1.is_value()
 && (single_value->field_mobileIdentity2.is_omit() || single_value->field_mobileIdentity2.is_value())
 && single_value->field_p1RestOctets.is_value();
}

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

PDU__RRM__PagingReq__Type1__NW__MS PDU__RRM__PagingReq__Type1__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS.");
PDU__RRM__PagingReq__Type1__NW__MS ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_pageMode.is_bound()) {
ret_val.pageMode() = single_value->field_pageMode.valueof();
}
if (single_value->field_channelNeeded.is_bound()) {
ret_val.channelNeeded() = single_value->field_channelNeeded.valueof();
}
if (single_value->field_mobileIdentity1.is_bound()) {
ret_val.mobileIdentity1() = single_value->field_mobileIdentity1.valueof();
}
if (single_value->field_mobileIdentity2.is_omit()) ret_val.mobileIdentity2() = OMIT_VALUE;
else if (single_value->field_mobileIdentity2.is_bound()) {
ret_val.mobileIdentity2() = single_value->field_mobileIdentity2.valueof();
}
if (single_value->field_p1RestOctets.is_bound()) {
ret_val.p1RestOctets() = single_value->field_p1RestOctets.valueof();
}
return ret_val;
}

void PDU__RRM__PagingReq__Type1__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__PagingReq__Type1__NW__MS_template[list_length];
}

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

BITSTRING_template& PDU__RRM__PagingReq__Type1__NW__MS_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& PDU__RRM__PagingReq__Type1__NW__MS_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS.");
return single_value->field_messageType;
}

PageMode__V_template& PDU__RRM__PagingReq__Type1__NW__MS_template::pageMode()
{
set_specific();
return single_value->field_pageMode;
}

const PageMode__V_template& PDU__RRM__PagingReq__Type1__NW__MS_template::pageMode() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pageMode of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS.");
return single_value->field_pageMode;
}

ChannelNeeded__V_template& PDU__RRM__PagingReq__Type1__NW__MS_template::channelNeeded()
{
set_specific();
return single_value->field_channelNeeded;
}

const ChannelNeeded__V_template& PDU__RRM__PagingReq__Type1__NW__MS_template::channelNeeded() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field channelNeeded of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS.");
return single_value->field_channelNeeded;
}

MobileL3__CommonIE__Types::MobileIdentityLV_template& PDU__RRM__PagingReq__Type1__NW__MS_template::mobileIdentity1()
{
set_specific();
return single_value->field_mobileIdentity1;
}

const MobileL3__CommonIE__Types::MobileIdentityLV_template& PDU__RRM__PagingReq__Type1__NW__MS_template::mobileIdentity1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mobileIdentity1 of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS.");
return single_value->field_mobileIdentity1;
}

MobileL3__CommonIE__Types::MobileIdentityTLV_template& PDU__RRM__PagingReq__Type1__NW__MS_template::mobileIdentity2()
{
set_specific();
return single_value->field_mobileIdentity2;
}

const MobileL3__CommonIE__Types::MobileIdentityTLV_template& PDU__RRM__PagingReq__Type1__NW__MS_template::mobileIdentity2() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mobileIdentity2 of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS.");
return single_value->field_mobileIdentity2;
}

OCTETSTRING_template& PDU__RRM__PagingReq__Type1__NW__MS_template::p1RestOctets()
{
set_specific();
return single_value->field_p1RestOctets;
}

const OCTETSTRING_template& PDU__RRM__PagingReq__Type1__NW__MS_template::p1RestOctets() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field p1RestOctets of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS.");
return single_value->field_p1RestOctets;
}

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

void PDU__RRM__PagingReq__Type1__NW__MS_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.log();
TTCN_Logger::log_event_str(", pageMode := ");
single_value->field_pageMode.log();
TTCN_Logger::log_event_str(", channelNeeded := ");
single_value->field_channelNeeded.log();
TTCN_Logger::log_event_str(", mobileIdentity1 := ");
single_value->field_mobileIdentity1.log();
TTCN_Logger::log_event_str(", mobileIdentity2 := ");
single_value->field_mobileIdentity2.log();
TTCN_Logger::log_event_str(", p1RestOctets := ");
single_value->field_p1RestOctets.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 PDU__RRM__PagingReq__Type1__NW__MS_template::log_match(const PDU__RRM__PagingReq__Type1__NW__MS& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_pageMode.match(match_value.pageMode(), legacy)){
TTCN_Logger::log_logmatch_info(".pageMode");
single_value->field_pageMode.log_match(match_value.pageMode(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_channelNeeded.match(match_value.channelNeeded(), legacy)){
TTCN_Logger::log_logmatch_info(".channelNeeded");
single_value->field_channelNeeded.log_match(match_value.channelNeeded(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mobileIdentity1.match(match_value.mobileIdentity1(), legacy)){
TTCN_Logger::log_logmatch_info(".mobileIdentity1");
single_value->field_mobileIdentity1.log_match(match_value.mobileIdentity1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.mobileIdentity2().ispresent()){
if(!single_value->field_mobileIdentity2.match(match_value.mobileIdentity2(), legacy)){
TTCN_Logger::log_logmatch_info(".mobileIdentity2");
single_value->field_mobileIdentity2.log_match(match_value.mobileIdentity2(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_mobileIdentity2.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".mobileIdentity2 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_mobileIdentity2.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_p1RestOctets.match(match_value.p1RestOctets(), legacy)){
TTCN_Logger::log_logmatch_info(".p1RestOctets");
single_value->field_p1RestOctets.log_match(match_value.p1RestOctets(), 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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::log_event_str(", pageMode := ");
single_value->field_pageMode.log_match(match_value.pageMode(), legacy);
TTCN_Logger::log_event_str(", channelNeeded := ");
single_value->field_channelNeeded.log_match(match_value.channelNeeded(), legacy);
TTCN_Logger::log_event_str(", mobileIdentity1 := ");
single_value->field_mobileIdentity1.log_match(match_value.mobileIdentity1(), legacy);
TTCN_Logger::log_event_str(", mobileIdentity2 := ");
if (match_value.mobileIdentity2().ispresent()) {
single_value->field_mobileIdentity2.log_match(match_value.mobileIdentity2(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_mobileIdentity2.log();
if (single_value->field_mobileIdentity2.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", p1RestOctets := ");
single_value->field_p1RestOctets.log_match(match_value.p1RestOctets(), 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 PDU__RRM__PagingReq__Type1__NW__MS_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
if (pageMode().is_bound()) pageMode().set_implicit_omit();
if (channelNeeded().is_bound()) channelNeeded().set_implicit_omit();
if (mobileIdentity1().is_bound()) mobileIdentity1().set_implicit_omit();
if (!mobileIdentity2().is_bound()) mobileIdentity2() = OMIT_VALUE;
else mobileIdentity2().set_implicit_omit();
if (p1RestOctets().is_bound()) p1RestOctets().set_implicit_omit();
}

void PDU__RRM__PagingReq__Type1__NW__MS_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.encode_text(text_buf);
single_value->field_pageMode.encode_text(text_buf);
single_value->field_channelNeeded.encode_text(text_buf);
single_value->field_mobileIdentity1.encode_text(text_buf);
single_value->field_mobileIdentity2.encode_text(text_buf);
single_value->field_p1RestOctets.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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS.");
}
}

void PDU__RRM__PagingReq__Type1__NW__MS_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_messageType.decode_text(text_buf);
single_value->field_pageMode.decode_text(text_buf);
single_value->field_channelNeeded.decode_text(text_buf);
single_value->field_mobileIdentity1.decode_text(text_buf);
single_value->field_mobileIdentity2.decode_text(text_buf);
single_value->field_p1RestOctets.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 PDU__RRM__PagingReq__Type1__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS.");
}
}

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

void PDU__RRM__PagingReq__Type1__NW__MS_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS");
single_value->field_pageMode.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS");
single_value->field_channelNeeded.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS");
single_value->field_mobileIdentity1.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS");
single_value->field_mobileIdentity2.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS");
single_value->field_p1RestOctets.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS");
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 : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS");
}

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

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

PDU__RRM__PagingReq__Type2__NW__MS::PDU__RRM__PagingReq__Type2__NW__MS()
{
}

PDU__RRM__PagingReq__Type2__NW__MS::PDU__RRM__PagingReq__Type2__NW__MS(const BITSTRING& par_messageType,
    const PageMode__V& par_pageMode,
    const ChannelNeeded__V& par_channelNeeded,
    const OCTETSTRING& par_mobileIdentity1,
    const OCTETSTRING& par_mobileIdentity2,
    const OPTIONAL< MobileL3__CommonIE__Types::MobileIdentityTLV >& par_mobileIdentity3,
    const OCTETSTRING& par_p2RestOctets)
  :   field_messageType(par_messageType),
  field_pageMode(par_pageMode),
  field_channelNeeded(par_channelNeeded),
  field_mobileIdentity1(par_mobileIdentity1),
  field_mobileIdentity2(par_mobileIdentity2),
  field_mobileIdentity3(par_mobileIdentity3),
  field_p2RestOctets(par_p2RestOctets)
{
}

PDU__RRM__PagingReq__Type2__NW__MS::PDU__RRM__PagingReq__Type2__NW__MS(const PDU__RRM__PagingReq__Type2__NW__MS& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.pageMode().is_bound()) field_pageMode = other_value.pageMode();
else field_pageMode.clean_up();
if (other_value.channelNeeded().is_bound()) field_channelNeeded = other_value.channelNeeded();
else field_channelNeeded.clean_up();
if (other_value.mobileIdentity1().is_bound()) field_mobileIdentity1 = other_value.mobileIdentity1();
else field_mobileIdentity1.clean_up();
if (other_value.mobileIdentity2().is_bound()) field_mobileIdentity2 = other_value.mobileIdentity2();
else field_mobileIdentity2.clean_up();
if (other_value.mobileIdentity3().is_bound()) field_mobileIdentity3 = other_value.mobileIdentity3();
else field_mobileIdentity3.clean_up();
if (other_value.p2RestOctets().is_bound()) field_p2RestOctets = other_value.p2RestOctets();
else field_p2RestOctets.clean_up();
}

void PDU__RRM__PagingReq__Type2__NW__MS::clean_up()
{
field_messageType.clean_up();
field_pageMode.clean_up();
field_channelNeeded.clean_up();
field_mobileIdentity1.clean_up();
field_mobileIdentity2.clean_up();
field_mobileIdentity3.clean_up();
field_p2RestOctets.clean_up();
}

const TTCN_Typedescriptor_t* PDU__RRM__PagingReq__Type2__NW__MS::get_descriptor() const { return &PDU__RRM__PagingReq__Type2__NW__MS_descr_; }
PDU__RRM__PagingReq__Type2__NW__MS& PDU__RRM__PagingReq__Type2__NW__MS::operator=(const PDU__RRM__PagingReq__Type2__NW__MS& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.pageMode().is_bound()) field_pageMode = other_value.pageMode();
  else field_pageMode.clean_up();
  if (other_value.channelNeeded().is_bound()) field_channelNeeded = other_value.channelNeeded();
  else field_channelNeeded.clean_up();
  if (other_value.mobileIdentity1().is_bound()) field_mobileIdentity1 = other_value.mobileIdentity1();
  else field_mobileIdentity1.clean_up();
  if (other_value.mobileIdentity2().is_bound()) field_mobileIdentity2 = other_value.mobileIdentity2();
  else field_mobileIdentity2.clean_up();
  if (other_value.mobileIdentity3().is_bound()) field_mobileIdentity3 = other_value.mobileIdentity3();
  else field_mobileIdentity3.clean_up();
  if (other_value.p2RestOctets().is_bound()) field_p2RestOctets = other_value.p2RestOctets();
  else field_p2RestOctets.clean_up();
}
return *this;
}

boolean PDU__RRM__PagingReq__Type2__NW__MS::operator==(const PDU__RRM__PagingReq__Type2__NW__MS& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_pageMode==other_value.field_pageMode
  && field_channelNeeded==other_value.field_channelNeeded
  && field_mobileIdentity1==other_value.field_mobileIdentity1
  && field_mobileIdentity2==other_value.field_mobileIdentity2
  && field_mobileIdentity3==other_value.field_mobileIdentity3
  && field_p2RestOctets==other_value.field_p2RestOctets;
}

boolean PDU__RRM__PagingReq__Type2__NW__MS::is_bound() const
{
return (field_messageType.is_bound())
  || (field_pageMode.is_bound())
  || (field_channelNeeded.is_bound())
  || (field_mobileIdentity1.is_bound())
  || (field_mobileIdentity2.is_bound())
  || (OPTIONAL_OMIT == field_mobileIdentity3.get_selection() || field_mobileIdentity3.is_bound())
  || (field_p2RestOctets.is_bound());
}
boolean PDU__RRM__PagingReq__Type2__NW__MS::is_value() const
{
return field_messageType.is_value()
  && field_pageMode.is_value()
  && field_channelNeeded.is_value()
  && field_mobileIdentity1.is_value()
  && field_mobileIdentity2.is_value()
  && (OPTIONAL_OMIT == field_mobileIdentity3.get_selection() || field_mobileIdentity3.is_value())
  && field_p2RestOctets.is_value();
}
int PDU__RRM__PagingReq__Type2__NW__MS::size_of() const
{
  int ret_val = 6;
  if (field_mobileIdentity3.ispresent()) ret_val++;
  return ret_val;
}

void PDU__RRM__PagingReq__Type2__NW__MS::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(", pageMode := ");
field_pageMode.log();
TTCN_Logger::log_event_str(", channelNeeded := ");
field_channelNeeded.log();
TTCN_Logger::log_event_str(", mobileIdentity1 := ");
field_mobileIdentity1.log();
TTCN_Logger::log_event_str(", mobileIdentity2 := ");
field_mobileIdentity2.log();
TTCN_Logger::log_event_str(", mobileIdentity3 := ");
field_mobileIdentity3.log();
TTCN_Logger::log_event_str(", p2RestOctets := ");
field_p2RestOctets.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__RRM__PagingReq__Type2__NW__MS::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (pageMode().is_bound()) pageMode().set_implicit_omit();
if (channelNeeded().is_bound()) channelNeeded().set_implicit_omit();
if (mobileIdentity1().is_bound()) mobileIdentity1().set_implicit_omit();
if (mobileIdentity2().is_bound()) mobileIdentity2().set_implicit_omit();
if (!mobileIdentity3().is_bound()) mobileIdentity3() = OMIT_VALUE;
else mobileIdentity3().set_implicit_omit();
if (p2RestOctets().is_bound()) p2RestOctets().set_implicit_omit();
}

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

void PDU__RRM__PagingReq__Type2__NW__MS::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_pageMode.encode_text(text_buf);
field_channelNeeded.encode_text(text_buf);
field_mobileIdentity1.encode_text(text_buf);
field_mobileIdentity2.encode_text(text_buf);
field_mobileIdentity3.encode_text(text_buf);
field_p2RestOctets.encode_text(text_buf);
}

void PDU__RRM__PagingReq__Type2__NW__MS::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_pageMode.decode_text(text_buf);
field_channelNeeded.decode_text(text_buf);
field_mobileIdentity1.decode_text(text_buf);
field_mobileIdentity2.decode_text(text_buf);
field_mobileIdentity3.decode_text(text_buf);
field_p2RestOctets.decode_text(text_buf);
}

void PDU__RRM__PagingReq__Type2__NW__MS::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 PDU__RRM__PagingReq__Type2__NW__MS::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 PDU__RRM__PagingReq__Type2__NW__MS::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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, PageMode__V_descr_.raw->forceomit);
  decoded_field_length = field_pageMode.RAW_decode(PageMode__V_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, ChannelNeeded__V_descr_.raw->forceomit);
  decoded_field_length = field_channelNeeded.RAW_decode(ChannelNeeded__V_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, TMSIP__TMSI__V_descr_.raw->forceomit);
  decoded_field_length = field_mobileIdentity1.RAW_decode(TMSIP__TMSI__V_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, TMSIP__TMSI__V_descr_.raw->forceomit);
  decoded_field_length = field_mobileIdentity2.RAW_decode(TMSIP__TMSI__V_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){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_mobileIdentity3 = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, MobileL3__CommonIE__Types::MobileIdentityTLV_descr_.raw->forceomit);
  decoded_field_length = field_mobileIdentity3().RAW_decode(MobileL3__CommonIE__Types::MobileIdentityTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_mobileIdentity3 = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_mobileIdentity3.ispresent() || field_mobileIdentity3().elementIdentifier() !=  bs_5){
  field_mobileIdentity3=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_mobileIdentity3=OMIT_VALUE;
  RAW_Force_Omit field_6_force_omit(6, force_omit, P2RestOctets_descr_.raw->forceomit);
  decoded_field_length = field_p2RestOctets.RAW_decode(P2RestOctets_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());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__RRM__PagingReq__Type2__NW__MS::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 = 7;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(7);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, General__Types::BIT8_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PageMode__V_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, ChannelNeeded__V_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, TMSIP__TMSI__V_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, TMSIP__TMSI__V_descr_.raw);
  if (field_mobileIdentity3.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, MobileL3__CommonIE__Types::MobileIdentityTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, P2RestOctets_descr_.raw);
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_pageMode.RAW_encode(PageMode__V_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_channelNeeded.RAW_encode(ChannelNeeded__V_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_mobileIdentity1.RAW_encode(TMSIP__TMSI__V_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_mobileIdentity2.RAW_encode(TMSIP__TMSI__V_descr_, *myleaf.body.node.nodes[4]);
  if (field_mobileIdentity3.ispresent()) {
  encoded_length += field_mobileIdentity3().RAW_encode(MobileL3__CommonIE__Types::MobileIdentityTLV_descr_, *myleaf.body.node.nodes[5]);
  }
  encoded_length += field_p2RestOctets.RAW_encode(P2RestOctets_descr_, *myleaf.body.node.nodes[6]);
  if (field_mobileIdentity3.ispresent() && (!field_mobileIdentity3.ispresent() || field_mobileIdentity3().elementIdentifier() !=  bs_5)) {
  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_5.RAW_encode(General__Types::BIT7_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 PDU__RRM__PagingReq__Type2__NW__MS_template::single_value_struct {
BITSTRING_template field_messageType;
PageMode__V_template field_pageMode;
ChannelNeeded__V_template field_channelNeeded;
OCTETSTRING_template field_mobileIdentity1;
OCTETSTRING_template field_mobileIdentity2;
MobileL3__CommonIE__Types::MobileIdentityTLV_template field_mobileIdentity3;
OCTETSTRING_template field_p2RestOctets;
};

void PDU__RRM__PagingReq__Type2__NW__MS_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_messageType = ANY_VALUE;
single_value->field_pageMode = ANY_VALUE;
single_value->field_channelNeeded = ANY_VALUE;
single_value->field_mobileIdentity1 = ANY_VALUE;
single_value->field_mobileIdentity2 = ANY_VALUE;
single_value->field_mobileIdentity3 = ANY_OR_OMIT;
single_value->field_p2RestOctets = ANY_VALUE;
}
}
}

void PDU__RRM__PagingReq__Type2__NW__MS_template::copy_value(const PDU__RRM__PagingReq__Type2__NW__MS& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
if (other_value.pageMode().is_bound()) {
  single_value->field_pageMode = other_value.pageMode();
} else {
  single_value->field_pageMode.clean_up();
}
if (other_value.channelNeeded().is_bound()) {
  single_value->field_channelNeeded = other_value.channelNeeded();
} else {
  single_value->field_channelNeeded.clean_up();
}
if (other_value.mobileIdentity1().is_bound()) {
  single_value->field_mobileIdentity1 = other_value.mobileIdentity1();
} else {
  single_value->field_mobileIdentity1.clean_up();
}
if (other_value.mobileIdentity2().is_bound()) {
  single_value->field_mobileIdentity2 = other_value.mobileIdentity2();
} else {
  single_value->field_mobileIdentity2.clean_up();
}
if (other_value.mobileIdentity3().is_bound()) {
  if (other_value.mobileIdentity3().ispresent()) single_value->field_mobileIdentity3 = other_value.mobileIdentity3()();
  else single_value->field_mobileIdentity3 = OMIT_VALUE;
} else {
  single_value->field_mobileIdentity3.clean_up();
}
if (other_value.p2RestOctets().is_bound()) {
  single_value->field_p2RestOctets = other_value.p2RestOctets();
} else {
  single_value->field_p2RestOctets.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__PagingReq__Type2__NW__MS_template::copy_template(const PDU__RRM__PagingReq__Type2__NW__MS_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.pageMode().get_selection()) {
single_value->field_pageMode = other_value.pageMode();
} else {
single_value->field_pageMode.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.channelNeeded().get_selection()) {
single_value->field_channelNeeded = other_value.channelNeeded();
} else {
single_value->field_channelNeeded.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mobileIdentity1().get_selection()) {
single_value->field_mobileIdentity1 = other_value.mobileIdentity1();
} else {
single_value->field_mobileIdentity1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mobileIdentity2().get_selection()) {
single_value->field_mobileIdentity2 = other_value.mobileIdentity2();
} else {
single_value->field_mobileIdentity2.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mobileIdentity3().get_selection()) {
single_value->field_mobileIdentity3 = other_value.mobileIdentity3();
} else {
single_value->field_mobileIdentity3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.p2RestOctets().get_selection()) {
single_value->field_p2RestOctets = other_value.p2RestOctets();
} else {
single_value->field_p2RestOctets.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 PDU__RRM__PagingReq__Type2__NW__MS_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 PDU__RRM__PagingReq__Type2__NW__MS_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__PagingReq__Type2__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS.");
break;
}
set_selection(other_value);
}

PDU__RRM__PagingReq__Type2__NW__MS_template::PDU__RRM__PagingReq__Type2__NW__MS_template()
{
}

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

PDU__RRM__PagingReq__Type2__NW__MS_template::PDU__RRM__PagingReq__Type2__NW__MS_template(const PDU__RRM__PagingReq__Type2__NW__MS& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PDU__RRM__PagingReq__Type2__NW__MS_template::match(const PDU__RRM__PagingReq__Type2__NW__MS& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), legacy))return FALSE;
if(!other_value.pageMode().is_bound()) return FALSE;
if(!single_value->field_pageMode.match(other_value.pageMode(), legacy))return FALSE;
if(!other_value.channelNeeded().is_bound()) return FALSE;
if(!single_value->field_channelNeeded.match(other_value.channelNeeded(), legacy))return FALSE;
if(!other_value.mobileIdentity1().is_bound()) return FALSE;
if(!single_value->field_mobileIdentity1.match(other_value.mobileIdentity1(), legacy))return FALSE;
if(!other_value.mobileIdentity2().is_bound()) return FALSE;
if(!single_value->field_mobileIdentity2.match(other_value.mobileIdentity2(), legacy))return FALSE;
if(!other_value.mobileIdentity3().is_bound()) return FALSE;
if((other_value.mobileIdentity3().ispresent() ? !single_value->field_mobileIdentity3.match((const MobileL3__CommonIE__Types::MobileIdentityTLV&)other_value.mobileIdentity3(), legacy) : !single_value->field_mobileIdentity3.match_omit(legacy)))return FALSE;
if(!other_value.p2RestOctets().is_bound()) return FALSE;
if(!single_value->field_p2RestOctets.match(other_value.p2RestOctets(), 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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS.");
}
return FALSE;
}

boolean PDU__RRM__PagingReq__Type2__NW__MS_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_messageType.is_bound()
 || single_value->field_pageMode.is_bound()
 || single_value->field_channelNeeded.is_bound()
 || single_value->field_mobileIdentity1.is_bound()
 || single_value->field_mobileIdentity2.is_bound()
 || (single_value->field_mobileIdentity3.is_omit() || single_value->field_mobileIdentity3.is_bound())
 || single_value->field_p2RestOctets.is_bound();
}

boolean PDU__RRM__PagingReq__Type2__NW__MS_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_pageMode.is_value()
 && single_value->field_channelNeeded.is_value()
 && single_value->field_mobileIdentity1.is_value()
 && single_value->field_mobileIdentity2.is_value()
 && (single_value->field_mobileIdentity3.is_omit() || single_value->field_mobileIdentity3.is_value())
 && single_value->field_p2RestOctets.is_value();
}

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

PDU__RRM__PagingReq__Type2__NW__MS PDU__RRM__PagingReq__Type2__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS.");
PDU__RRM__PagingReq__Type2__NW__MS ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_pageMode.is_bound()) {
ret_val.pageMode() = single_value->field_pageMode.valueof();
}
if (single_value->field_channelNeeded.is_bound()) {
ret_val.channelNeeded() = single_value->field_channelNeeded.valueof();
}
if (single_value->field_mobileIdentity1.is_bound()) {
ret_val.mobileIdentity1() = single_value->field_mobileIdentity1.valueof();
}
if (single_value->field_mobileIdentity2.is_bound()) {
ret_val.mobileIdentity2() = single_value->field_mobileIdentity2.valueof();
}
if (single_value->field_mobileIdentity3.is_omit()) ret_val.mobileIdentity3() = OMIT_VALUE;
else if (single_value->field_mobileIdentity3.is_bound()) {
ret_val.mobileIdentity3() = single_value->field_mobileIdentity3.valueof();
}
if (single_value->field_p2RestOctets.is_bound()) {
ret_val.p2RestOctets() = single_value->field_p2RestOctets.valueof();
}
return ret_val;
}

void PDU__RRM__PagingReq__Type2__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__PagingReq__Type2__NW__MS_template[list_length];
}

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

BITSTRING_template& PDU__RRM__PagingReq__Type2__NW__MS_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& PDU__RRM__PagingReq__Type2__NW__MS_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS.");
return single_value->field_messageType;
}

PageMode__V_template& PDU__RRM__PagingReq__Type2__NW__MS_template::pageMode()
{
set_specific();
return single_value->field_pageMode;
}

const PageMode__V_template& PDU__RRM__PagingReq__Type2__NW__MS_template::pageMode() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pageMode of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS.");
return single_value->field_pageMode;
}

ChannelNeeded__V_template& PDU__RRM__PagingReq__Type2__NW__MS_template::channelNeeded()
{
set_specific();
return single_value->field_channelNeeded;
}

const ChannelNeeded__V_template& PDU__RRM__PagingReq__Type2__NW__MS_template::channelNeeded() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field channelNeeded of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS.");
return single_value->field_channelNeeded;
}

OCTETSTRING_template& PDU__RRM__PagingReq__Type2__NW__MS_template::mobileIdentity1()
{
set_specific();
return single_value->field_mobileIdentity1;
}

const OCTETSTRING_template& PDU__RRM__PagingReq__Type2__NW__MS_template::mobileIdentity1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mobileIdentity1 of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS.");
return single_value->field_mobileIdentity1;
}

OCTETSTRING_template& PDU__RRM__PagingReq__Type2__NW__MS_template::mobileIdentity2()
{
set_specific();
return single_value->field_mobileIdentity2;
}

const OCTETSTRING_template& PDU__RRM__PagingReq__Type2__NW__MS_template::mobileIdentity2() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mobileIdentity2 of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS.");
return single_value->field_mobileIdentity2;
}

MobileL3__CommonIE__Types::MobileIdentityTLV_template& PDU__RRM__PagingReq__Type2__NW__MS_template::mobileIdentity3()
{
set_specific();
return single_value->field_mobileIdentity3;
}

const MobileL3__CommonIE__Types::MobileIdentityTLV_template& PDU__RRM__PagingReq__Type2__NW__MS_template::mobileIdentity3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mobileIdentity3 of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS.");
return single_value->field_mobileIdentity3;
}

OCTETSTRING_template& PDU__RRM__PagingReq__Type2__NW__MS_template::p2RestOctets()
{
set_specific();
return single_value->field_p2RestOctets;
}

const OCTETSTRING_template& PDU__RRM__PagingReq__Type2__NW__MS_template::p2RestOctets() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field p2RestOctets of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS.");
return single_value->field_p2RestOctets;
}

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

void PDU__RRM__PagingReq__Type2__NW__MS_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.log();
TTCN_Logger::log_event_str(", pageMode := ");
single_value->field_pageMode.log();
TTCN_Logger::log_event_str(", channelNeeded := ");
single_value->field_channelNeeded.log();
TTCN_Logger::log_event_str(", mobileIdentity1 := ");
single_value->field_mobileIdentity1.log();
TTCN_Logger::log_event_str(", mobileIdentity2 := ");
single_value->field_mobileIdentity2.log();
TTCN_Logger::log_event_str(", mobileIdentity3 := ");
single_value->field_mobileIdentity3.log();
TTCN_Logger::log_event_str(", p2RestOctets := ");
single_value->field_p2RestOctets.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 PDU__RRM__PagingReq__Type2__NW__MS_template::log_match(const PDU__RRM__PagingReq__Type2__NW__MS& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_pageMode.match(match_value.pageMode(), legacy)){
TTCN_Logger::log_logmatch_info(".pageMode");
single_value->field_pageMode.log_match(match_value.pageMode(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_channelNeeded.match(match_value.channelNeeded(), legacy)){
TTCN_Logger::log_logmatch_info(".channelNeeded");
single_value->field_channelNeeded.log_match(match_value.channelNeeded(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mobileIdentity1.match(match_value.mobileIdentity1(), legacy)){
TTCN_Logger::log_logmatch_info(".mobileIdentity1");
single_value->field_mobileIdentity1.log_match(match_value.mobileIdentity1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mobileIdentity2.match(match_value.mobileIdentity2(), legacy)){
TTCN_Logger::log_logmatch_info(".mobileIdentity2");
single_value->field_mobileIdentity2.log_match(match_value.mobileIdentity2(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.mobileIdentity3().ispresent()){
if(!single_value->field_mobileIdentity3.match(match_value.mobileIdentity3(), legacy)){
TTCN_Logger::log_logmatch_info(".mobileIdentity3");
single_value->field_mobileIdentity3.log_match(match_value.mobileIdentity3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_mobileIdentity3.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".mobileIdentity3 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_mobileIdentity3.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if(!single_value->field_p2RestOctets.match(match_value.p2RestOctets(), legacy)){
TTCN_Logger::log_logmatch_info(".p2RestOctets");
single_value->field_p2RestOctets.log_match(match_value.p2RestOctets(), 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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::log_event_str(", pageMode := ");
single_value->field_pageMode.log_match(match_value.pageMode(), legacy);
TTCN_Logger::log_event_str(", channelNeeded := ");
single_value->field_channelNeeded.log_match(match_value.channelNeeded(), legacy);
TTCN_Logger::log_event_str(", mobileIdentity1 := ");
single_value->field_mobileIdentity1.log_match(match_value.mobileIdentity1(), legacy);
TTCN_Logger::log_event_str(", mobileIdentity2 := ");
single_value->field_mobileIdentity2.log_match(match_value.mobileIdentity2(), legacy);
TTCN_Logger::log_event_str(", mobileIdentity3 := ");
if (match_value.mobileIdentity3().ispresent()) {
single_value->field_mobileIdentity3.log_match(match_value.mobileIdentity3(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_mobileIdentity3.log();
if (single_value->field_mobileIdentity3.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", p2RestOctets := ");
single_value->field_p2RestOctets.log_match(match_value.p2RestOctets(), 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 PDU__RRM__PagingReq__Type2__NW__MS_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
if (pageMode().is_bound()) pageMode().set_implicit_omit();
if (channelNeeded().is_bound()) channelNeeded().set_implicit_omit();
if (mobileIdentity1().is_bound()) mobileIdentity1().set_implicit_omit();
if (mobileIdentity2().is_bound()) mobileIdentity2().set_implicit_omit();
if (!mobileIdentity3().is_bound()) mobileIdentity3() = OMIT_VALUE;
else mobileIdentity3().set_implicit_omit();
if (p2RestOctets().is_bound()) p2RestOctets().set_implicit_omit();
}

void PDU__RRM__PagingReq__Type2__NW__MS_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.encode_text(text_buf);
single_value->field_pageMode.encode_text(text_buf);
single_value->field_channelNeeded.encode_text(text_buf);
single_value->field_mobileIdentity1.encode_text(text_buf);
single_value->field_mobileIdentity2.encode_text(text_buf);
single_value->field_mobileIdentity3.encode_text(text_buf);
single_value->field_p2RestOctets.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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS.");
}
}

void PDU__RRM__PagingReq__Type2__NW__MS_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_messageType.decode_text(text_buf);
single_value->field_pageMode.decode_text(text_buf);
single_value->field_channelNeeded.decode_text(text_buf);
single_value->field_mobileIdentity1.decode_text(text_buf);
single_value->field_mobileIdentity2.decode_text(text_buf);
single_value->field_mobileIdentity3.decode_text(text_buf);
single_value->field_p2RestOctets.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 PDU__RRM__PagingReq__Type2__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS.");
}
}

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

void PDU__RRM__PagingReq__Type2__NW__MS_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS");
single_value->field_pageMode.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS");
single_value->field_channelNeeded.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS");
single_value->field_mobileIdentity1.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS");
single_value->field_mobileIdentity2.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS");
single_value->field_mobileIdentity3.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS");
single_value->field_p2RestOctets.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS");
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 : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS");
}

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

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

PDU__RRM__PagingReq__Type3__NW__MS::PDU__RRM__PagingReq__Type3__NW__MS()
{
}

PDU__RRM__PagingReq__Type3__NW__MS::PDU__RRM__PagingReq__Type3__NW__MS(const BITSTRING& par_messageType,
    const PageMode__V& par_pageMode,
    const ChannelNeeded__V& par_channelNeeded,
    const OCTETSTRING& par_mobileIdentity1,
    const OCTETSTRING& par_mobileIdentity2,
    const OCTETSTRING& par_mobileIdentity3,
    const OCTETSTRING& par_mobileIdentity4,
    const OCTETSTRING& par_p3RestOctets)
  :   field_messageType(par_messageType),
  field_pageMode(par_pageMode),
  field_channelNeeded(par_channelNeeded),
  field_mobileIdentity1(par_mobileIdentity1),
  field_mobileIdentity2(par_mobileIdentity2),
  field_mobileIdentity3(par_mobileIdentity3),
  field_mobileIdentity4(par_mobileIdentity4),
  field_p3RestOctets(par_p3RestOctets)
{
}

PDU__RRM__PagingReq__Type3__NW__MS::PDU__RRM__PagingReq__Type3__NW__MS(const PDU__RRM__PagingReq__Type3__NW__MS& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.pageMode().is_bound()) field_pageMode = other_value.pageMode();
else field_pageMode.clean_up();
if (other_value.channelNeeded().is_bound()) field_channelNeeded = other_value.channelNeeded();
else field_channelNeeded.clean_up();
if (other_value.mobileIdentity1().is_bound()) field_mobileIdentity1 = other_value.mobileIdentity1();
else field_mobileIdentity1.clean_up();
if (other_value.mobileIdentity2().is_bound()) field_mobileIdentity2 = other_value.mobileIdentity2();
else field_mobileIdentity2.clean_up();
if (other_value.mobileIdentity3().is_bound()) field_mobileIdentity3 = other_value.mobileIdentity3();
else field_mobileIdentity3.clean_up();
if (other_value.mobileIdentity4().is_bound()) field_mobileIdentity4 = other_value.mobileIdentity4();
else field_mobileIdentity4.clean_up();
if (other_value.p3RestOctets().is_bound()) field_p3RestOctets = other_value.p3RestOctets();
else field_p3RestOctets.clean_up();
}

void PDU__RRM__PagingReq__Type3__NW__MS::clean_up()
{
field_messageType.clean_up();
field_pageMode.clean_up();
field_channelNeeded.clean_up();
field_mobileIdentity1.clean_up();
field_mobileIdentity2.clean_up();
field_mobileIdentity3.clean_up();
field_mobileIdentity4.clean_up();
field_p3RestOctets.clean_up();
}

const TTCN_Typedescriptor_t* PDU__RRM__PagingReq__Type3__NW__MS::get_descriptor() const { return &PDU__RRM__PagingReq__Type3__NW__MS_descr_; }
PDU__RRM__PagingReq__Type3__NW__MS& PDU__RRM__PagingReq__Type3__NW__MS::operator=(const PDU__RRM__PagingReq__Type3__NW__MS& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.pageMode().is_bound()) field_pageMode = other_value.pageMode();
  else field_pageMode.clean_up();
  if (other_value.channelNeeded().is_bound()) field_channelNeeded = other_value.channelNeeded();
  else field_channelNeeded.clean_up();
  if (other_value.mobileIdentity1().is_bound()) field_mobileIdentity1 = other_value.mobileIdentity1();
  else field_mobileIdentity1.clean_up();
  if (other_value.mobileIdentity2().is_bound()) field_mobileIdentity2 = other_value.mobileIdentity2();
  else field_mobileIdentity2.clean_up();
  if (other_value.mobileIdentity3().is_bound()) field_mobileIdentity3 = other_value.mobileIdentity3();
  else field_mobileIdentity3.clean_up();
  if (other_value.mobileIdentity4().is_bound()) field_mobileIdentity4 = other_value.mobileIdentity4();
  else field_mobileIdentity4.clean_up();
  if (other_value.p3RestOctets().is_bound()) field_p3RestOctets = other_value.p3RestOctets();
  else field_p3RestOctets.clean_up();
}
return *this;
}

boolean PDU__RRM__PagingReq__Type3__NW__MS::operator==(const PDU__RRM__PagingReq__Type3__NW__MS& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_pageMode==other_value.field_pageMode
  && field_channelNeeded==other_value.field_channelNeeded
  && field_mobileIdentity1==other_value.field_mobileIdentity1
  && field_mobileIdentity2==other_value.field_mobileIdentity2
  && field_mobileIdentity3==other_value.field_mobileIdentity3
  && field_mobileIdentity4==other_value.field_mobileIdentity4
  && field_p3RestOctets==other_value.field_p3RestOctets;
}

boolean PDU__RRM__PagingReq__Type3__NW__MS::is_bound() const
{
return (field_messageType.is_bound())
  || (field_pageMode.is_bound())
  || (field_channelNeeded.is_bound())
  || (field_mobileIdentity1.is_bound())
  || (field_mobileIdentity2.is_bound())
  || (field_mobileIdentity3.is_bound())
  || (field_mobileIdentity4.is_bound())
  || (field_p3RestOctets.is_bound());
}
boolean PDU__RRM__PagingReq__Type3__NW__MS::is_value() const
{
return field_messageType.is_value()
  && field_pageMode.is_value()
  && field_channelNeeded.is_value()
  && field_mobileIdentity1.is_value()
  && field_mobileIdentity2.is_value()
  && field_mobileIdentity3.is_value()
  && field_mobileIdentity4.is_value()
  && field_p3RestOctets.is_value();
}
void PDU__RRM__PagingReq__Type3__NW__MS::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(", pageMode := ");
field_pageMode.log();
TTCN_Logger::log_event_str(", channelNeeded := ");
field_channelNeeded.log();
TTCN_Logger::log_event_str(", mobileIdentity1 := ");
field_mobileIdentity1.log();
TTCN_Logger::log_event_str(", mobileIdentity2 := ");
field_mobileIdentity2.log();
TTCN_Logger::log_event_str(", mobileIdentity3 := ");
field_mobileIdentity3.log();
TTCN_Logger::log_event_str(", mobileIdentity4 := ");
field_mobileIdentity4.log();
TTCN_Logger::log_event_str(", p3RestOctets := ");
field_p3RestOctets.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__RRM__PagingReq__Type3__NW__MS::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (pageMode().is_bound()) pageMode().set_implicit_omit();
if (channelNeeded().is_bound()) channelNeeded().set_implicit_omit();
if (mobileIdentity1().is_bound()) mobileIdentity1().set_implicit_omit();
if (mobileIdentity2().is_bound()) mobileIdentity2().set_implicit_omit();
if (mobileIdentity3().is_bound()) mobileIdentity3().set_implicit_omit();
if (mobileIdentity4().is_bound()) mobileIdentity4().set_implicit_omit();
if (p3RestOctets().is_bound()) p3RestOctets().set_implicit_omit();
}

void PDU__RRM__PagingReq__Type3__NW__MS::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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS 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) messageType().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) pageMode().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) channelNeeded().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) mobileIdentity1().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) mobileIdentity2().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) mobileIdentity3().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) mobileIdentity4().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) p3RestOctets().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(), "messageType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          messageType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "pageMode")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pageMode().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "channelNeeded")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          channelNeeded().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mobileIdentity1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mobileIdentity1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mobileIdentity2")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mobileIdentity2().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mobileIdentity3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mobileIdentity3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mobileIdentity4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mobileIdentity4().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "p3RestOctets")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          p3RestOctets().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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS");
  }
}

void PDU__RRM__PagingReq__Type3__NW__MS::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_pageMode.encode_text(text_buf);
field_channelNeeded.encode_text(text_buf);
field_mobileIdentity1.encode_text(text_buf);
field_mobileIdentity2.encode_text(text_buf);
field_mobileIdentity3.encode_text(text_buf);
field_mobileIdentity4.encode_text(text_buf);
field_p3RestOctets.encode_text(text_buf);
}

void PDU__RRM__PagingReq__Type3__NW__MS::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_pageMode.decode_text(text_buf);
field_channelNeeded.decode_text(text_buf);
field_mobileIdentity1.decode_text(text_buf);
field_mobileIdentity2.decode_text(text_buf);
field_mobileIdentity3.decode_text(text_buf);
field_mobileIdentity4.decode_text(text_buf);
field_p3RestOctets.decode_text(text_buf);
}

void PDU__RRM__PagingReq__Type3__NW__MS::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 PDU__RRM__PagingReq__Type3__NW__MS::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 PDU__RRM__PagingReq__Type3__NW__MS::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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, PageMode__V_descr_.raw->forceomit);
  decoded_field_length = field_pageMode.RAW_decode(PageMode__V_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, ChannelNeeded__V_descr_.raw->forceomit);
  decoded_field_length = field_channelNeeded.RAW_decode(ChannelNeeded__V_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, TMSIP__TMSI__V_descr_.raw->forceomit);
  decoded_field_length = field_mobileIdentity1.RAW_decode(TMSIP__TMSI__V_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, TMSIP__TMSI__V_descr_.raw->forceomit);
  decoded_field_length = field_mobileIdentity2.RAW_decode(TMSIP__TMSI__V_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, TMSIP__TMSI__V_descr_.raw->forceomit);
  decoded_field_length = field_mobileIdentity3.RAW_decode(TMSIP__TMSI__V_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, TMSIP__TMSI__V_descr_.raw->forceomit);
  decoded_field_length = field_mobileIdentity4.RAW_decode(TMSIP__TMSI__V_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, P3RestOctets_descr_.raw->forceomit);
  decoded_field_length = field_p3RestOctets.RAW_decode(P3RestOctets_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());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__RRM__PagingReq__Type3__NW__MS::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, General__Types::BIT8_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PageMode__V_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, ChannelNeeded__V_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, TMSIP__TMSI__V_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, TMSIP__TMSI__V_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, TMSIP__TMSI__V_descr_.raw);
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, TMSIP__TMSI__V_descr_.raw);
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, P3RestOctets_descr_.raw);
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_pageMode.RAW_encode(PageMode__V_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_channelNeeded.RAW_encode(ChannelNeeded__V_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_mobileIdentity1.RAW_encode(TMSIP__TMSI__V_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_mobileIdentity2.RAW_encode(TMSIP__TMSI__V_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_mobileIdentity3.RAW_encode(TMSIP__TMSI__V_descr_, *myleaf.body.node.nodes[5]);
  encoded_length += field_mobileIdentity4.RAW_encode(TMSIP__TMSI__V_descr_, *myleaf.body.node.nodes[6]);
  encoded_length += field_p3RestOctets.RAW_encode(P3RestOctets_descr_, *myleaf.body.node.nodes[7]);
  return myleaf.length = encoded_length;
}

struct PDU__RRM__PagingReq__Type3__NW__MS_template::single_value_struct {
BITSTRING_template field_messageType;
PageMode__V_template field_pageMode;
ChannelNeeded__V_template field_channelNeeded;
OCTETSTRING_template field_mobileIdentity1;
OCTETSTRING_template field_mobileIdentity2;
OCTETSTRING_template field_mobileIdentity3;
OCTETSTRING_template field_mobileIdentity4;
OCTETSTRING_template field_p3RestOctets;
};

void PDU__RRM__PagingReq__Type3__NW__MS_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_messageType = ANY_VALUE;
single_value->field_pageMode = ANY_VALUE;
single_value->field_channelNeeded = ANY_VALUE;
single_value->field_mobileIdentity1 = ANY_VALUE;
single_value->field_mobileIdentity2 = ANY_VALUE;
single_value->field_mobileIdentity3 = ANY_VALUE;
single_value->field_mobileIdentity4 = ANY_VALUE;
single_value->field_p3RestOctets = ANY_VALUE;
}
}
}

void PDU__RRM__PagingReq__Type3__NW__MS_template::copy_value(const PDU__RRM__PagingReq__Type3__NW__MS& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
if (other_value.pageMode().is_bound()) {
  single_value->field_pageMode = other_value.pageMode();
} else {
  single_value->field_pageMode.clean_up();
}
if (other_value.channelNeeded().is_bound()) {
  single_value->field_channelNeeded = other_value.channelNeeded();
} else {
  single_value->field_channelNeeded.clean_up();
}
if (other_value.mobileIdentity1().is_bound()) {
  single_value->field_mobileIdentity1 = other_value.mobileIdentity1();
} else {
  single_value->field_mobileIdentity1.clean_up();
}
if (other_value.mobileIdentity2().is_bound()) {
  single_value->field_mobileIdentity2 = other_value.mobileIdentity2();
} else {
  single_value->field_mobileIdentity2.clean_up();
}
if (other_value.mobileIdentity3().is_bound()) {
  single_value->field_mobileIdentity3 = other_value.mobileIdentity3();
} else {
  single_value->field_mobileIdentity3.clean_up();
}
if (other_value.mobileIdentity4().is_bound()) {
  single_value->field_mobileIdentity4 = other_value.mobileIdentity4();
} else {
  single_value->field_mobileIdentity4.clean_up();
}
if (other_value.p3RestOctets().is_bound()) {
  single_value->field_p3RestOctets = other_value.p3RestOctets();
} else {
  single_value->field_p3RestOctets.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__PagingReq__Type3__NW__MS_template::copy_template(const PDU__RRM__PagingReq__Type3__NW__MS_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.pageMode().get_selection()) {
single_value->field_pageMode = other_value.pageMode();
} else {
single_value->field_pageMode.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.channelNeeded().get_selection()) {
single_value->field_channelNeeded = other_value.channelNeeded();
} else {
single_value->field_channelNeeded.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mobileIdentity1().get_selection()) {
single_value->field_mobileIdentity1 = other_value.mobileIdentity1();
} else {
single_value->field_mobileIdentity1.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mobileIdentity2().get_selection()) {
single_value->field_mobileIdentity2 = other_value.mobileIdentity2();
} else {
single_value->field_mobileIdentity2.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mobileIdentity3().get_selection()) {
single_value->field_mobileIdentity3 = other_value.mobileIdentity3();
} else {
single_value->field_mobileIdentity3.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mobileIdentity4().get_selection()) {
single_value->field_mobileIdentity4 = other_value.mobileIdentity4();
} else {
single_value->field_mobileIdentity4.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.p3RestOctets().get_selection()) {
single_value->field_p3RestOctets = other_value.p3RestOctets();
} else {
single_value->field_p3RestOctets.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 PDU__RRM__PagingReq__Type3__NW__MS_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 PDU__RRM__PagingReq__Type3__NW__MS_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__PagingReq__Type3__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
break;
}
set_selection(other_value);
}

PDU__RRM__PagingReq__Type3__NW__MS_template::PDU__RRM__PagingReq__Type3__NW__MS_template()
{
}

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

PDU__RRM__PagingReq__Type3__NW__MS_template::PDU__RRM__PagingReq__Type3__NW__MS_template(const PDU__RRM__PagingReq__Type3__NW__MS& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PDU__RRM__PagingReq__Type3__NW__MS_template::match(const PDU__RRM__PagingReq__Type3__NW__MS& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), legacy))return FALSE;
if(!other_value.pageMode().is_bound()) return FALSE;
if(!single_value->field_pageMode.match(other_value.pageMode(), legacy))return FALSE;
if(!other_value.channelNeeded().is_bound()) return FALSE;
if(!single_value->field_channelNeeded.match(other_value.channelNeeded(), legacy))return FALSE;
if(!other_value.mobileIdentity1().is_bound()) return FALSE;
if(!single_value->field_mobileIdentity1.match(other_value.mobileIdentity1(), legacy))return FALSE;
if(!other_value.mobileIdentity2().is_bound()) return FALSE;
if(!single_value->field_mobileIdentity2.match(other_value.mobileIdentity2(), legacy))return FALSE;
if(!other_value.mobileIdentity3().is_bound()) return FALSE;
if(!single_value->field_mobileIdentity3.match(other_value.mobileIdentity3(), legacy))return FALSE;
if(!other_value.mobileIdentity4().is_bound()) return FALSE;
if(!single_value->field_mobileIdentity4.match(other_value.mobileIdentity4(), legacy))return FALSE;
if(!other_value.p3RestOctets().is_bound()) return FALSE;
if(!single_value->field_p3RestOctets.match(other_value.p3RestOctets(), 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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
}
return FALSE;
}

boolean PDU__RRM__PagingReq__Type3__NW__MS_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_messageType.is_bound()
 || single_value->field_pageMode.is_bound()
 || single_value->field_channelNeeded.is_bound()
 || single_value->field_mobileIdentity1.is_bound()
 || single_value->field_mobileIdentity2.is_bound()
 || single_value->field_mobileIdentity3.is_bound()
 || single_value->field_mobileIdentity4.is_bound()
 || single_value->field_p3RestOctets.is_bound();
}

boolean PDU__RRM__PagingReq__Type3__NW__MS_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_pageMode.is_value()
 && single_value->field_channelNeeded.is_value()
 && single_value->field_mobileIdentity1.is_value()
 && single_value->field_mobileIdentity2.is_value()
 && single_value->field_mobileIdentity3.is_value()
 && single_value->field_mobileIdentity4.is_value()
 && single_value->field_p3RestOctets.is_value();
}

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

PDU__RRM__PagingReq__Type3__NW__MS PDU__RRM__PagingReq__Type3__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
PDU__RRM__PagingReq__Type3__NW__MS ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_pageMode.is_bound()) {
ret_val.pageMode() = single_value->field_pageMode.valueof();
}
if (single_value->field_channelNeeded.is_bound()) {
ret_val.channelNeeded() = single_value->field_channelNeeded.valueof();
}
if (single_value->field_mobileIdentity1.is_bound()) {
ret_val.mobileIdentity1() = single_value->field_mobileIdentity1.valueof();
}
if (single_value->field_mobileIdentity2.is_bound()) {
ret_val.mobileIdentity2() = single_value->field_mobileIdentity2.valueof();
}
if (single_value->field_mobileIdentity3.is_bound()) {
ret_val.mobileIdentity3() = single_value->field_mobileIdentity3.valueof();
}
if (single_value->field_mobileIdentity4.is_bound()) {
ret_val.mobileIdentity4() = single_value->field_mobileIdentity4.valueof();
}
if (single_value->field_p3RestOctets.is_bound()) {
ret_val.p3RestOctets() = single_value->field_p3RestOctets.valueof();
}
return ret_val;
}

void PDU__RRM__PagingReq__Type3__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__PagingReq__Type3__NW__MS_template[list_length];
}

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

BITSTRING_template& PDU__RRM__PagingReq__Type3__NW__MS_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& PDU__RRM__PagingReq__Type3__NW__MS_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
return single_value->field_messageType;
}

PageMode__V_template& PDU__RRM__PagingReq__Type3__NW__MS_template::pageMode()
{
set_specific();
return single_value->field_pageMode;
}

const PageMode__V_template& PDU__RRM__PagingReq__Type3__NW__MS_template::pageMode() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pageMode of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
return single_value->field_pageMode;
}

ChannelNeeded__V_template& PDU__RRM__PagingReq__Type3__NW__MS_template::channelNeeded()
{
set_specific();
return single_value->field_channelNeeded;
}

const ChannelNeeded__V_template& PDU__RRM__PagingReq__Type3__NW__MS_template::channelNeeded() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field channelNeeded of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
return single_value->field_channelNeeded;
}

OCTETSTRING_template& PDU__RRM__PagingReq__Type3__NW__MS_template::mobileIdentity1()
{
set_specific();
return single_value->field_mobileIdentity1;
}

const OCTETSTRING_template& PDU__RRM__PagingReq__Type3__NW__MS_template::mobileIdentity1() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mobileIdentity1 of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
return single_value->field_mobileIdentity1;
}

OCTETSTRING_template& PDU__RRM__PagingReq__Type3__NW__MS_template::mobileIdentity2()
{
set_specific();
return single_value->field_mobileIdentity2;
}

const OCTETSTRING_template& PDU__RRM__PagingReq__Type3__NW__MS_template::mobileIdentity2() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mobileIdentity2 of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
return single_value->field_mobileIdentity2;
}

OCTETSTRING_template& PDU__RRM__PagingReq__Type3__NW__MS_template::mobileIdentity3()
{
set_specific();
return single_value->field_mobileIdentity3;
}

const OCTETSTRING_template& PDU__RRM__PagingReq__Type3__NW__MS_template::mobileIdentity3() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mobileIdentity3 of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
return single_value->field_mobileIdentity3;
}

OCTETSTRING_template& PDU__RRM__PagingReq__Type3__NW__MS_template::mobileIdentity4()
{
set_specific();
return single_value->field_mobileIdentity4;
}

const OCTETSTRING_template& PDU__RRM__PagingReq__Type3__NW__MS_template::mobileIdentity4() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mobileIdentity4 of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
return single_value->field_mobileIdentity4;
}

OCTETSTRING_template& PDU__RRM__PagingReq__Type3__NW__MS_template::p3RestOctets()
{
set_specific();
return single_value->field_p3RestOctets;
}

const OCTETSTRING_template& PDU__RRM__PagingReq__Type3__NW__MS_template::p3RestOctets() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field p3RestOctets of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
return single_value->field_p3RestOctets;
}

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

void PDU__RRM__PagingReq__Type3__NW__MS_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.log();
TTCN_Logger::log_event_str(", pageMode := ");
single_value->field_pageMode.log();
TTCN_Logger::log_event_str(", channelNeeded := ");
single_value->field_channelNeeded.log();
TTCN_Logger::log_event_str(", mobileIdentity1 := ");
single_value->field_mobileIdentity1.log();
TTCN_Logger::log_event_str(", mobileIdentity2 := ");
single_value->field_mobileIdentity2.log();
TTCN_Logger::log_event_str(", mobileIdentity3 := ");
single_value->field_mobileIdentity3.log();
TTCN_Logger::log_event_str(", mobileIdentity4 := ");
single_value->field_mobileIdentity4.log();
TTCN_Logger::log_event_str(", p3RestOctets := ");
single_value->field_p3RestOctets.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 PDU__RRM__PagingReq__Type3__NW__MS_template::log_match(const PDU__RRM__PagingReq__Type3__NW__MS& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_pageMode.match(match_value.pageMode(), legacy)){
TTCN_Logger::log_logmatch_info(".pageMode");
single_value->field_pageMode.log_match(match_value.pageMode(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_channelNeeded.match(match_value.channelNeeded(), legacy)){
TTCN_Logger::log_logmatch_info(".channelNeeded");
single_value->field_channelNeeded.log_match(match_value.channelNeeded(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mobileIdentity1.match(match_value.mobileIdentity1(), legacy)){
TTCN_Logger::log_logmatch_info(".mobileIdentity1");
single_value->field_mobileIdentity1.log_match(match_value.mobileIdentity1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mobileIdentity2.match(match_value.mobileIdentity2(), legacy)){
TTCN_Logger::log_logmatch_info(".mobileIdentity2");
single_value->field_mobileIdentity2.log_match(match_value.mobileIdentity2(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mobileIdentity3.match(match_value.mobileIdentity3(), legacy)){
TTCN_Logger::log_logmatch_info(".mobileIdentity3");
single_value->field_mobileIdentity3.log_match(match_value.mobileIdentity3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mobileIdentity4.match(match_value.mobileIdentity4(), legacy)){
TTCN_Logger::log_logmatch_info(".mobileIdentity4");
single_value->field_mobileIdentity4.log_match(match_value.mobileIdentity4(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_p3RestOctets.match(match_value.p3RestOctets(), legacy)){
TTCN_Logger::log_logmatch_info(".p3RestOctets");
single_value->field_p3RestOctets.log_match(match_value.p3RestOctets(), 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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::log_event_str(", pageMode := ");
single_value->field_pageMode.log_match(match_value.pageMode(), legacy);
TTCN_Logger::log_event_str(", channelNeeded := ");
single_value->field_channelNeeded.log_match(match_value.channelNeeded(), legacy);
TTCN_Logger::log_event_str(", mobileIdentity1 := ");
single_value->field_mobileIdentity1.log_match(match_value.mobileIdentity1(), legacy);
TTCN_Logger::log_event_str(", mobileIdentity2 := ");
single_value->field_mobileIdentity2.log_match(match_value.mobileIdentity2(), legacy);
TTCN_Logger::log_event_str(", mobileIdentity3 := ");
single_value->field_mobileIdentity3.log_match(match_value.mobileIdentity3(), legacy);
TTCN_Logger::log_event_str(", mobileIdentity4 := ");
single_value->field_mobileIdentity4.log_match(match_value.mobileIdentity4(), legacy);
TTCN_Logger::log_event_str(", p3RestOctets := ");
single_value->field_p3RestOctets.log_match(match_value.p3RestOctets(), 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 PDU__RRM__PagingReq__Type3__NW__MS_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
if (pageMode().is_bound()) pageMode().set_implicit_omit();
if (channelNeeded().is_bound()) channelNeeded().set_implicit_omit();
if (mobileIdentity1().is_bound()) mobileIdentity1().set_implicit_omit();
if (mobileIdentity2().is_bound()) mobileIdentity2().set_implicit_omit();
if (mobileIdentity3().is_bound()) mobileIdentity3().set_implicit_omit();
if (mobileIdentity4().is_bound()) mobileIdentity4().set_implicit_omit();
if (p3RestOctets().is_bound()) p3RestOctets().set_implicit_omit();
}

void PDU__RRM__PagingReq__Type3__NW__MS_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.encode_text(text_buf);
single_value->field_pageMode.encode_text(text_buf);
single_value->field_channelNeeded.encode_text(text_buf);
single_value->field_mobileIdentity1.encode_text(text_buf);
single_value->field_mobileIdentity2.encode_text(text_buf);
single_value->field_mobileIdentity3.encode_text(text_buf);
single_value->field_mobileIdentity4.encode_text(text_buf);
single_value->field_p3RestOctets.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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
}
}

void PDU__RRM__PagingReq__Type3__NW__MS_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_messageType.decode_text(text_buf);
single_value->field_pageMode.decode_text(text_buf);
single_value->field_channelNeeded.decode_text(text_buf);
single_value->field_mobileIdentity1.decode_text(text_buf);
single_value->field_mobileIdentity2.decode_text(text_buf);
single_value->field_mobileIdentity3.decode_text(text_buf);
single_value->field_mobileIdentity4.decode_text(text_buf);
single_value->field_p3RestOctets.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 PDU__RRM__PagingReq__Type3__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS.");
}
}

void PDU__RRM__PagingReq__Type3__NW__MS_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: {
    PDU__RRM__PagingReq__Type3__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS 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) messageType().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) pageMode().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) channelNeeded().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) mobileIdentity1().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) mobileIdentity2().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) mobileIdentity3().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) mobileIdentity4().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) p3RestOctets().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(), "messageType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          messageType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "pageMode")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pageMode().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "channelNeeded")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          channelNeeded().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mobileIdentity1")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mobileIdentity1().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mobileIdentity2")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mobileIdentity2().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mobileIdentity3")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mobileIdentity3().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mobileIdentity4")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mobileIdentity4().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "p3RestOctets")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          p3RestOctets().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 @MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__RRM__PagingReq__Type3__NW__MS_template* precondition = new PDU__RRM__PagingReq__Type3__NW__MS_template;
    precondition->set_param(*param.get_elem(0));
    PDU__RRM__PagingReq__Type3__NW__MS_template* implied_template = new PDU__RRM__PagingReq__Type3__NW__MS_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__RRM__PagingReq__Type3__NW__MS_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__RRM__PagingReq__Type3__NW__MS_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS");
single_value->field_pageMode.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS");
single_value->field_channelNeeded.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS");
single_value->field_mobileIdentity1.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS");
single_value->field_mobileIdentity2.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS");
single_value->field_mobileIdentity3.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS");
single_value->field_mobileIdentity4.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS");
single_value->field_p3RestOctets.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS");
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 : "@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS");
}

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

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

PDU__RRM__PagingResponse__MS__NW::PDU__RRM__PagingResponse__MS__NW()
{
}

PDU__RRM__PagingResponse__MS__NW::PDU__RRM__PagingResponse__MS__NW(const BITSTRING& par_messageType,
    const MobileL3__CommonIE__Types::CipheringKeySequenceNumberV& par_cipheringKeySequenceNumber,
    const BITSTRING& par_spare1__4,
    const MobileL3__CommonIE__Types::MobileStationClassmark2__LV& par_mobileStationClassmark,
    const MobileL3__CommonIE__Types::MobileIdentityLV& par_mobileIdentity,
    const OPTIONAL< MobileL3__CommonIE__Types::AdditionalUpdateParameterTV >& par_additionalUpdateParameters)
  :   field_messageType(par_messageType),
  field_cipheringKeySequenceNumber(par_cipheringKeySequenceNumber),
  field_spare1__4(par_spare1__4),
  field_mobileStationClassmark(par_mobileStationClassmark),
  field_mobileIdentity(par_mobileIdentity),
  field_additionalUpdateParameters(par_additionalUpdateParameters)
{
}

PDU__RRM__PagingResponse__MS__NW::PDU__RRM__PagingResponse__MS__NW(const PDU__RRM__PagingResponse__MS__NW& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.cipheringKeySequenceNumber().is_bound()) field_cipheringKeySequenceNumber = other_value.cipheringKeySequenceNumber();
else field_cipheringKeySequenceNumber.clean_up();
if (other_value.spare1__4().is_bound()) field_spare1__4 = other_value.spare1__4();
else field_spare1__4.clean_up();
if (other_value.mobileStationClassmark().is_bound()) field_mobileStationClassmark = other_value.mobileStationClassmark();
else field_mobileStationClassmark.clean_up();
if (other_value.mobileIdentity().is_bound()) field_mobileIdentity = other_value.mobileIdentity();
else field_mobileIdentity.clean_up();
if (other_value.additionalUpdateParameters().is_bound()) field_additionalUpdateParameters = other_value.additionalUpdateParameters();
else field_additionalUpdateParameters.clean_up();
}

void PDU__RRM__PagingResponse__MS__NW::clean_up()
{
field_messageType.clean_up();
field_cipheringKeySequenceNumber.clean_up();
field_spare1__4.clean_up();
field_mobileStationClassmark.clean_up();
field_mobileIdentity.clean_up();
field_additionalUpdateParameters.clean_up();
}

const TTCN_Typedescriptor_t* PDU__RRM__PagingResponse__MS__NW::get_descriptor() const { return &PDU__RRM__PagingResponse__MS__NW_descr_; }
PDU__RRM__PagingResponse__MS__NW& PDU__RRM__PagingResponse__MS__NW::operator=(const PDU__RRM__PagingResponse__MS__NW& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.cipheringKeySequenceNumber().is_bound()) field_cipheringKeySequenceNumber = other_value.cipheringKeySequenceNumber();
  else field_cipheringKeySequenceNumber.clean_up();
  if (other_value.spare1__4().is_bound()) field_spare1__4 = other_value.spare1__4();
  else field_spare1__4.clean_up();
  if (other_value.mobileStationClassmark().is_bound()) field_mobileStationClassmark = other_value.mobileStationClassmark();
  else field_mobileStationClassmark.clean_up();
  if (other_value.mobileIdentity().is_bound()) field_mobileIdentity = other_value.mobileIdentity();
  else field_mobileIdentity.clean_up();
  if (other_value.additionalUpdateParameters().is_bound()) field_additionalUpdateParameters = other_value.additionalUpdateParameters();
  else field_additionalUpdateParameters.clean_up();
}
return *this;
}

boolean PDU__RRM__PagingResponse__MS__NW::operator==(const PDU__RRM__PagingResponse__MS__NW& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_cipheringKeySequenceNumber==other_value.field_cipheringKeySequenceNumber
  && field_spare1__4==other_value.field_spare1__4
  && field_mobileStationClassmark==other_value.field_mobileStationClassmark
  && field_mobileIdentity==other_value.field_mobileIdentity
  && field_additionalUpdateParameters==other_value.field_additionalUpdateParameters;
}

boolean PDU__RRM__PagingResponse__MS__NW::is_bound() const
{
return (field_messageType.is_bound())
  || (field_cipheringKeySequenceNumber.is_bound())
  || (field_spare1__4.is_bound())
  || (field_mobileStationClassmark.is_bound())
  || (field_mobileIdentity.is_bound())
  || (OPTIONAL_OMIT == field_additionalUpdateParameters.get_selection() || field_additionalUpdateParameters.is_bound());
}
boolean PDU__RRM__PagingResponse__MS__NW::is_value() const
{
return field_messageType.is_value()
  && field_cipheringKeySequenceNumber.is_value()
  && field_spare1__4.is_value()
  && field_mobileStationClassmark.is_value()
  && field_mobileIdentity.is_value()
  && (OPTIONAL_OMIT == field_additionalUpdateParameters.get_selection() || field_additionalUpdateParameters.is_value());
}
int PDU__RRM__PagingResponse__MS__NW::size_of() const
{
  int ret_val = 5;
  if (field_additionalUpdateParameters.ispresent()) ret_val++;
  return ret_val;
}

void PDU__RRM__PagingResponse__MS__NW::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(", cipheringKeySequenceNumber := ");
field_cipheringKeySequenceNumber.log();
TTCN_Logger::log_event_str(", spare1_4 := ");
field_spare1__4.log();
TTCN_Logger::log_event_str(", mobileStationClassmark := ");
field_mobileStationClassmark.log();
TTCN_Logger::log_event_str(", mobileIdentity := ");
field_mobileIdentity.log();
TTCN_Logger::log_event_str(", additionalUpdateParameters := ");
field_additionalUpdateParameters.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__RRM__PagingResponse__MS__NW::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (cipheringKeySequenceNumber().is_bound()) cipheringKeySequenceNumber().set_implicit_omit();
if (spare1__4().is_bound()) spare1__4().set_implicit_omit();
if (mobileStationClassmark().is_bound()) mobileStationClassmark().set_implicit_omit();
if (mobileIdentity().is_bound()) mobileIdentity().set_implicit_omit();
if (!additionalUpdateParameters().is_bound()) additionalUpdateParameters() = OMIT_VALUE;
else additionalUpdateParameters().set_implicit_omit();
}

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

void PDU__RRM__PagingResponse__MS__NW::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_cipheringKeySequenceNumber.encode_text(text_buf);
field_spare1__4.encode_text(text_buf);
field_mobileStationClassmark.encode_text(text_buf);
field_mobileIdentity.encode_text(text_buf);
field_additionalUpdateParameters.encode_text(text_buf);
}

void PDU__RRM__PagingResponse__MS__NW::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_cipheringKeySequenceNumber.decode_text(text_buf);
field_spare1__4.decode_text(text_buf);
field_mobileStationClassmark.decode_text(text_buf);
field_mobileIdentity.decode_text(text_buf);
field_additionalUpdateParameters.decode_text(text_buf);
}

void PDU__RRM__PagingResponse__MS__NW::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 PDU__RRM__PagingResponse__MS__NW::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 PDU__RRM__PagingResponse__MS__NW::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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, MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_descr_.raw->forceomit);
  decoded_field_length = field_cipheringKeySequenceNumber.RAW_decode(MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_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, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_spare1__4.RAW_decode(General__Types::BIT4_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, MobileL3__CommonIE__Types::MobileStationClassmark2__LV_descr_.raw->forceomit);
  decoded_field_length = field_mobileStationClassmark.RAW_decode(MobileL3__CommonIE__Types::MobileStationClassmark2__LV_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, MobileL3__CommonIE__Types::MobileIdentityLV_descr_.raw->forceomit);
  decoded_field_length = field_mobileIdentity.RAW_decode(MobileL3__CommonIE__Types::MobileIdentityLV_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){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_additionalUpdateParameters = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, MobileL3__CommonIE__Types::AdditionalUpdateParameterTV_descr_.raw->forceomit);
  decoded_field_length = field_additionalUpdateParameters().RAW_decode(MobileL3__CommonIE__Types::AdditionalUpdateParameterTV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_additionalUpdateParameters = 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_additionalUpdateParameters=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__RRM__PagingResponse__MS__NW::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 = 6;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(6);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, General__Types::BIT8_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::BIT4_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, MobileL3__CommonIE__Types::MobileStationClassmark2__LV_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, MobileL3__CommonIE__Types::MobileIdentityLV_descr_.raw);
  if (field_additionalUpdateParameters.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, MobileL3__CommonIE__Types::AdditionalUpdateParameterTV_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_cipheringKeySequenceNumber.RAW_encode(MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_spare1__4.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_mobileStationClassmark.RAW_encode(MobileL3__CommonIE__Types::MobileStationClassmark2__LV_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_mobileIdentity.RAW_encode(MobileL3__CommonIE__Types::MobileIdentityLV_descr_, *myleaf.body.node.nodes[4]);
  if (field_additionalUpdateParameters.ispresent()) {
  encoded_length += field_additionalUpdateParameters().RAW_encode(MobileL3__CommonIE__Types::AdditionalUpdateParameterTV_descr_, *myleaf.body.node.nodes[5]);
  }
  return myleaf.length = encoded_length;
}

struct PDU__RRM__PagingResponse__MS__NW_template::single_value_struct {
BITSTRING_template field_messageType;
MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_template field_cipheringKeySequenceNumber;
BITSTRING_template field_spare1__4;
MobileL3__CommonIE__Types::MobileStationClassmark2__LV_template field_mobileStationClassmark;
MobileL3__CommonIE__Types::MobileIdentityLV_template field_mobileIdentity;
MobileL3__CommonIE__Types::AdditionalUpdateParameterTV_template field_additionalUpdateParameters;
};

void PDU__RRM__PagingResponse__MS__NW_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_messageType = ANY_VALUE;
single_value->field_cipheringKeySequenceNumber = ANY_VALUE;
single_value->field_spare1__4 = ANY_VALUE;
single_value->field_mobileStationClassmark = ANY_VALUE;
single_value->field_mobileIdentity = ANY_VALUE;
single_value->field_additionalUpdateParameters = ANY_OR_OMIT;
}
}
}

void PDU__RRM__PagingResponse__MS__NW_template::copy_value(const PDU__RRM__PagingResponse__MS__NW& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
if (other_value.cipheringKeySequenceNumber().is_bound()) {
  single_value->field_cipheringKeySequenceNumber = other_value.cipheringKeySequenceNumber();
} else {
  single_value->field_cipheringKeySequenceNumber.clean_up();
}
if (other_value.spare1__4().is_bound()) {
  single_value->field_spare1__4 = other_value.spare1__4();
} else {
  single_value->field_spare1__4.clean_up();
}
if (other_value.mobileStationClassmark().is_bound()) {
  single_value->field_mobileStationClassmark = other_value.mobileStationClassmark();
} else {
  single_value->field_mobileStationClassmark.clean_up();
}
if (other_value.mobileIdentity().is_bound()) {
  single_value->field_mobileIdentity = other_value.mobileIdentity();
} else {
  single_value->field_mobileIdentity.clean_up();
}
if (other_value.additionalUpdateParameters().is_bound()) {
  if (other_value.additionalUpdateParameters().ispresent()) single_value->field_additionalUpdateParameters = other_value.additionalUpdateParameters()();
  else single_value->field_additionalUpdateParameters = OMIT_VALUE;
} else {
  single_value->field_additionalUpdateParameters.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__PagingResponse__MS__NW_template::copy_template(const PDU__RRM__PagingResponse__MS__NW_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.cipheringKeySequenceNumber().get_selection()) {
single_value->field_cipheringKeySequenceNumber = other_value.cipheringKeySequenceNumber();
} else {
single_value->field_cipheringKeySequenceNumber.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare1__4().get_selection()) {
single_value->field_spare1__4 = other_value.spare1__4();
} else {
single_value->field_spare1__4.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mobileStationClassmark().get_selection()) {
single_value->field_mobileStationClassmark = other_value.mobileStationClassmark();
} else {
single_value->field_mobileStationClassmark.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mobileIdentity().get_selection()) {
single_value->field_mobileIdentity = other_value.mobileIdentity();
} else {
single_value->field_mobileIdentity.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.additionalUpdateParameters().get_selection()) {
single_value->field_additionalUpdateParameters = other_value.additionalUpdateParameters();
} else {
single_value->field_additionalUpdateParameters.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 PDU__RRM__PagingResponse__MS__NW_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 PDU__RRM__PagingResponse__MS__NW_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__PagingResponse__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW.");
break;
}
set_selection(other_value);
}

PDU__RRM__PagingResponse__MS__NW_template::PDU__RRM__PagingResponse__MS__NW_template()
{
}

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

PDU__RRM__PagingResponse__MS__NW_template::PDU__RRM__PagingResponse__MS__NW_template(const PDU__RRM__PagingResponse__MS__NW& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PDU__RRM__PagingResponse__MS__NW_template::match(const PDU__RRM__PagingResponse__MS__NW& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), legacy))return FALSE;
if(!other_value.cipheringKeySequenceNumber().is_bound()) return FALSE;
if(!single_value->field_cipheringKeySequenceNumber.match(other_value.cipheringKeySequenceNumber(), legacy))return FALSE;
if(!other_value.spare1__4().is_bound()) return FALSE;
if(!single_value->field_spare1__4.match(other_value.spare1__4(), legacy))return FALSE;
if(!other_value.mobileStationClassmark().is_bound()) return FALSE;
if(!single_value->field_mobileStationClassmark.match(other_value.mobileStationClassmark(), legacy))return FALSE;
if(!other_value.mobileIdentity().is_bound()) return FALSE;
if(!single_value->field_mobileIdentity.match(other_value.mobileIdentity(), legacy))return FALSE;
if(!other_value.additionalUpdateParameters().is_bound()) return FALSE;
if((other_value.additionalUpdateParameters().ispresent() ? !single_value->field_additionalUpdateParameters.match((const MobileL3__CommonIE__Types::AdditionalUpdateParameterTV&)other_value.additionalUpdateParameters(), legacy) : !single_value->field_additionalUpdateParameters.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 @MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW.");
}
return FALSE;
}

boolean PDU__RRM__PagingResponse__MS__NW_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_messageType.is_bound()
 || single_value->field_cipheringKeySequenceNumber.is_bound()
 || single_value->field_spare1__4.is_bound()
 || single_value->field_mobileStationClassmark.is_bound()
 || single_value->field_mobileIdentity.is_bound()
 || (single_value->field_additionalUpdateParameters.is_omit() || single_value->field_additionalUpdateParameters.is_bound());
}

boolean PDU__RRM__PagingResponse__MS__NW_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_cipheringKeySequenceNumber.is_value()
 && single_value->field_spare1__4.is_value()
 && single_value->field_mobileStationClassmark.is_value()
 && single_value->field_mobileIdentity.is_value()
 && (single_value->field_additionalUpdateParameters.is_omit() || single_value->field_additionalUpdateParameters.is_value());
}

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

PDU__RRM__PagingResponse__MS__NW PDU__RRM__PagingResponse__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW.");
PDU__RRM__PagingResponse__MS__NW ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_cipheringKeySequenceNumber.is_bound()) {
ret_val.cipheringKeySequenceNumber() = single_value->field_cipheringKeySequenceNumber.valueof();
}
if (single_value->field_spare1__4.is_bound()) {
ret_val.spare1__4() = single_value->field_spare1__4.valueof();
}
if (single_value->field_mobileStationClassmark.is_bound()) {
ret_val.mobileStationClassmark() = single_value->field_mobileStationClassmark.valueof();
}
if (single_value->field_mobileIdentity.is_bound()) {
ret_val.mobileIdentity() = single_value->field_mobileIdentity.valueof();
}
if (single_value->field_additionalUpdateParameters.is_omit()) ret_val.additionalUpdateParameters() = OMIT_VALUE;
else if (single_value->field_additionalUpdateParameters.is_bound()) {
ret_val.additionalUpdateParameters() = single_value->field_additionalUpdateParameters.valueof();
}
return ret_val;
}

void PDU__RRM__PagingResponse__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__PagingResponse__MS__NW_template[list_length];
}

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

BITSTRING_template& PDU__RRM__PagingResponse__MS__NW_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& PDU__RRM__PagingResponse__MS__NW_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW.");
return single_value->field_messageType;
}

MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_template& PDU__RRM__PagingResponse__MS__NW_template::cipheringKeySequenceNumber()
{
set_specific();
return single_value->field_cipheringKeySequenceNumber;
}

const MobileL3__CommonIE__Types::CipheringKeySequenceNumberV_template& PDU__RRM__PagingResponse__MS__NW_template::cipheringKeySequenceNumber() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cipheringKeySequenceNumber of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW.");
return single_value->field_cipheringKeySequenceNumber;
}

BITSTRING_template& PDU__RRM__PagingResponse__MS__NW_template::spare1__4()
{
set_specific();
return single_value->field_spare1__4;
}

const BITSTRING_template& PDU__RRM__PagingResponse__MS__NW_template::spare1__4() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare1_4 of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW.");
return single_value->field_spare1__4;
}

MobileL3__CommonIE__Types::MobileStationClassmark2__LV_template& PDU__RRM__PagingResponse__MS__NW_template::mobileStationClassmark()
{
set_specific();
return single_value->field_mobileStationClassmark;
}

const MobileL3__CommonIE__Types::MobileStationClassmark2__LV_template& PDU__RRM__PagingResponse__MS__NW_template::mobileStationClassmark() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mobileStationClassmark of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW.");
return single_value->field_mobileStationClassmark;
}

MobileL3__CommonIE__Types::MobileIdentityLV_template& PDU__RRM__PagingResponse__MS__NW_template::mobileIdentity()
{
set_specific();
return single_value->field_mobileIdentity;
}

const MobileL3__CommonIE__Types::MobileIdentityLV_template& PDU__RRM__PagingResponse__MS__NW_template::mobileIdentity() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mobileIdentity of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW.");
return single_value->field_mobileIdentity;
}

MobileL3__CommonIE__Types::AdditionalUpdateParameterTV_template& PDU__RRM__PagingResponse__MS__NW_template::additionalUpdateParameters()
{
set_specific();
return single_value->field_additionalUpdateParameters;
}

const MobileL3__CommonIE__Types::AdditionalUpdateParameterTV_template& PDU__RRM__PagingResponse__MS__NW_template::additionalUpdateParameters() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field additionalUpdateParameters of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW.");
return single_value->field_additionalUpdateParameters;
}

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

void PDU__RRM__PagingResponse__MS__NW_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.log();
TTCN_Logger::log_event_str(", cipheringKeySequenceNumber := ");
single_value->field_cipheringKeySequenceNumber.log();
TTCN_Logger::log_event_str(", spare1_4 := ");
single_value->field_spare1__4.log();
TTCN_Logger::log_event_str(", mobileStationClassmark := ");
single_value->field_mobileStationClassmark.log();
TTCN_Logger::log_event_str(", mobileIdentity := ");
single_value->field_mobileIdentity.log();
TTCN_Logger::log_event_str(", additionalUpdateParameters := ");
single_value->field_additionalUpdateParameters.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 PDU__RRM__PagingResponse__MS__NW_template::log_match(const PDU__RRM__PagingResponse__MS__NW& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_cipheringKeySequenceNumber.match(match_value.cipheringKeySequenceNumber(), legacy)){
TTCN_Logger::log_logmatch_info(".cipheringKeySequenceNumber");
single_value->field_cipheringKeySequenceNumber.log_match(match_value.cipheringKeySequenceNumber(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare1__4.match(match_value.spare1__4(), legacy)){
TTCN_Logger::log_logmatch_info(".spare1_4");
single_value->field_spare1__4.log_match(match_value.spare1__4(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mobileStationClassmark.match(match_value.mobileStationClassmark(), legacy)){
TTCN_Logger::log_logmatch_info(".mobileStationClassmark");
single_value->field_mobileStationClassmark.log_match(match_value.mobileStationClassmark(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mobileIdentity.match(match_value.mobileIdentity(), legacy)){
TTCN_Logger::log_logmatch_info(".mobileIdentity");
single_value->field_mobileIdentity.log_match(match_value.mobileIdentity(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.additionalUpdateParameters().ispresent()){
if(!single_value->field_additionalUpdateParameters.match(match_value.additionalUpdateParameters(), legacy)){
TTCN_Logger::log_logmatch_info(".additionalUpdateParameters");
single_value->field_additionalUpdateParameters.log_match(match_value.additionalUpdateParameters(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_additionalUpdateParameters.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".additionalUpdateParameters := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_additionalUpdateParameters.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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::log_event_str(", cipheringKeySequenceNumber := ");
single_value->field_cipheringKeySequenceNumber.log_match(match_value.cipheringKeySequenceNumber(), legacy);
TTCN_Logger::log_event_str(", spare1_4 := ");
single_value->field_spare1__4.log_match(match_value.spare1__4(), legacy);
TTCN_Logger::log_event_str(", mobileStationClassmark := ");
single_value->field_mobileStationClassmark.log_match(match_value.mobileStationClassmark(), legacy);
TTCN_Logger::log_event_str(", mobileIdentity := ");
single_value->field_mobileIdentity.log_match(match_value.mobileIdentity(), legacy);
TTCN_Logger::log_event_str(", additionalUpdateParameters := ");
if (match_value.additionalUpdateParameters().ispresent()) {
single_value->field_additionalUpdateParameters.log_match(match_value.additionalUpdateParameters(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_additionalUpdateParameters.log();
if (single_value->field_additionalUpdateParameters.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 PDU__RRM__PagingResponse__MS__NW_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
if (cipheringKeySequenceNumber().is_bound()) cipheringKeySequenceNumber().set_implicit_omit();
if (spare1__4().is_bound()) spare1__4().set_implicit_omit();
if (mobileStationClassmark().is_bound()) mobileStationClassmark().set_implicit_omit();
if (mobileIdentity().is_bound()) mobileIdentity().set_implicit_omit();
if (!additionalUpdateParameters().is_bound()) additionalUpdateParameters() = OMIT_VALUE;
else additionalUpdateParameters().set_implicit_omit();
}

void PDU__RRM__PagingResponse__MS__NW_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.encode_text(text_buf);
single_value->field_cipheringKeySequenceNumber.encode_text(text_buf);
single_value->field_spare1__4.encode_text(text_buf);
single_value->field_mobileStationClassmark.encode_text(text_buf);
single_value->field_mobileIdentity.encode_text(text_buf);
single_value->field_additionalUpdateParameters.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 @MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW.");
}
}

void PDU__RRM__PagingResponse__MS__NW_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_messageType.decode_text(text_buf);
single_value->field_cipheringKeySequenceNumber.decode_text(text_buf);
single_value->field_spare1__4.decode_text(text_buf);
single_value->field_mobileStationClassmark.decode_text(text_buf);
single_value->field_mobileIdentity.decode_text(text_buf);
single_value->field_additionalUpdateParameters.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 PDU__RRM__PagingResponse__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW.");
}
}

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

void PDU__RRM__PagingResponse__MS__NW_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW");
single_value->field_cipheringKeySequenceNumber.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW");
single_value->field_spare1__4.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW");
single_value->field_mobileStationClassmark.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW");
single_value->field_mobileIdentity.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW");
single_value->field_additionalUpdateParameters.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW");
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 : "@MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW");
}

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

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

PDU__RRM__PartialRelease__NW__MS::PDU__RRM__PartialRelease__NW__MS()
{
}

PDU__RRM__PartialRelease__NW__MS::PDU__RRM__PartialRelease__NW__MS(const BITSTRING& par_messageType,
    const ChannelDescription__V& par_channelDescription)
  :   field_messageType(par_messageType),
  field_channelDescription(par_channelDescription)
{
}

PDU__RRM__PartialRelease__NW__MS::PDU__RRM__PartialRelease__NW__MS(const PDU__RRM__PartialRelease__NW__MS& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PartialRelease_NW_MS.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.channelDescription().is_bound()) field_channelDescription = other_value.channelDescription();
else field_channelDescription.clean_up();
}

void PDU__RRM__PartialRelease__NW__MS::clean_up()
{
field_messageType.clean_up();
field_channelDescription.clean_up();
}

const TTCN_Typedescriptor_t* PDU__RRM__PartialRelease__NW__MS::get_descriptor() const { return &PDU__RRM__PartialRelease__NW__MS_descr_; }
PDU__RRM__PartialRelease__NW__MS& PDU__RRM__PartialRelease__NW__MS::operator=(const PDU__RRM__PartialRelease__NW__MS& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PartialRelease_NW_MS.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.channelDescription().is_bound()) field_channelDescription = other_value.channelDescription();
  else field_channelDescription.clean_up();
}
return *this;
}

boolean PDU__RRM__PartialRelease__NW__MS::operator==(const PDU__RRM__PartialRelease__NW__MS& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_channelDescription==other_value.field_channelDescription;
}

boolean PDU__RRM__PartialRelease__NW__MS::is_bound() const
{
return (field_messageType.is_bound())
  || (field_channelDescription.is_bound());
}
boolean PDU__RRM__PartialRelease__NW__MS::is_value() const
{
return field_messageType.is_value()
  && field_channelDescription.is_value();
}
void PDU__RRM__PartialRelease__NW__MS::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(", channelDescription := ");
field_channelDescription.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__RRM__PartialRelease__NW__MS::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (channelDescription().is_bound()) channelDescription().set_implicit_omit();
}

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

void PDU__RRM__PartialRelease__NW__MS::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_channelDescription.encode_text(text_buf);
}

void PDU__RRM__PartialRelease__NW__MS::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_channelDescription.decode_text(text_buf);
}

void PDU__RRM__PartialRelease__NW__MS::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 PDU__RRM__PartialRelease__NW__MS::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 PDU__RRM__PartialRelease__NW__MS::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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, ChannelDescription__V_descr_.raw->forceomit);
  decoded_field_length = field_channelDescription.RAW_decode(ChannelDescription__V_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 PDU__RRM__PartialRelease__NW__MS::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, General__Types::BIT8_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, ChannelDescription__V_descr_.raw);
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_channelDescription.RAW_encode(ChannelDescription__V_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct PDU__RRM__PartialRelease__NW__MS_template::single_value_struct {
BITSTRING_template field_messageType;
ChannelDescription__V_template field_channelDescription;
};

void PDU__RRM__PartialRelease__NW__MS_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_messageType = ANY_VALUE;
single_value->field_channelDescription = ANY_VALUE;
}
}
}

void PDU__RRM__PartialRelease__NW__MS_template::copy_value(const PDU__RRM__PartialRelease__NW__MS& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
if (other_value.channelDescription().is_bound()) {
  single_value->field_channelDescription = other_value.channelDescription();
} else {
  single_value->field_channelDescription.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__PartialRelease__NW__MS_template::copy_template(const PDU__RRM__PartialRelease__NW__MS_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.channelDescription().get_selection()) {
single_value->field_channelDescription = other_value.channelDescription();
} else {
single_value->field_channelDescription.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 PDU__RRM__PartialRelease__NW__MS_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 PDU__RRM__PartialRelease__NW__MS_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__PartialRelease__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PartialRelease_NW_MS.");
break;
}
set_selection(other_value);
}

PDU__RRM__PartialRelease__NW__MS_template::PDU__RRM__PartialRelease__NW__MS_template()
{
}

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

PDU__RRM__PartialRelease__NW__MS_template::PDU__RRM__PartialRelease__NW__MS_template(const PDU__RRM__PartialRelease__NW__MS& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PDU__RRM__PartialRelease__NW__MS_template::match(const PDU__RRM__PartialRelease__NW__MS& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), legacy))return FALSE;
if(!other_value.channelDescription().is_bound()) return FALSE;
if(!single_value->field_channelDescription.match(other_value.channelDescription(), 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 @MobileL3_RRM_Types.PDU_RRM_PartialRelease_NW_MS.");
}
return FALSE;
}

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

boolean PDU__RRM__PartialRelease__NW__MS_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_channelDescription.is_value();
}

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

PDU__RRM__PartialRelease__NW__MS PDU__RRM__PartialRelease__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PartialRelease_NW_MS.");
PDU__RRM__PartialRelease__NW__MS ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_channelDescription.is_bound()) {
ret_val.channelDescription() = single_value->field_channelDescription.valueof();
}
return ret_val;
}

void PDU__RRM__PartialRelease__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PartialRelease_NW_MS.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__PartialRelease__NW__MS_template[list_length];
}

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

BITSTRING_template& PDU__RRM__PartialRelease__NW__MS_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& PDU__RRM__PartialRelease__NW__MS_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PartialRelease_NW_MS.");
return single_value->field_messageType;
}

ChannelDescription__V_template& PDU__RRM__PartialRelease__NW__MS_template::channelDescription()
{
set_specific();
return single_value->field_channelDescription;
}

const ChannelDescription__V_template& PDU__RRM__PartialRelease__NW__MS_template::channelDescription() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field channelDescription of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PartialRelease_NW_MS.");
return single_value->field_channelDescription;
}

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

void PDU__RRM__PartialRelease__NW__MS_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.log();
TTCN_Logger::log_event_str(", channelDescription := ");
single_value->field_channelDescription.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 PDU__RRM__PartialRelease__NW__MS_template::log_match(const PDU__RRM__PartialRelease__NW__MS& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_channelDescription.match(match_value.channelDescription(), legacy)){
TTCN_Logger::log_logmatch_info(".channelDescription");
single_value->field_channelDescription.log_match(match_value.channelDescription(), 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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::log_event_str(", channelDescription := ");
single_value->field_channelDescription.log_match(match_value.channelDescription(), 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 PDU__RRM__PartialRelease__NW__MS_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
if (channelDescription().is_bound()) channelDescription().set_implicit_omit();
}

void PDU__RRM__PartialRelease__NW__MS_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.encode_text(text_buf);
single_value->field_channelDescription.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 @MobileL3_RRM_Types.PDU_RRM_PartialRelease_NW_MS.");
}
}

void PDU__RRM__PartialRelease__NW__MS_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_messageType.decode_text(text_buf);
single_value->field_channelDescription.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 PDU__RRM__PartialRelease__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PartialRelease_NW_MS.");
}
}

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

void PDU__RRM__PartialRelease__NW__MS_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PartialRelease_NW_MS");
single_value->field_channelDescription.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PartialRelease_NW_MS");
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 : "@MobileL3_RRM_Types.PDU_RRM_PartialRelease_NW_MS");
}

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

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

PDU__RRM__PartialReleaseComplete__MS__NW::PDU__RRM__PartialReleaseComplete__MS__NW()
{
}

PDU__RRM__PartialReleaseComplete__MS__NW::PDU__RRM__PartialReleaseComplete__MS__NW(const BITSTRING& par_messageType)
  :   field_messageType(par_messageType)
{
}

PDU__RRM__PartialReleaseComplete__MS__NW::PDU__RRM__PartialReleaseComplete__MS__NW(const PDU__RRM__PartialReleaseComplete__MS__NW& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PartialReleaseComplete_MS_NW.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
}

void PDU__RRM__PartialReleaseComplete__MS__NW::clean_up()
{
field_messageType.clean_up();
}

const TTCN_Typedescriptor_t* PDU__RRM__PartialReleaseComplete__MS__NW::get_descriptor() const { return &PDU__RRM__PartialReleaseComplete__MS__NW_descr_; }
PDU__RRM__PartialReleaseComplete__MS__NW& PDU__RRM__PartialReleaseComplete__MS__NW::operator=(const PDU__RRM__PartialReleaseComplete__MS__NW& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PartialReleaseComplete_MS_NW.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
}
return *this;
}

boolean PDU__RRM__PartialReleaseComplete__MS__NW::operator==(const PDU__RRM__PartialReleaseComplete__MS__NW& other_value) const
{
return field_messageType==other_value.field_messageType;
}

boolean PDU__RRM__PartialReleaseComplete__MS__NW::is_bound() const
{
return (field_messageType.is_bound());
}
boolean PDU__RRM__PartialReleaseComplete__MS__NW::is_value() const
{
return field_messageType.is_value();
}
void PDU__RRM__PartialReleaseComplete__MS__NW::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__RRM__PartialReleaseComplete__MS__NW::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
}

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

void PDU__RRM__PartialReleaseComplete__MS__NW::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
}

void PDU__RRM__PartialReleaseComplete__MS__NW::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
}

void PDU__RRM__PartialReleaseComplete__MS__NW::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 PDU__RRM__PartialReleaseComplete__MS__NW::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 PDU__RRM__PartialReleaseComplete__MS__NW::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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());
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__RRM__PartialReleaseComplete__MS__NW::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 = 1;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(1);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, General__Types::BIT8_descr_.raw);
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  return myleaf.length = encoded_length;
}

struct PDU__RRM__PartialReleaseComplete__MS__NW_template::single_value_struct {
BITSTRING_template field_messageType;
};

void PDU__RRM__PartialReleaseComplete__MS__NW_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_messageType = ANY_VALUE;
}
}
}

void PDU__RRM__PartialReleaseComplete__MS__NW_template::copy_value(const PDU__RRM__PartialReleaseComplete__MS__NW& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__PartialReleaseComplete__MS__NW_template::copy_template(const PDU__RRM__PartialReleaseComplete__MS__NW_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.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 PDU__RRM__PartialReleaseComplete__MS__NW_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 PDU__RRM__PartialReleaseComplete__MS__NW_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__PartialReleaseComplete__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_PartialReleaseComplete_MS_NW.");
break;
}
set_selection(other_value);
}

PDU__RRM__PartialReleaseComplete__MS__NW_template::PDU__RRM__PartialReleaseComplete__MS__NW_template()
{
}

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

PDU__RRM__PartialReleaseComplete__MS__NW_template::PDU__RRM__PartialReleaseComplete__MS__NW_template(const PDU__RRM__PartialReleaseComplete__MS__NW& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PDU__RRM__PartialReleaseComplete__MS__NW_template::match(const PDU__RRM__PartialReleaseComplete__MS__NW& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), 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 @MobileL3_RRM_Types.PDU_RRM_PartialReleaseComplete_MS_NW.");
}
return FALSE;
}

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

boolean PDU__RRM__PartialReleaseComplete__MS__NW_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value();
}

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

PDU__RRM__PartialReleaseComplete__MS__NW PDU__RRM__PartialReleaseComplete__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_PartialReleaseComplete_MS_NW.");
PDU__RRM__PartialReleaseComplete__MS__NW ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
return ret_val;
}

void PDU__RRM__PartialReleaseComplete__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_PartialReleaseComplete_MS_NW.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__PartialReleaseComplete__MS__NW_template[list_length];
}

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

BITSTRING_template& PDU__RRM__PartialReleaseComplete__MS__NW_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& PDU__RRM__PartialReleaseComplete__MS__NW_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PartialReleaseComplete_MS_NW.");
return single_value->field_messageType;
}

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

void PDU__RRM__PartialReleaseComplete__MS__NW_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.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 PDU__RRM__PartialReleaseComplete__MS__NW_template::log_match(const PDU__RRM__PartialReleaseComplete__MS__NW& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), 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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), 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 PDU__RRM__PartialReleaseComplete__MS__NW_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
}

void PDU__RRM__PartialReleaseComplete__MS__NW_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.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 @MobileL3_RRM_Types.PDU_RRM_PartialReleaseComplete_MS_NW.");
}
}

void PDU__RRM__PartialReleaseComplete__MS__NW_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_messageType.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 PDU__RRM__PartialReleaseComplete__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_PartialReleaseComplete_MS_NW.");
}
}

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

void PDU__RRM__PartialReleaseComplete__MS__NW_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PartialReleaseComplete_MS_NW");
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 : "@MobileL3_RRM_Types.PDU_RRM_PartialReleaseComplete_MS_NW");
}

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

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

PDU__RRM__PhysicalInformation__NW__MS::PDU__RRM__PhysicalInformation__NW__MS()
{
}

PDU__RRM__PhysicalInformation__NW__MS::PDU__RRM__PhysicalInformation__NW__MS(const BITSTRING& par_messageType,
    const OCTETSTRING& par_timingAdvance)
  :   field_messageType(par_messageType),
  field_timingAdvance(par_timingAdvance)
{
}

PDU__RRM__PhysicalInformation__NW__MS::PDU__RRM__PhysicalInformation__NW__MS(const PDU__RRM__PhysicalInformation__NW__MS& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PhysicalInformation_NW_MS.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.timingAdvance().is_bound()) field_timingAdvance = other_value.timingAdvance();
else field_timingAdvance.clean_up();
}

void PDU__RRM__PhysicalInformation__NW__MS::clean_up()
{
field_messageType.clean_up();
field_timingAdvance.clean_up();
}

const TTCN_Typedescriptor_t* PDU__RRM__PhysicalInformation__NW__MS::get_descriptor() const { return &PDU__RRM__PhysicalInformation__NW__MS_descr_; }
PDU__RRM__PhysicalInformation__NW__MS& PDU__RRM__PhysicalInformation__NW__MS::operator=(const PDU__RRM__PhysicalInformation__NW__MS& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.PDU_RRM_PhysicalInformation_NW_MS.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.timingAdvance().is_bound()) field_timingAdvance = other_value.timingAdvance();
  else field_timingAdvance.clean_up();
}
return *this;
}

boolean PDU__RRM__PhysicalInformation__NW__MS::operator==(const PDU__RRM__PhysicalInformation__NW__MS& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_timingAdvance==other_value.field_timingAdvance;
}

boolean PDU__RRM__PhysicalInformation__NW__MS::is_bound() const
{
return (field_messageType.is_bound())
  || (field_timingAdvance.is_bound());
}
boolean PDU__RRM__PhysicalInformation__NW__MS::is_value() const
{
return field_messageType.is_value()
  && field_timingAdvance.is_value();
}
void PDU__RRM__PhysicalInformation__NW__MS::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(", timingAdvance := ");
field_timingAdvance.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__RRM__PhysicalInformation__NW__MS::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (timingAdvance().is_bound()) timingAdvance().set_implicit_omit();
}

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

void PDU__RRM__PhysicalInformation__NW__MS::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_timingAdvance.encode_text(text_buf);
}

void PDU__RRM__PhysicalInformation__NW__MS::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_timingAdvance.decode_text(text_buf);
}

void PDU__RRM__PhysicalInformation__NW__MS::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 PDU__RRM__PhysicalInformation__NW__MS::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 PDU__RRM__PhysicalInformation__NW__MS::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_timingAdvance.RAW_decode(General__Types::OCT1_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 PDU__RRM__PhysicalInformation__NW__MS::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, General__Types::BIT8_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::OCT1_descr_.raw);
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_timingAdvance.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct PDU__RRM__PhysicalInformation__NW__MS_template::single_value_struct {
BITSTRING_template field_messageType;
OCTETSTRING_template field_timingAdvance;
};

void PDU__RRM__PhysicalInformation__NW__MS_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_messageType = ANY_VALUE;
single_value->field_timingAdvance = ANY_VALUE;
}
}
}

void PDU__RRM__PhysicalInformation__NW__MS_template::copy_value(const PDU__RRM__PhysicalInformation__NW__MS& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
if (other_value.timingAdvance().is_bound()) {
  single_value->field_timingAdvance = other_value.timingAdvance();
} else {
  single_value->field_timingAdvance.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__PhysicalInformation__NW__MS_template::copy_template(const PDU__RRM__PhysicalInformation__NW__MS_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.timingAdvance().get_selection()) {
single_value->field_timingAdvance = other_value.timingAdvance();
} else {
single_value->field_timingAdvance.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 PDU__RRM__PhysicalInformation__NW__MS_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 PDU__RRM__PhysicalInformation__NW__MS_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__PhysicalInformation__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PhysicalInformation_NW_MS.");
break;
}
set_selection(other_value);
}

PDU__RRM__PhysicalInformation__NW__MS_template::PDU__RRM__PhysicalInformation__NW__MS_template()
{
}

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

PDU__RRM__PhysicalInformation__NW__MS_template::PDU__RRM__PhysicalInformation__NW__MS_template(const PDU__RRM__PhysicalInformation__NW__MS& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PDU__RRM__PhysicalInformation__NW__MS_template::match(const PDU__RRM__PhysicalInformation__NW__MS& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), legacy))return FALSE;
if(!other_value.timingAdvance().is_bound()) return FALSE;
if(!single_value->field_timingAdvance.match(other_value.timingAdvance(), 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 @MobileL3_RRM_Types.PDU_RRM_PhysicalInformation_NW_MS.");
}
return FALSE;
}

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

boolean PDU__RRM__PhysicalInformation__NW__MS_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_timingAdvance.is_value();
}

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

PDU__RRM__PhysicalInformation__NW__MS PDU__RRM__PhysicalInformation__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PhysicalInformation_NW_MS.");
PDU__RRM__PhysicalInformation__NW__MS ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_timingAdvance.is_bound()) {
ret_val.timingAdvance() = single_value->field_timingAdvance.valueof();
}
return ret_val;
}

void PDU__RRM__PhysicalInformation__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PhysicalInformation_NW_MS.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__PhysicalInformation__NW__MS_template[list_length];
}

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

BITSTRING_template& PDU__RRM__PhysicalInformation__NW__MS_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& PDU__RRM__PhysicalInformation__NW__MS_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PhysicalInformation_NW_MS.");
return single_value->field_messageType;
}

OCTETSTRING_template& PDU__RRM__PhysicalInformation__NW__MS_template::timingAdvance()
{
set_specific();
return single_value->field_timingAdvance;
}

const OCTETSTRING_template& PDU__RRM__PhysicalInformation__NW__MS_template::timingAdvance() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field timingAdvance of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_PhysicalInformation_NW_MS.");
return single_value->field_timingAdvance;
}

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

void PDU__RRM__PhysicalInformation__NW__MS_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.log();
TTCN_Logger::log_event_str(", timingAdvance := ");
single_value->field_timingAdvance.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 PDU__RRM__PhysicalInformation__NW__MS_template::log_match(const PDU__RRM__PhysicalInformation__NW__MS& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_timingAdvance.match(match_value.timingAdvance(), legacy)){
TTCN_Logger::log_logmatch_info(".timingAdvance");
single_value->field_timingAdvance.log_match(match_value.timingAdvance(), 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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::log_event_str(", timingAdvance := ");
single_value->field_timingAdvance.log_match(match_value.timingAdvance(), 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 PDU__RRM__PhysicalInformation__NW__MS_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
if (timingAdvance().is_bound()) timingAdvance().set_implicit_omit();
}

void PDU__RRM__PhysicalInformation__NW__MS_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.encode_text(text_buf);
single_value->field_timingAdvance.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 @MobileL3_RRM_Types.PDU_RRM_PhysicalInformation_NW_MS.");
}
}

void PDU__RRM__PhysicalInformation__NW__MS_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_messageType.decode_text(text_buf);
single_value->field_timingAdvance.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 PDU__RRM__PhysicalInformation__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_PhysicalInformation_NW_MS.");
}
}

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

void PDU__RRM__PhysicalInformation__NW__MS_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PhysicalInformation_NW_MS");
single_value->field_timingAdvance.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_PhysicalInformation_NW_MS");
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 : "@MobileL3_RRM_Types.PDU_RRM_PhysicalInformation_NW_MS");
}

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

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

PDU__RRM__RR__Status::PDU__RRM__RR__Status()
{
}

PDU__RRM__RR__Status::PDU__RRM__RR__Status(const BITSTRING& par_messageType,
    const RR__Cause__V& par_rR__Cause)
  :   field_messageType(par_messageType),
  field_rR__Cause(par_rR__Cause)
{
}

PDU__RRM__RR__Status::PDU__RRM__RR__Status(const PDU__RRM__RR__Status& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.PDU_RRM_RR_Status.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.rR__Cause().is_bound()) field_rR__Cause = other_value.rR__Cause();
else field_rR__Cause.clean_up();
}

void PDU__RRM__RR__Status::clean_up()
{
field_messageType.clean_up();
field_rR__Cause.clean_up();
}

const TTCN_Typedescriptor_t* PDU__RRM__RR__Status::get_descriptor() const { return &PDU__RRM__RR__Status_descr_; }
PDU__RRM__RR__Status& PDU__RRM__RR__Status::operator=(const PDU__RRM__RR__Status& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.PDU_RRM_RR_Status.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.rR__Cause().is_bound()) field_rR__Cause = other_value.rR__Cause();
  else field_rR__Cause.clean_up();
}
return *this;
}

boolean PDU__RRM__RR__Status::operator==(const PDU__RRM__RR__Status& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_rR__Cause==other_value.field_rR__Cause;
}

boolean PDU__RRM__RR__Status::is_bound() const
{
return (field_messageType.is_bound())
  || (field_rR__Cause.is_bound());
}
boolean PDU__RRM__RR__Status::is_value() const
{
return field_messageType.is_value()
  && field_rR__Cause.is_value();
}
void PDU__RRM__RR__Status::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(", rR_Cause := ");
field_rR__Cause.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__RRM__RR__Status::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (rR__Cause().is_bound()) rR__Cause().set_implicit_omit();
}

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

void PDU__RRM__RR__Status::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_rR__Cause.encode_text(text_buf);
}

void PDU__RRM__RR__Status::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_rR__Cause.decode_text(text_buf);
}

void PDU__RRM__RR__Status::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 PDU__RRM__RR__Status::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 PDU__RRM__RR__Status::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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, RR__Cause__V_descr_.raw->forceomit);
  decoded_field_length = field_rR__Cause.RAW_decode(RR__Cause__V_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 PDU__RRM__RR__Status::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, General__Types::BIT8_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, RR__Cause__V_descr_.raw);
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_rR__Cause.RAW_encode(RR__Cause__V_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct PDU__RRM__RR__Status_template::single_value_struct {
BITSTRING_template field_messageType;
RR__Cause__V_template field_rR__Cause;
};

void PDU__RRM__RR__Status_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_messageType = ANY_VALUE;
single_value->field_rR__Cause = ANY_VALUE;
}
}
}

void PDU__RRM__RR__Status_template::copy_value(const PDU__RRM__RR__Status& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
if (other_value.rR__Cause().is_bound()) {
  single_value->field_rR__Cause = other_value.rR__Cause();
} else {
  single_value->field_rR__Cause.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__RR__Status_template::copy_template(const PDU__RRM__RR__Status_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.rR__Cause().get_selection()) {
single_value->field_rR__Cause = other_value.rR__Cause();
} else {
single_value->field_rR__Cause.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 PDU__RRM__RR__Status_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 PDU__RRM__RR__Status_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__RR__Status_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 @MobileL3_RRM_Types.PDU_RRM_RR_Status.");
break;
}
set_selection(other_value);
}

PDU__RRM__RR__Status_template::PDU__RRM__RR__Status_template()
{
}

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

PDU__RRM__RR__Status_template::PDU__RRM__RR__Status_template(const PDU__RRM__RR__Status& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PDU__RRM__RR__Status_template::match(const PDU__RRM__RR__Status& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), legacy))return FALSE;
if(!other_value.rR__Cause().is_bound()) return FALSE;
if(!single_value->field_rR__Cause.match(other_value.rR__Cause(), 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 @MobileL3_RRM_Types.PDU_RRM_RR_Status.");
}
return FALSE;
}

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

boolean PDU__RRM__RR__Status_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_rR__Cause.is_value();
}

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

PDU__RRM__RR__Status PDU__RRM__RR__Status_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 @MobileL3_RRM_Types.PDU_RRM_RR_Status.");
PDU__RRM__RR__Status ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_rR__Cause.is_bound()) {
ret_val.rR__Cause() = single_value->field_rR__Cause.valueof();
}
return ret_val;
}

void PDU__RRM__RR__Status_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 @MobileL3_RRM_Types.PDU_RRM_RR_Status.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__RR__Status_template[list_length];
}

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

BITSTRING_template& PDU__RRM__RR__Status_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& PDU__RRM__RR__Status_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_RR_Status.");
return single_value->field_messageType;
}

RR__Cause__V_template& PDU__RRM__RR__Status_template::rR__Cause()
{
set_specific();
return single_value->field_rR__Cause;
}

const RR__Cause__V_template& PDU__RRM__RR__Status_template::rR__Cause() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field rR_Cause of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_RR_Status.");
return single_value->field_rR__Cause;
}

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

void PDU__RRM__RR__Status_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.log();
TTCN_Logger::log_event_str(", rR_Cause := ");
single_value->field_rR__Cause.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 PDU__RRM__RR__Status_template::log_match(const PDU__RRM__RR__Status& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_rR__Cause.match(match_value.rR__Cause(), legacy)){
TTCN_Logger::log_logmatch_info(".rR_Cause");
single_value->field_rR__Cause.log_match(match_value.rR__Cause(), 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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::log_event_str(", rR_Cause := ");
single_value->field_rR__Cause.log_match(match_value.rR__Cause(), 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 PDU__RRM__RR__Status_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
if (rR__Cause().is_bound()) rR__Cause().set_implicit_omit();
}

void PDU__RRM__RR__Status_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.encode_text(text_buf);
single_value->field_rR__Cause.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 @MobileL3_RRM_Types.PDU_RRM_RR_Status.");
}
}

void PDU__RRM__RR__Status_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_messageType.decode_text(text_buf);
single_value->field_rR__Cause.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 PDU__RRM__RR__Status_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 @MobileL3_RRM_Types.PDU_RRM_RR_Status.");
}
}

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

void PDU__RRM__RR__Status_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_RR_Status");
single_value->field_rR__Cause.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_RR_Status");
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 : "@MobileL3_RRM_Types.PDU_RRM_RR_Status");
}

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

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

PDU__RRM__TalkerIndication__MS__NW::PDU__RRM__TalkerIndication__MS__NW()
{
}

PDU__RRM__TalkerIndication__MS__NW::PDU__RRM__TalkerIndication__MS__NW(const BITSTRING& par_messageType,
    const MobileL3__CommonIE__Types::MobileStationClassmark2__LV& par_mobileStationClassmark,
    const MobileL3__CommonIE__Types::MobileIdentityLV& par_mobileIdentity,
    const OPTIONAL< MobileL3__CommonIE__Types::CipheringKeySequenceNumberTV >& par_cipheringKeySequenceNumber)
  :   field_messageType(par_messageType),
  field_mobileStationClassmark(par_mobileStationClassmark),
  field_mobileIdentity(par_mobileIdentity),
  field_cipheringKeySequenceNumber(par_cipheringKeySequenceNumber)
{
}

PDU__RRM__TalkerIndication__MS__NW::PDU__RRM__TalkerIndication__MS__NW(const PDU__RRM__TalkerIndication__MS__NW& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.mobileStationClassmark().is_bound()) field_mobileStationClassmark = other_value.mobileStationClassmark();
else field_mobileStationClassmark.clean_up();
if (other_value.mobileIdentity().is_bound()) field_mobileIdentity = other_value.mobileIdentity();
else field_mobileIdentity.clean_up();
if (other_value.cipheringKeySequenceNumber().is_bound()) field_cipheringKeySequenceNumber = other_value.cipheringKeySequenceNumber();
else field_cipheringKeySequenceNumber.clean_up();
}

void PDU__RRM__TalkerIndication__MS__NW::clean_up()
{
field_messageType.clean_up();
field_mobileStationClassmark.clean_up();
field_mobileIdentity.clean_up();
field_cipheringKeySequenceNumber.clean_up();
}

const TTCN_Typedescriptor_t* PDU__RRM__TalkerIndication__MS__NW::get_descriptor() const { return &PDU__RRM__TalkerIndication__MS__NW_descr_; }
PDU__RRM__TalkerIndication__MS__NW& PDU__RRM__TalkerIndication__MS__NW::operator=(const PDU__RRM__TalkerIndication__MS__NW& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.mobileStationClassmark().is_bound()) field_mobileStationClassmark = other_value.mobileStationClassmark();
  else field_mobileStationClassmark.clean_up();
  if (other_value.mobileIdentity().is_bound()) field_mobileIdentity = other_value.mobileIdentity();
  else field_mobileIdentity.clean_up();
  if (other_value.cipheringKeySequenceNumber().is_bound()) field_cipheringKeySequenceNumber = other_value.cipheringKeySequenceNumber();
  else field_cipheringKeySequenceNumber.clean_up();
}
return *this;
}

boolean PDU__RRM__TalkerIndication__MS__NW::operator==(const PDU__RRM__TalkerIndication__MS__NW& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_mobileStationClassmark==other_value.field_mobileStationClassmark
  && field_mobileIdentity==other_value.field_mobileIdentity
  && field_cipheringKeySequenceNumber==other_value.field_cipheringKeySequenceNumber;
}

boolean PDU__RRM__TalkerIndication__MS__NW::is_bound() const
{
return (field_messageType.is_bound())
  || (field_mobileStationClassmark.is_bound())
  || (field_mobileIdentity.is_bound())
  || (OPTIONAL_OMIT == field_cipheringKeySequenceNumber.get_selection() || field_cipheringKeySequenceNumber.is_bound());
}
boolean PDU__RRM__TalkerIndication__MS__NW::is_value() const
{
return field_messageType.is_value()
  && field_mobileStationClassmark.is_value()
  && field_mobileIdentity.is_value()
  && (OPTIONAL_OMIT == field_cipheringKeySequenceNumber.get_selection() || field_cipheringKeySequenceNumber.is_value());
}
int PDU__RRM__TalkerIndication__MS__NW::size_of() const
{
  int ret_val = 3;
  if (field_cipheringKeySequenceNumber.ispresent()) ret_val++;
  return ret_val;
}

void PDU__RRM__TalkerIndication__MS__NW::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(", mobileStationClassmark := ");
field_mobileStationClassmark.log();
TTCN_Logger::log_event_str(", mobileIdentity := ");
field_mobileIdentity.log();
TTCN_Logger::log_event_str(", cipheringKeySequenceNumber := ");
field_cipheringKeySequenceNumber.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__RRM__TalkerIndication__MS__NW::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (mobileStationClassmark().is_bound()) mobileStationClassmark().set_implicit_omit();
if (mobileIdentity().is_bound()) mobileIdentity().set_implicit_omit();
if (!cipheringKeySequenceNumber().is_bound()) cipheringKeySequenceNumber() = OMIT_VALUE;
else cipheringKeySequenceNumber().set_implicit_omit();
}

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

void PDU__RRM__TalkerIndication__MS__NW::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_mobileStationClassmark.encode_text(text_buf);
field_mobileIdentity.encode_text(text_buf);
field_cipheringKeySequenceNumber.encode_text(text_buf);
}

void PDU__RRM__TalkerIndication__MS__NW::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_mobileStationClassmark.decode_text(text_buf);
field_mobileIdentity.decode_text(text_buf);
field_cipheringKeySequenceNumber.decode_text(text_buf);
}

void PDU__RRM__TalkerIndication__MS__NW::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 PDU__RRM__TalkerIndication__MS__NW::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 PDU__RRM__TalkerIndication__MS__NW::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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, MobileL3__CommonIE__Types::MobileStationClassmark2__LV_descr_.raw->forceomit);
  decoded_field_length = field_mobileStationClassmark.RAW_decode(MobileL3__CommonIE__Types::MobileStationClassmark2__LV_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, MobileL3__CommonIE__Types::MobileIdentityLV_descr_.raw->forceomit);
  decoded_field_length = field_mobileIdentity.RAW_decode(MobileL3__CommonIE__Types::MobileIdentityLV_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){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_cipheringKeySequenceNumber = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, MobileL3__CommonIE__Types::CipheringKeySequenceNumberTV_descr_.raw->forceomit);
  decoded_field_length = field_cipheringKeySequenceNumber().RAW_decode(MobileL3__CommonIE__Types::CipheringKeySequenceNumberTV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_cipheringKeySequenceNumber = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_cipheringKeySequenceNumber.ispresent() || field_cipheringKeySequenceNumber().elementIdentifier() !=  bs_13){
  field_cipheringKeySequenceNumber=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_cipheringKeySequenceNumber=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__RRM__TalkerIndication__MS__NW::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, General__Types::BIT8_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, MobileL3__CommonIE__Types::MobileStationClassmark2__LV_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, MobileL3__CommonIE__Types::MobileIdentityLV_descr_.raw);
  if (field_cipheringKeySequenceNumber.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, MobileL3__CommonIE__Types::CipheringKeySequenceNumberTV_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_mobileStationClassmark.RAW_encode(MobileL3__CommonIE__Types::MobileStationClassmark2__LV_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_mobileIdentity.RAW_encode(MobileL3__CommonIE__Types::MobileIdentityLV_descr_, *myleaf.body.node.nodes[2]);
  if (field_cipheringKeySequenceNumber.ispresent()) {
  encoded_length += field_cipheringKeySequenceNumber().RAW_encode(MobileL3__CommonIE__Types::CipheringKeySequenceNumberTV_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_cipheringKeySequenceNumber.ispresent() && (!field_cipheringKeySequenceNumber.ispresent() || field_cipheringKeySequenceNumber().elementIdentifier() !=  bs_13)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={3,1};
  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(General__Types::BIT4_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 PDU__RRM__TalkerIndication__MS__NW_template::single_value_struct {
BITSTRING_template field_messageType;
MobileL3__CommonIE__Types::MobileStationClassmark2__LV_template field_mobileStationClassmark;
MobileL3__CommonIE__Types::MobileIdentityLV_template field_mobileIdentity;
MobileL3__CommonIE__Types::CipheringKeySequenceNumberTV_template field_cipheringKeySequenceNumber;
};

void PDU__RRM__TalkerIndication__MS__NW_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_messageType = ANY_VALUE;
single_value->field_mobileStationClassmark = ANY_VALUE;
single_value->field_mobileIdentity = ANY_VALUE;
single_value->field_cipheringKeySequenceNumber = ANY_OR_OMIT;
}
}
}

void PDU__RRM__TalkerIndication__MS__NW_template::copy_value(const PDU__RRM__TalkerIndication__MS__NW& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
if (other_value.mobileStationClassmark().is_bound()) {
  single_value->field_mobileStationClassmark = other_value.mobileStationClassmark();
} else {
  single_value->field_mobileStationClassmark.clean_up();
}
if (other_value.mobileIdentity().is_bound()) {
  single_value->field_mobileIdentity = other_value.mobileIdentity();
} else {
  single_value->field_mobileIdentity.clean_up();
}
if (other_value.cipheringKeySequenceNumber().is_bound()) {
  if (other_value.cipheringKeySequenceNumber().ispresent()) single_value->field_cipheringKeySequenceNumber = other_value.cipheringKeySequenceNumber()();
  else single_value->field_cipheringKeySequenceNumber = OMIT_VALUE;
} else {
  single_value->field_cipheringKeySequenceNumber.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__TalkerIndication__MS__NW_template::copy_template(const PDU__RRM__TalkerIndication__MS__NW_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mobileStationClassmark().get_selection()) {
single_value->field_mobileStationClassmark = other_value.mobileStationClassmark();
} else {
single_value->field_mobileStationClassmark.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mobileIdentity().get_selection()) {
single_value->field_mobileIdentity = other_value.mobileIdentity();
} else {
single_value->field_mobileIdentity.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.cipheringKeySequenceNumber().get_selection()) {
single_value->field_cipheringKeySequenceNumber = other_value.cipheringKeySequenceNumber();
} else {
single_value->field_cipheringKeySequenceNumber.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 PDU__RRM__TalkerIndication__MS__NW_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 PDU__RRM__TalkerIndication__MS__NW_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__TalkerIndication__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW.");
break;
}
set_selection(other_value);
}

PDU__RRM__TalkerIndication__MS__NW_template::PDU__RRM__TalkerIndication__MS__NW_template()
{
}

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

PDU__RRM__TalkerIndication__MS__NW_template::PDU__RRM__TalkerIndication__MS__NW_template(const PDU__RRM__TalkerIndication__MS__NW& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PDU__RRM__TalkerIndication__MS__NW_template::match(const PDU__RRM__TalkerIndication__MS__NW& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), legacy))return FALSE;
if(!other_value.mobileStationClassmark().is_bound()) return FALSE;
if(!single_value->field_mobileStationClassmark.match(other_value.mobileStationClassmark(), legacy))return FALSE;
if(!other_value.mobileIdentity().is_bound()) return FALSE;
if(!single_value->field_mobileIdentity.match(other_value.mobileIdentity(), legacy))return FALSE;
if(!other_value.cipheringKeySequenceNumber().is_bound()) return FALSE;
if((other_value.cipheringKeySequenceNumber().ispresent() ? !single_value->field_cipheringKeySequenceNumber.match((const MobileL3__CommonIE__Types::CipheringKeySequenceNumberTV&)other_value.cipheringKeySequenceNumber(), legacy) : !single_value->field_cipheringKeySequenceNumber.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 @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW.");
}
return FALSE;
}

boolean PDU__RRM__TalkerIndication__MS__NW_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_messageType.is_bound()
 || single_value->field_mobileStationClassmark.is_bound()
 || single_value->field_mobileIdentity.is_bound()
 || (single_value->field_cipheringKeySequenceNumber.is_omit() || single_value->field_cipheringKeySequenceNumber.is_bound());
}

boolean PDU__RRM__TalkerIndication__MS__NW_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_mobileStationClassmark.is_value()
 && single_value->field_mobileIdentity.is_value()
 && (single_value->field_cipheringKeySequenceNumber.is_omit() || single_value->field_cipheringKeySequenceNumber.is_value());
}

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

PDU__RRM__TalkerIndication__MS__NW PDU__RRM__TalkerIndication__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW.");
PDU__RRM__TalkerIndication__MS__NW ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_mobileStationClassmark.is_bound()) {
ret_val.mobileStationClassmark() = single_value->field_mobileStationClassmark.valueof();
}
if (single_value->field_mobileIdentity.is_bound()) {
ret_val.mobileIdentity() = single_value->field_mobileIdentity.valueof();
}
if (single_value->field_cipheringKeySequenceNumber.is_omit()) ret_val.cipheringKeySequenceNumber() = OMIT_VALUE;
else if (single_value->field_cipheringKeySequenceNumber.is_bound()) {
ret_val.cipheringKeySequenceNumber() = single_value->field_cipheringKeySequenceNumber.valueof();
}
return ret_val;
}

void PDU__RRM__TalkerIndication__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__TalkerIndication__MS__NW_template[list_length];
}

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

BITSTRING_template& PDU__RRM__TalkerIndication__MS__NW_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& PDU__RRM__TalkerIndication__MS__NW_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW.");
return single_value->field_messageType;
}

MobileL3__CommonIE__Types::MobileStationClassmark2__LV_template& PDU__RRM__TalkerIndication__MS__NW_template::mobileStationClassmark()
{
set_specific();
return single_value->field_mobileStationClassmark;
}

const MobileL3__CommonIE__Types::MobileStationClassmark2__LV_template& PDU__RRM__TalkerIndication__MS__NW_template::mobileStationClassmark() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mobileStationClassmark of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW.");
return single_value->field_mobileStationClassmark;
}

MobileL3__CommonIE__Types::MobileIdentityLV_template& PDU__RRM__TalkerIndication__MS__NW_template::mobileIdentity()
{
set_specific();
return single_value->field_mobileIdentity;
}

const MobileL3__CommonIE__Types::MobileIdentityLV_template& PDU__RRM__TalkerIndication__MS__NW_template::mobileIdentity() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mobileIdentity of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW.");
return single_value->field_mobileIdentity;
}

MobileL3__CommonIE__Types::CipheringKeySequenceNumberTV_template& PDU__RRM__TalkerIndication__MS__NW_template::cipheringKeySequenceNumber()
{
set_specific();
return single_value->field_cipheringKeySequenceNumber;
}

const MobileL3__CommonIE__Types::CipheringKeySequenceNumberTV_template& PDU__RRM__TalkerIndication__MS__NW_template::cipheringKeySequenceNumber() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field cipheringKeySequenceNumber of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW.");
return single_value->field_cipheringKeySequenceNumber;
}

int PDU__RRM__TalkerIndication__MS__NW_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
  {    int ret_val = 3;
      if (single_value->field_cipheringKeySequenceNumber.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 @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW 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 @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW containing a value list with different sizes.");
      }
      return item_size;
    }
  case OMIT_VALUE:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW.");
  }
  return 0;
}

void PDU__RRM__TalkerIndication__MS__NW_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.log();
TTCN_Logger::log_event_str(", mobileStationClassmark := ");
single_value->field_mobileStationClassmark.log();
TTCN_Logger::log_event_str(", mobileIdentity := ");
single_value->field_mobileIdentity.log();
TTCN_Logger::log_event_str(", cipheringKeySequenceNumber := ");
single_value->field_cipheringKeySequenceNumber.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 PDU__RRM__TalkerIndication__MS__NW_template::log_match(const PDU__RRM__TalkerIndication__MS__NW& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mobileStationClassmark.match(match_value.mobileStationClassmark(), legacy)){
TTCN_Logger::log_logmatch_info(".mobileStationClassmark");
single_value->field_mobileStationClassmark.log_match(match_value.mobileStationClassmark(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_mobileIdentity.match(match_value.mobileIdentity(), legacy)){
TTCN_Logger::log_logmatch_info(".mobileIdentity");
single_value->field_mobileIdentity.log_match(match_value.mobileIdentity(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.cipheringKeySequenceNumber().ispresent()){
if(!single_value->field_cipheringKeySequenceNumber.match(match_value.cipheringKeySequenceNumber(), legacy)){
TTCN_Logger::log_logmatch_info(".cipheringKeySequenceNumber");
single_value->field_cipheringKeySequenceNumber.log_match(match_value.cipheringKeySequenceNumber(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_cipheringKeySequenceNumber.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".cipheringKeySequenceNumber := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_cipheringKeySequenceNumber.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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::log_event_str(", mobileStationClassmark := ");
single_value->field_mobileStationClassmark.log_match(match_value.mobileStationClassmark(), legacy);
TTCN_Logger::log_event_str(", mobileIdentity := ");
single_value->field_mobileIdentity.log_match(match_value.mobileIdentity(), legacy);
TTCN_Logger::log_event_str(", cipheringKeySequenceNumber := ");
if (match_value.cipheringKeySequenceNumber().ispresent()) {
single_value->field_cipheringKeySequenceNumber.log_match(match_value.cipheringKeySequenceNumber(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_cipheringKeySequenceNumber.log();
if (single_value->field_cipheringKeySequenceNumber.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 PDU__RRM__TalkerIndication__MS__NW_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
if (mobileStationClassmark().is_bound()) mobileStationClassmark().set_implicit_omit();
if (mobileIdentity().is_bound()) mobileIdentity().set_implicit_omit();
if (!cipheringKeySequenceNumber().is_bound()) cipheringKeySequenceNumber() = OMIT_VALUE;
else cipheringKeySequenceNumber().set_implicit_omit();
}

void PDU__RRM__TalkerIndication__MS__NW_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.encode_text(text_buf);
single_value->field_mobileStationClassmark.encode_text(text_buf);
single_value->field_mobileIdentity.encode_text(text_buf);
single_value->field_cipheringKeySequenceNumber.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 @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW.");
}
}

void PDU__RRM__TalkerIndication__MS__NW_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_messageType.decode_text(text_buf);
single_value->field_mobileStationClassmark.decode_text(text_buf);
single_value->field_mobileIdentity.decode_text(text_buf);
single_value->field_cipheringKeySequenceNumber.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 PDU__RRM__TalkerIndication__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW.");
}
}

void PDU__RRM__TalkerIndication__MS__NW_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: {
    PDU__RRM__TalkerIndication__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW 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) messageType().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) mobileStationClassmark().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) mobileIdentity().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) cipheringKeySequenceNumber().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(), "messageType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          messageType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mobileStationClassmark")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mobileStationClassmark().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mobileIdentity")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mobileIdentity().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "cipheringKeySequenceNumber")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          cipheringKeySequenceNumber().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 @MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__RRM__TalkerIndication__MS__NW_template* precondition = new PDU__RRM__TalkerIndication__MS__NW_template;
    precondition->set_param(*param.get_elem(0));
    PDU__RRM__TalkerIndication__MS__NW_template* implied_template = new PDU__RRM__TalkerIndication__MS__NW_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__RRM__TalkerIndication__MS__NW_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__RRM__TalkerIndication__MS__NW_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW");
single_value->field_mobileStationClassmark.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW");
single_value->field_mobileIdentity.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW");
single_value->field_cipheringKeySequenceNumber.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW");
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 : "@MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW");
}

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

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

PDU__RRM__UplinkBusy__NW__MS::PDU__RRM__UplinkBusy__NW__MS()
{
}

PDU__RRM__UplinkBusy__NW__MS::PDU__RRM__UplinkBusy__NW__MS(const BITSTRING& par_messageType,
    const OPTIONAL< TalkerPriorityStatus__TLV >& par_talkerPriorityStatus,
    const OPTIONAL< Token__TV >& par_token,
    const OPTIONAL< TalkerIdentity__TLV >& par_talkerIdentity,
    const OPTIONAL< UplinkAccessIndication__TV >& par_uplinkAccessIndication)
  :   field_messageType(par_messageType),
  field_talkerPriorityStatus(par_talkerPriorityStatus),
  field_token(par_token),
  field_talkerIdentity(par_talkerIdentity),
  field_uplinkAccessIndication(par_uplinkAccessIndication)
{
}

PDU__RRM__UplinkBusy__NW__MS::PDU__RRM__UplinkBusy__NW__MS(const PDU__RRM__UplinkBusy__NW__MS& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.talkerPriorityStatus().is_bound()) field_talkerPriorityStatus = other_value.talkerPriorityStatus();
else field_talkerPriorityStatus.clean_up();
if (other_value.token().is_bound()) field_token = other_value.token();
else field_token.clean_up();
if (other_value.talkerIdentity().is_bound()) field_talkerIdentity = other_value.talkerIdentity();
else field_talkerIdentity.clean_up();
if (other_value.uplinkAccessIndication().is_bound()) field_uplinkAccessIndication = other_value.uplinkAccessIndication();
else field_uplinkAccessIndication.clean_up();
}

void PDU__RRM__UplinkBusy__NW__MS::clean_up()
{
field_messageType.clean_up();
field_talkerPriorityStatus.clean_up();
field_token.clean_up();
field_talkerIdentity.clean_up();
field_uplinkAccessIndication.clean_up();
}

const TTCN_Typedescriptor_t* PDU__RRM__UplinkBusy__NW__MS::get_descriptor() const { return &PDU__RRM__UplinkBusy__NW__MS_descr_; }
PDU__RRM__UplinkBusy__NW__MS& PDU__RRM__UplinkBusy__NW__MS::operator=(const PDU__RRM__UplinkBusy__NW__MS& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.talkerPriorityStatus().is_bound()) field_talkerPriorityStatus = other_value.talkerPriorityStatus();
  else field_talkerPriorityStatus.clean_up();
  if (other_value.token().is_bound()) field_token = other_value.token();
  else field_token.clean_up();
  if (other_value.talkerIdentity().is_bound()) field_talkerIdentity = other_value.talkerIdentity();
  else field_talkerIdentity.clean_up();
  if (other_value.uplinkAccessIndication().is_bound()) field_uplinkAccessIndication = other_value.uplinkAccessIndication();
  else field_uplinkAccessIndication.clean_up();
}
return *this;
}

boolean PDU__RRM__UplinkBusy__NW__MS::operator==(const PDU__RRM__UplinkBusy__NW__MS& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_talkerPriorityStatus==other_value.field_talkerPriorityStatus
  && field_token==other_value.field_token
  && field_talkerIdentity==other_value.field_talkerIdentity
  && field_uplinkAccessIndication==other_value.field_uplinkAccessIndication;
}

boolean PDU__RRM__UplinkBusy__NW__MS::is_bound() const
{
return (field_messageType.is_bound())
  || (OPTIONAL_OMIT == field_talkerPriorityStatus.get_selection() || field_talkerPriorityStatus.is_bound())
  || (OPTIONAL_OMIT == field_token.get_selection() || field_token.is_bound())
  || (OPTIONAL_OMIT == field_talkerIdentity.get_selection() || field_talkerIdentity.is_bound())
  || (OPTIONAL_OMIT == field_uplinkAccessIndication.get_selection() || field_uplinkAccessIndication.is_bound());
}
boolean PDU__RRM__UplinkBusy__NW__MS::is_value() const
{
return field_messageType.is_value()
  && (OPTIONAL_OMIT == field_talkerPriorityStatus.get_selection() || field_talkerPriorityStatus.is_value())
  && (OPTIONAL_OMIT == field_token.get_selection() || field_token.is_value())
  && (OPTIONAL_OMIT == field_talkerIdentity.get_selection() || field_talkerIdentity.is_value())
  && (OPTIONAL_OMIT == field_uplinkAccessIndication.get_selection() || field_uplinkAccessIndication.is_value());
}
int PDU__RRM__UplinkBusy__NW__MS::size_of() const
{
  int ret_val = 1;
  if (field_talkerPriorityStatus.ispresent()) ret_val++;
  if (field_token.ispresent()) ret_val++;
  if (field_talkerIdentity.ispresent()) ret_val++;
  if (field_uplinkAccessIndication.ispresent()) ret_val++;
  return ret_val;
}

void PDU__RRM__UplinkBusy__NW__MS::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(", talkerPriorityStatus := ");
field_talkerPriorityStatus.log();
TTCN_Logger::log_event_str(", token := ");
field_token.log();
TTCN_Logger::log_event_str(", talkerIdentity := ");
field_talkerIdentity.log();
TTCN_Logger::log_event_str(", uplinkAccessIndication := ");
field_uplinkAccessIndication.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__RRM__UplinkBusy__NW__MS::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (!talkerPriorityStatus().is_bound()) talkerPriorityStatus() = OMIT_VALUE;
else talkerPriorityStatus().set_implicit_omit();
if (!token().is_bound()) token() = OMIT_VALUE;
else token().set_implicit_omit();
if (!talkerIdentity().is_bound()) talkerIdentity() = OMIT_VALUE;
else talkerIdentity().set_implicit_omit();
if (!uplinkAccessIndication().is_bound()) uplinkAccessIndication() = OMIT_VALUE;
else uplinkAccessIndication().set_implicit_omit();
}

void PDU__RRM__UplinkBusy__NW__MS::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 @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS 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) messageType().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) talkerPriorityStatus().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) token().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) talkerIdentity().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) uplinkAccessIndication().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(), "messageType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          messageType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "talkerPriorityStatus")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          talkerPriorityStatus().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "token")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          token().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "talkerIdentity")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          talkerIdentity().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "uplinkAccessIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          uplinkAccessIndication().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 @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS");
  }
}

void PDU__RRM__UplinkBusy__NW__MS::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_talkerPriorityStatus.encode_text(text_buf);
field_token.encode_text(text_buf);
field_talkerIdentity.encode_text(text_buf);
field_uplinkAccessIndication.encode_text(text_buf);
}

void PDU__RRM__UplinkBusy__NW__MS::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_talkerPriorityStatus.decode_text(text_buf);
field_token.decode_text(text_buf);
field_talkerIdentity.decode_text(text_buf);
field_uplinkAccessIndication.decode_text(text_buf);
}

void PDU__RRM__UplinkBusy__NW__MS::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 PDU__RRM__UplinkBusy__NW__MS::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 PDU__RRM__UplinkBusy__NW__MS::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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){
  if (force_omit != NULL && (*force_omit)(1)) {
    field_talkerPriorityStatus = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_1_force_omit(1, force_omit, TalkerPriorityStatus__TLV_descr_.raw->forceomit);
  decoded_field_length = field_talkerPriorityStatus().RAW_decode(TalkerPriorityStatus__TLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 1) {
  field_talkerPriorityStatus = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_talkerPriorityStatus.ispresent() || field_talkerPriorityStatus().elementIdentifier() !=  os_41){
  field_talkerPriorityStatus=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_talkerPriorityStatus=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_token = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, Token__TV_descr_.raw->forceomit);
  decoded_field_length = field_token().RAW_decode(Token__TV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_token = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_token.ispresent() || field_token().elementIdentifier() !=  os_42){
  field_token=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_token=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_talkerIdentity = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, TalkerIdentity__TLV_descr_.raw->forceomit);
  decoded_field_length = field_talkerIdentity().RAW_decode(TalkerIdentity__TLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_talkerIdentity = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_talkerIdentity.ispresent() || field_talkerIdentity().elementIdentifier() !=  os_43){
  field_talkerIdentity=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_talkerIdentity=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_uplinkAccessIndication = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, UplinkAccessIndication__TV_descr_.raw->forceomit);
  decoded_field_length = field_uplinkAccessIndication().RAW_decode(UplinkAccessIndication__TV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_uplinkAccessIndication = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_uplinkAccessIndication.ispresent() || field_uplinkAccessIndication().elementIdentifier() !=  bs_2){
  field_uplinkAccessIndication=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_uplinkAccessIndication=OMIT_VALUE;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__RRM__UplinkBusy__NW__MS::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, General__Types::BIT8_descr_.raw);
  if (field_talkerPriorityStatus.ispresent()) {
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, TalkerPriorityStatus__TLV_descr_.raw);
  }
  else myleaf.body.node.nodes[1] = NULL;
  if (field_token.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, Token__TV_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_talkerIdentity.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, TalkerIdentity__TLV_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_uplinkAccessIndication.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, UplinkAccessIndication__TV_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  if (field_talkerPriorityStatus.ispresent()) {
  encoded_length += field_talkerPriorityStatus().RAW_encode(TalkerPriorityStatus__TLV_descr_, *myleaf.body.node.nodes[1]);
  }
  if (field_token.ispresent()) {
  encoded_length += field_token().RAW_encode(Token__TV_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_talkerIdentity.ispresent()) {
  encoded_length += field_talkerIdentity().RAW_encode(TalkerIdentity__TLV_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_uplinkAccessIndication.ispresent()) {
  encoded_length += field_uplinkAccessIndication().RAW_encode(UplinkAccessIndication__TV_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_talkerPriorityStatus.ispresent() && (!field_talkerPriorityStatus.ispresent() || field_talkerPriorityStatus().elementIdentifier() !=  os_41)) {
  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){
   os_41.RAW_encode(General__Types::OCT1_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_token.ispresent() && (!field_token.ispresent() || field_token().elementIdentifier() !=  os_42)) {
  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){
   os_42.RAW_encode(General__Types::OCT1_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_talkerIdentity.ispresent() && (!field_talkerIdentity.ispresent() || field_talkerIdentity().elementIdentifier() !=  os_43)) {
  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){
   os_43.RAW_encode(General__Types::OCT1_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_uplinkAccessIndication.ispresent() && (!field_uplinkAccessIndication.ispresent() || field_uplinkAccessIndication().elementIdentifier() !=  bs_2)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={4,2};
  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_2.RAW_encode(General__Types::BIT4_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 PDU__RRM__UplinkBusy__NW__MS_template::single_value_struct {
BITSTRING_template field_messageType;
TalkerPriorityStatus__TLV_template field_talkerPriorityStatus;
Token__TV_template field_token;
TalkerIdentity__TLV_template field_talkerIdentity;
UplinkAccessIndication__TV_template field_uplinkAccessIndication;
};

void PDU__RRM__UplinkBusy__NW__MS_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_messageType = ANY_VALUE;
single_value->field_talkerPriorityStatus = ANY_OR_OMIT;
single_value->field_token = ANY_OR_OMIT;
single_value->field_talkerIdentity = ANY_OR_OMIT;
single_value->field_uplinkAccessIndication = ANY_OR_OMIT;
}
}
}

void PDU__RRM__UplinkBusy__NW__MS_template::copy_value(const PDU__RRM__UplinkBusy__NW__MS& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
if (other_value.talkerPriorityStatus().is_bound()) {
  if (other_value.talkerPriorityStatus().ispresent()) single_value->field_talkerPriorityStatus = other_value.talkerPriorityStatus()();
  else single_value->field_talkerPriorityStatus = OMIT_VALUE;
} else {
  single_value->field_talkerPriorityStatus.clean_up();
}
if (other_value.token().is_bound()) {
  if (other_value.token().ispresent()) single_value->field_token = other_value.token()();
  else single_value->field_token = OMIT_VALUE;
} else {
  single_value->field_token.clean_up();
}
if (other_value.talkerIdentity().is_bound()) {
  if (other_value.talkerIdentity().ispresent()) single_value->field_talkerIdentity = other_value.talkerIdentity()();
  else single_value->field_talkerIdentity = OMIT_VALUE;
} else {
  single_value->field_talkerIdentity.clean_up();
}
if (other_value.uplinkAccessIndication().is_bound()) {
  if (other_value.uplinkAccessIndication().ispresent()) single_value->field_uplinkAccessIndication = other_value.uplinkAccessIndication()();
  else single_value->field_uplinkAccessIndication = OMIT_VALUE;
} else {
  single_value->field_uplinkAccessIndication.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__UplinkBusy__NW__MS_template::copy_template(const PDU__RRM__UplinkBusy__NW__MS_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.talkerPriorityStatus().get_selection()) {
single_value->field_talkerPriorityStatus = other_value.talkerPriorityStatus();
} else {
single_value->field_talkerPriorityStatus.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.token().get_selection()) {
single_value->field_token = other_value.token();
} else {
single_value->field_token.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.talkerIdentity().get_selection()) {
single_value->field_talkerIdentity = other_value.talkerIdentity();
} else {
single_value->field_talkerIdentity.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.uplinkAccessIndication().get_selection()) {
single_value->field_uplinkAccessIndication = other_value.uplinkAccessIndication();
} else {
single_value->field_uplinkAccessIndication.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 PDU__RRM__UplinkBusy__NW__MS_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 PDU__RRM__UplinkBusy__NW__MS_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__UplinkBusy__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS.");
break;
}
set_selection(other_value);
}

PDU__RRM__UplinkBusy__NW__MS_template::PDU__RRM__UplinkBusy__NW__MS_template()
{
}

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

PDU__RRM__UplinkBusy__NW__MS_template::PDU__RRM__UplinkBusy__NW__MS_template(const PDU__RRM__UplinkBusy__NW__MS& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PDU__RRM__UplinkBusy__NW__MS_template::match(const PDU__RRM__UplinkBusy__NW__MS& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), legacy))return FALSE;
if(!other_value.talkerPriorityStatus().is_bound()) return FALSE;
if((other_value.talkerPriorityStatus().ispresent() ? !single_value->field_talkerPriorityStatus.match((const TalkerPriorityStatus__TLV&)other_value.talkerPriorityStatus(), legacy) : !single_value->field_talkerPriorityStatus.match_omit(legacy)))return FALSE;
if(!other_value.token().is_bound()) return FALSE;
if((other_value.token().ispresent() ? !single_value->field_token.match((const Token__TV&)other_value.token(), legacy) : !single_value->field_token.match_omit(legacy)))return FALSE;
if(!other_value.talkerIdentity().is_bound()) return FALSE;
if((other_value.talkerIdentity().ispresent() ? !single_value->field_talkerIdentity.match((const TalkerIdentity__TLV&)other_value.talkerIdentity(), legacy) : !single_value->field_talkerIdentity.match_omit(legacy)))return FALSE;
if(!other_value.uplinkAccessIndication().is_bound()) return FALSE;
if((other_value.uplinkAccessIndication().ispresent() ? !single_value->field_uplinkAccessIndication.match((const UplinkAccessIndication__TV&)other_value.uplinkAccessIndication(), legacy) : !single_value->field_uplinkAccessIndication.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 @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS.");
}
return FALSE;
}

boolean PDU__RRM__UplinkBusy__NW__MS_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_messageType.is_bound()
 || (single_value->field_talkerPriorityStatus.is_omit() || single_value->field_talkerPriorityStatus.is_bound())
 || (single_value->field_token.is_omit() || single_value->field_token.is_bound())
 || (single_value->field_talkerIdentity.is_omit() || single_value->field_talkerIdentity.is_bound())
 || (single_value->field_uplinkAccessIndication.is_omit() || single_value->field_uplinkAccessIndication.is_bound());
}

boolean PDU__RRM__UplinkBusy__NW__MS_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && (single_value->field_talkerPriorityStatus.is_omit() || single_value->field_talkerPriorityStatus.is_value())
 && (single_value->field_token.is_omit() || single_value->field_token.is_value())
 && (single_value->field_talkerIdentity.is_omit() || single_value->field_talkerIdentity.is_value())
 && (single_value->field_uplinkAccessIndication.is_omit() || single_value->field_uplinkAccessIndication.is_value());
}

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

PDU__RRM__UplinkBusy__NW__MS PDU__RRM__UplinkBusy__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS.");
PDU__RRM__UplinkBusy__NW__MS ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_talkerPriorityStatus.is_omit()) ret_val.talkerPriorityStatus() = OMIT_VALUE;
else if (single_value->field_talkerPriorityStatus.is_bound()) {
ret_val.talkerPriorityStatus() = single_value->field_talkerPriorityStatus.valueof();
}
if (single_value->field_token.is_omit()) ret_val.token() = OMIT_VALUE;
else if (single_value->field_token.is_bound()) {
ret_val.token() = single_value->field_token.valueof();
}
if (single_value->field_talkerIdentity.is_omit()) ret_val.talkerIdentity() = OMIT_VALUE;
else if (single_value->field_talkerIdentity.is_bound()) {
ret_val.talkerIdentity() = single_value->field_talkerIdentity.valueof();
}
if (single_value->field_uplinkAccessIndication.is_omit()) ret_val.uplinkAccessIndication() = OMIT_VALUE;
else if (single_value->field_uplinkAccessIndication.is_bound()) {
ret_val.uplinkAccessIndication() = single_value->field_uplinkAccessIndication.valueof();
}
return ret_val;
}

void PDU__RRM__UplinkBusy__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__UplinkBusy__NW__MS_template[list_length];
}

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

BITSTRING_template& PDU__RRM__UplinkBusy__NW__MS_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& PDU__RRM__UplinkBusy__NW__MS_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS.");
return single_value->field_messageType;
}

TalkerPriorityStatus__TLV_template& PDU__RRM__UplinkBusy__NW__MS_template::talkerPriorityStatus()
{
set_specific();
return single_value->field_talkerPriorityStatus;
}

const TalkerPriorityStatus__TLV_template& PDU__RRM__UplinkBusy__NW__MS_template::talkerPriorityStatus() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field talkerPriorityStatus of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS.");
return single_value->field_talkerPriorityStatus;
}

Token__TV_template& PDU__RRM__UplinkBusy__NW__MS_template::token()
{
set_specific();
return single_value->field_token;
}

const Token__TV_template& PDU__RRM__UplinkBusy__NW__MS_template::token() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field token of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS.");
return single_value->field_token;
}

TalkerIdentity__TLV_template& PDU__RRM__UplinkBusy__NW__MS_template::talkerIdentity()
{
set_specific();
return single_value->field_talkerIdentity;
}

const TalkerIdentity__TLV_template& PDU__RRM__UplinkBusy__NW__MS_template::talkerIdentity() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field talkerIdentity of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS.");
return single_value->field_talkerIdentity;
}

UplinkAccessIndication__TV_template& PDU__RRM__UplinkBusy__NW__MS_template::uplinkAccessIndication()
{
set_specific();
return single_value->field_uplinkAccessIndication;
}

const UplinkAccessIndication__TV_template& PDU__RRM__UplinkBusy__NW__MS_template::uplinkAccessIndication() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field uplinkAccessIndication of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS.");
return single_value->field_uplinkAccessIndication;
}

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

void PDU__RRM__UplinkBusy__NW__MS_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.log();
TTCN_Logger::log_event_str(", talkerPriorityStatus := ");
single_value->field_talkerPriorityStatus.log();
TTCN_Logger::log_event_str(", token := ");
single_value->field_token.log();
TTCN_Logger::log_event_str(", talkerIdentity := ");
single_value->field_talkerIdentity.log();
TTCN_Logger::log_event_str(", uplinkAccessIndication := ");
single_value->field_uplinkAccessIndication.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 PDU__RRM__UplinkBusy__NW__MS_template::log_match(const PDU__RRM__UplinkBusy__NW__MS& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.talkerPriorityStatus().ispresent()){
if(!single_value->field_talkerPriorityStatus.match(match_value.talkerPriorityStatus(), legacy)){
TTCN_Logger::log_logmatch_info(".talkerPriorityStatus");
single_value->field_talkerPriorityStatus.log_match(match_value.talkerPriorityStatus(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_talkerPriorityStatus.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".talkerPriorityStatus := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_talkerPriorityStatus.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.token().ispresent()){
if(!single_value->field_token.match(match_value.token(), legacy)){
TTCN_Logger::log_logmatch_info(".token");
single_value->field_token.log_match(match_value.token(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_token.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".token := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_token.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.talkerIdentity().ispresent()){
if(!single_value->field_talkerIdentity.match(match_value.talkerIdentity(), legacy)){
TTCN_Logger::log_logmatch_info(".talkerIdentity");
single_value->field_talkerIdentity.log_match(match_value.talkerIdentity(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_talkerIdentity.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".talkerIdentity := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_talkerIdentity.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.uplinkAccessIndication().ispresent()){
if(!single_value->field_uplinkAccessIndication.match(match_value.uplinkAccessIndication(), legacy)){
TTCN_Logger::log_logmatch_info(".uplinkAccessIndication");
single_value->field_uplinkAccessIndication.log_match(match_value.uplinkAccessIndication(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_uplinkAccessIndication.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".uplinkAccessIndication := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_uplinkAccessIndication.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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::log_event_str(", talkerPriorityStatus := ");
if (match_value.talkerPriorityStatus().ispresent()) {
single_value->field_talkerPriorityStatus.log_match(match_value.talkerPriorityStatus(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_talkerPriorityStatus.log();
if (single_value->field_talkerPriorityStatus.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", token := ");
if (match_value.token().ispresent()) {
single_value->field_token.log_match(match_value.token(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_token.log();
if (single_value->field_token.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", talkerIdentity := ");
if (match_value.talkerIdentity().ispresent()) {
single_value->field_talkerIdentity.log_match(match_value.talkerIdentity(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_talkerIdentity.log();
if (single_value->field_talkerIdentity.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", uplinkAccessIndication := ");
if (match_value.uplinkAccessIndication().ispresent()) {
single_value->field_uplinkAccessIndication.log_match(match_value.uplinkAccessIndication(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_uplinkAccessIndication.log();
if (single_value->field_uplinkAccessIndication.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 PDU__RRM__UplinkBusy__NW__MS_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
if (!talkerPriorityStatus().is_bound()) talkerPriorityStatus() = OMIT_VALUE;
else talkerPriorityStatus().set_implicit_omit();
if (!token().is_bound()) token() = OMIT_VALUE;
else token().set_implicit_omit();
if (!talkerIdentity().is_bound()) talkerIdentity() = OMIT_VALUE;
else talkerIdentity().set_implicit_omit();
if (!uplinkAccessIndication().is_bound()) uplinkAccessIndication() = OMIT_VALUE;
else uplinkAccessIndication().set_implicit_omit();
}

void PDU__RRM__UplinkBusy__NW__MS_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.encode_text(text_buf);
single_value->field_talkerPriorityStatus.encode_text(text_buf);
single_value->field_token.encode_text(text_buf);
single_value->field_talkerIdentity.encode_text(text_buf);
single_value->field_uplinkAccessIndication.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 @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS.");
}
}

void PDU__RRM__UplinkBusy__NW__MS_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_messageType.decode_text(text_buf);
single_value->field_talkerPriorityStatus.decode_text(text_buf);
single_value->field_token.decode_text(text_buf);
single_value->field_talkerIdentity.decode_text(text_buf);
single_value->field_uplinkAccessIndication.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 PDU__RRM__UplinkBusy__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS.");
}
}

void PDU__RRM__UplinkBusy__NW__MS_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: {
    PDU__RRM__UplinkBusy__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS 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) messageType().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) talkerPriorityStatus().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) token().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) talkerIdentity().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) uplinkAccessIndication().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(), "messageType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          messageType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "talkerPriorityStatus")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          talkerPriorityStatus().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "token")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          token().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "talkerIdentity")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          talkerIdentity().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "uplinkAccessIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          uplinkAccessIndication().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 @MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__RRM__UplinkBusy__NW__MS_template* precondition = new PDU__RRM__UplinkBusy__NW__MS_template;
    precondition->set_param(*param.get_elem(0));
    PDU__RRM__UplinkBusy__NW__MS_template* implied_template = new PDU__RRM__UplinkBusy__NW__MS_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__RRM__UplinkBusy__NW__MS_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__RRM__UplinkBusy__NW__MS_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS");
single_value->field_talkerPriorityStatus.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS");
single_value->field_token.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS");
single_value->field_talkerIdentity.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS");
single_value->field_uplinkAccessIndication.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS");
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 : "@MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS");
}

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

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

PDU__RRM__UplinkRelease::PDU__RRM__UplinkRelease()
{
}

PDU__RRM__UplinkRelease::PDU__RRM__UplinkRelease(const BITSTRING& par_messageType,
    const RR__Cause__V& par_rR__Cause)
  :   field_messageType(par_messageType),
  field_rR__Cause(par_rR__Cause)
{
}

PDU__RRM__UplinkRelease::PDU__RRM__UplinkRelease(const PDU__RRM__UplinkRelease& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.PDU_RRM_UplinkRelease.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.rR__Cause().is_bound()) field_rR__Cause = other_value.rR__Cause();
else field_rR__Cause.clean_up();
}

void PDU__RRM__UplinkRelease::clean_up()
{
field_messageType.clean_up();
field_rR__Cause.clean_up();
}

const TTCN_Typedescriptor_t* PDU__RRM__UplinkRelease::get_descriptor() const { return &PDU__RRM__UplinkRelease_descr_; }
PDU__RRM__UplinkRelease& PDU__RRM__UplinkRelease::operator=(const PDU__RRM__UplinkRelease& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.PDU_RRM_UplinkRelease.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.rR__Cause().is_bound()) field_rR__Cause = other_value.rR__Cause();
  else field_rR__Cause.clean_up();
}
return *this;
}

boolean PDU__RRM__UplinkRelease::operator==(const PDU__RRM__UplinkRelease& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_rR__Cause==other_value.field_rR__Cause;
}

boolean PDU__RRM__UplinkRelease::is_bound() const
{
return (field_messageType.is_bound())
  || (field_rR__Cause.is_bound());
}
boolean PDU__RRM__UplinkRelease::is_value() const
{
return field_messageType.is_value()
  && field_rR__Cause.is_value();
}
void PDU__RRM__UplinkRelease::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(", rR_Cause := ");
field_rR__Cause.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__RRM__UplinkRelease::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (rR__Cause().is_bound()) rR__Cause().set_implicit_omit();
}

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

void PDU__RRM__UplinkRelease::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_rR__Cause.encode_text(text_buf);
}

void PDU__RRM__UplinkRelease::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_rR__Cause.decode_text(text_buf);
}

void PDU__RRM__UplinkRelease::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 PDU__RRM__UplinkRelease::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 PDU__RRM__UplinkRelease::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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, RR__Cause__V_descr_.raw->forceomit);
  decoded_field_length = field_rR__Cause.RAW_decode(RR__Cause__V_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 PDU__RRM__UplinkRelease::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, General__Types::BIT8_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, RR__Cause__V_descr_.raw);
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_rR__Cause.RAW_encode(RR__Cause__V_descr_, *myleaf.body.node.nodes[1]);
  return myleaf.length = encoded_length;
}

struct PDU__RRM__UplinkRelease_template::single_value_struct {
BITSTRING_template field_messageType;
RR__Cause__V_template field_rR__Cause;
};

void PDU__RRM__UplinkRelease_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_messageType = ANY_VALUE;
single_value->field_rR__Cause = ANY_VALUE;
}
}
}

void PDU__RRM__UplinkRelease_template::copy_value(const PDU__RRM__UplinkRelease& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
if (other_value.rR__Cause().is_bound()) {
  single_value->field_rR__Cause = other_value.rR__Cause();
} else {
  single_value->field_rR__Cause.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__UplinkRelease_template::copy_template(const PDU__RRM__UplinkRelease_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.rR__Cause().get_selection()) {
single_value->field_rR__Cause = other_value.rR__Cause();
} else {
single_value->field_rR__Cause.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 PDU__RRM__UplinkRelease_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 PDU__RRM__UplinkRelease_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__UplinkRelease_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 @MobileL3_RRM_Types.PDU_RRM_UplinkRelease.");
break;
}
set_selection(other_value);
}

PDU__RRM__UplinkRelease_template::PDU__RRM__UplinkRelease_template()
{
}

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

PDU__RRM__UplinkRelease_template::PDU__RRM__UplinkRelease_template(const PDU__RRM__UplinkRelease& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PDU__RRM__UplinkRelease_template::match(const PDU__RRM__UplinkRelease& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), legacy))return FALSE;
if(!other_value.rR__Cause().is_bound()) return FALSE;
if(!single_value->field_rR__Cause.match(other_value.rR__Cause(), 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 @MobileL3_RRM_Types.PDU_RRM_UplinkRelease.");
}
return FALSE;
}

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

boolean PDU__RRM__UplinkRelease_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_rR__Cause.is_value();
}

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

PDU__RRM__UplinkRelease PDU__RRM__UplinkRelease_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 @MobileL3_RRM_Types.PDU_RRM_UplinkRelease.");
PDU__RRM__UplinkRelease ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_rR__Cause.is_bound()) {
ret_val.rR__Cause() = single_value->field_rR__Cause.valueof();
}
return ret_val;
}

void PDU__RRM__UplinkRelease_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 @MobileL3_RRM_Types.PDU_RRM_UplinkRelease.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__UplinkRelease_template[list_length];
}

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

BITSTRING_template& PDU__RRM__UplinkRelease_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& PDU__RRM__UplinkRelease_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_UplinkRelease.");
return single_value->field_messageType;
}

RR__Cause__V_template& PDU__RRM__UplinkRelease_template::rR__Cause()
{
set_specific();
return single_value->field_rR__Cause;
}

const RR__Cause__V_template& PDU__RRM__UplinkRelease_template::rR__Cause() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field rR_Cause of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_UplinkRelease.");
return single_value->field_rR__Cause;
}

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

void PDU__RRM__UplinkRelease_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.log();
TTCN_Logger::log_event_str(", rR_Cause := ");
single_value->field_rR__Cause.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 PDU__RRM__UplinkRelease_template::log_match(const PDU__RRM__UplinkRelease& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_rR__Cause.match(match_value.rR__Cause(), legacy)){
TTCN_Logger::log_logmatch_info(".rR_Cause");
single_value->field_rR__Cause.log_match(match_value.rR__Cause(), 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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::log_event_str(", rR_Cause := ");
single_value->field_rR__Cause.log_match(match_value.rR__Cause(), 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 PDU__RRM__UplinkRelease_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
if (rR__Cause().is_bound()) rR__Cause().set_implicit_omit();
}

void PDU__RRM__UplinkRelease_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.encode_text(text_buf);
single_value->field_rR__Cause.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 @MobileL3_RRM_Types.PDU_RRM_UplinkRelease.");
}
}

void PDU__RRM__UplinkRelease_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_messageType.decode_text(text_buf);
single_value->field_rR__Cause.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 PDU__RRM__UplinkRelease_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 @MobileL3_RRM_Types.PDU_RRM_UplinkRelease.");
}
}

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

void PDU__RRM__UplinkRelease_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_UplinkRelease");
single_value->field_rR__Cause.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_UplinkRelease");
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 : "@MobileL3_RRM_Types.PDU_RRM_UplinkRelease");
}

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

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

PDU__RRM__VGCS__UplinkGrant__NW__MS::PDU__RRM__VGCS__UplinkGrant__NW__MS()
{
}

PDU__RRM__VGCS__UplinkGrant__NW__MS::PDU__RRM__VGCS__UplinkGrant__NW__MS(const BITSTRING& par_messageType,
    const RequestReference__V& par_requestReference,
    const OCTETSTRING& par_timingAdvance)
  :   field_messageType(par_messageType),
  field_requestReference(par_requestReference),
  field_timingAdvance(par_timingAdvance)
{
}

PDU__RRM__VGCS__UplinkGrant__NW__MS::PDU__RRM__VGCS__UplinkGrant__NW__MS(const PDU__RRM__VGCS__UplinkGrant__NW__MS& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.requestReference().is_bound()) field_requestReference = other_value.requestReference();
else field_requestReference.clean_up();
if (other_value.timingAdvance().is_bound()) field_timingAdvance = other_value.timingAdvance();
else field_timingAdvance.clean_up();
}

void PDU__RRM__VGCS__UplinkGrant__NW__MS::clean_up()
{
field_messageType.clean_up();
field_requestReference.clean_up();
field_timingAdvance.clean_up();
}

const TTCN_Typedescriptor_t* PDU__RRM__VGCS__UplinkGrant__NW__MS::get_descriptor() const { return &PDU__RRM__VGCS__UplinkGrant__NW__MS_descr_; }
PDU__RRM__VGCS__UplinkGrant__NW__MS& PDU__RRM__VGCS__UplinkGrant__NW__MS::operator=(const PDU__RRM__VGCS__UplinkGrant__NW__MS& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.requestReference().is_bound()) field_requestReference = other_value.requestReference();
  else field_requestReference.clean_up();
  if (other_value.timingAdvance().is_bound()) field_timingAdvance = other_value.timingAdvance();
  else field_timingAdvance.clean_up();
}
return *this;
}

boolean PDU__RRM__VGCS__UplinkGrant__NW__MS::operator==(const PDU__RRM__VGCS__UplinkGrant__NW__MS& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_requestReference==other_value.field_requestReference
  && field_timingAdvance==other_value.field_timingAdvance;
}

boolean PDU__RRM__VGCS__UplinkGrant__NW__MS::is_bound() const
{
return (field_messageType.is_bound())
  || (field_requestReference.is_bound())
  || (field_timingAdvance.is_bound());
}
boolean PDU__RRM__VGCS__UplinkGrant__NW__MS::is_value() const
{
return field_messageType.is_value()
  && field_requestReference.is_value()
  && field_timingAdvance.is_value();
}
void PDU__RRM__VGCS__UplinkGrant__NW__MS::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(", requestReference := ");
field_requestReference.log();
TTCN_Logger::log_event_str(", timingAdvance := ");
field_timingAdvance.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__RRM__VGCS__UplinkGrant__NW__MS::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (requestReference().is_bound()) requestReference().set_implicit_omit();
if (timingAdvance().is_bound()) timingAdvance().set_implicit_omit();
}

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

void PDU__RRM__VGCS__UplinkGrant__NW__MS::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_requestReference.encode_text(text_buf);
field_timingAdvance.encode_text(text_buf);
}

void PDU__RRM__VGCS__UplinkGrant__NW__MS::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_requestReference.decode_text(text_buf);
field_timingAdvance.decode_text(text_buf);
}

void PDU__RRM__VGCS__UplinkGrant__NW__MS::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 PDU__RRM__VGCS__UplinkGrant__NW__MS::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 PDU__RRM__VGCS__UplinkGrant__NW__MS::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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, RequestReference__V_descr_.raw->forceomit);
  decoded_field_length = field_requestReference.RAW_decode(RequestReference__V_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, General__Types::OCT1_descr_.raw->forceomit);
  decoded_field_length = field_timingAdvance.RAW_decode(General__Types::OCT1_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 PDU__RRM__VGCS__UplinkGrant__NW__MS::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, General__Types::BIT8_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, RequestReference__V_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, General__Types::OCT1_descr_.raw);
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_requestReference.RAW_encode(RequestReference__V_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_timingAdvance.RAW_encode(General__Types::OCT1_descr_, *myleaf.body.node.nodes[2]);
  return myleaf.length = encoded_length;
}

struct PDU__RRM__VGCS__UplinkGrant__NW__MS_template::single_value_struct {
BITSTRING_template field_messageType;
RequestReference__V_template field_requestReference;
OCTETSTRING_template field_timingAdvance;
};

void PDU__RRM__VGCS__UplinkGrant__NW__MS_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_messageType = ANY_VALUE;
single_value->field_requestReference = ANY_VALUE;
single_value->field_timingAdvance = ANY_VALUE;
}
}
}

void PDU__RRM__VGCS__UplinkGrant__NW__MS_template::copy_value(const PDU__RRM__VGCS__UplinkGrant__NW__MS& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
if (other_value.requestReference().is_bound()) {
  single_value->field_requestReference = other_value.requestReference();
} else {
  single_value->field_requestReference.clean_up();
}
if (other_value.timingAdvance().is_bound()) {
  single_value->field_timingAdvance = other_value.timingAdvance();
} else {
  single_value->field_timingAdvance.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__VGCS__UplinkGrant__NW__MS_template::copy_template(const PDU__RRM__VGCS__UplinkGrant__NW__MS_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.requestReference().get_selection()) {
single_value->field_requestReference = other_value.requestReference();
} else {
single_value->field_requestReference.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.timingAdvance().get_selection()) {
single_value->field_timingAdvance = other_value.timingAdvance();
} else {
single_value->field_timingAdvance.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 PDU__RRM__VGCS__UplinkGrant__NW__MS_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 PDU__RRM__VGCS__UplinkGrant__NW__MS_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__VGCS__UplinkGrant__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS.");
break;
}
set_selection(other_value);
}

PDU__RRM__VGCS__UplinkGrant__NW__MS_template::PDU__RRM__VGCS__UplinkGrant__NW__MS_template()
{
}

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

PDU__RRM__VGCS__UplinkGrant__NW__MS_template::PDU__RRM__VGCS__UplinkGrant__NW__MS_template(const PDU__RRM__VGCS__UplinkGrant__NW__MS& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PDU__RRM__VGCS__UplinkGrant__NW__MS_template::match(const PDU__RRM__VGCS__UplinkGrant__NW__MS& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), legacy))return FALSE;
if(!other_value.requestReference().is_bound()) return FALSE;
if(!single_value->field_requestReference.match(other_value.requestReference(), legacy))return FALSE;
if(!other_value.timingAdvance().is_bound()) return FALSE;
if(!single_value->field_timingAdvance.match(other_value.timingAdvance(), 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 @MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS.");
}
return FALSE;
}

boolean PDU__RRM__VGCS__UplinkGrant__NW__MS_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_messageType.is_bound()
 || single_value->field_requestReference.is_bound()
 || single_value->field_timingAdvance.is_bound();
}

boolean PDU__RRM__VGCS__UplinkGrant__NW__MS_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_requestReference.is_value()
 && single_value->field_timingAdvance.is_value();
}

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

PDU__RRM__VGCS__UplinkGrant__NW__MS PDU__RRM__VGCS__UplinkGrant__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS.");
PDU__RRM__VGCS__UplinkGrant__NW__MS ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_requestReference.is_bound()) {
ret_val.requestReference() = single_value->field_requestReference.valueof();
}
if (single_value->field_timingAdvance.is_bound()) {
ret_val.timingAdvance() = single_value->field_timingAdvance.valueof();
}
return ret_val;
}

void PDU__RRM__VGCS__UplinkGrant__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__VGCS__UplinkGrant__NW__MS_template[list_length];
}

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

BITSTRING_template& PDU__RRM__VGCS__UplinkGrant__NW__MS_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& PDU__RRM__VGCS__UplinkGrant__NW__MS_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS.");
return single_value->field_messageType;
}

RequestReference__V_template& PDU__RRM__VGCS__UplinkGrant__NW__MS_template::requestReference()
{
set_specific();
return single_value->field_requestReference;
}

const RequestReference__V_template& PDU__RRM__VGCS__UplinkGrant__NW__MS_template::requestReference() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field requestReference of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS.");
return single_value->field_requestReference;
}

OCTETSTRING_template& PDU__RRM__VGCS__UplinkGrant__NW__MS_template::timingAdvance()
{
set_specific();
return single_value->field_timingAdvance;
}

const OCTETSTRING_template& PDU__RRM__VGCS__UplinkGrant__NW__MS_template::timingAdvance() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field timingAdvance of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS.");
return single_value->field_timingAdvance;
}

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

void PDU__RRM__VGCS__UplinkGrant__NW__MS_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.log();
TTCN_Logger::log_event_str(", requestReference := ");
single_value->field_requestReference.log();
TTCN_Logger::log_event_str(", timingAdvance := ");
single_value->field_timingAdvance.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 PDU__RRM__VGCS__UplinkGrant__NW__MS_template::log_match(const PDU__RRM__VGCS__UplinkGrant__NW__MS& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_requestReference.match(match_value.requestReference(), legacy)){
TTCN_Logger::log_logmatch_info(".requestReference");
single_value->field_requestReference.log_match(match_value.requestReference(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_timingAdvance.match(match_value.timingAdvance(), legacy)){
TTCN_Logger::log_logmatch_info(".timingAdvance");
single_value->field_timingAdvance.log_match(match_value.timingAdvance(), 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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::log_event_str(", requestReference := ");
single_value->field_requestReference.log_match(match_value.requestReference(), legacy);
TTCN_Logger::log_event_str(", timingAdvance := ");
single_value->field_timingAdvance.log_match(match_value.timingAdvance(), 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 PDU__RRM__VGCS__UplinkGrant__NW__MS_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
if (requestReference().is_bound()) requestReference().set_implicit_omit();
if (timingAdvance().is_bound()) timingAdvance().set_implicit_omit();
}

void PDU__RRM__VGCS__UplinkGrant__NW__MS_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.encode_text(text_buf);
single_value->field_requestReference.encode_text(text_buf);
single_value->field_timingAdvance.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 @MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS.");
}
}

void PDU__RRM__VGCS__UplinkGrant__NW__MS_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_messageType.decode_text(text_buf);
single_value->field_requestReference.decode_text(text_buf);
single_value->field_timingAdvance.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 PDU__RRM__VGCS__UplinkGrant__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS.");
}
}

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

void PDU__RRM__VGCS__UplinkGrant__NW__MS_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS");
single_value->field_requestReference.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS");
single_value->field_timingAdvance.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS");
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 : "@MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS");
}

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

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

PDU__RRM__ApplicationInformation::PDU__RRM__ApplicationInformation()
{
}

PDU__RRM__ApplicationInformation::PDU__RRM__ApplicationInformation(const BITSTRING& par_messageType,
    const BITSTRING& par_aPDU__ID,
    const APDU__Flags__V& par_aPDU__Flags,
    const APDU__Data__LV& par_aPDU__Data)
  :   field_messageType(par_messageType),
  field_aPDU__ID(par_aPDU__ID),
  field_aPDU__Flags(par_aPDU__Flags),
  field_aPDU__Data(par_aPDU__Data)
{
}

PDU__RRM__ApplicationInformation::PDU__RRM__ApplicationInformation(const PDU__RRM__ApplicationInformation& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.aPDU__ID().is_bound()) field_aPDU__ID = other_value.aPDU__ID();
else field_aPDU__ID.clean_up();
if (other_value.aPDU__Flags().is_bound()) field_aPDU__Flags = other_value.aPDU__Flags();
else field_aPDU__Flags.clean_up();
if (other_value.aPDU__Data().is_bound()) field_aPDU__Data = other_value.aPDU__Data();
else field_aPDU__Data.clean_up();
}

void PDU__RRM__ApplicationInformation::clean_up()
{
field_messageType.clean_up();
field_aPDU__ID.clean_up();
field_aPDU__Flags.clean_up();
field_aPDU__Data.clean_up();
}

const TTCN_Typedescriptor_t* PDU__RRM__ApplicationInformation::get_descriptor() const { return &PDU__RRM__ApplicationInformation_descr_; }
PDU__RRM__ApplicationInformation& PDU__RRM__ApplicationInformation::operator=(const PDU__RRM__ApplicationInformation& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.aPDU__ID().is_bound()) field_aPDU__ID = other_value.aPDU__ID();
  else field_aPDU__ID.clean_up();
  if (other_value.aPDU__Flags().is_bound()) field_aPDU__Flags = other_value.aPDU__Flags();
  else field_aPDU__Flags.clean_up();
  if (other_value.aPDU__Data().is_bound()) field_aPDU__Data = other_value.aPDU__Data();
  else field_aPDU__Data.clean_up();
}
return *this;
}

boolean PDU__RRM__ApplicationInformation::operator==(const PDU__RRM__ApplicationInformation& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_aPDU__ID==other_value.field_aPDU__ID
  && field_aPDU__Flags==other_value.field_aPDU__Flags
  && field_aPDU__Data==other_value.field_aPDU__Data;
}

boolean PDU__RRM__ApplicationInformation::is_bound() const
{
return (field_messageType.is_bound())
  || (field_aPDU__ID.is_bound())
  || (field_aPDU__Flags.is_bound())
  || (field_aPDU__Data.is_bound());
}
boolean PDU__RRM__ApplicationInformation::is_value() const
{
return field_messageType.is_value()
  && field_aPDU__ID.is_value()
  && field_aPDU__Flags.is_value()
  && field_aPDU__Data.is_value();
}
void PDU__RRM__ApplicationInformation::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(", aPDU_ID := ");
field_aPDU__ID.log();
TTCN_Logger::log_event_str(", aPDU_Flags := ");
field_aPDU__Flags.log();
TTCN_Logger::log_event_str(", aPDU_Data := ");
field_aPDU__Data.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__RRM__ApplicationInformation::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (aPDU__ID().is_bound()) aPDU__ID().set_implicit_omit();
if (aPDU__Flags().is_bound()) aPDU__Flags().set_implicit_omit();
if (aPDU__Data().is_bound()) aPDU__Data().set_implicit_omit();
}

void PDU__RRM__ApplicationInformation::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 @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation 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) messageType().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) aPDU__ID().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) aPDU__Flags().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) aPDU__Data().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(), "messageType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          messageType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "aPDU_ID")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          aPDU__ID().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "aPDU_Flags")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          aPDU__Flags().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "aPDU_Data")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          aPDU__Data().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 @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_RRM_Types.PDU_RRM_ApplicationInformation");
  }
}

void PDU__RRM__ApplicationInformation::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_aPDU__ID.encode_text(text_buf);
field_aPDU__Flags.encode_text(text_buf);
field_aPDU__Data.encode_text(text_buf);
}

void PDU__RRM__ApplicationInformation::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_aPDU__ID.decode_text(text_buf);
field_aPDU__Flags.decode_text(text_buf);
field_aPDU__Data.decode_text(text_buf);
}

void PDU__RRM__ApplicationInformation::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 PDU__RRM__ApplicationInformation::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 PDU__RRM__ApplicationInformation::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_aPDU__ID.RAW_decode(General__Types::BIT4_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, APDU__Flags__V_descr_.raw->forceomit);
  decoded_field_length = field_aPDU__Flags.RAW_decode(APDU__Flags__V_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, APDU__Data__LV_descr_.raw->forceomit);
  decoded_field_length = field_aPDU__Data.RAW_decode(APDU__Data__LV_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 PDU__RRM__ApplicationInformation::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, General__Types::BIT8_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::BIT4_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, APDU__Flags__V_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, APDU__Data__LV_descr_.raw);
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_aPDU__ID.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_aPDU__Flags.RAW_encode(APDU__Flags__V_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_aPDU__Data.RAW_encode(APDU__Data__LV_descr_, *myleaf.body.node.nodes[3]);
  return myleaf.length = encoded_length;
}

struct PDU__RRM__ApplicationInformation_template::single_value_struct {
BITSTRING_template field_messageType;
BITSTRING_template field_aPDU__ID;
APDU__Flags__V_template field_aPDU__Flags;
APDU__Data__LV_template field_aPDU__Data;
};

void PDU__RRM__ApplicationInformation_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_messageType = ANY_VALUE;
single_value->field_aPDU__ID = ANY_VALUE;
single_value->field_aPDU__Flags = ANY_VALUE;
single_value->field_aPDU__Data = ANY_VALUE;
}
}
}

void PDU__RRM__ApplicationInformation_template::copy_value(const PDU__RRM__ApplicationInformation& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
if (other_value.aPDU__ID().is_bound()) {
  single_value->field_aPDU__ID = other_value.aPDU__ID();
} else {
  single_value->field_aPDU__ID.clean_up();
}
if (other_value.aPDU__Flags().is_bound()) {
  single_value->field_aPDU__Flags = other_value.aPDU__Flags();
} else {
  single_value->field_aPDU__Flags.clean_up();
}
if (other_value.aPDU__Data().is_bound()) {
  single_value->field_aPDU__Data = other_value.aPDU__Data();
} else {
  single_value->field_aPDU__Data.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__ApplicationInformation_template::copy_template(const PDU__RRM__ApplicationInformation_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.aPDU__ID().get_selection()) {
single_value->field_aPDU__ID = other_value.aPDU__ID();
} else {
single_value->field_aPDU__ID.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.aPDU__Flags().get_selection()) {
single_value->field_aPDU__Flags = other_value.aPDU__Flags();
} else {
single_value->field_aPDU__Flags.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.aPDU__Data().get_selection()) {
single_value->field_aPDU__Data = other_value.aPDU__Data();
} else {
single_value->field_aPDU__Data.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 PDU__RRM__ApplicationInformation_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 PDU__RRM__ApplicationInformation_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__ApplicationInformation_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 @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation.");
break;
}
set_selection(other_value);
}

PDU__RRM__ApplicationInformation_template::PDU__RRM__ApplicationInformation_template()
{
}

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

PDU__RRM__ApplicationInformation_template::PDU__RRM__ApplicationInformation_template(const PDU__RRM__ApplicationInformation& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PDU__RRM__ApplicationInformation_template::match(const PDU__RRM__ApplicationInformation& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), legacy))return FALSE;
if(!other_value.aPDU__ID().is_bound()) return FALSE;
if(!single_value->field_aPDU__ID.match(other_value.aPDU__ID(), legacy))return FALSE;
if(!other_value.aPDU__Flags().is_bound()) return FALSE;
if(!single_value->field_aPDU__Flags.match(other_value.aPDU__Flags(), legacy))return FALSE;
if(!other_value.aPDU__Data().is_bound()) return FALSE;
if(!single_value->field_aPDU__Data.match(other_value.aPDU__Data(), 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 @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation.");
}
return FALSE;
}

boolean PDU__RRM__ApplicationInformation_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_messageType.is_bound()
 || single_value->field_aPDU__ID.is_bound()
 || single_value->field_aPDU__Flags.is_bound()
 || single_value->field_aPDU__Data.is_bound();
}

boolean PDU__RRM__ApplicationInformation_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_aPDU__ID.is_value()
 && single_value->field_aPDU__Flags.is_value()
 && single_value->field_aPDU__Data.is_value();
}

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

PDU__RRM__ApplicationInformation PDU__RRM__ApplicationInformation_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 @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation.");
PDU__RRM__ApplicationInformation ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_aPDU__ID.is_bound()) {
ret_val.aPDU__ID() = single_value->field_aPDU__ID.valueof();
}
if (single_value->field_aPDU__Flags.is_bound()) {
ret_val.aPDU__Flags() = single_value->field_aPDU__Flags.valueof();
}
if (single_value->field_aPDU__Data.is_bound()) {
ret_val.aPDU__Data() = single_value->field_aPDU__Data.valueof();
}
return ret_val;
}

void PDU__RRM__ApplicationInformation_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 @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__ApplicationInformation_template[list_length];
}

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

BITSTRING_template& PDU__RRM__ApplicationInformation_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& PDU__RRM__ApplicationInformation_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation.");
return single_value->field_messageType;
}

BITSTRING_template& PDU__RRM__ApplicationInformation_template::aPDU__ID()
{
set_specific();
return single_value->field_aPDU__ID;
}

const BITSTRING_template& PDU__RRM__ApplicationInformation_template::aPDU__ID() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field aPDU_ID of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation.");
return single_value->field_aPDU__ID;
}

APDU__Flags__V_template& PDU__RRM__ApplicationInformation_template::aPDU__Flags()
{
set_specific();
return single_value->field_aPDU__Flags;
}

const APDU__Flags__V_template& PDU__RRM__ApplicationInformation_template::aPDU__Flags() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field aPDU_Flags of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation.");
return single_value->field_aPDU__Flags;
}

APDU__Data__LV_template& PDU__RRM__ApplicationInformation_template::aPDU__Data()
{
set_specific();
return single_value->field_aPDU__Data;
}

const APDU__Data__LV_template& PDU__RRM__ApplicationInformation_template::aPDU__Data() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field aPDU_Data of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation.");
return single_value->field_aPDU__Data;
}

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

void PDU__RRM__ApplicationInformation_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.log();
TTCN_Logger::log_event_str(", aPDU_ID := ");
single_value->field_aPDU__ID.log();
TTCN_Logger::log_event_str(", aPDU_Flags := ");
single_value->field_aPDU__Flags.log();
TTCN_Logger::log_event_str(", aPDU_Data := ");
single_value->field_aPDU__Data.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 PDU__RRM__ApplicationInformation_template::log_match(const PDU__RRM__ApplicationInformation& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_aPDU__ID.match(match_value.aPDU__ID(), legacy)){
TTCN_Logger::log_logmatch_info(".aPDU_ID");
single_value->field_aPDU__ID.log_match(match_value.aPDU__ID(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_aPDU__Flags.match(match_value.aPDU__Flags(), legacy)){
TTCN_Logger::log_logmatch_info(".aPDU_Flags");
single_value->field_aPDU__Flags.log_match(match_value.aPDU__Flags(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_aPDU__Data.match(match_value.aPDU__Data(), legacy)){
TTCN_Logger::log_logmatch_info(".aPDU_Data");
single_value->field_aPDU__Data.log_match(match_value.aPDU__Data(), 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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::log_event_str(", aPDU_ID := ");
single_value->field_aPDU__ID.log_match(match_value.aPDU__ID(), legacy);
TTCN_Logger::log_event_str(", aPDU_Flags := ");
single_value->field_aPDU__Flags.log_match(match_value.aPDU__Flags(), legacy);
TTCN_Logger::log_event_str(", aPDU_Data := ");
single_value->field_aPDU__Data.log_match(match_value.aPDU__Data(), 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 PDU__RRM__ApplicationInformation_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
if (aPDU__ID().is_bound()) aPDU__ID().set_implicit_omit();
if (aPDU__Flags().is_bound()) aPDU__Flags().set_implicit_omit();
if (aPDU__Data().is_bound()) aPDU__Data().set_implicit_omit();
}

void PDU__RRM__ApplicationInformation_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.encode_text(text_buf);
single_value->field_aPDU__ID.encode_text(text_buf);
single_value->field_aPDU__Flags.encode_text(text_buf);
single_value->field_aPDU__Data.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 @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation.");
}
}

void PDU__RRM__ApplicationInformation_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_messageType.decode_text(text_buf);
single_value->field_aPDU__ID.decode_text(text_buf);
single_value->field_aPDU__Flags.decode_text(text_buf);
single_value->field_aPDU__Data.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 PDU__RRM__ApplicationInformation_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 @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation.");
}
}

void PDU__RRM__ApplicationInformation_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: {
    PDU__RRM__ApplicationInformation_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 @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation 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) messageType().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) aPDU__ID().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) aPDU__Flags().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) aPDU__Data().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(), "messageType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          messageType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "aPDU_ID")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          aPDU__ID().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "aPDU_Flags")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          aPDU__Flags().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "aPDU_Data")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          aPDU__Data().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 @MobileL3_RRM_Types.PDU_RRM_ApplicationInformation: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__RRM__ApplicationInformation_template* precondition = new PDU__RRM__ApplicationInformation_template;
    precondition->set_param(*param.get_elem(0));
    PDU__RRM__ApplicationInformation_template* implied_template = new PDU__RRM__ApplicationInformation_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__RRM__ApplicationInformation_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_RRM_Types.PDU_RRM_ApplicationInformation");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__RRM__ApplicationInformation_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_ApplicationInformation");
single_value->field_aPDU__ID.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_ApplicationInformation");
single_value->field_aPDU__Flags.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_ApplicationInformation");
single_value->field_aPDU__Data.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_ApplicationInformation");
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 : "@MobileL3_RRM_Types.PDU_RRM_ApplicationInformation");
}

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

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

PDU__RRM__ServiceInformationMessage__MS__NW::PDU__RRM__ServiceInformationMessage__MS__NW()
{
}

PDU__RRM__ServiceInformationMessage__MS__NW::PDU__RRM__ServiceInformationMessage__MS__NW(const BITSTRING& par_messageType,
    const OCTETSTRING& par_tLLI,
    const MobileL3__GMM__SM__Types::RoutingAreaIdentificationV& par_routingAreaIdentification,
    const ServiceSupport__V& par_serviceSupport)
  :   field_messageType(par_messageType),
  field_tLLI(par_tLLI),
  field_routingAreaIdentification(par_routingAreaIdentification),
  field_serviceSupport(par_serviceSupport)
{
}

PDU__RRM__ServiceInformationMessage__MS__NW::PDU__RRM__ServiceInformationMessage__MS__NW(const PDU__RRM__ServiceInformationMessage__MS__NW& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.tLLI().is_bound()) field_tLLI = other_value.tLLI();
else field_tLLI.clean_up();
if (other_value.routingAreaIdentification().is_bound()) field_routingAreaIdentification = other_value.routingAreaIdentification();
else field_routingAreaIdentification.clean_up();
if (other_value.serviceSupport().is_bound()) field_serviceSupport = other_value.serviceSupport();
else field_serviceSupport.clean_up();
}

void PDU__RRM__ServiceInformationMessage__MS__NW::clean_up()
{
field_messageType.clean_up();
field_tLLI.clean_up();
field_routingAreaIdentification.clean_up();
field_serviceSupport.clean_up();
}

const TTCN_Typedescriptor_t* PDU__RRM__ServiceInformationMessage__MS__NW::get_descriptor() const { return &PDU__RRM__ServiceInformationMessage__MS__NW_descr_; }
PDU__RRM__ServiceInformationMessage__MS__NW& PDU__RRM__ServiceInformationMessage__MS__NW::operator=(const PDU__RRM__ServiceInformationMessage__MS__NW& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.tLLI().is_bound()) field_tLLI = other_value.tLLI();
  else field_tLLI.clean_up();
  if (other_value.routingAreaIdentification().is_bound()) field_routingAreaIdentification = other_value.routingAreaIdentification();
  else field_routingAreaIdentification.clean_up();
  if (other_value.serviceSupport().is_bound()) field_serviceSupport = other_value.serviceSupport();
  else field_serviceSupport.clean_up();
}
return *this;
}

boolean PDU__RRM__ServiceInformationMessage__MS__NW::operator==(const PDU__RRM__ServiceInformationMessage__MS__NW& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_tLLI==other_value.field_tLLI
  && field_routingAreaIdentification==other_value.field_routingAreaIdentification
  && field_serviceSupport==other_value.field_serviceSupport;
}

boolean PDU__RRM__ServiceInformationMessage__MS__NW::is_bound() const
{
return (field_messageType.is_bound())
  || (field_tLLI.is_bound())
  || (field_routingAreaIdentification.is_bound())
  || (field_serviceSupport.is_bound());
}
boolean PDU__RRM__ServiceInformationMessage__MS__NW::is_value() const
{
return field_messageType.is_value()
  && field_tLLI.is_value()
  && field_routingAreaIdentification.is_value()
  && field_serviceSupport.is_value();
}
void PDU__RRM__ServiceInformationMessage__MS__NW::log() const
{
if (!is_bound()) {
TTCN_Logger::log_event_unbound();
return;
}
TTCN_Logger::log_event_str("{ messageType := ");
field_messageType.log();
TTCN_Logger::log_event_str(", tLLI := ");
field_tLLI.log();
TTCN_Logger::log_event_str(", routingAreaIdentification := ");
field_routingAreaIdentification.log();
TTCN_Logger::log_event_str(", serviceSupport := ");
field_serviceSupport.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__RRM__ServiceInformationMessage__MS__NW::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (tLLI().is_bound()) tLLI().set_implicit_omit();
if (routingAreaIdentification().is_bound()) routingAreaIdentification().set_implicit_omit();
if (serviceSupport().is_bound()) serviceSupport().set_implicit_omit();
}

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

void PDU__RRM__ServiceInformationMessage__MS__NW::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_tLLI.encode_text(text_buf);
field_routingAreaIdentification.encode_text(text_buf);
field_serviceSupport.encode_text(text_buf);
}

void PDU__RRM__ServiceInformationMessage__MS__NW::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_tLLI.decode_text(text_buf);
field_routingAreaIdentification.decode_text(text_buf);
field_serviceSupport.decode_text(text_buf);
}

void PDU__RRM__ServiceInformationMessage__MS__NW::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 PDU__RRM__ServiceInformationMessage__MS__NW::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 PDU__RRM__ServiceInformationMessage__MS__NW::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, General__Types::BIT8_descr_.raw->forceomit);
  decoded_field_length = field_messageType.RAW_decode(General__Types::BIT8_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, General__Types::OCT4_descr_.raw->forceomit);
  decoded_field_length = field_tLLI.RAW_decode(General__Types::OCT4_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, MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_descr_.raw->forceomit);
  decoded_field_length = field_routingAreaIdentification.RAW_decode(MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_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, ServiceSupport__V_descr_.raw->forceomit);
  decoded_field_length = field_serviceSupport.RAW_decode(ServiceSupport__V_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 PDU__RRM__ServiceInformationMessage__MS__NW::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, General__Types::BIT8_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, General__Types::OCT4_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, ServiceSupport__V_descr_.raw);
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_tLLI.RAW_encode(General__Types::OCT4_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_routingAreaIdentification.RAW_encode(MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_serviceSupport.RAW_encode(ServiceSupport__V_descr_, *myleaf.body.node.nodes[3]);
  return myleaf.length = encoded_length;
}

struct PDU__RRM__ServiceInformationMessage__MS__NW_template::single_value_struct {
BITSTRING_template field_messageType;
OCTETSTRING_template field_tLLI;
MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_template field_routingAreaIdentification;
ServiceSupport__V_template field_serviceSupport;
};

void PDU__RRM__ServiceInformationMessage__MS__NW_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_messageType = ANY_VALUE;
single_value->field_tLLI = ANY_VALUE;
single_value->field_routingAreaIdentification = ANY_VALUE;
single_value->field_serviceSupport = ANY_VALUE;
}
}
}

void PDU__RRM__ServiceInformationMessage__MS__NW_template::copy_value(const PDU__RRM__ServiceInformationMessage__MS__NW& other_value)
{
single_value = new single_value_struct;
if (other_value.messageType().is_bound()) {
  single_value->field_messageType = other_value.messageType();
} else {
  single_value->field_messageType.clean_up();
}
if (other_value.tLLI().is_bound()) {
  single_value->field_tLLI = other_value.tLLI();
} else {
  single_value->field_tLLI.clean_up();
}
if (other_value.routingAreaIdentification().is_bound()) {
  single_value->field_routingAreaIdentification = other_value.routingAreaIdentification();
} else {
  single_value->field_routingAreaIdentification.clean_up();
}
if (other_value.serviceSupport().is_bound()) {
  single_value->field_serviceSupport = other_value.serviceSupport();
} else {
  single_value->field_serviceSupport.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__ServiceInformationMessage__MS__NW_template::copy_template(const PDU__RRM__ServiceInformationMessage__MS__NW_template& other_value)
{
switch (other_value.template_selection) {
case SPECIFIC_VALUE:
single_value = new single_value_struct;
if (UNINITIALIZED_TEMPLATE != other_value.messageType().get_selection()) {
single_value->field_messageType = other_value.messageType();
} else {
single_value->field_messageType.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.tLLI().get_selection()) {
single_value->field_tLLI = other_value.tLLI();
} else {
single_value->field_tLLI.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.routingAreaIdentification().get_selection()) {
single_value->field_routingAreaIdentification = other_value.routingAreaIdentification();
} else {
single_value->field_routingAreaIdentification.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.serviceSupport().get_selection()) {
single_value->field_serviceSupport = other_value.serviceSupport();
} else {
single_value->field_serviceSupport.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 PDU__RRM__ServiceInformationMessage__MS__NW_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 PDU__RRM__ServiceInformationMessage__MS__NW_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__ServiceInformationMessage__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW.");
break;
}
set_selection(other_value);
}

PDU__RRM__ServiceInformationMessage__MS__NW_template::PDU__RRM__ServiceInformationMessage__MS__NW_template()
{
}

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

PDU__RRM__ServiceInformationMessage__MS__NW_template::PDU__RRM__ServiceInformationMessage__MS__NW_template(const PDU__RRM__ServiceInformationMessage__MS__NW& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

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

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

boolean PDU__RRM__ServiceInformationMessage__MS__NW_template::match(const PDU__RRM__ServiceInformationMessage__MS__NW& 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.messageType().is_bound()) return FALSE;
if(!single_value->field_messageType.match(other_value.messageType(), legacy))return FALSE;
if(!other_value.tLLI().is_bound()) return FALSE;
if(!single_value->field_tLLI.match(other_value.tLLI(), legacy))return FALSE;
if(!other_value.routingAreaIdentification().is_bound()) return FALSE;
if(!single_value->field_routingAreaIdentification.match(other_value.routingAreaIdentification(), legacy))return FALSE;
if(!other_value.serviceSupport().is_bound()) return FALSE;
if(!single_value->field_serviceSupport.match(other_value.serviceSupport(), 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 @MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW.");
}
return FALSE;
}

boolean PDU__RRM__ServiceInformationMessage__MS__NW_template::is_bound() const
{
if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE;
if (template_selection != SPECIFIC_VALUE) return TRUE;
return single_value->field_messageType.is_bound()
 || single_value->field_tLLI.is_bound()
 || single_value->field_routingAreaIdentification.is_bound()
 || single_value->field_serviceSupport.is_bound();
}

boolean PDU__RRM__ServiceInformationMessage__MS__NW_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_tLLI.is_value()
 && single_value->field_routingAreaIdentification.is_value()
 && single_value->field_serviceSupport.is_value();
}

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

PDU__RRM__ServiceInformationMessage__MS__NW PDU__RRM__ServiceInformationMessage__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW.");
PDU__RRM__ServiceInformationMessage__MS__NW ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_tLLI.is_bound()) {
ret_val.tLLI() = single_value->field_tLLI.valueof();
}
if (single_value->field_routingAreaIdentification.is_bound()) {
ret_val.routingAreaIdentification() = single_value->field_routingAreaIdentification.valueof();
}
if (single_value->field_serviceSupport.is_bound()) {
ret_val.serviceSupport() = single_value->field_serviceSupport.valueof();
}
return ret_val;
}

void PDU__RRM__ServiceInformationMessage__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__ServiceInformationMessage__MS__NW_template[list_length];
}

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

BITSTRING_template& PDU__RRM__ServiceInformationMessage__MS__NW_template::messageType()
{
set_specific();
return single_value->field_messageType;
}

const BITSTRING_template& PDU__RRM__ServiceInformationMessage__MS__NW_template::messageType() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field messageType of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW.");
return single_value->field_messageType;
}

OCTETSTRING_template& PDU__RRM__ServiceInformationMessage__MS__NW_template::tLLI()
{
set_specific();
return single_value->field_tLLI;
}

const OCTETSTRING_template& PDU__RRM__ServiceInformationMessage__MS__NW_template::tLLI() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tLLI of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW.");
return single_value->field_tLLI;
}

MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_template& PDU__RRM__ServiceInformationMessage__MS__NW_template::routingAreaIdentification()
{
set_specific();
return single_value->field_routingAreaIdentification;
}

const MobileL3__GMM__SM__Types::RoutingAreaIdentificationV_template& PDU__RRM__ServiceInformationMessage__MS__NW_template::routingAreaIdentification() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field routingAreaIdentification of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW.");
return single_value->field_routingAreaIdentification;
}

ServiceSupport__V_template& PDU__RRM__ServiceInformationMessage__MS__NW_template::serviceSupport()
{
set_specific();
return single_value->field_serviceSupport;
}

const ServiceSupport__V_template& PDU__RRM__ServiceInformationMessage__MS__NW_template::serviceSupport() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field serviceSupport of a non-specific template of type @MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW.");
return single_value->field_serviceSupport;
}

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

void PDU__RRM__ServiceInformationMessage__MS__NW_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
TTCN_Logger::log_event_str("{ messageType := ");
single_value->field_messageType.log();
TTCN_Logger::log_event_str(", tLLI := ");
single_value->field_tLLI.log();
TTCN_Logger::log_event_str(", routingAreaIdentification := ");
single_value->field_routingAreaIdentification.log();
TTCN_Logger::log_event_str(", serviceSupport := ");
single_value->field_serviceSupport.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 PDU__RRM__ServiceInformationMessage__MS__NW_template::log_match(const PDU__RRM__ServiceInformationMessage__MS__NW& 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_messageType.match(match_value.messageType(), legacy)){
TTCN_Logger::log_logmatch_info(".messageType");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_tLLI.match(match_value.tLLI(), legacy)){
TTCN_Logger::log_logmatch_info(".tLLI");
single_value->field_tLLI.log_match(match_value.tLLI(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_routingAreaIdentification.match(match_value.routingAreaIdentification(), legacy)){
TTCN_Logger::log_logmatch_info(".routingAreaIdentification");
single_value->field_routingAreaIdentification.log_match(match_value.routingAreaIdentification(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_serviceSupport.match(match_value.serviceSupport(), legacy)){
TTCN_Logger::log_logmatch_info(".serviceSupport");
single_value->field_serviceSupport.log_match(match_value.serviceSupport(), 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("{ messageType := ");
single_value->field_messageType.log_match(match_value.messageType(), legacy);
TTCN_Logger::log_event_str(", tLLI := ");
single_value->field_tLLI.log_match(match_value.tLLI(), legacy);
TTCN_Logger::log_event_str(", routingAreaIdentification := ");
single_value->field_routingAreaIdentification.log_match(match_value.routingAreaIdentification(), legacy);
TTCN_Logger::log_event_str(", serviceSupport := ");
single_value->field_serviceSupport.log_match(match_value.serviceSupport(), 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 PDU__RRM__ServiceInformationMessage__MS__NW_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
if (messageType().is_bound()) messageType().set_implicit_omit();
if (tLLI().is_bound()) tLLI().set_implicit_omit();
if (routingAreaIdentification().is_bound()) routingAreaIdentification().set_implicit_omit();
if (serviceSupport().is_bound()) serviceSupport().set_implicit_omit();
}

void PDU__RRM__ServiceInformationMessage__MS__NW_template::encode_text(Text_Buf& text_buf) const
{
encode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
single_value->field_messageType.encode_text(text_buf);
single_value->field_tLLI.encode_text(text_buf);
single_value->field_routingAreaIdentification.encode_text(text_buf);
single_value->field_serviceSupport.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 @MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW.");
}
}

void PDU__RRM__ServiceInformationMessage__MS__NW_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_messageType.decode_text(text_buf);
single_value->field_tLLI.decode_text(text_buf);
single_value->field_routingAreaIdentification.decode_text(text_buf);
single_value->field_serviceSupport.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 PDU__RRM__ServiceInformationMessage__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW.");
}
}

void PDU__RRM__ServiceInformationMessage__MS__NW_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: {
    PDU__RRM__ServiceInformationMessage__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW 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) messageType().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) tLLI().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) routingAreaIdentification().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) serviceSupport().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(), "messageType")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          messageType().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tLLI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tLLI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "routingAreaIdentification")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          routingAreaIdentification().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "serviceSupport")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          serviceSupport().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 @MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__RRM__ServiceInformationMessage__MS__NW_template* precondition = new PDU__RRM__ServiceInformationMessage__MS__NW_template;
    precondition->set_param(*param.get_elem(0));
    PDU__RRM__ServiceInformationMessage__MS__NW_template* implied_template = new PDU__RRM__ServiceInformationMessage__MS__NW_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__RRM__ServiceInformationMessage__MS__NW_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__RRM__ServiceInformationMessage__MS__NW_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_messageType.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW");
single_value->field_tLLI.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW");
single_value->field_routingAreaIdentification.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW");
single_value->field_serviceSupport.check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW");
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 : "@MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW");
}

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

boolean PDU__RRM__ServiceInformationMessage__MS__NW_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 PDU__RRM__MS__NW::copy_value(const PDU__RRM__MS__NW& other_value)
{
switch (other_value.union_selection) {
case ALT_cipheringModeComplete:
field_cipheringModeComplete = new PDU__RRM__CipheringModeComplete__MS__NW(*other_value.field_cipheringModeComplete);
break;
case ALT_configurationChangeAck:
field_configurationChangeAck = new PDU__RRM__ConfigurationChangeAck__MS__NW(*other_value.field_configurationChangeAck);
break;
case ALT_configurationChangeRej:
field_configurationChangeRej = new PDU__RRM__ConfigurationChangeRej__MS__NW(*other_value.field_configurationChangeRej);
break;
case ALT_assignmentComplete:
field_assignmentComplete = new PDU__RRM__AssignmentComplete__MS__NW(*other_value.field_assignmentComplete);
break;
case ALT_assignmentFailure:
field_assignmentFailure = new PDU__RRM__AssignmentFailure__MS__NW(*other_value.field_assignmentFailure);
break;
case ALT_handoverComplete:
field_handoverComplete = new PDU__RRM__HandoverComplete__MS__NW(*other_value.field_handoverComplete);
break;
case ALT_handoverFailure:
field_handoverFailure = new PDU__RRM__HandoverFailure__MS__NW(*other_value.field_handoverFailure);
break;
case ALT_partialReleaseComplete:
field_partialReleaseComplete = new PDU__RRM__PartialReleaseComplete__MS__NW(*other_value.field_partialReleaseComplete);
break;
case ALT_pagingResponse:
field_pagingResponse = new PDU__RRM__PagingResponse__MS__NW(*other_value.field_pagingResponse);
break;
case ALT_notificationResponse:
field_notificationResponse = new PDU__RRM__NotificationResponse__MS__NW(*other_value.field_notificationResponse);
break;
case ALT_rR__Status:
field_rR__Status = new PDU__RRM__RR__Status(*other_value.field_rR__Status);
break;
case ALT_channelModeModifyAck:
field_channelModeModifyAck = new PDU__RRM__ChannelModeModifyAck__MS__NW(*other_value.field_channelModeModifyAck);
break;
case ALT_classmarkChange:
field_classmarkChange = new PDU__RRM__ClassmarkChange__MS__NW(*other_value.field_classmarkChange);
break;
case ALT_gPRS__suspensionRequest:
field_gPRS__suspensionRequest = new PDU__RRM__GPRS__SuspensionRequest__MS__NW(*other_value.field_gPRS__suspensionRequest);
break;
case ALT_serviceInformationMessage:
field_serviceInformationMessage = new PDU__RRM__ServiceInformationMessage__MS__NW(*other_value.field_serviceInformationMessage);
break;
case ALT_uplinkRelease:
field_uplinkRelease = new PDU__RRM__UplinkRelease(*other_value.field_uplinkRelease);
break;
case ALT_talkerIndication:
field_talkerIndication = new PDU__RRM__TalkerIndication__MS__NW(*other_value.field_talkerIndication);
break;
case ALT_applicationInformation:
field_applicationInformation = new PDU__RRM__ApplicationInformation(*other_value.field_applicationInformation);
break;
case ALT_dTM__AssignmentFailure:
field_dTM__AssignmentFailure = new PDU__RRM__DTM__AssignmentFailure__MS__NW(*other_value.field_dTM__AssignmentFailure);
break;
case ALT_dTM__Request:
field_dTM__Request = new PDU__RRM__DTM__Request__MS__NW(*other_value.field_dTM__Request);
break;
case ALT_uTRAN__ClassmarkChange:
field_uTRAN__ClassmarkChange = new PDU__RRM__UTRAN__ClassmarkChange__MS__NW(*other_value.field_uTRAN__ClassmarkChange);
break;
case ALT_cDMA2000__ClassmarkChange:
field_cDMA2000__ClassmarkChange = new PDU__RRM__CDMA2000__ClassmarkChange__MS__NW(*other_value.field_cDMA2000__ClassmarkChange);
break;
case ALT_gERAN__IU__ModeClassmarkChange:
field_gERAN__IU__ModeClassmarkChange = new PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW(*other_value.field_gERAN__IU__ModeClassmarkChange);
break;
default:
TTCN_error("Assignment of an unbound union value of type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
}
union_selection = other_value.union_selection;
}

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

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

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

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

boolean PDU__RRM__MS__NW::operator==(const PDU__RRM__MS__NW& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_cipheringModeComplete:
return *field_cipheringModeComplete == *other_value.field_cipheringModeComplete;
case ALT_configurationChangeAck:
return *field_configurationChangeAck == *other_value.field_configurationChangeAck;
case ALT_configurationChangeRej:
return *field_configurationChangeRej == *other_value.field_configurationChangeRej;
case ALT_assignmentComplete:
return *field_assignmentComplete == *other_value.field_assignmentComplete;
case ALT_assignmentFailure:
return *field_assignmentFailure == *other_value.field_assignmentFailure;
case ALT_handoverComplete:
return *field_handoverComplete == *other_value.field_handoverComplete;
case ALT_handoverFailure:
return *field_handoverFailure == *other_value.field_handoverFailure;
case ALT_partialReleaseComplete:
return *field_partialReleaseComplete == *other_value.field_partialReleaseComplete;
case ALT_pagingResponse:
return *field_pagingResponse == *other_value.field_pagingResponse;
case ALT_notificationResponse:
return *field_notificationResponse == *other_value.field_notificationResponse;
case ALT_rR__Status:
return *field_rR__Status == *other_value.field_rR__Status;
case ALT_channelModeModifyAck:
return *field_channelModeModifyAck == *other_value.field_channelModeModifyAck;
case ALT_classmarkChange:
return *field_classmarkChange == *other_value.field_classmarkChange;
case ALT_gPRS__suspensionRequest:
return *field_gPRS__suspensionRequest == *other_value.field_gPRS__suspensionRequest;
case ALT_serviceInformationMessage:
return *field_serviceInformationMessage == *other_value.field_serviceInformationMessage;
case ALT_uplinkRelease:
return *field_uplinkRelease == *other_value.field_uplinkRelease;
case ALT_talkerIndication:
return *field_talkerIndication == *other_value.field_talkerIndication;
case ALT_applicationInformation:
return *field_applicationInformation == *other_value.field_applicationInformation;
case ALT_dTM__AssignmentFailure:
return *field_dTM__AssignmentFailure == *other_value.field_dTM__AssignmentFailure;
case ALT_dTM__Request:
return *field_dTM__Request == *other_value.field_dTM__Request;
case ALT_uTRAN__ClassmarkChange:
return *field_uTRAN__ClassmarkChange == *other_value.field_uTRAN__ClassmarkChange;
case ALT_cDMA2000__ClassmarkChange:
return *field_cDMA2000__ClassmarkChange == *other_value.field_cDMA2000__ClassmarkChange;
case ALT_gERAN__IU__ModeClassmarkChange:
return *field_gERAN__IU__ModeClassmarkChange == *other_value.field_gERAN__IU__ModeClassmarkChange;
default:
return FALSE;
}
}

PDU__RRM__CipheringModeComplete__MS__NW& PDU__RRM__MS__NW::cipheringModeComplete()
{
if (union_selection != ALT_cipheringModeComplete) {
clean_up();
field_cipheringModeComplete = new PDU__RRM__CipheringModeComplete__MS__NW;
union_selection = ALT_cipheringModeComplete;
}
return *field_cipheringModeComplete;
}

const PDU__RRM__CipheringModeComplete__MS__NW& PDU__RRM__MS__NW::cipheringModeComplete() const
{
if (union_selection != ALT_cipheringModeComplete) TTCN_error("Using non-selected field cipheringModeComplete in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_cipheringModeComplete;
}

PDU__RRM__ConfigurationChangeAck__MS__NW& PDU__RRM__MS__NW::configurationChangeAck()
{
if (union_selection != ALT_configurationChangeAck) {
clean_up();
field_configurationChangeAck = new PDU__RRM__ConfigurationChangeAck__MS__NW;
union_selection = ALT_configurationChangeAck;
}
return *field_configurationChangeAck;
}

const PDU__RRM__ConfigurationChangeAck__MS__NW& PDU__RRM__MS__NW::configurationChangeAck() const
{
if (union_selection != ALT_configurationChangeAck) TTCN_error("Using non-selected field configurationChangeAck in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_configurationChangeAck;
}

PDU__RRM__ConfigurationChangeRej__MS__NW& PDU__RRM__MS__NW::configurationChangeRej()
{
if (union_selection != ALT_configurationChangeRej) {
clean_up();
field_configurationChangeRej = new PDU__RRM__ConfigurationChangeRej__MS__NW;
union_selection = ALT_configurationChangeRej;
}
return *field_configurationChangeRej;
}

const PDU__RRM__ConfigurationChangeRej__MS__NW& PDU__RRM__MS__NW::configurationChangeRej() const
{
if (union_selection != ALT_configurationChangeRej) TTCN_error("Using non-selected field configurationChangeRej in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_configurationChangeRej;
}

PDU__RRM__AssignmentComplete__MS__NW& PDU__RRM__MS__NW::assignmentComplete()
{
if (union_selection != ALT_assignmentComplete) {
clean_up();
field_assignmentComplete = new PDU__RRM__AssignmentComplete__MS__NW;
union_selection = ALT_assignmentComplete;
}
return *field_assignmentComplete;
}

const PDU__RRM__AssignmentComplete__MS__NW& PDU__RRM__MS__NW::assignmentComplete() const
{
if (union_selection != ALT_assignmentComplete) TTCN_error("Using non-selected field assignmentComplete in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_assignmentComplete;
}

PDU__RRM__AssignmentFailure__MS__NW& PDU__RRM__MS__NW::assignmentFailure()
{
if (union_selection != ALT_assignmentFailure) {
clean_up();
field_assignmentFailure = new PDU__RRM__AssignmentFailure__MS__NW;
union_selection = ALT_assignmentFailure;
}
return *field_assignmentFailure;
}

const PDU__RRM__AssignmentFailure__MS__NW& PDU__RRM__MS__NW::assignmentFailure() const
{
if (union_selection != ALT_assignmentFailure) TTCN_error("Using non-selected field assignmentFailure in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_assignmentFailure;
}

PDU__RRM__HandoverComplete__MS__NW& PDU__RRM__MS__NW::handoverComplete()
{
if (union_selection != ALT_handoverComplete) {
clean_up();
field_handoverComplete = new PDU__RRM__HandoverComplete__MS__NW;
union_selection = ALT_handoverComplete;
}
return *field_handoverComplete;
}

const PDU__RRM__HandoverComplete__MS__NW& PDU__RRM__MS__NW::handoverComplete() const
{
if (union_selection != ALT_handoverComplete) TTCN_error("Using non-selected field handoverComplete in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_handoverComplete;
}

PDU__RRM__HandoverFailure__MS__NW& PDU__RRM__MS__NW::handoverFailure()
{
if (union_selection != ALT_handoverFailure) {
clean_up();
field_handoverFailure = new PDU__RRM__HandoverFailure__MS__NW;
union_selection = ALT_handoverFailure;
}
return *field_handoverFailure;
}

const PDU__RRM__HandoverFailure__MS__NW& PDU__RRM__MS__NW::handoverFailure() const
{
if (union_selection != ALT_handoverFailure) TTCN_error("Using non-selected field handoverFailure in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_handoverFailure;
}

PDU__RRM__PartialReleaseComplete__MS__NW& PDU__RRM__MS__NW::partialReleaseComplete()
{
if (union_selection != ALT_partialReleaseComplete) {
clean_up();
field_partialReleaseComplete = new PDU__RRM__PartialReleaseComplete__MS__NW;
union_selection = ALT_partialReleaseComplete;
}
return *field_partialReleaseComplete;
}

const PDU__RRM__PartialReleaseComplete__MS__NW& PDU__RRM__MS__NW::partialReleaseComplete() const
{
if (union_selection != ALT_partialReleaseComplete) TTCN_error("Using non-selected field partialReleaseComplete in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_partialReleaseComplete;
}

PDU__RRM__PagingResponse__MS__NW& PDU__RRM__MS__NW::pagingResponse()
{
if (union_selection != ALT_pagingResponse) {
clean_up();
field_pagingResponse = new PDU__RRM__PagingResponse__MS__NW;
union_selection = ALT_pagingResponse;
}
return *field_pagingResponse;
}

const PDU__RRM__PagingResponse__MS__NW& PDU__RRM__MS__NW::pagingResponse() const
{
if (union_selection != ALT_pagingResponse) TTCN_error("Using non-selected field pagingResponse in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_pagingResponse;
}

PDU__RRM__NotificationResponse__MS__NW& PDU__RRM__MS__NW::notificationResponse()
{
if (union_selection != ALT_notificationResponse) {
clean_up();
field_notificationResponse = new PDU__RRM__NotificationResponse__MS__NW;
union_selection = ALT_notificationResponse;
}
return *field_notificationResponse;
}

const PDU__RRM__NotificationResponse__MS__NW& PDU__RRM__MS__NW::notificationResponse() const
{
if (union_selection != ALT_notificationResponse) TTCN_error("Using non-selected field notificationResponse in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_notificationResponse;
}

PDU__RRM__RR__Status& PDU__RRM__MS__NW::rR__Status()
{
if (union_selection != ALT_rR__Status) {
clean_up();
field_rR__Status = new PDU__RRM__RR__Status;
union_selection = ALT_rR__Status;
}
return *field_rR__Status;
}

const PDU__RRM__RR__Status& PDU__RRM__MS__NW::rR__Status() const
{
if (union_selection != ALT_rR__Status) TTCN_error("Using non-selected field rR_Status in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_rR__Status;
}

PDU__RRM__ChannelModeModifyAck__MS__NW& PDU__RRM__MS__NW::channelModeModifyAck()
{
if (union_selection != ALT_channelModeModifyAck) {
clean_up();
field_channelModeModifyAck = new PDU__RRM__ChannelModeModifyAck__MS__NW;
union_selection = ALT_channelModeModifyAck;
}
return *field_channelModeModifyAck;
}

const PDU__RRM__ChannelModeModifyAck__MS__NW& PDU__RRM__MS__NW::channelModeModifyAck() const
{
if (union_selection != ALT_channelModeModifyAck) TTCN_error("Using non-selected field channelModeModifyAck in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_channelModeModifyAck;
}

PDU__RRM__ClassmarkChange__MS__NW& PDU__RRM__MS__NW::classmarkChange()
{
if (union_selection != ALT_classmarkChange) {
clean_up();
field_classmarkChange = new PDU__RRM__ClassmarkChange__MS__NW;
union_selection = ALT_classmarkChange;
}
return *field_classmarkChange;
}

const PDU__RRM__ClassmarkChange__MS__NW& PDU__RRM__MS__NW::classmarkChange() const
{
if (union_selection != ALT_classmarkChange) TTCN_error("Using non-selected field classmarkChange in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_classmarkChange;
}

PDU__RRM__GPRS__SuspensionRequest__MS__NW& PDU__RRM__MS__NW::gPRS__suspensionRequest()
{
if (union_selection != ALT_gPRS__suspensionRequest) {
clean_up();
field_gPRS__suspensionRequest = new PDU__RRM__GPRS__SuspensionRequest__MS__NW;
union_selection = ALT_gPRS__suspensionRequest;
}
return *field_gPRS__suspensionRequest;
}

const PDU__RRM__GPRS__SuspensionRequest__MS__NW& PDU__RRM__MS__NW::gPRS__suspensionRequest() const
{
if (union_selection != ALT_gPRS__suspensionRequest) TTCN_error("Using non-selected field gPRS_suspensionRequest in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_gPRS__suspensionRequest;
}

PDU__RRM__ServiceInformationMessage__MS__NW& PDU__RRM__MS__NW::serviceInformationMessage()
{
if (union_selection != ALT_serviceInformationMessage) {
clean_up();
field_serviceInformationMessage = new PDU__RRM__ServiceInformationMessage__MS__NW;
union_selection = ALT_serviceInformationMessage;
}
return *field_serviceInformationMessage;
}

const PDU__RRM__ServiceInformationMessage__MS__NW& PDU__RRM__MS__NW::serviceInformationMessage() const
{
if (union_selection != ALT_serviceInformationMessage) TTCN_error("Using non-selected field serviceInformationMessage in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_serviceInformationMessage;
}

PDU__RRM__UplinkRelease& PDU__RRM__MS__NW::uplinkRelease()
{
if (union_selection != ALT_uplinkRelease) {
clean_up();
field_uplinkRelease = new PDU__RRM__UplinkRelease;
union_selection = ALT_uplinkRelease;
}
return *field_uplinkRelease;
}

const PDU__RRM__UplinkRelease& PDU__RRM__MS__NW::uplinkRelease() const
{
if (union_selection != ALT_uplinkRelease) TTCN_error("Using non-selected field uplinkRelease in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_uplinkRelease;
}

PDU__RRM__TalkerIndication__MS__NW& PDU__RRM__MS__NW::talkerIndication()
{
if (union_selection != ALT_talkerIndication) {
clean_up();
field_talkerIndication = new PDU__RRM__TalkerIndication__MS__NW;
union_selection = ALT_talkerIndication;
}
return *field_talkerIndication;
}

const PDU__RRM__TalkerIndication__MS__NW& PDU__RRM__MS__NW::talkerIndication() const
{
if (union_selection != ALT_talkerIndication) TTCN_error("Using non-selected field talkerIndication in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_talkerIndication;
}

PDU__RRM__ApplicationInformation& PDU__RRM__MS__NW::applicationInformation()
{
if (union_selection != ALT_applicationInformation) {
clean_up();
field_applicationInformation = new PDU__RRM__ApplicationInformation;
union_selection = ALT_applicationInformation;
}
return *field_applicationInformation;
}

const PDU__RRM__ApplicationInformation& PDU__RRM__MS__NW::applicationInformation() const
{
if (union_selection != ALT_applicationInformation) TTCN_error("Using non-selected field applicationInformation in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_applicationInformation;
}

PDU__RRM__DTM__AssignmentFailure__MS__NW& PDU__RRM__MS__NW::dTM__AssignmentFailure()
{
if (union_selection != ALT_dTM__AssignmentFailure) {
clean_up();
field_dTM__AssignmentFailure = new PDU__RRM__DTM__AssignmentFailure__MS__NW;
union_selection = ALT_dTM__AssignmentFailure;
}
return *field_dTM__AssignmentFailure;
}

const PDU__RRM__DTM__AssignmentFailure__MS__NW& PDU__RRM__MS__NW::dTM__AssignmentFailure() const
{
if (union_selection != ALT_dTM__AssignmentFailure) TTCN_error("Using non-selected field dTM_AssignmentFailure in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_dTM__AssignmentFailure;
}

PDU__RRM__DTM__Request__MS__NW& PDU__RRM__MS__NW::dTM__Request()
{
if (union_selection != ALT_dTM__Request) {
clean_up();
field_dTM__Request = new PDU__RRM__DTM__Request__MS__NW;
union_selection = ALT_dTM__Request;
}
return *field_dTM__Request;
}

const PDU__RRM__DTM__Request__MS__NW& PDU__RRM__MS__NW::dTM__Request() const
{
if (union_selection != ALT_dTM__Request) TTCN_error("Using non-selected field dTM_Request in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_dTM__Request;
}

PDU__RRM__UTRAN__ClassmarkChange__MS__NW& PDU__RRM__MS__NW::uTRAN__ClassmarkChange()
{
if (union_selection != ALT_uTRAN__ClassmarkChange) {
clean_up();
field_uTRAN__ClassmarkChange = new PDU__RRM__UTRAN__ClassmarkChange__MS__NW;
union_selection = ALT_uTRAN__ClassmarkChange;
}
return *field_uTRAN__ClassmarkChange;
}

const PDU__RRM__UTRAN__ClassmarkChange__MS__NW& PDU__RRM__MS__NW::uTRAN__ClassmarkChange() const
{
if (union_selection != ALT_uTRAN__ClassmarkChange) TTCN_error("Using non-selected field uTRAN_ClassmarkChange in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_uTRAN__ClassmarkChange;
}

PDU__RRM__CDMA2000__ClassmarkChange__MS__NW& PDU__RRM__MS__NW::cDMA2000__ClassmarkChange()
{
if (union_selection != ALT_cDMA2000__ClassmarkChange) {
clean_up();
field_cDMA2000__ClassmarkChange = new PDU__RRM__CDMA2000__ClassmarkChange__MS__NW;
union_selection = ALT_cDMA2000__ClassmarkChange;
}
return *field_cDMA2000__ClassmarkChange;
}

const PDU__RRM__CDMA2000__ClassmarkChange__MS__NW& PDU__RRM__MS__NW::cDMA2000__ClassmarkChange() const
{
if (union_selection != ALT_cDMA2000__ClassmarkChange) TTCN_error("Using non-selected field cDMA2000_ClassmarkChange in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_cDMA2000__ClassmarkChange;
}

PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW& PDU__RRM__MS__NW::gERAN__IU__ModeClassmarkChange()
{
if (union_selection != ALT_gERAN__IU__ModeClassmarkChange) {
clean_up();
field_gERAN__IU__ModeClassmarkChange = new PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW;
union_selection = ALT_gERAN__IU__ModeClassmarkChange;
}
return *field_gERAN__IU__ModeClassmarkChange;
}

const PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW& PDU__RRM__MS__NW::gERAN__IU__ModeClassmarkChange() const
{
if (union_selection != ALT_gERAN__IU__ModeClassmarkChange) TTCN_error("Using non-selected field gERAN_IU_ModeClassmarkChange in a value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *field_gERAN__IU__ModeClassmarkChange;
}

boolean PDU__RRM__MS__NW::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 @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return union_selection == checked_selection;
}

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

boolean PDU__RRM__MS__NW::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_cipheringModeComplete: return field_cipheringModeComplete->is_value();
case ALT_configurationChangeAck: return field_configurationChangeAck->is_value();
case ALT_configurationChangeRej: return field_configurationChangeRej->is_value();
case ALT_assignmentComplete: return field_assignmentComplete->is_value();
case ALT_assignmentFailure: return field_assignmentFailure->is_value();
case ALT_handoverComplete: return field_handoverComplete->is_value();
case ALT_handoverFailure: return field_handoverFailure->is_value();
case ALT_partialReleaseComplete: return field_partialReleaseComplete->is_value();
case ALT_pagingResponse: return field_pagingResponse->is_value();
case ALT_notificationResponse: return field_notificationResponse->is_value();
case ALT_rR__Status: return field_rR__Status->is_value();
case ALT_channelModeModifyAck: return field_channelModeModifyAck->is_value();
case ALT_classmarkChange: return field_classmarkChange->is_value();
case ALT_gPRS__suspensionRequest: return field_gPRS__suspensionRequest->is_value();
case ALT_serviceInformationMessage: return field_serviceInformationMessage->is_value();
case ALT_uplinkRelease: return field_uplinkRelease->is_value();
case ALT_talkerIndication: return field_talkerIndication->is_value();
case ALT_applicationInformation: return field_applicationInformation->is_value();
case ALT_dTM__AssignmentFailure: return field_dTM__AssignmentFailure->is_value();
case ALT_dTM__Request: return field_dTM__Request->is_value();
case ALT_uTRAN__ClassmarkChange: return field_uTRAN__ClassmarkChange->is_value();
case ALT_cDMA2000__ClassmarkChange: return field_cDMA2000__ClassmarkChange->is_value();
case ALT_gERAN__IU__ModeClassmarkChange: return field_gERAN__IU__ModeClassmarkChange->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void PDU__RRM__MS__NW::clean_up()
{
switch (union_selection) {
case ALT_cipheringModeComplete:
  delete field_cipheringModeComplete;
  break;
case ALT_configurationChangeAck:
  delete field_configurationChangeAck;
  break;
case ALT_configurationChangeRej:
  delete field_configurationChangeRej;
  break;
case ALT_assignmentComplete:
  delete field_assignmentComplete;
  break;
case ALT_assignmentFailure:
  delete field_assignmentFailure;
  break;
case ALT_handoverComplete:
  delete field_handoverComplete;
  break;
case ALT_handoverFailure:
  delete field_handoverFailure;
  break;
case ALT_partialReleaseComplete:
  delete field_partialReleaseComplete;
  break;
case ALT_pagingResponse:
  delete field_pagingResponse;
  break;
case ALT_notificationResponse:
  delete field_notificationResponse;
  break;
case ALT_rR__Status:
  delete field_rR__Status;
  break;
case ALT_channelModeModifyAck:
  delete field_channelModeModifyAck;
  break;
case ALT_classmarkChange:
  delete field_classmarkChange;
  break;
case ALT_gPRS__suspensionRequest:
  delete field_gPRS__suspensionRequest;
  break;
case ALT_serviceInformationMessage:
  delete field_serviceInformationMessage;
  break;
case ALT_uplinkRelease:
  delete field_uplinkRelease;
  break;
case ALT_talkerIndication:
  delete field_talkerIndication;
  break;
case ALT_applicationInformation:
  delete field_applicationInformation;
  break;
case ALT_dTM__AssignmentFailure:
  delete field_dTM__AssignmentFailure;
  break;
case ALT_dTM__Request:
  delete field_dTM__Request;
  break;
case ALT_uTRAN__ClassmarkChange:
  delete field_uTRAN__ClassmarkChange;
  break;
case ALT_cDMA2000__ClassmarkChange:
  delete field_cDMA2000__ClassmarkChange;
  break;
case ALT_gERAN__IU__ModeClassmarkChange:
  delete field_gERAN__IU__ModeClassmarkChange;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void PDU__RRM__MS__NW::log() const
{
switch (union_selection) {
case ALT_cipheringModeComplete:
TTCN_Logger::log_event_str("{ cipheringModeComplete := ");
field_cipheringModeComplete->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_configurationChangeAck:
TTCN_Logger::log_event_str("{ configurationChangeAck := ");
field_configurationChangeAck->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_configurationChangeRej:
TTCN_Logger::log_event_str("{ configurationChangeRej := ");
field_configurationChangeRej->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_assignmentComplete:
TTCN_Logger::log_event_str("{ assignmentComplete := ");
field_assignmentComplete->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_assignmentFailure:
TTCN_Logger::log_event_str("{ assignmentFailure := ");
field_assignmentFailure->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_handoverComplete:
TTCN_Logger::log_event_str("{ handoverComplete := ");
field_handoverComplete->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_handoverFailure:
TTCN_Logger::log_event_str("{ handoverFailure := ");
field_handoverFailure->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_partialReleaseComplete:
TTCN_Logger::log_event_str("{ partialReleaseComplete := ");
field_partialReleaseComplete->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_pagingResponse:
TTCN_Logger::log_event_str("{ pagingResponse := ");
field_pagingResponse->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_notificationResponse:
TTCN_Logger::log_event_str("{ notificationResponse := ");
field_notificationResponse->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_rR__Status:
TTCN_Logger::log_event_str("{ rR_Status := ");
field_rR__Status->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_channelModeModifyAck:
TTCN_Logger::log_event_str("{ channelModeModifyAck := ");
field_channelModeModifyAck->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_classmarkChange:
TTCN_Logger::log_event_str("{ classmarkChange := ");
field_classmarkChange->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_gPRS__suspensionRequest:
TTCN_Logger::log_event_str("{ gPRS_suspensionRequest := ");
field_gPRS__suspensionRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_serviceInformationMessage:
TTCN_Logger::log_event_str("{ serviceInformationMessage := ");
field_serviceInformationMessage->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_uplinkRelease:
TTCN_Logger::log_event_str("{ uplinkRelease := ");
field_uplinkRelease->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_talkerIndication:
TTCN_Logger::log_event_str("{ talkerIndication := ");
field_talkerIndication->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_applicationInformation:
TTCN_Logger::log_event_str("{ applicationInformation := ");
field_applicationInformation->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_dTM__AssignmentFailure:
TTCN_Logger::log_event_str("{ dTM_AssignmentFailure := ");
field_dTM__AssignmentFailure->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_dTM__Request:
TTCN_Logger::log_event_str("{ dTM_Request := ");
field_dTM__Request->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_uTRAN__ClassmarkChange:
TTCN_Logger::log_event_str("{ uTRAN_ClassmarkChange := ");
field_uTRAN__ClassmarkChange->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_cDMA2000__ClassmarkChange:
TTCN_Logger::log_event_str("{ cDMA2000_ClassmarkChange := ");
field_cDMA2000__ClassmarkChange->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_gERAN__IU__ModeClassmarkChange:
TTCN_Logger::log_event_str("{ gERAN_IU_ModeClassmarkChange := ");
field_gERAN__IU__ModeClassmarkChange->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

void PDU__RRM__MS__NW::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, "cipheringModeComplete")) {
    cipheringModeComplete().set_param(*mp_last);
    if (!cipheringModeComplete().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "configurationChangeAck")) {
    configurationChangeAck().set_param(*mp_last);
    if (!configurationChangeAck().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "configurationChangeRej")) {
    configurationChangeRej().set_param(*mp_last);
    if (!configurationChangeRej().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "assignmentComplete")) {
    assignmentComplete().set_param(*mp_last);
    if (!assignmentComplete().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "assignmentFailure")) {
    assignmentFailure().set_param(*mp_last);
    if (!assignmentFailure().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "handoverComplete")) {
    handoverComplete().set_param(*mp_last);
    if (!handoverComplete().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "handoverFailure")) {
    handoverFailure().set_param(*mp_last);
    if (!handoverFailure().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "partialReleaseComplete")) {
    partialReleaseComplete().set_param(*mp_last);
    if (!partialReleaseComplete().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "pagingResponse")) {
    pagingResponse().set_param(*mp_last);
    if (!pagingResponse().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "notificationResponse")) {
    notificationResponse().set_param(*mp_last);
    if (!notificationResponse().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "rR_Status")) {
    rR__Status().set_param(*mp_last);
    if (!rR__Status().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "channelModeModifyAck")) {
    channelModeModifyAck().set_param(*mp_last);
    if (!channelModeModifyAck().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "classmarkChange")) {
    classmarkChange().set_param(*mp_last);
    if (!classmarkChange().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "gPRS_suspensionRequest")) {
    gPRS__suspensionRequest().set_param(*mp_last);
    if (!gPRS__suspensionRequest().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "serviceInformationMessage")) {
    serviceInformationMessage().set_param(*mp_last);
    if (!serviceInformationMessage().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "uplinkRelease")) {
    uplinkRelease().set_param(*mp_last);
    if (!uplinkRelease().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "talkerIndication")) {
    talkerIndication().set_param(*mp_last);
    if (!talkerIndication().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "applicationInformation")) {
    applicationInformation().set_param(*mp_last);
    if (!applicationInformation().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "dTM_AssignmentFailure")) {
    dTM__AssignmentFailure().set_param(*mp_last);
    if (!dTM__AssignmentFailure().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "dTM_Request")) {
    dTM__Request().set_param(*mp_last);
    if (!dTM__Request().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "uTRAN_ClassmarkChange")) {
    uTRAN__ClassmarkChange().set_param(*mp_last);
    if (!uTRAN__ClassmarkChange().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "cDMA2000_ClassmarkChange")) {
    cDMA2000__ClassmarkChange().set_param(*mp_last);
    if (!cDMA2000__ClassmarkChange().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "gERAN_IU_ModeClassmarkChange")) {
    gERAN__IU__ModeClassmarkChange().set_param(*mp_last);
    if (!gERAN__IU__ModeClassmarkChange().is_bound()) clean_up();
    return;
  }
  mp_last->error("Field %s does not exist in type @MobileL3_RRM_Types.PDU_RRM_MS_NW.", last_name);
}

void PDU__RRM__MS__NW::set_implicit_omit()
{
switch (union_selection) {
case ALT_cipheringModeComplete:
field_cipheringModeComplete->set_implicit_omit(); break;
case ALT_configurationChangeAck:
field_configurationChangeAck->set_implicit_omit(); break;
case ALT_configurationChangeRej:
field_configurationChangeRej->set_implicit_omit(); break;
case ALT_assignmentComplete:
field_assignmentComplete->set_implicit_omit(); break;
case ALT_assignmentFailure:
field_assignmentFailure->set_implicit_omit(); break;
case ALT_handoverComplete:
field_handoverComplete->set_implicit_omit(); break;
case ALT_handoverFailure:
field_handoverFailure->set_implicit_omit(); break;
case ALT_partialReleaseComplete:
field_partialReleaseComplete->set_implicit_omit(); break;
case ALT_pagingResponse:
field_pagingResponse->set_implicit_omit(); break;
case ALT_notificationResponse:
field_notificationResponse->set_implicit_omit(); break;
case ALT_rR__Status:
field_rR__Status->set_implicit_omit(); break;
case ALT_channelModeModifyAck:
field_channelModeModifyAck->set_implicit_omit(); break;
case ALT_classmarkChange:
field_classmarkChange->set_implicit_omit(); break;
case ALT_gPRS__suspensionRequest:
field_gPRS__suspensionRequest->set_implicit_omit(); break;
case ALT_serviceInformationMessage:
field_serviceInformationMessage->set_implicit_omit(); break;
case ALT_uplinkRelease:
field_uplinkRelease->set_implicit_omit(); break;
case ALT_talkerIndication:
field_talkerIndication->set_implicit_omit(); break;
case ALT_applicationInformation:
field_applicationInformation->set_implicit_omit(); break;
case ALT_dTM__AssignmentFailure:
field_dTM__AssignmentFailure->set_implicit_omit(); break;
case ALT_dTM__Request:
field_dTM__Request->set_implicit_omit(); break;
case ALT_uTRAN__ClassmarkChange:
field_uTRAN__ClassmarkChange->set_implicit_omit(); break;
case ALT_cDMA2000__ClassmarkChange:
field_cDMA2000__ClassmarkChange->set_implicit_omit(); break;
case ALT_gERAN__IU__ModeClassmarkChange:
field_gERAN__IU__ModeClassmarkChange->set_implicit_omit(); break;
default: break;
}
}

void PDU__RRM__MS__NW::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_cipheringModeComplete:
field_cipheringModeComplete->encode_text(text_buf);
break;
case ALT_configurationChangeAck:
field_configurationChangeAck->encode_text(text_buf);
break;
case ALT_configurationChangeRej:
field_configurationChangeRej->encode_text(text_buf);
break;
case ALT_assignmentComplete:
field_assignmentComplete->encode_text(text_buf);
break;
case ALT_assignmentFailure:
field_assignmentFailure->encode_text(text_buf);
break;
case ALT_handoverComplete:
field_handoverComplete->encode_text(text_buf);
break;
case ALT_handoverFailure:
field_handoverFailure->encode_text(text_buf);
break;
case ALT_partialReleaseComplete:
field_partialReleaseComplete->encode_text(text_buf);
break;
case ALT_pagingResponse:
field_pagingResponse->encode_text(text_buf);
break;
case ALT_notificationResponse:
field_notificationResponse->encode_text(text_buf);
break;
case ALT_rR__Status:
field_rR__Status->encode_text(text_buf);
break;
case ALT_channelModeModifyAck:
field_channelModeModifyAck->encode_text(text_buf);
break;
case ALT_classmarkChange:
field_classmarkChange->encode_text(text_buf);
break;
case ALT_gPRS__suspensionRequest:
field_gPRS__suspensionRequest->encode_text(text_buf);
break;
case ALT_serviceInformationMessage:
field_serviceInformationMessage->encode_text(text_buf);
break;
case ALT_uplinkRelease:
field_uplinkRelease->encode_text(text_buf);
break;
case ALT_talkerIndication:
field_talkerIndication->encode_text(text_buf);
break;
case ALT_applicationInformation:
field_applicationInformation->encode_text(text_buf);
break;
case ALT_dTM__AssignmentFailure:
field_dTM__AssignmentFailure->encode_text(text_buf);
break;
case ALT_dTM__Request:
field_dTM__Request->encode_text(text_buf);
break;
case ALT_uTRAN__ClassmarkChange:
field_uTRAN__ClassmarkChange->encode_text(text_buf);
break;
case ALT_cDMA2000__ClassmarkChange:
field_cDMA2000__ClassmarkChange->encode_text(text_buf);
break;
case ALT_gERAN__IU__ModeClassmarkChange:
field_gERAN__IU__ModeClassmarkChange->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
}
}

void PDU__RRM__MS__NW::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_cipheringModeComplete:
cipheringModeComplete().decode_text(text_buf);
break;
case ALT_configurationChangeAck:
configurationChangeAck().decode_text(text_buf);
break;
case ALT_configurationChangeRej:
configurationChangeRej().decode_text(text_buf);
break;
case ALT_assignmentComplete:
assignmentComplete().decode_text(text_buf);
break;
case ALT_assignmentFailure:
assignmentFailure().decode_text(text_buf);
break;
case ALT_handoverComplete:
handoverComplete().decode_text(text_buf);
break;
case ALT_handoverFailure:
handoverFailure().decode_text(text_buf);
break;
case ALT_partialReleaseComplete:
partialReleaseComplete().decode_text(text_buf);
break;
case ALT_pagingResponse:
pagingResponse().decode_text(text_buf);
break;
case ALT_notificationResponse:
notificationResponse().decode_text(text_buf);
break;
case ALT_rR__Status:
rR__Status().decode_text(text_buf);
break;
case ALT_channelModeModifyAck:
channelModeModifyAck().decode_text(text_buf);
break;
case ALT_classmarkChange:
classmarkChange().decode_text(text_buf);
break;
case ALT_gPRS__suspensionRequest:
gPRS__suspensionRequest().decode_text(text_buf);
break;
case ALT_serviceInformationMessage:
serviceInformationMessage().decode_text(text_buf);
break;
case ALT_uplinkRelease:
uplinkRelease().decode_text(text_buf);
break;
case ALT_talkerIndication:
talkerIndication().decode_text(text_buf);
break;
case ALT_applicationInformation:
applicationInformation().decode_text(text_buf);
break;
case ALT_dTM__AssignmentFailure:
dTM__AssignmentFailure().decode_text(text_buf);
break;
case ALT_dTM__Request:
dTM__Request().decode_text(text_buf);
break;
case ALT_uTRAN__ClassmarkChange:
uTRAN__ClassmarkChange().decode_text(text_buf);
break;
case ALT_cDMA2000__ClassmarkChange:
cDMA2000__ClassmarkChange().decode_text(text_buf);
break;
case ALT_gERAN__IU__ModeClassmarkChange:
gERAN__IU__ModeClassmarkChange().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
}
}

void PDU__RRM__MS__NW::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 PDU__RRM__MS__NW::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 PDU__RRM__MS__NW::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, PDU__RRM__CipheringModeComplete__MS__NW_descr_.raw->forceomit);
      decoded_length = cipheringModeComplete().RAW_decode(PDU__RRM__CipheringModeComplete__MS__NW_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, PDU__RRM__ConfigurationChangeAck__MS__NW_descr_.raw->forceomit);
      decoded_length = configurationChangeAck().RAW_decode(PDU__RRM__ConfigurationChangeAck__MS__NW_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, PDU__RRM__ConfigurationChangeRej__MS__NW_descr_.raw->forceomit);
      decoded_length = configurationChangeRej().RAW_decode(PDU__RRM__ConfigurationChangeRej__MS__NW_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, PDU__RRM__AssignmentComplete__MS__NW_descr_.raw->forceomit);
      decoded_length = assignmentComplete().RAW_decode(PDU__RRM__AssignmentComplete__MS__NW_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, PDU__RRM__AssignmentFailure__MS__NW_descr_.raw->forceomit);
      decoded_length = assignmentFailure().RAW_decode(PDU__RRM__AssignmentFailure__MS__NW_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, PDU__RRM__HandoverComplete__MS__NW_descr_.raw->forceomit);
      decoded_length = handoverComplete().RAW_decode(PDU__RRM__HandoverComplete__MS__NW_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, PDU__RRM__HandoverFailure__MS__NW_descr_.raw->forceomit);
      decoded_length = handoverFailure().RAW_decode(PDU__RRM__HandoverFailure__MS__NW_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, PDU__RRM__PartialReleaseComplete__MS__NW_descr_.raw->forceomit);
      decoded_length = partialReleaseComplete().RAW_decode(PDU__RRM__PartialReleaseComplete__MS__NW_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, PDU__RRM__PagingResponse__MS__NW_descr_.raw->forceomit);
      decoded_length = pagingResponse().RAW_decode(PDU__RRM__PagingResponse__MS__NW_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, PDU__RRM__NotificationResponse__MS__NW_descr_.raw->forceomit);
      decoded_length = notificationResponse().RAW_decode(PDU__RRM__NotificationResponse__MS__NW_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 10: {
      RAW_Force_Omit field_force_omit(10, force_omit, PDU__RRM__RR__Status_descr_.raw->forceomit);
      decoded_length = rR__Status().RAW_decode(PDU__RRM__RR__Status_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 11: {
      RAW_Force_Omit field_force_omit(11, force_omit, PDU__RRM__ChannelModeModifyAck__MS__NW_descr_.raw->forceomit);
      decoded_length = channelModeModifyAck().RAW_decode(PDU__RRM__ChannelModeModifyAck__MS__NW_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 12: {
      RAW_Force_Omit field_force_omit(12, force_omit, PDU__RRM__ClassmarkChange__MS__NW_descr_.raw->forceomit);
      decoded_length = classmarkChange().RAW_decode(PDU__RRM__ClassmarkChange__MS__NW_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 13: {
      RAW_Force_Omit field_force_omit(13, force_omit, PDU__RRM__GPRS__SuspensionRequest__MS__NW_descr_.raw->forceomit);
      decoded_length = gPRS__suspensionRequest().RAW_decode(PDU__RRM__GPRS__SuspensionRequest__MS__NW_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 14: {
      RAW_Force_Omit field_force_omit(14, force_omit, PDU__RRM__ServiceInformationMessage__MS__NW_descr_.raw->forceomit);
      decoded_length = serviceInformationMessage().RAW_decode(PDU__RRM__ServiceInformationMessage__MS__NW_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 15: {
      RAW_Force_Omit field_force_omit(15, force_omit, PDU__RRM__UplinkRelease_descr_.raw->forceomit);
      decoded_length = uplinkRelease().RAW_decode(PDU__RRM__UplinkRelease_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 16: {
      RAW_Force_Omit field_force_omit(16, force_omit, PDU__RRM__TalkerIndication__MS__NW_descr_.raw->forceomit);
      decoded_length = talkerIndication().RAW_decode(PDU__RRM__TalkerIndication__MS__NW_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 17: {
      RAW_Force_Omit field_force_omit(17, force_omit, PDU__RRM__ApplicationInformation_descr_.raw->forceomit);
      decoded_length = applicationInformation().RAW_decode(PDU__RRM__ApplicationInformation_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 18: {
      RAW_Force_Omit field_force_omit(18, force_omit, PDU__RRM__DTM__AssignmentFailure__MS__NW_descr_.raw->forceomit);
      decoded_length = dTM__AssignmentFailure().RAW_decode(PDU__RRM__DTM__AssignmentFailure__MS__NW_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 19: {
      RAW_Force_Omit field_force_omit(19, force_omit, PDU__RRM__DTM__Request__MS__NW_descr_.raw->forceomit);
      decoded_length = dTM__Request().RAW_decode(PDU__RRM__DTM__Request__MS__NW_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 20: {
      RAW_Force_Omit field_force_omit(20, force_omit, PDU__RRM__UTRAN__ClassmarkChange__MS__NW_descr_.raw->forceomit);
      decoded_length = uTRAN__ClassmarkChange().RAW_decode(PDU__RRM__UTRAN__ClassmarkChange__MS__NW_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 21: {
      RAW_Force_Omit field_force_omit(21, force_omit, PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_descr_.raw->forceomit);
      decoded_length = cDMA2000__ClassmarkChange().RAW_decode(PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 22: {
      RAW_Force_Omit field_force_omit(22, force_omit, PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_descr_.raw->forceomit);
      decoded_length = gERAN__IU__ModeClassmarkChange().RAW_decode(PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_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_0;
    int decoded_0_length;
    already_failed = FALSE;
    if (!already_failed) {
      p_buf.set_pos_bit(starting_pos + 0);
      decoded_0_length = temporal_0.RAW_decode(General__Types::BIT8_descr_, p_buf, limit, top_bit_ord, TRUE);
      if (decoded_0_length > 0) {
        if (temporal_0 ==  bs_14) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(0, force_omit, PDU__RRM__CipheringModeComplete__MS__NW_descr_.raw->forceomit);
          decoded_length = cipheringModeComplete().RAW_decode(PDU__RRM__CipheringModeComplete__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_cipheringModeComplete).messageType() ==  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_0_length > 0) {
        if (temporal_0 ==  bs_15) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(1, force_omit, PDU__RRM__ConfigurationChangeAck__MS__NW_descr_.raw->forceomit);
          decoded_length = configurationChangeAck().RAW_decode(PDU__RRM__ConfigurationChangeAck__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_configurationChangeAck).messageType() ==  bs_15) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_16) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(2, force_omit, PDU__RRM__ConfigurationChangeRej__MS__NW_descr_.raw->forceomit);
          decoded_length = configurationChangeRej().RAW_decode(PDU__RRM__ConfigurationChangeRej__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_configurationChangeRej).messageType() ==  bs_16) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_17) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(3, force_omit, PDU__RRM__AssignmentComplete__MS__NW_descr_.raw->forceomit);
          decoded_length = assignmentComplete().RAW_decode(PDU__RRM__AssignmentComplete__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_assignmentComplete).messageType() ==  bs_17) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_18) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(4, force_omit, PDU__RRM__AssignmentFailure__MS__NW_descr_.raw->forceomit);
          decoded_length = assignmentFailure().RAW_decode(PDU__RRM__AssignmentFailure__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_assignmentFailure).messageType() ==  bs_18) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_19) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(5, force_omit, PDU__RRM__HandoverComplete__MS__NW_descr_.raw->forceomit);
          decoded_length = handoverComplete().RAW_decode(PDU__RRM__HandoverComplete__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_handoverComplete).messageType() ==  bs_19) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_20) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(6, force_omit, PDU__RRM__HandoverFailure__MS__NW_descr_.raw->forceomit);
          decoded_length = handoverFailure().RAW_decode(PDU__RRM__HandoverFailure__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_handoverFailure).messageType() ==  bs_20) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_21) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(7, force_omit, PDU__RRM__PartialReleaseComplete__MS__NW_descr_.raw->forceomit);
          decoded_length = partialReleaseComplete().RAW_decode(PDU__RRM__PartialReleaseComplete__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_partialReleaseComplete).messageType() ==  bs_21) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_22) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(8, force_omit, PDU__RRM__PagingResponse__MS__NW_descr_.raw->forceomit);
          decoded_length = pagingResponse().RAW_decode(PDU__RRM__PagingResponse__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_pagingResponse).messageType() ==  bs_22) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_23) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(9, force_omit, PDU__RRM__NotificationResponse__MS__NW_descr_.raw->forceomit);
          decoded_length = notificationResponse().RAW_decode(PDU__RRM__NotificationResponse__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_notificationResponse).messageType() ==  bs_23) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_24) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(10, force_omit, PDU__RRM__RR__Status_descr_.raw->forceomit);
          decoded_length = rR__Status().RAW_decode(PDU__RRM__RR__Status_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_rR__Status).messageType() ==  bs_24) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_25) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(11, force_omit, PDU__RRM__ChannelModeModifyAck__MS__NW_descr_.raw->forceomit);
          decoded_length = channelModeModifyAck().RAW_decode(PDU__RRM__ChannelModeModifyAck__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_channelModeModifyAck).messageType() ==  bs_25) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_26) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(12, force_omit, PDU__RRM__ClassmarkChange__MS__NW_descr_.raw->forceomit);
          decoded_length = classmarkChange().RAW_decode(PDU__RRM__ClassmarkChange__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_classmarkChange).messageType() ==  bs_26) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_27) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(13, force_omit, PDU__RRM__GPRS__SuspensionRequest__MS__NW_descr_.raw->forceomit);
          decoded_length = gPRS__suspensionRequest().RAW_decode(PDU__RRM__GPRS__SuspensionRequest__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_gPRS__suspensionRequest).messageType() ==  bs_27) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_28) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(14, force_omit, PDU__RRM__ServiceInformationMessage__MS__NW_descr_.raw->forceomit);
          decoded_length = serviceInformationMessage().RAW_decode(PDU__RRM__ServiceInformationMessage__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_serviceInformationMessage).messageType() ==  bs_28) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_29) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(15, force_omit, PDU__RRM__UplinkRelease_descr_.raw->forceomit);
          decoded_length = uplinkRelease().RAW_decode(PDU__RRM__UplinkRelease_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_uplinkRelease).messageType() ==  bs_29) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_30) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(16, force_omit, PDU__RRM__TalkerIndication__MS__NW_descr_.raw->forceomit);
          decoded_length = talkerIndication().RAW_decode(PDU__RRM__TalkerIndication__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_talkerIndication).messageType() ==  bs_30) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_31) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(17, force_omit, PDU__RRM__ApplicationInformation_descr_.raw->forceomit);
          decoded_length = applicationInformation().RAW_decode(PDU__RRM__ApplicationInformation_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_applicationInformation).messageType() ==  bs_31) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_32) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(18, force_omit, PDU__RRM__DTM__AssignmentFailure__MS__NW_descr_.raw->forceomit);
          decoded_length = dTM__AssignmentFailure().RAW_decode(PDU__RRM__DTM__AssignmentFailure__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_dTM__AssignmentFailure).messageType() ==  bs_32) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_33) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(19, force_omit, PDU__RRM__DTM__Request__MS__NW_descr_.raw->forceomit);
          decoded_length = dTM__Request().RAW_decode(PDU__RRM__DTM__Request__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_dTM__Request).messageType() ==  bs_33) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_34) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(20, force_omit, PDU__RRM__UTRAN__ClassmarkChange__MS__NW_descr_.raw->forceomit);
          decoded_length = uTRAN__ClassmarkChange().RAW_decode(PDU__RRM__UTRAN__ClassmarkChange__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_uTRAN__ClassmarkChange).messageType() ==  bs_34) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_35) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(21, force_omit, PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_descr_.raw->forceomit);
          decoded_length = cDMA2000__ClassmarkChange().RAW_decode(PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_cDMA2000__ClassmarkChange).messageType() ==  bs_35) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_36) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(22, force_omit, PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_descr_.raw->forceomit);
          decoded_length = gERAN__IU__ModeClassmarkChange().RAW_decode(PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_gERAN__IU__ModeClassmarkChange).messageType() ==  bs_36) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
 }
 clean_up();
 return -1;
}

int PDU__RRM__MS__NW::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
{
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 23;  myleaf.body.node.nodes = init_nodes_of_enc_tree(23);
  memset(myleaf.body.node.nodes, 0, 23 * sizeof(RAW_enc_tree *));
  switch (union_selection) {
  case ALT_cipheringModeComplete:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, PDU__RRM__CipheringModeComplete__MS__NW_descr_.raw);
    encoded_length = field_cipheringModeComplete->RAW_encode(PDU__RRM__CipheringModeComplete__MS__NW_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &PDU__RRM__CipheringModeComplete__MS__NW_descr_;
    if ((*field_cipheringModeComplete).messageType() !=  bs_14) {
  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_14.RAW_encode(General__Types::BIT8_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_configurationChangeAck:
    myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, PDU__RRM__ConfigurationChangeAck__MS__NW_descr_.raw);
    encoded_length = field_configurationChangeAck->RAW_encode(PDU__RRM__ConfigurationChangeAck__MS__NW_descr_, *myleaf.body.node.nodes[1]);
    myleaf.body.node.nodes[1]->coding_descr = &PDU__RRM__ConfigurationChangeAck__MS__NW_descr_;
    if ((*field_configurationChangeAck).messageType() !=  bs_15) {
  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_15.RAW_encode(General__Types::BIT8_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_configurationChangeRej:
    myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, PDU__RRM__ConfigurationChangeRej__MS__NW_descr_.raw);
    encoded_length = field_configurationChangeRej->RAW_encode(PDU__RRM__ConfigurationChangeRej__MS__NW_descr_, *myleaf.body.node.nodes[2]);
    myleaf.body.node.nodes[2]->coding_descr = &PDU__RRM__ConfigurationChangeRej__MS__NW_descr_;
    if ((*field_configurationChangeRej).messageType() !=  bs_16) {
  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_16.RAW_encode(General__Types::BIT8_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_assignmentComplete:
    myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 3, PDU__RRM__AssignmentComplete__MS__NW_descr_.raw);
    encoded_length = field_assignmentComplete->RAW_encode(PDU__RRM__AssignmentComplete__MS__NW_descr_, *myleaf.body.node.nodes[3]);
    myleaf.body.node.nodes[3]->coding_descr = &PDU__RRM__AssignmentComplete__MS__NW_descr_;
    if ((*field_assignmentComplete).messageType() !=  bs_17) {
  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_17.RAW_encode(General__Types::BIT8_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_assignmentFailure:
    myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 4, PDU__RRM__AssignmentFailure__MS__NW_descr_.raw);
    encoded_length = field_assignmentFailure->RAW_encode(PDU__RRM__AssignmentFailure__MS__NW_descr_, *myleaf.body.node.nodes[4]);
    myleaf.body.node.nodes[4]->coding_descr = &PDU__RRM__AssignmentFailure__MS__NW_descr_;
    if ((*field_assignmentFailure).messageType() !=  bs_18) {
  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_18.RAW_encode(General__Types::BIT8_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_handoverComplete:
    myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 5, PDU__RRM__HandoverComplete__MS__NW_descr_.raw);
    encoded_length = field_handoverComplete->RAW_encode(PDU__RRM__HandoverComplete__MS__NW_descr_, *myleaf.body.node.nodes[5]);
    myleaf.body.node.nodes[5]->coding_descr = &PDU__RRM__HandoverComplete__MS__NW_descr_;
    if ((*field_handoverComplete).messageType() !=  bs_19) {
  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_19.RAW_encode(General__Types::BIT8_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_handoverFailure:
    myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 6, PDU__RRM__HandoverFailure__MS__NW_descr_.raw);
    encoded_length = field_handoverFailure->RAW_encode(PDU__RRM__HandoverFailure__MS__NW_descr_, *myleaf.body.node.nodes[6]);
    myleaf.body.node.nodes[6]->coding_descr = &PDU__RRM__HandoverFailure__MS__NW_descr_;
    if ((*field_handoverFailure).messageType() !=  bs_20) {
  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_20.RAW_encode(General__Types::BIT8_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_partialReleaseComplete:
    myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 7, PDU__RRM__PartialReleaseComplete__MS__NW_descr_.raw);
    encoded_length = field_partialReleaseComplete->RAW_encode(PDU__RRM__PartialReleaseComplete__MS__NW_descr_, *myleaf.body.node.nodes[7]);
    myleaf.body.node.nodes[7]->coding_descr = &PDU__RRM__PartialReleaseComplete__MS__NW_descr_;
    if ((*field_partialReleaseComplete).messageType() !=  bs_21) {
  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_21.RAW_encode(General__Types::BIT8_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_pagingResponse:
    myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 8, PDU__RRM__PagingResponse__MS__NW_descr_.raw);
    encoded_length = field_pagingResponse->RAW_encode(PDU__RRM__PagingResponse__MS__NW_descr_, *myleaf.body.node.nodes[8]);
    myleaf.body.node.nodes[8]->coding_descr = &PDU__RRM__PagingResponse__MS__NW_descr_;
    if ((*field_pagingResponse).messageType() !=  bs_22) {
  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_22.RAW_encode(General__Types::BIT8_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_notificationResponse:
    myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 9, PDU__RRM__NotificationResponse__MS__NW_descr_.raw);
    encoded_length = field_notificationResponse->RAW_encode(PDU__RRM__NotificationResponse__MS__NW_descr_, *myleaf.body.node.nodes[9]);
    myleaf.body.node.nodes[9]->coding_descr = &PDU__RRM__NotificationResponse__MS__NW_descr_;
    if ((*field_notificationResponse).messageType() !=  bs_23) {
  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_23.RAW_encode(General__Types::BIT8_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_rR__Status:
    myleaf.body.node.nodes[10] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 10, PDU__RRM__RR__Status_descr_.raw);
    encoded_length = field_rR__Status->RAW_encode(PDU__RRM__RR__Status_descr_, *myleaf.body.node.nodes[10]);
    myleaf.body.node.nodes[10]->coding_descr = &PDU__RRM__RR__Status_descr_;
    if ((*field_rR__Status).messageType() !=  bs_24) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={10,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_24.RAW_encode(General__Types::BIT8_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_channelModeModifyAck:
    myleaf.body.node.nodes[11] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 11, PDU__RRM__ChannelModeModifyAck__MS__NW_descr_.raw);
    encoded_length = field_channelModeModifyAck->RAW_encode(PDU__RRM__ChannelModeModifyAck__MS__NW_descr_, *myleaf.body.node.nodes[11]);
    myleaf.body.node.nodes[11]->coding_descr = &PDU__RRM__ChannelModeModifyAck__MS__NW_descr_;
    if ((*field_channelModeModifyAck).messageType() !=  bs_25) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={11,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_25.RAW_encode(General__Types::BIT8_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_classmarkChange:
    myleaf.body.node.nodes[12] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 12, PDU__RRM__ClassmarkChange__MS__NW_descr_.raw);
    encoded_length = field_classmarkChange->RAW_encode(PDU__RRM__ClassmarkChange__MS__NW_descr_, *myleaf.body.node.nodes[12]);
    myleaf.body.node.nodes[12]->coding_descr = &PDU__RRM__ClassmarkChange__MS__NW_descr_;
    if ((*field_classmarkChange).messageType() !=  bs_26) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={12,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_26.RAW_encode(General__Types::BIT8_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_gPRS__suspensionRequest:
    myleaf.body.node.nodes[13] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 13, PDU__RRM__GPRS__SuspensionRequest__MS__NW_descr_.raw);
    encoded_length = field_gPRS__suspensionRequest->RAW_encode(PDU__RRM__GPRS__SuspensionRequest__MS__NW_descr_, *myleaf.body.node.nodes[13]);
    myleaf.body.node.nodes[13]->coding_descr = &PDU__RRM__GPRS__SuspensionRequest__MS__NW_descr_;
    if ((*field_gPRS__suspensionRequest).messageType() !=  bs_27) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={13,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_27.RAW_encode(General__Types::BIT8_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_serviceInformationMessage:
    myleaf.body.node.nodes[14] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 14, PDU__RRM__ServiceInformationMessage__MS__NW_descr_.raw);
    encoded_length = field_serviceInformationMessage->RAW_encode(PDU__RRM__ServiceInformationMessage__MS__NW_descr_, *myleaf.body.node.nodes[14]);
    myleaf.body.node.nodes[14]->coding_descr = &PDU__RRM__ServiceInformationMessage__MS__NW_descr_;
    if ((*field_serviceInformationMessage).messageType() !=  bs_28) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={14,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_28.RAW_encode(General__Types::BIT8_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_uplinkRelease:
    myleaf.body.node.nodes[15] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 15, PDU__RRM__UplinkRelease_descr_.raw);
    encoded_length = field_uplinkRelease->RAW_encode(PDU__RRM__UplinkRelease_descr_, *myleaf.body.node.nodes[15]);
    myleaf.body.node.nodes[15]->coding_descr = &PDU__RRM__UplinkRelease_descr_;
    if ((*field_uplinkRelease).messageType() !=  bs_29) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={15,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_29.RAW_encode(General__Types::BIT8_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_talkerIndication:
    myleaf.body.node.nodes[16] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 16, PDU__RRM__TalkerIndication__MS__NW_descr_.raw);
    encoded_length = field_talkerIndication->RAW_encode(PDU__RRM__TalkerIndication__MS__NW_descr_, *myleaf.body.node.nodes[16]);
    myleaf.body.node.nodes[16]->coding_descr = &PDU__RRM__TalkerIndication__MS__NW_descr_;
    if ((*field_talkerIndication).messageType() !=  bs_30) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={16,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_30.RAW_encode(General__Types::BIT8_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_applicationInformation:
    myleaf.body.node.nodes[17] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 17, PDU__RRM__ApplicationInformation_descr_.raw);
    encoded_length = field_applicationInformation->RAW_encode(PDU__RRM__ApplicationInformation_descr_, *myleaf.body.node.nodes[17]);
    myleaf.body.node.nodes[17]->coding_descr = &PDU__RRM__ApplicationInformation_descr_;
    if ((*field_applicationInformation).messageType() !=  bs_31) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={17,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_31.RAW_encode(General__Types::BIT8_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_dTM__AssignmentFailure:
    myleaf.body.node.nodes[18] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 18, PDU__RRM__DTM__AssignmentFailure__MS__NW_descr_.raw);
    encoded_length = field_dTM__AssignmentFailure->RAW_encode(PDU__RRM__DTM__AssignmentFailure__MS__NW_descr_, *myleaf.body.node.nodes[18]);
    myleaf.body.node.nodes[18]->coding_descr = &PDU__RRM__DTM__AssignmentFailure__MS__NW_descr_;
    if ((*field_dTM__AssignmentFailure).messageType() !=  bs_32) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={18,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_32.RAW_encode(General__Types::BIT8_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_dTM__Request:
    myleaf.body.node.nodes[19] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 19, PDU__RRM__DTM__Request__MS__NW_descr_.raw);
    encoded_length = field_dTM__Request->RAW_encode(PDU__RRM__DTM__Request__MS__NW_descr_, *myleaf.body.node.nodes[19]);
    myleaf.body.node.nodes[19]->coding_descr = &PDU__RRM__DTM__Request__MS__NW_descr_;
    if ((*field_dTM__Request).messageType() !=  bs_33) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={19,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_33.RAW_encode(General__Types::BIT8_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_uTRAN__ClassmarkChange:
    myleaf.body.node.nodes[20] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 20, PDU__RRM__UTRAN__ClassmarkChange__MS__NW_descr_.raw);
    encoded_length = field_uTRAN__ClassmarkChange->RAW_encode(PDU__RRM__UTRAN__ClassmarkChange__MS__NW_descr_, *myleaf.body.node.nodes[20]);
    myleaf.body.node.nodes[20]->coding_descr = &PDU__RRM__UTRAN__ClassmarkChange__MS__NW_descr_;
    if ((*field_uTRAN__ClassmarkChange).messageType() !=  bs_34) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={20,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_34.RAW_encode(General__Types::BIT8_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_cDMA2000__ClassmarkChange:
    myleaf.body.node.nodes[21] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 21, PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_descr_.raw);
    encoded_length = field_cDMA2000__ClassmarkChange->RAW_encode(PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_descr_, *myleaf.body.node.nodes[21]);
    myleaf.body.node.nodes[21]->coding_descr = &PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_descr_;
    if ((*field_cDMA2000__ClassmarkChange).messageType() !=  bs_35) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={21,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_35.RAW_encode(General__Types::BIT8_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_gERAN__IU__ModeClassmarkChange:
    myleaf.body.node.nodes[22] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 22, PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_descr_.raw);
    encoded_length = field_gERAN__IU__ModeClassmarkChange->RAW_encode(PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_descr_, *myleaf.body.node.nodes[22]);
    myleaf.body.node.nodes[22]->coding_descr = &PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_descr_;
    if ((*field_gERAN__IU__ModeClassmarkChange).messageType() !=  bs_36) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={22,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_36.RAW_encode(General__Types::BIT8_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 PDU__RRM__MS__NW_template::copy_value(const PDU__RRM__MS__NW& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case PDU__RRM__MS__NW::ALT_cipheringModeComplete:
single_value.field_cipheringModeComplete = new PDU__RRM__CipheringModeComplete__MS__NW_template(other_value.cipheringModeComplete());
break;
case PDU__RRM__MS__NW::ALT_configurationChangeAck:
single_value.field_configurationChangeAck = new PDU__RRM__ConfigurationChangeAck__MS__NW_template(other_value.configurationChangeAck());
break;
case PDU__RRM__MS__NW::ALT_configurationChangeRej:
single_value.field_configurationChangeRej = new PDU__RRM__ConfigurationChangeRej__MS__NW_template(other_value.configurationChangeRej());
break;
case PDU__RRM__MS__NW::ALT_assignmentComplete:
single_value.field_assignmentComplete = new PDU__RRM__AssignmentComplete__MS__NW_template(other_value.assignmentComplete());
break;
case PDU__RRM__MS__NW::ALT_assignmentFailure:
single_value.field_assignmentFailure = new PDU__RRM__AssignmentFailure__MS__NW_template(other_value.assignmentFailure());
break;
case PDU__RRM__MS__NW::ALT_handoverComplete:
single_value.field_handoverComplete = new PDU__RRM__HandoverComplete__MS__NW_template(other_value.handoverComplete());
break;
case PDU__RRM__MS__NW::ALT_handoverFailure:
single_value.field_handoverFailure = new PDU__RRM__HandoverFailure__MS__NW_template(other_value.handoverFailure());
break;
case PDU__RRM__MS__NW::ALT_partialReleaseComplete:
single_value.field_partialReleaseComplete = new PDU__RRM__PartialReleaseComplete__MS__NW_template(other_value.partialReleaseComplete());
break;
case PDU__RRM__MS__NW::ALT_pagingResponse:
single_value.field_pagingResponse = new PDU__RRM__PagingResponse__MS__NW_template(other_value.pagingResponse());
break;
case PDU__RRM__MS__NW::ALT_notificationResponse:
single_value.field_notificationResponse = new PDU__RRM__NotificationResponse__MS__NW_template(other_value.notificationResponse());
break;
case PDU__RRM__MS__NW::ALT_rR__Status:
single_value.field_rR__Status = new PDU__RRM__RR__Status_template(other_value.rR__Status());
break;
case PDU__RRM__MS__NW::ALT_channelModeModifyAck:
single_value.field_channelModeModifyAck = new PDU__RRM__ChannelModeModifyAck__MS__NW_template(other_value.channelModeModifyAck());
break;
case PDU__RRM__MS__NW::ALT_classmarkChange:
single_value.field_classmarkChange = new PDU__RRM__ClassmarkChange__MS__NW_template(other_value.classmarkChange());
break;
case PDU__RRM__MS__NW::ALT_gPRS__suspensionRequest:
single_value.field_gPRS__suspensionRequest = new PDU__RRM__GPRS__SuspensionRequest__MS__NW_template(other_value.gPRS__suspensionRequest());
break;
case PDU__RRM__MS__NW::ALT_serviceInformationMessage:
single_value.field_serviceInformationMessage = new PDU__RRM__ServiceInformationMessage__MS__NW_template(other_value.serviceInformationMessage());
break;
case PDU__RRM__MS__NW::ALT_uplinkRelease:
single_value.field_uplinkRelease = new PDU__RRM__UplinkRelease_template(other_value.uplinkRelease());
break;
case PDU__RRM__MS__NW::ALT_talkerIndication:
single_value.field_talkerIndication = new PDU__RRM__TalkerIndication__MS__NW_template(other_value.talkerIndication());
break;
case PDU__RRM__MS__NW::ALT_applicationInformation:
single_value.field_applicationInformation = new PDU__RRM__ApplicationInformation_template(other_value.applicationInformation());
break;
case PDU__RRM__MS__NW::ALT_dTM__AssignmentFailure:
single_value.field_dTM__AssignmentFailure = new PDU__RRM__DTM__AssignmentFailure__MS__NW_template(other_value.dTM__AssignmentFailure());
break;
case PDU__RRM__MS__NW::ALT_dTM__Request:
single_value.field_dTM__Request = new PDU__RRM__DTM__Request__MS__NW_template(other_value.dTM__Request());
break;
case PDU__RRM__MS__NW::ALT_uTRAN__ClassmarkChange:
single_value.field_uTRAN__ClassmarkChange = new PDU__RRM__UTRAN__ClassmarkChange__MS__NW_template(other_value.uTRAN__ClassmarkChange());
break;
case PDU__RRM__MS__NW::ALT_cDMA2000__ClassmarkChange:
single_value.field_cDMA2000__ClassmarkChange = new PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_template(other_value.cDMA2000__ClassmarkChange());
break;
case PDU__RRM__MS__NW::ALT_gERAN__IU__ModeClassmarkChange:
single_value.field_gERAN__IU__ModeClassmarkChange = new PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_template(other_value.gERAN__IU__ModeClassmarkChange());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__MS__NW_template::copy_template(const PDU__RRM__MS__NW_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 PDU__RRM__MS__NW::ALT_cipheringModeComplete:
single_value.field_cipheringModeComplete = new PDU__RRM__CipheringModeComplete__MS__NW_template(*other_value.single_value.field_cipheringModeComplete);
break;
case PDU__RRM__MS__NW::ALT_configurationChangeAck:
single_value.field_configurationChangeAck = new PDU__RRM__ConfigurationChangeAck__MS__NW_template(*other_value.single_value.field_configurationChangeAck);
break;
case PDU__RRM__MS__NW::ALT_configurationChangeRej:
single_value.field_configurationChangeRej = new PDU__RRM__ConfigurationChangeRej__MS__NW_template(*other_value.single_value.field_configurationChangeRej);
break;
case PDU__RRM__MS__NW::ALT_assignmentComplete:
single_value.field_assignmentComplete = new PDU__RRM__AssignmentComplete__MS__NW_template(*other_value.single_value.field_assignmentComplete);
break;
case PDU__RRM__MS__NW::ALT_assignmentFailure:
single_value.field_assignmentFailure = new PDU__RRM__AssignmentFailure__MS__NW_template(*other_value.single_value.field_assignmentFailure);
break;
case PDU__RRM__MS__NW::ALT_handoverComplete:
single_value.field_handoverComplete = new PDU__RRM__HandoverComplete__MS__NW_template(*other_value.single_value.field_handoverComplete);
break;
case PDU__RRM__MS__NW::ALT_handoverFailure:
single_value.field_handoverFailure = new PDU__RRM__HandoverFailure__MS__NW_template(*other_value.single_value.field_handoverFailure);
break;
case PDU__RRM__MS__NW::ALT_partialReleaseComplete:
single_value.field_partialReleaseComplete = new PDU__RRM__PartialReleaseComplete__MS__NW_template(*other_value.single_value.field_partialReleaseComplete);
break;
case PDU__RRM__MS__NW::ALT_pagingResponse:
single_value.field_pagingResponse = new PDU__RRM__PagingResponse__MS__NW_template(*other_value.single_value.field_pagingResponse);
break;
case PDU__RRM__MS__NW::ALT_notificationResponse:
single_value.field_notificationResponse = new PDU__RRM__NotificationResponse__MS__NW_template(*other_value.single_value.field_notificationResponse);
break;
case PDU__RRM__MS__NW::ALT_rR__Status:
single_value.field_rR__Status = new PDU__RRM__RR__Status_template(*other_value.single_value.field_rR__Status);
break;
case PDU__RRM__MS__NW::ALT_channelModeModifyAck:
single_value.field_channelModeModifyAck = new PDU__RRM__ChannelModeModifyAck__MS__NW_template(*other_value.single_value.field_channelModeModifyAck);
break;
case PDU__RRM__MS__NW::ALT_classmarkChange:
single_value.field_classmarkChange = new PDU__RRM__ClassmarkChange__MS__NW_template(*other_value.single_value.field_classmarkChange);
break;
case PDU__RRM__MS__NW::ALT_gPRS__suspensionRequest:
single_value.field_gPRS__suspensionRequest = new PDU__RRM__GPRS__SuspensionRequest__MS__NW_template(*other_value.single_value.field_gPRS__suspensionRequest);
break;
case PDU__RRM__MS__NW::ALT_serviceInformationMessage:
single_value.field_serviceInformationMessage = new PDU__RRM__ServiceInformationMessage__MS__NW_template(*other_value.single_value.field_serviceInformationMessage);
break;
case PDU__RRM__MS__NW::ALT_uplinkRelease:
single_value.field_uplinkRelease = new PDU__RRM__UplinkRelease_template(*other_value.single_value.field_uplinkRelease);
break;
case PDU__RRM__MS__NW::ALT_talkerIndication:
single_value.field_talkerIndication = new PDU__RRM__TalkerIndication__MS__NW_template(*other_value.single_value.field_talkerIndication);
break;
case PDU__RRM__MS__NW::ALT_applicationInformation:
single_value.field_applicationInformation = new PDU__RRM__ApplicationInformation_template(*other_value.single_value.field_applicationInformation);
break;
case PDU__RRM__MS__NW::ALT_dTM__AssignmentFailure:
single_value.field_dTM__AssignmentFailure = new PDU__RRM__DTM__AssignmentFailure__MS__NW_template(*other_value.single_value.field_dTM__AssignmentFailure);
break;
case PDU__RRM__MS__NW::ALT_dTM__Request:
single_value.field_dTM__Request = new PDU__RRM__DTM__Request__MS__NW_template(*other_value.single_value.field_dTM__Request);
break;
case PDU__RRM__MS__NW::ALT_uTRAN__ClassmarkChange:
single_value.field_uTRAN__ClassmarkChange = new PDU__RRM__UTRAN__ClassmarkChange__MS__NW_template(*other_value.single_value.field_uTRAN__ClassmarkChange);
break;
case PDU__RRM__MS__NW::ALT_cDMA2000__ClassmarkChange:
single_value.field_cDMA2000__ClassmarkChange = new PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_template(*other_value.single_value.field_cDMA2000__ClassmarkChange);
break;
case PDU__RRM__MS__NW::ALT_gERAN__IU__ModeClassmarkChange:
single_value.field_gERAN__IU__ModeClassmarkChange = new PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_template(*other_value.single_value.field_gERAN__IU__ModeClassmarkChange);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
}
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 PDU__RRM__MS__NW_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 PDU__RRM__MS__NW_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
}
set_selection(other_value);
}

PDU__RRM__MS__NW_template::PDU__RRM__MS__NW_template()
{
}

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

PDU__RRM__MS__NW_template::PDU__RRM__MS__NW_template(const PDU__RRM__MS__NW& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void PDU__RRM__MS__NW_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case PDU__RRM__MS__NW::ALT_cipheringModeComplete:
delete single_value.field_cipheringModeComplete;
break;
case PDU__RRM__MS__NW::ALT_configurationChangeAck:
delete single_value.field_configurationChangeAck;
break;
case PDU__RRM__MS__NW::ALT_configurationChangeRej:
delete single_value.field_configurationChangeRej;
break;
case PDU__RRM__MS__NW::ALT_assignmentComplete:
delete single_value.field_assignmentComplete;
break;
case PDU__RRM__MS__NW::ALT_assignmentFailure:
delete single_value.field_assignmentFailure;
break;
case PDU__RRM__MS__NW::ALT_handoverComplete:
delete single_value.field_handoverComplete;
break;
case PDU__RRM__MS__NW::ALT_handoverFailure:
delete single_value.field_handoverFailure;
break;
case PDU__RRM__MS__NW::ALT_partialReleaseComplete:
delete single_value.field_partialReleaseComplete;
break;
case PDU__RRM__MS__NW::ALT_pagingResponse:
delete single_value.field_pagingResponse;
break;
case PDU__RRM__MS__NW::ALT_notificationResponse:
delete single_value.field_notificationResponse;
break;
case PDU__RRM__MS__NW::ALT_rR__Status:
delete single_value.field_rR__Status;
break;
case PDU__RRM__MS__NW::ALT_channelModeModifyAck:
delete single_value.field_channelModeModifyAck;
break;
case PDU__RRM__MS__NW::ALT_classmarkChange:
delete single_value.field_classmarkChange;
break;
case PDU__RRM__MS__NW::ALT_gPRS__suspensionRequest:
delete single_value.field_gPRS__suspensionRequest;
break;
case PDU__RRM__MS__NW::ALT_serviceInformationMessage:
delete single_value.field_serviceInformationMessage;
break;
case PDU__RRM__MS__NW::ALT_uplinkRelease:
delete single_value.field_uplinkRelease;
break;
case PDU__RRM__MS__NW::ALT_talkerIndication:
delete single_value.field_talkerIndication;
break;
case PDU__RRM__MS__NW::ALT_applicationInformation:
delete single_value.field_applicationInformation;
break;
case PDU__RRM__MS__NW::ALT_dTM__AssignmentFailure:
delete single_value.field_dTM__AssignmentFailure;
break;
case PDU__RRM__MS__NW::ALT_dTM__Request:
delete single_value.field_dTM__Request;
break;
case PDU__RRM__MS__NW::ALT_uTRAN__ClassmarkChange:
delete single_value.field_uTRAN__ClassmarkChange;
break;
case PDU__RRM__MS__NW::ALT_cDMA2000__ClassmarkChange:
delete single_value.field_cDMA2000__ClassmarkChange;
break;
case PDU__RRM__MS__NW::ALT_gERAN__IU__ModeClassmarkChange:
delete single_value.field_gERAN__IU__ModeClassmarkChange;
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;
}

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

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

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

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

boolean PDU__RRM__MS__NW_template::match(const PDU__RRM__MS__NW& 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:
{
PDU__RRM__MS__NW::union_selection_type value_selection = other_value.get_selection();
if (value_selection == PDU__RRM__MS__NW::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case PDU__RRM__MS__NW::ALT_cipheringModeComplete:
return single_value.field_cipheringModeComplete->match(other_value.cipheringModeComplete(), legacy);
case PDU__RRM__MS__NW::ALT_configurationChangeAck:
return single_value.field_configurationChangeAck->match(other_value.configurationChangeAck(), legacy);
case PDU__RRM__MS__NW::ALT_configurationChangeRej:
return single_value.field_configurationChangeRej->match(other_value.configurationChangeRej(), legacy);
case PDU__RRM__MS__NW::ALT_assignmentComplete:
return single_value.field_assignmentComplete->match(other_value.assignmentComplete(), legacy);
case PDU__RRM__MS__NW::ALT_assignmentFailure:
return single_value.field_assignmentFailure->match(other_value.assignmentFailure(), legacy);
case PDU__RRM__MS__NW::ALT_handoverComplete:
return single_value.field_handoverComplete->match(other_value.handoverComplete(), legacy);
case PDU__RRM__MS__NW::ALT_handoverFailure:
return single_value.field_handoverFailure->match(other_value.handoverFailure(), legacy);
case PDU__RRM__MS__NW::ALT_partialReleaseComplete:
return single_value.field_partialReleaseComplete->match(other_value.partialReleaseComplete(), legacy);
case PDU__RRM__MS__NW::ALT_pagingResponse:
return single_value.field_pagingResponse->match(other_value.pagingResponse(), legacy);
case PDU__RRM__MS__NW::ALT_notificationResponse:
return single_value.field_notificationResponse->match(other_value.notificationResponse(), legacy);
case PDU__RRM__MS__NW::ALT_rR__Status:
return single_value.field_rR__Status->match(other_value.rR__Status(), legacy);
case PDU__RRM__MS__NW::ALT_channelModeModifyAck:
return single_value.field_channelModeModifyAck->match(other_value.channelModeModifyAck(), legacy);
case PDU__RRM__MS__NW::ALT_classmarkChange:
return single_value.field_classmarkChange->match(other_value.classmarkChange(), legacy);
case PDU__RRM__MS__NW::ALT_gPRS__suspensionRequest:
return single_value.field_gPRS__suspensionRequest->match(other_value.gPRS__suspensionRequest(), legacy);
case PDU__RRM__MS__NW::ALT_serviceInformationMessage:
return single_value.field_serviceInformationMessage->match(other_value.serviceInformationMessage(), legacy);
case PDU__RRM__MS__NW::ALT_uplinkRelease:
return single_value.field_uplinkRelease->match(other_value.uplinkRelease(), legacy);
case PDU__RRM__MS__NW::ALT_talkerIndication:
return single_value.field_talkerIndication->match(other_value.talkerIndication(), legacy);
case PDU__RRM__MS__NW::ALT_applicationInformation:
return single_value.field_applicationInformation->match(other_value.applicationInformation(), legacy);
case PDU__RRM__MS__NW::ALT_dTM__AssignmentFailure:
return single_value.field_dTM__AssignmentFailure->match(other_value.dTM__AssignmentFailure(), legacy);
case PDU__RRM__MS__NW::ALT_dTM__Request:
return single_value.field_dTM__Request->match(other_value.dTM__Request(), legacy);
case PDU__RRM__MS__NW::ALT_uTRAN__ClassmarkChange:
return single_value.field_uTRAN__ClassmarkChange->match(other_value.uTRAN__ClassmarkChange(), legacy);
case PDU__RRM__MS__NW::ALT_cDMA2000__ClassmarkChange:
return single_value.field_cDMA2000__ClassmarkChange->match(other_value.cDMA2000__ClassmarkChange(), legacy);
case PDU__RRM__MS__NW::ALT_gERAN__IU__ModeClassmarkChange:
return single_value.field_gERAN__IU__ModeClassmarkChange->match(other_value.gERAN__IU__ModeClassmarkChange(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
}
}
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 @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
}
return FALSE;
}

boolean PDU__RRM__MS__NW_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case PDU__RRM__MS__NW::ALT_cipheringModeComplete:
return single_value.field_cipheringModeComplete->is_value();
case PDU__RRM__MS__NW::ALT_configurationChangeAck:
return single_value.field_configurationChangeAck->is_value();
case PDU__RRM__MS__NW::ALT_configurationChangeRej:
return single_value.field_configurationChangeRej->is_value();
case PDU__RRM__MS__NW::ALT_assignmentComplete:
return single_value.field_assignmentComplete->is_value();
case PDU__RRM__MS__NW::ALT_assignmentFailure:
return single_value.field_assignmentFailure->is_value();
case PDU__RRM__MS__NW::ALT_handoverComplete:
return single_value.field_handoverComplete->is_value();
case PDU__RRM__MS__NW::ALT_handoverFailure:
return single_value.field_handoverFailure->is_value();
case PDU__RRM__MS__NW::ALT_partialReleaseComplete:
return single_value.field_partialReleaseComplete->is_value();
case PDU__RRM__MS__NW::ALT_pagingResponse:
return single_value.field_pagingResponse->is_value();
case PDU__RRM__MS__NW::ALT_notificationResponse:
return single_value.field_notificationResponse->is_value();
case PDU__RRM__MS__NW::ALT_rR__Status:
return single_value.field_rR__Status->is_value();
case PDU__RRM__MS__NW::ALT_channelModeModifyAck:
return single_value.field_channelModeModifyAck->is_value();
case PDU__RRM__MS__NW::ALT_classmarkChange:
return single_value.field_classmarkChange->is_value();
case PDU__RRM__MS__NW::ALT_gPRS__suspensionRequest:
return single_value.field_gPRS__suspensionRequest->is_value();
case PDU__RRM__MS__NW::ALT_serviceInformationMessage:
return single_value.field_serviceInformationMessage->is_value();
case PDU__RRM__MS__NW::ALT_uplinkRelease:
return single_value.field_uplinkRelease->is_value();
case PDU__RRM__MS__NW::ALT_talkerIndication:
return single_value.field_talkerIndication->is_value();
case PDU__RRM__MS__NW::ALT_applicationInformation:
return single_value.field_applicationInformation->is_value();
case PDU__RRM__MS__NW::ALT_dTM__AssignmentFailure:
return single_value.field_dTM__AssignmentFailure->is_value();
case PDU__RRM__MS__NW::ALT_dTM__Request:
return single_value.field_dTM__Request->is_value();
case PDU__RRM__MS__NW::ALT_uTRAN__ClassmarkChange:
return single_value.field_uTRAN__ClassmarkChange->is_value();
case PDU__RRM__MS__NW::ALT_cDMA2000__ClassmarkChange:
return single_value.field_cDMA2000__ClassmarkChange->is_value();
case PDU__RRM__MS__NW::ALT_gERAN__IU__ModeClassmarkChange:
return single_value.field_gERAN__IU__ModeClassmarkChange->is_value();
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
}
}

PDU__RRM__MS__NW PDU__RRM__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
PDU__RRM__MS__NW ret_val;
switch (single_value.union_selection) {
case PDU__RRM__MS__NW::ALT_cipheringModeComplete:
ret_val.cipheringModeComplete() = single_value.field_cipheringModeComplete->valueof();
break;
case PDU__RRM__MS__NW::ALT_configurationChangeAck:
ret_val.configurationChangeAck() = single_value.field_configurationChangeAck->valueof();
break;
case PDU__RRM__MS__NW::ALT_configurationChangeRej:
ret_val.configurationChangeRej() = single_value.field_configurationChangeRej->valueof();
break;
case PDU__RRM__MS__NW::ALT_assignmentComplete:
ret_val.assignmentComplete() = single_value.field_assignmentComplete->valueof();
break;
case PDU__RRM__MS__NW::ALT_assignmentFailure:
ret_val.assignmentFailure() = single_value.field_assignmentFailure->valueof();
break;
case PDU__RRM__MS__NW::ALT_handoverComplete:
ret_val.handoverComplete() = single_value.field_handoverComplete->valueof();
break;
case PDU__RRM__MS__NW::ALT_handoverFailure:
ret_val.handoverFailure() = single_value.field_handoverFailure->valueof();
break;
case PDU__RRM__MS__NW::ALT_partialReleaseComplete:
ret_val.partialReleaseComplete() = single_value.field_partialReleaseComplete->valueof();
break;
case PDU__RRM__MS__NW::ALT_pagingResponse:
ret_val.pagingResponse() = single_value.field_pagingResponse->valueof();
break;
case PDU__RRM__MS__NW::ALT_notificationResponse:
ret_val.notificationResponse() = single_value.field_notificationResponse->valueof();
break;
case PDU__RRM__MS__NW::ALT_rR__Status:
ret_val.rR__Status() = single_value.field_rR__Status->valueof();
break;
case PDU__RRM__MS__NW::ALT_channelModeModifyAck:
ret_val.channelModeModifyAck() = single_value.field_channelModeModifyAck->valueof();
break;
case PDU__RRM__MS__NW::ALT_classmarkChange:
ret_val.classmarkChange() = single_value.field_classmarkChange->valueof();
break;
case PDU__RRM__MS__NW::ALT_gPRS__suspensionRequest:
ret_val.gPRS__suspensionRequest() = single_value.field_gPRS__suspensionRequest->valueof();
break;
case PDU__RRM__MS__NW::ALT_serviceInformationMessage:
ret_val.serviceInformationMessage() = single_value.field_serviceInformationMessage->valueof();
break;
case PDU__RRM__MS__NW::ALT_uplinkRelease:
ret_val.uplinkRelease() = single_value.field_uplinkRelease->valueof();
break;
case PDU__RRM__MS__NW::ALT_talkerIndication:
ret_val.talkerIndication() = single_value.field_talkerIndication->valueof();
break;
case PDU__RRM__MS__NW::ALT_applicationInformation:
ret_val.applicationInformation() = single_value.field_applicationInformation->valueof();
break;
case PDU__RRM__MS__NW::ALT_dTM__AssignmentFailure:
ret_val.dTM__AssignmentFailure() = single_value.field_dTM__AssignmentFailure->valueof();
break;
case PDU__RRM__MS__NW::ALT_dTM__Request:
ret_val.dTM__Request() = single_value.field_dTM__Request->valueof();
break;
case PDU__RRM__MS__NW::ALT_uTRAN__ClassmarkChange:
ret_val.uTRAN__ClassmarkChange() = single_value.field_uTRAN__ClassmarkChange->valueof();
break;
case PDU__RRM__MS__NW::ALT_cDMA2000__ClassmarkChange:
ret_val.cDMA2000__ClassmarkChange() = single_value.field_cDMA2000__ClassmarkChange->valueof();
break;
case PDU__RRM__MS__NW::ALT_gERAN__IU__ModeClassmarkChange:
ret_val.gERAN__IU__ModeClassmarkChange() = single_value.field_gERAN__IU__ModeClassmarkChange->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
}
return ret_val;
}

PDU__RRM__MS__NW_template& PDU__RRM__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return value_list.list_value[list_index];
}
void PDU__RRM__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__MS__NW_template[list_length];
}

PDU__RRM__CipheringModeComplete__MS__NW_template& PDU__RRM__MS__NW_template::cipheringModeComplete()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_cipheringModeComplete) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_cipheringModeComplete = new PDU__RRM__CipheringModeComplete__MS__NW_template(ANY_VALUE);
else single_value.field_cipheringModeComplete = new PDU__RRM__CipheringModeComplete__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_cipheringModeComplete;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_cipheringModeComplete;
}

const PDU__RRM__CipheringModeComplete__MS__NW_template& PDU__RRM__MS__NW_template::cipheringModeComplete() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field cipheringModeComplete in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_cipheringModeComplete) TTCN_error("Accessing non-selected field cipheringModeComplete in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_cipheringModeComplete;
}

PDU__RRM__ConfigurationChangeAck__MS__NW_template& PDU__RRM__MS__NW_template::configurationChangeAck()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_configurationChangeAck) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_configurationChangeAck = new PDU__RRM__ConfigurationChangeAck__MS__NW_template(ANY_VALUE);
else single_value.field_configurationChangeAck = new PDU__RRM__ConfigurationChangeAck__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_configurationChangeAck;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_configurationChangeAck;
}

const PDU__RRM__ConfigurationChangeAck__MS__NW_template& PDU__RRM__MS__NW_template::configurationChangeAck() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field configurationChangeAck in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_configurationChangeAck) TTCN_error("Accessing non-selected field configurationChangeAck in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_configurationChangeAck;
}

PDU__RRM__ConfigurationChangeRej__MS__NW_template& PDU__RRM__MS__NW_template::configurationChangeRej()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_configurationChangeRej) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_configurationChangeRej = new PDU__RRM__ConfigurationChangeRej__MS__NW_template(ANY_VALUE);
else single_value.field_configurationChangeRej = new PDU__RRM__ConfigurationChangeRej__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_configurationChangeRej;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_configurationChangeRej;
}

const PDU__RRM__ConfigurationChangeRej__MS__NW_template& PDU__RRM__MS__NW_template::configurationChangeRej() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field configurationChangeRej in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_configurationChangeRej) TTCN_error("Accessing non-selected field configurationChangeRej in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_configurationChangeRej;
}

PDU__RRM__AssignmentComplete__MS__NW_template& PDU__RRM__MS__NW_template::assignmentComplete()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_assignmentComplete) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_assignmentComplete = new PDU__RRM__AssignmentComplete__MS__NW_template(ANY_VALUE);
else single_value.field_assignmentComplete = new PDU__RRM__AssignmentComplete__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_assignmentComplete;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_assignmentComplete;
}

const PDU__RRM__AssignmentComplete__MS__NW_template& PDU__RRM__MS__NW_template::assignmentComplete() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field assignmentComplete in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_assignmentComplete) TTCN_error("Accessing non-selected field assignmentComplete in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_assignmentComplete;
}

PDU__RRM__AssignmentFailure__MS__NW_template& PDU__RRM__MS__NW_template::assignmentFailure()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_assignmentFailure) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_assignmentFailure = new PDU__RRM__AssignmentFailure__MS__NW_template(ANY_VALUE);
else single_value.field_assignmentFailure = new PDU__RRM__AssignmentFailure__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_assignmentFailure;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_assignmentFailure;
}

const PDU__RRM__AssignmentFailure__MS__NW_template& PDU__RRM__MS__NW_template::assignmentFailure() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field assignmentFailure in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_assignmentFailure) TTCN_error("Accessing non-selected field assignmentFailure in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_assignmentFailure;
}

PDU__RRM__HandoverComplete__MS__NW_template& PDU__RRM__MS__NW_template::handoverComplete()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_handoverComplete) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_handoverComplete = new PDU__RRM__HandoverComplete__MS__NW_template(ANY_VALUE);
else single_value.field_handoverComplete = new PDU__RRM__HandoverComplete__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_handoverComplete;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_handoverComplete;
}

const PDU__RRM__HandoverComplete__MS__NW_template& PDU__RRM__MS__NW_template::handoverComplete() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field handoverComplete in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_handoverComplete) TTCN_error("Accessing non-selected field handoverComplete in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_handoverComplete;
}

PDU__RRM__HandoverFailure__MS__NW_template& PDU__RRM__MS__NW_template::handoverFailure()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_handoverFailure) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_handoverFailure = new PDU__RRM__HandoverFailure__MS__NW_template(ANY_VALUE);
else single_value.field_handoverFailure = new PDU__RRM__HandoverFailure__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_handoverFailure;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_handoverFailure;
}

const PDU__RRM__HandoverFailure__MS__NW_template& PDU__RRM__MS__NW_template::handoverFailure() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field handoverFailure in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_handoverFailure) TTCN_error("Accessing non-selected field handoverFailure in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_handoverFailure;
}

PDU__RRM__PartialReleaseComplete__MS__NW_template& PDU__RRM__MS__NW_template::partialReleaseComplete()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_partialReleaseComplete) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_partialReleaseComplete = new PDU__RRM__PartialReleaseComplete__MS__NW_template(ANY_VALUE);
else single_value.field_partialReleaseComplete = new PDU__RRM__PartialReleaseComplete__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_partialReleaseComplete;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_partialReleaseComplete;
}

const PDU__RRM__PartialReleaseComplete__MS__NW_template& PDU__RRM__MS__NW_template::partialReleaseComplete() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field partialReleaseComplete in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_partialReleaseComplete) TTCN_error("Accessing non-selected field partialReleaseComplete in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_partialReleaseComplete;
}

PDU__RRM__PagingResponse__MS__NW_template& PDU__RRM__MS__NW_template::pagingResponse()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_pagingResponse) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_pagingResponse = new PDU__RRM__PagingResponse__MS__NW_template(ANY_VALUE);
else single_value.field_pagingResponse = new PDU__RRM__PagingResponse__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_pagingResponse;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_pagingResponse;
}

const PDU__RRM__PagingResponse__MS__NW_template& PDU__RRM__MS__NW_template::pagingResponse() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field pagingResponse in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_pagingResponse) TTCN_error("Accessing non-selected field pagingResponse in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_pagingResponse;
}

PDU__RRM__NotificationResponse__MS__NW_template& PDU__RRM__MS__NW_template::notificationResponse()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_notificationResponse) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_notificationResponse = new PDU__RRM__NotificationResponse__MS__NW_template(ANY_VALUE);
else single_value.field_notificationResponse = new PDU__RRM__NotificationResponse__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_notificationResponse;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_notificationResponse;
}

const PDU__RRM__NotificationResponse__MS__NW_template& PDU__RRM__MS__NW_template::notificationResponse() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field notificationResponse in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_notificationResponse) TTCN_error("Accessing non-selected field notificationResponse in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_notificationResponse;
}

PDU__RRM__RR__Status_template& PDU__RRM__MS__NW_template::rR__Status()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_rR__Status) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_rR__Status = new PDU__RRM__RR__Status_template(ANY_VALUE);
else single_value.field_rR__Status = new PDU__RRM__RR__Status_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_rR__Status;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_rR__Status;
}

const PDU__RRM__RR__Status_template& PDU__RRM__MS__NW_template::rR__Status() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field rR_Status in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_rR__Status) TTCN_error("Accessing non-selected field rR_Status in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_rR__Status;
}

PDU__RRM__ChannelModeModifyAck__MS__NW_template& PDU__RRM__MS__NW_template::channelModeModifyAck()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_channelModeModifyAck) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_channelModeModifyAck = new PDU__RRM__ChannelModeModifyAck__MS__NW_template(ANY_VALUE);
else single_value.field_channelModeModifyAck = new PDU__RRM__ChannelModeModifyAck__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_channelModeModifyAck;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_channelModeModifyAck;
}

const PDU__RRM__ChannelModeModifyAck__MS__NW_template& PDU__RRM__MS__NW_template::channelModeModifyAck() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field channelModeModifyAck in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_channelModeModifyAck) TTCN_error("Accessing non-selected field channelModeModifyAck in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_channelModeModifyAck;
}

PDU__RRM__ClassmarkChange__MS__NW_template& PDU__RRM__MS__NW_template::classmarkChange()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_classmarkChange) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_classmarkChange = new PDU__RRM__ClassmarkChange__MS__NW_template(ANY_VALUE);
else single_value.field_classmarkChange = new PDU__RRM__ClassmarkChange__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_classmarkChange;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_classmarkChange;
}

const PDU__RRM__ClassmarkChange__MS__NW_template& PDU__RRM__MS__NW_template::classmarkChange() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field classmarkChange in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_classmarkChange) TTCN_error("Accessing non-selected field classmarkChange in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_classmarkChange;
}

PDU__RRM__GPRS__SuspensionRequest__MS__NW_template& PDU__RRM__MS__NW_template::gPRS__suspensionRequest()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_gPRS__suspensionRequest) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_gPRS__suspensionRequest = new PDU__RRM__GPRS__SuspensionRequest__MS__NW_template(ANY_VALUE);
else single_value.field_gPRS__suspensionRequest = new PDU__RRM__GPRS__SuspensionRequest__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_gPRS__suspensionRequest;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_gPRS__suspensionRequest;
}

const PDU__RRM__GPRS__SuspensionRequest__MS__NW_template& PDU__RRM__MS__NW_template::gPRS__suspensionRequest() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field gPRS_suspensionRequest in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_gPRS__suspensionRequest) TTCN_error("Accessing non-selected field gPRS_suspensionRequest in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_gPRS__suspensionRequest;
}

PDU__RRM__ServiceInformationMessage__MS__NW_template& PDU__RRM__MS__NW_template::serviceInformationMessage()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_serviceInformationMessage) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_serviceInformationMessage = new PDU__RRM__ServiceInformationMessage__MS__NW_template(ANY_VALUE);
else single_value.field_serviceInformationMessage = new PDU__RRM__ServiceInformationMessage__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_serviceInformationMessage;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_serviceInformationMessage;
}

const PDU__RRM__ServiceInformationMessage__MS__NW_template& PDU__RRM__MS__NW_template::serviceInformationMessage() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field serviceInformationMessage in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_serviceInformationMessage) TTCN_error("Accessing non-selected field serviceInformationMessage in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_serviceInformationMessage;
}

PDU__RRM__UplinkRelease_template& PDU__RRM__MS__NW_template::uplinkRelease()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_uplinkRelease) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_uplinkRelease = new PDU__RRM__UplinkRelease_template(ANY_VALUE);
else single_value.field_uplinkRelease = new PDU__RRM__UplinkRelease_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_uplinkRelease;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_uplinkRelease;
}

const PDU__RRM__UplinkRelease_template& PDU__RRM__MS__NW_template::uplinkRelease() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field uplinkRelease in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_uplinkRelease) TTCN_error("Accessing non-selected field uplinkRelease in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_uplinkRelease;
}

PDU__RRM__TalkerIndication__MS__NW_template& PDU__RRM__MS__NW_template::talkerIndication()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_talkerIndication) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_talkerIndication = new PDU__RRM__TalkerIndication__MS__NW_template(ANY_VALUE);
else single_value.field_talkerIndication = new PDU__RRM__TalkerIndication__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_talkerIndication;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_talkerIndication;
}

const PDU__RRM__TalkerIndication__MS__NW_template& PDU__RRM__MS__NW_template::talkerIndication() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field talkerIndication in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_talkerIndication) TTCN_error("Accessing non-selected field talkerIndication in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_talkerIndication;
}

PDU__RRM__ApplicationInformation_template& PDU__RRM__MS__NW_template::applicationInformation()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_applicationInformation) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_applicationInformation = new PDU__RRM__ApplicationInformation_template(ANY_VALUE);
else single_value.field_applicationInformation = new PDU__RRM__ApplicationInformation_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_applicationInformation;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_applicationInformation;
}

const PDU__RRM__ApplicationInformation_template& PDU__RRM__MS__NW_template::applicationInformation() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field applicationInformation in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_applicationInformation) TTCN_error("Accessing non-selected field applicationInformation in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_applicationInformation;
}

PDU__RRM__DTM__AssignmentFailure__MS__NW_template& PDU__RRM__MS__NW_template::dTM__AssignmentFailure()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_dTM__AssignmentFailure) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_dTM__AssignmentFailure = new PDU__RRM__DTM__AssignmentFailure__MS__NW_template(ANY_VALUE);
else single_value.field_dTM__AssignmentFailure = new PDU__RRM__DTM__AssignmentFailure__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_dTM__AssignmentFailure;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_dTM__AssignmentFailure;
}

const PDU__RRM__DTM__AssignmentFailure__MS__NW_template& PDU__RRM__MS__NW_template::dTM__AssignmentFailure() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dTM_AssignmentFailure in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_dTM__AssignmentFailure) TTCN_error("Accessing non-selected field dTM_AssignmentFailure in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_dTM__AssignmentFailure;
}

PDU__RRM__DTM__Request__MS__NW_template& PDU__RRM__MS__NW_template::dTM__Request()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_dTM__Request) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_dTM__Request = new PDU__RRM__DTM__Request__MS__NW_template(ANY_VALUE);
else single_value.field_dTM__Request = new PDU__RRM__DTM__Request__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_dTM__Request;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_dTM__Request;
}

const PDU__RRM__DTM__Request__MS__NW_template& PDU__RRM__MS__NW_template::dTM__Request() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dTM_Request in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_dTM__Request) TTCN_error("Accessing non-selected field dTM_Request in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_dTM__Request;
}

PDU__RRM__UTRAN__ClassmarkChange__MS__NW_template& PDU__RRM__MS__NW_template::uTRAN__ClassmarkChange()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_uTRAN__ClassmarkChange) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_uTRAN__ClassmarkChange = new PDU__RRM__UTRAN__ClassmarkChange__MS__NW_template(ANY_VALUE);
else single_value.field_uTRAN__ClassmarkChange = new PDU__RRM__UTRAN__ClassmarkChange__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_uTRAN__ClassmarkChange;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_uTRAN__ClassmarkChange;
}

const PDU__RRM__UTRAN__ClassmarkChange__MS__NW_template& PDU__RRM__MS__NW_template::uTRAN__ClassmarkChange() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field uTRAN_ClassmarkChange in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_uTRAN__ClassmarkChange) TTCN_error("Accessing non-selected field uTRAN_ClassmarkChange in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_uTRAN__ClassmarkChange;
}

PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_template& PDU__RRM__MS__NW_template::cDMA2000__ClassmarkChange()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_cDMA2000__ClassmarkChange) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_cDMA2000__ClassmarkChange = new PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_template(ANY_VALUE);
else single_value.field_cDMA2000__ClassmarkChange = new PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_cDMA2000__ClassmarkChange;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_cDMA2000__ClassmarkChange;
}

const PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_template& PDU__RRM__MS__NW_template::cDMA2000__ClassmarkChange() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field cDMA2000_ClassmarkChange in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_cDMA2000__ClassmarkChange) TTCN_error("Accessing non-selected field cDMA2000_ClassmarkChange in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_cDMA2000__ClassmarkChange;
}

PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_template& PDU__RRM__MS__NW_template::gERAN__IU__ModeClassmarkChange()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__MS__NW::ALT_gERAN__IU__ModeClassmarkChange) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_gERAN__IU__ModeClassmarkChange = new PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_template(ANY_VALUE);
else single_value.field_gERAN__IU__ModeClassmarkChange = new PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_template;
single_value.union_selection = PDU__RRM__MS__NW::ALT_gERAN__IU__ModeClassmarkChange;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_gERAN__IU__ModeClassmarkChange;
}

const PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_template& PDU__RRM__MS__NW_template::gERAN__IU__ModeClassmarkChange() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field gERAN_IU_ModeClassmarkChange in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
if (single_value.union_selection != PDU__RRM__MS__NW::ALT_gERAN__IU__ModeClassmarkChange) TTCN_error("Accessing non-selected field gERAN_IU_ModeClassmarkChange in a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
return *single_value.field_gERAN__IU__ModeClassmarkChange;
}

boolean PDU__RRM__MS__NW_template::ischosen(PDU__RRM__MS__NW::union_selection_type checked_selection) const
{
if (checked_selection == PDU__RRM__MS__NW::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.union_selection == PDU__RRM__MS__NW::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
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 @MobileL3_RRM_Types.PDU_RRM_MS_NW 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 PDU__RRM__MS__NW_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case PDU__RRM__MS__NW::ALT_cipheringModeComplete:
TTCN_Logger::log_event_str("{ cipheringModeComplete := ");
single_value.field_cipheringModeComplete->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_configurationChangeAck:
TTCN_Logger::log_event_str("{ configurationChangeAck := ");
single_value.field_configurationChangeAck->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_configurationChangeRej:
TTCN_Logger::log_event_str("{ configurationChangeRej := ");
single_value.field_configurationChangeRej->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_assignmentComplete:
TTCN_Logger::log_event_str("{ assignmentComplete := ");
single_value.field_assignmentComplete->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_assignmentFailure:
TTCN_Logger::log_event_str("{ assignmentFailure := ");
single_value.field_assignmentFailure->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_handoverComplete:
TTCN_Logger::log_event_str("{ handoverComplete := ");
single_value.field_handoverComplete->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_handoverFailure:
TTCN_Logger::log_event_str("{ handoverFailure := ");
single_value.field_handoverFailure->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_partialReleaseComplete:
TTCN_Logger::log_event_str("{ partialReleaseComplete := ");
single_value.field_partialReleaseComplete->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_pagingResponse:
TTCN_Logger::log_event_str("{ pagingResponse := ");
single_value.field_pagingResponse->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_notificationResponse:
TTCN_Logger::log_event_str("{ notificationResponse := ");
single_value.field_notificationResponse->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_rR__Status:
TTCN_Logger::log_event_str("{ rR_Status := ");
single_value.field_rR__Status->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_channelModeModifyAck:
TTCN_Logger::log_event_str("{ channelModeModifyAck := ");
single_value.field_channelModeModifyAck->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_classmarkChange:
TTCN_Logger::log_event_str("{ classmarkChange := ");
single_value.field_classmarkChange->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_gPRS__suspensionRequest:
TTCN_Logger::log_event_str("{ gPRS_suspensionRequest := ");
single_value.field_gPRS__suspensionRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_serviceInformationMessage:
TTCN_Logger::log_event_str("{ serviceInformationMessage := ");
single_value.field_serviceInformationMessage->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_uplinkRelease:
TTCN_Logger::log_event_str("{ uplinkRelease := ");
single_value.field_uplinkRelease->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_talkerIndication:
TTCN_Logger::log_event_str("{ talkerIndication := ");
single_value.field_talkerIndication->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_applicationInformation:
TTCN_Logger::log_event_str("{ applicationInformation := ");
single_value.field_applicationInformation->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_dTM__AssignmentFailure:
TTCN_Logger::log_event_str("{ dTM_AssignmentFailure := ");
single_value.field_dTM__AssignmentFailure->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_dTM__Request:
TTCN_Logger::log_event_str("{ dTM_Request := ");
single_value.field_dTM__Request->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_uTRAN__ClassmarkChange:
TTCN_Logger::log_event_str("{ uTRAN_ClassmarkChange := ");
single_value.field_uTRAN__ClassmarkChange->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_cDMA2000__ClassmarkChange:
TTCN_Logger::log_event_str("{ cDMA2000_ClassmarkChange := ");
single_value.field_cDMA2000__ClassmarkChange->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__MS__NW::ALT_gERAN__IU__ModeClassmarkChange:
TTCN_Logger::log_event_str("{ gERAN_IU_ModeClassmarkChange := ");
single_value.field_gERAN__IU__ModeClassmarkChange->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 PDU__RRM__MS__NW_template::log_match(const PDU__RRM__MS__NW& 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 PDU__RRM__MS__NW::ALT_cipheringModeComplete:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".cipheringModeComplete");
single_value.field_cipheringModeComplete->log_match(match_value.cipheringModeComplete(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ cipheringModeComplete := ");
single_value.field_cipheringModeComplete->log_match(match_value.cipheringModeComplete(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_configurationChangeAck:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".configurationChangeAck");
single_value.field_configurationChangeAck->log_match(match_value.configurationChangeAck(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ configurationChangeAck := ");
single_value.field_configurationChangeAck->log_match(match_value.configurationChangeAck(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_configurationChangeRej:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".configurationChangeRej");
single_value.field_configurationChangeRej->log_match(match_value.configurationChangeRej(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ configurationChangeRej := ");
single_value.field_configurationChangeRej->log_match(match_value.configurationChangeRej(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_assignmentComplete:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".assignmentComplete");
single_value.field_assignmentComplete->log_match(match_value.assignmentComplete(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ assignmentComplete := ");
single_value.field_assignmentComplete->log_match(match_value.assignmentComplete(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_assignmentFailure:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".assignmentFailure");
single_value.field_assignmentFailure->log_match(match_value.assignmentFailure(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ assignmentFailure := ");
single_value.field_assignmentFailure->log_match(match_value.assignmentFailure(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_handoverComplete:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".handoverComplete");
single_value.field_handoverComplete->log_match(match_value.handoverComplete(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ handoverComplete := ");
single_value.field_handoverComplete->log_match(match_value.handoverComplete(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_handoverFailure:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".handoverFailure");
single_value.field_handoverFailure->log_match(match_value.handoverFailure(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ handoverFailure := ");
single_value.field_handoverFailure->log_match(match_value.handoverFailure(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_partialReleaseComplete:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".partialReleaseComplete");
single_value.field_partialReleaseComplete->log_match(match_value.partialReleaseComplete(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ partialReleaseComplete := ");
single_value.field_partialReleaseComplete->log_match(match_value.partialReleaseComplete(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_pagingResponse:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".pagingResponse");
single_value.field_pagingResponse->log_match(match_value.pagingResponse(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ pagingResponse := ");
single_value.field_pagingResponse->log_match(match_value.pagingResponse(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_notificationResponse:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".notificationResponse");
single_value.field_notificationResponse->log_match(match_value.notificationResponse(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ notificationResponse := ");
single_value.field_notificationResponse->log_match(match_value.notificationResponse(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_rR__Status:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".rR_Status");
single_value.field_rR__Status->log_match(match_value.rR__Status(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ rR_Status := ");
single_value.field_rR__Status->log_match(match_value.rR__Status(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_channelModeModifyAck:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".channelModeModifyAck");
single_value.field_channelModeModifyAck->log_match(match_value.channelModeModifyAck(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ channelModeModifyAck := ");
single_value.field_channelModeModifyAck->log_match(match_value.channelModeModifyAck(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_classmarkChange:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".classmarkChange");
single_value.field_classmarkChange->log_match(match_value.classmarkChange(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ classmarkChange := ");
single_value.field_classmarkChange->log_match(match_value.classmarkChange(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_gPRS__suspensionRequest:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".gPRS_suspensionRequest");
single_value.field_gPRS__suspensionRequest->log_match(match_value.gPRS__suspensionRequest(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ gPRS_suspensionRequest := ");
single_value.field_gPRS__suspensionRequest->log_match(match_value.gPRS__suspensionRequest(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_serviceInformationMessage:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".serviceInformationMessage");
single_value.field_serviceInformationMessage->log_match(match_value.serviceInformationMessage(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ serviceInformationMessage := ");
single_value.field_serviceInformationMessage->log_match(match_value.serviceInformationMessage(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_uplinkRelease:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".uplinkRelease");
single_value.field_uplinkRelease->log_match(match_value.uplinkRelease(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ uplinkRelease := ");
single_value.field_uplinkRelease->log_match(match_value.uplinkRelease(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_talkerIndication:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".talkerIndication");
single_value.field_talkerIndication->log_match(match_value.talkerIndication(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ talkerIndication := ");
single_value.field_talkerIndication->log_match(match_value.talkerIndication(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_applicationInformation:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".applicationInformation");
single_value.field_applicationInformation->log_match(match_value.applicationInformation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ applicationInformation := ");
single_value.field_applicationInformation->log_match(match_value.applicationInformation(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_dTM__AssignmentFailure:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".dTM_AssignmentFailure");
single_value.field_dTM__AssignmentFailure->log_match(match_value.dTM__AssignmentFailure(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ dTM_AssignmentFailure := ");
single_value.field_dTM__AssignmentFailure->log_match(match_value.dTM__AssignmentFailure(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_dTM__Request:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".dTM_Request");
single_value.field_dTM__Request->log_match(match_value.dTM__Request(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ dTM_Request := ");
single_value.field_dTM__Request->log_match(match_value.dTM__Request(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_uTRAN__ClassmarkChange:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".uTRAN_ClassmarkChange");
single_value.field_uTRAN__ClassmarkChange->log_match(match_value.uTRAN__ClassmarkChange(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ uTRAN_ClassmarkChange := ");
single_value.field_uTRAN__ClassmarkChange->log_match(match_value.uTRAN__ClassmarkChange(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_cDMA2000__ClassmarkChange:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".cDMA2000_ClassmarkChange");
single_value.field_cDMA2000__ClassmarkChange->log_match(match_value.cDMA2000__ClassmarkChange(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ cDMA2000_ClassmarkChange := ");
single_value.field_cDMA2000__ClassmarkChange->log_match(match_value.cDMA2000__ClassmarkChange(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__MS__NW::ALT_gERAN__IU__ModeClassmarkChange:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".gERAN_IU_ModeClassmarkChange");
single_value.field_gERAN__IU__ModeClassmarkChange->log_match(match_value.gERAN__IU__ModeClassmarkChange(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ gERAN_IU_ModeClassmarkChange := ");
single_value.field_gERAN__IU__ModeClassmarkChange->log_match(match_value.gERAN__IU__ModeClassmarkChange(), 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 PDU__RRM__MS__NW_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
switch (single_value.union_selection) {
case PDU__RRM__MS__NW::ALT_cipheringModeComplete:
single_value.field_cipheringModeComplete->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_configurationChangeAck:
single_value.field_configurationChangeAck->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_configurationChangeRej:
single_value.field_configurationChangeRej->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_assignmentComplete:
single_value.field_assignmentComplete->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_assignmentFailure:
single_value.field_assignmentFailure->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_handoverComplete:
single_value.field_handoverComplete->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_handoverFailure:
single_value.field_handoverFailure->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_partialReleaseComplete:
single_value.field_partialReleaseComplete->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_pagingResponse:
single_value.field_pagingResponse->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_notificationResponse:
single_value.field_notificationResponse->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_rR__Status:
single_value.field_rR__Status->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_channelModeModifyAck:
single_value.field_channelModeModifyAck->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_classmarkChange:
single_value.field_classmarkChange->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_gPRS__suspensionRequest:
single_value.field_gPRS__suspensionRequest->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_serviceInformationMessage:
single_value.field_serviceInformationMessage->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_uplinkRelease:
single_value.field_uplinkRelease->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_talkerIndication:
single_value.field_talkerIndication->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_applicationInformation:
single_value.field_applicationInformation->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_dTM__AssignmentFailure:
single_value.field_dTM__AssignmentFailure->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_dTM__Request:
single_value.field_dTM__Request->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_uTRAN__ClassmarkChange:
single_value.field_uTRAN__ClassmarkChange->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_cDMA2000__ClassmarkChange:
single_value.field_cDMA2000__ClassmarkChange->set_implicit_omit(); break;
case PDU__RRM__MS__NW::ALT_gERAN__IU__ModeClassmarkChange:
single_value.field_gERAN__IU__ModeClassmarkChange->set_implicit_omit(); break;
default: break;
}
}

void PDU__RRM__MS__NW_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 PDU__RRM__MS__NW::ALT_cipheringModeComplete:
single_value.field_cipheringModeComplete->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_configurationChangeAck:
single_value.field_configurationChangeAck->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_configurationChangeRej:
single_value.field_configurationChangeRej->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_assignmentComplete:
single_value.field_assignmentComplete->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_assignmentFailure:
single_value.field_assignmentFailure->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_handoverComplete:
single_value.field_handoverComplete->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_handoverFailure:
single_value.field_handoverFailure->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_partialReleaseComplete:
single_value.field_partialReleaseComplete->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_pagingResponse:
single_value.field_pagingResponse->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_notificationResponse:
single_value.field_notificationResponse->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_rR__Status:
single_value.field_rR__Status->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_channelModeModifyAck:
single_value.field_channelModeModifyAck->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_classmarkChange:
single_value.field_classmarkChange->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_gPRS__suspensionRequest:
single_value.field_gPRS__suspensionRequest->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_serviceInformationMessage:
single_value.field_serviceInformationMessage->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_uplinkRelease:
single_value.field_uplinkRelease->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_talkerIndication:
single_value.field_talkerIndication->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_applicationInformation:
single_value.field_applicationInformation->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_dTM__AssignmentFailure:
single_value.field_dTM__AssignmentFailure->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_dTM__Request:
single_value.field_dTM__Request->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_uTRAN__ClassmarkChange:
single_value.field_uTRAN__ClassmarkChange->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_cDMA2000__ClassmarkChange:
single_value.field_cDMA2000__ClassmarkChange->encode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_gERAN__IU__ModeClassmarkChange:
single_value.field_gERAN__IU__ModeClassmarkChange->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
}
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 @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
}
}

void PDU__RRM__MS__NW_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
{
single_value.union_selection = PDU__RRM__MS__NW::UNBOUND_VALUE;
PDU__RRM__MS__NW::union_selection_type new_selection = (PDU__RRM__MS__NW::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case PDU__RRM__MS__NW::ALT_cipheringModeComplete:
single_value.field_cipheringModeComplete = new PDU__RRM__CipheringModeComplete__MS__NW_template;
single_value.field_cipheringModeComplete->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_configurationChangeAck:
single_value.field_configurationChangeAck = new PDU__RRM__ConfigurationChangeAck__MS__NW_template;
single_value.field_configurationChangeAck->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_configurationChangeRej:
single_value.field_configurationChangeRej = new PDU__RRM__ConfigurationChangeRej__MS__NW_template;
single_value.field_configurationChangeRej->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_assignmentComplete:
single_value.field_assignmentComplete = new PDU__RRM__AssignmentComplete__MS__NW_template;
single_value.field_assignmentComplete->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_assignmentFailure:
single_value.field_assignmentFailure = new PDU__RRM__AssignmentFailure__MS__NW_template;
single_value.field_assignmentFailure->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_handoverComplete:
single_value.field_handoverComplete = new PDU__RRM__HandoverComplete__MS__NW_template;
single_value.field_handoverComplete->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_handoverFailure:
single_value.field_handoverFailure = new PDU__RRM__HandoverFailure__MS__NW_template;
single_value.field_handoverFailure->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_partialReleaseComplete:
single_value.field_partialReleaseComplete = new PDU__RRM__PartialReleaseComplete__MS__NW_template;
single_value.field_partialReleaseComplete->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_pagingResponse:
single_value.field_pagingResponse = new PDU__RRM__PagingResponse__MS__NW_template;
single_value.field_pagingResponse->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_notificationResponse:
single_value.field_notificationResponse = new PDU__RRM__NotificationResponse__MS__NW_template;
single_value.field_notificationResponse->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_rR__Status:
single_value.field_rR__Status = new PDU__RRM__RR__Status_template;
single_value.field_rR__Status->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_channelModeModifyAck:
single_value.field_channelModeModifyAck = new PDU__RRM__ChannelModeModifyAck__MS__NW_template;
single_value.field_channelModeModifyAck->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_classmarkChange:
single_value.field_classmarkChange = new PDU__RRM__ClassmarkChange__MS__NW_template;
single_value.field_classmarkChange->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_gPRS__suspensionRequest:
single_value.field_gPRS__suspensionRequest = new PDU__RRM__GPRS__SuspensionRequest__MS__NW_template;
single_value.field_gPRS__suspensionRequest->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_serviceInformationMessage:
single_value.field_serviceInformationMessage = new PDU__RRM__ServiceInformationMessage__MS__NW_template;
single_value.field_serviceInformationMessage->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_uplinkRelease:
single_value.field_uplinkRelease = new PDU__RRM__UplinkRelease_template;
single_value.field_uplinkRelease->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_talkerIndication:
single_value.field_talkerIndication = new PDU__RRM__TalkerIndication__MS__NW_template;
single_value.field_talkerIndication->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_applicationInformation:
single_value.field_applicationInformation = new PDU__RRM__ApplicationInformation_template;
single_value.field_applicationInformation->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_dTM__AssignmentFailure:
single_value.field_dTM__AssignmentFailure = new PDU__RRM__DTM__AssignmentFailure__MS__NW_template;
single_value.field_dTM__AssignmentFailure->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_dTM__Request:
single_value.field_dTM__Request = new PDU__RRM__DTM__Request__MS__NW_template;
single_value.field_dTM__Request->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_uTRAN__ClassmarkChange:
single_value.field_uTRAN__ClassmarkChange = new PDU__RRM__UTRAN__ClassmarkChange__MS__NW_template;
single_value.field_uTRAN__ClassmarkChange->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_cDMA2000__ClassmarkChange:
single_value.field_cDMA2000__ClassmarkChange = new PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_template;
single_value.field_cDMA2000__ClassmarkChange->decode_text(text_buf);
break;
case PDU__RRM__MS__NW::ALT_gERAN__IU__ModeClassmarkChange:
single_value.field_gERAN__IU__ModeClassmarkChange = new PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_template;
single_value.field_gERAN__IU__ModeClassmarkChange->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
}
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 PDU__RRM__MS__NW_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 @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
}
}

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

boolean PDU__RRM__MS__NW_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 PDU__RRM__MS__NW_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 `@MobileL3_RRM_Types.PDU_RRM_MS_NW'");
    }
    if (strcmp("cipheringModeComplete", param_field) == 0) {
      cipheringModeComplete().set_param(param);
      return;
    } else if (strcmp("configurationChangeAck", param_field) == 0) {
      configurationChangeAck().set_param(param);
      return;
    } else if (strcmp("configurationChangeRej", param_field) == 0) {
      configurationChangeRej().set_param(param);
      return;
    } else if (strcmp("assignmentComplete", param_field) == 0) {
      assignmentComplete().set_param(param);
      return;
    } else if (strcmp("assignmentFailure", param_field) == 0) {
      assignmentFailure().set_param(param);
      return;
    } else if (strcmp("handoverComplete", param_field) == 0) {
      handoverComplete().set_param(param);
      return;
    } else if (strcmp("handoverFailure", param_field) == 0) {
      handoverFailure().set_param(param);
      return;
    } else if (strcmp("partialReleaseComplete", param_field) == 0) {
      partialReleaseComplete().set_param(param);
      return;
    } else if (strcmp("pagingResponse", param_field) == 0) {
      pagingResponse().set_param(param);
      return;
    } else if (strcmp("notificationResponse", param_field) == 0) {
      notificationResponse().set_param(param);
      return;
    } else if (strcmp("rR_Status", param_field) == 0) {
      rR__Status().set_param(param);
      return;
    } else if (strcmp("channelModeModifyAck", param_field) == 0) {
      channelModeModifyAck().set_param(param);
      return;
    } else if (strcmp("classmarkChange", param_field) == 0) {
      classmarkChange().set_param(param);
      return;
    } else if (strcmp("gPRS_suspensionRequest", param_field) == 0) {
      gPRS__suspensionRequest().set_param(param);
      return;
    } else if (strcmp("serviceInformationMessage", param_field) == 0) {
      serviceInformationMessage().set_param(param);
      return;
    } else if (strcmp("uplinkRelease", param_field) == 0) {
      uplinkRelease().set_param(param);
      return;
    } else if (strcmp("talkerIndication", param_field) == 0) {
      talkerIndication().set_param(param);
      return;
    } else if (strcmp("applicationInformation", param_field) == 0) {
      applicationInformation().set_param(param);
      return;
    } else if (strcmp("dTM_AssignmentFailure", param_field) == 0) {
      dTM__AssignmentFailure().set_param(param);
      return;
    } else if (strcmp("dTM_Request", param_field) == 0) {
      dTM__Request().set_param(param);
      return;
    } else if (strcmp("uTRAN_ClassmarkChange", param_field) == 0) {
      uTRAN__ClassmarkChange().set_param(param);
      return;
    } else if (strcmp("cDMA2000_ClassmarkChange", param_field) == 0) {
      cDMA2000__ClassmarkChange().set_param(param);
      return;
    } else if (strcmp("gERAN_IU_ModeClassmarkChange", param_field) == 0) {
      gERAN__IU__ModeClassmarkChange().set_param(param);
      return;
    } else param.error("Field `%s' not found in union template type `@MobileL3_RRM_Types.PDU_RRM_MS_NW'", 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: {
    PDU__RRM__MS__NW_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", "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
    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, "cipheringModeComplete")) {
      cipheringModeComplete().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "configurationChangeAck")) {
      configurationChangeAck().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "configurationChangeRej")) {
      configurationChangeRej().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "assignmentComplete")) {
      assignmentComplete().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "assignmentFailure")) {
      assignmentFailure().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "handoverComplete")) {
      handoverComplete().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "handoverFailure")) {
      handoverFailure().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "partialReleaseComplete")) {
      partialReleaseComplete().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "pagingResponse")) {
      pagingResponse().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "notificationResponse")) {
      notificationResponse().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "rR_Status")) {
      rR__Status().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "channelModeModifyAck")) {
      channelModeModifyAck().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "classmarkChange")) {
      classmarkChange().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "gPRS_suspensionRequest")) {
      gPRS__suspensionRequest().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "serviceInformationMessage")) {
      serviceInformationMessage().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "uplinkRelease")) {
      uplinkRelease().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "talkerIndication")) {
      talkerIndication().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "applicationInformation")) {
      applicationInformation().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "dTM_AssignmentFailure")) {
      dTM__AssignmentFailure().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "dTM_Request")) {
      dTM__Request().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "uTRAN_ClassmarkChange")) {
      uTRAN__ClassmarkChange().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "cDMA2000_ClassmarkChange")) {
      cDMA2000__ClassmarkChange().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "gERAN_IU_ModeClassmarkChange")) {
      gERAN__IU__ModeClassmarkChange().set_param(*mp_last);
      break;
    }
    mp_last->error("Field %s does not exist in type @MobileL3_RRM_Types.PDU_RRM_MS_NW.", last_name);
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__RRM__MS__NW_template* precondition = new PDU__RRM__MS__NW_template;
    precondition->set_param(*m_p->get_elem(0));
    PDU__RRM__MS__NW_template* implied_template = new PDU__RRM__MS__NW_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = PDU__RRM__MS__NW_template(precondition, implied_template);
  } break;
  default:
    param.type_error("union template", "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__RRM__MS__NW_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 PDU__RRM__MS__NW::ALT_cipheringModeComplete:
single_value.field_cipheringModeComplete->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_configurationChangeAck:
single_value.field_configurationChangeAck->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_configurationChangeRej:
single_value.field_configurationChangeRej->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_assignmentComplete:
single_value.field_assignmentComplete->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_assignmentFailure:
single_value.field_assignmentFailure->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_handoverComplete:
single_value.field_handoverComplete->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_handoverFailure:
single_value.field_handoverFailure->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_partialReleaseComplete:
single_value.field_partialReleaseComplete->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_pagingResponse:
single_value.field_pagingResponse->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_notificationResponse:
single_value.field_notificationResponse->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_rR__Status:
single_value.field_rR__Status->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_channelModeModifyAck:
single_value.field_channelModeModifyAck->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_classmarkChange:
single_value.field_classmarkChange->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_gPRS__suspensionRequest:
single_value.field_gPRS__suspensionRequest->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_serviceInformationMessage:
single_value.field_serviceInformationMessage->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_uplinkRelease:
single_value.field_uplinkRelease->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_talkerIndication:
single_value.field_talkerIndication->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_applicationInformation:
single_value.field_applicationInformation->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_dTM__AssignmentFailure:
single_value.field_dTM__AssignmentFailure->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_dTM__Request:
single_value.field_dTM__Request->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_uTRAN__ClassmarkChange:
single_value.field_uTRAN__ClassmarkChange->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_cDMA2000__ClassmarkChange:
single_value.field_cDMA2000__ClassmarkChange->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
case PDU__RRM__MS__NW::ALT_gERAN__IU__ModeClassmarkChange:
single_value.field_gERAN__IU__ModeClassmarkChange->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
return;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @MobileL3_RRM_Types.PDU_RRM_MS_NW.");
}
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 : "@MobileL3_RRM_Types.PDU_RRM_MS_NW");
}

void PDU__RRM__NW__MS::copy_value(const PDU__RRM__NW__MS& other_value)
{
switch (other_value.union_selection) {
case ALT_additionalAssignment:
field_additionalAssignment = new PDU__RRM__AdditionalAssignment__NW__MS(*other_value.field_additionalAssignment);
break;
case ALT_immediatePacketAssignment:
field_immediatePacketAssignment = new PDU__RRM__ImmediatePacketAssignment__NW__MS(*other_value.field_immediatePacketAssignment);
break;
case ALT_cipheringModeCommand:
field_cipheringModeCommand = new PDU__RRM__CipheringModeCommand__NW__MS(*other_value.field_cipheringModeCommand);
break;
case ALT_configurationChangeCommand:
field_configurationChangeCommand = new PDU__RRM__ConfigurationChangeCommand__NW__MS(*other_value.field_configurationChangeCommand);
break;
case ALT_assignmentCommand:
field_assignmentCommand = new PDU__RRM__AssignmentCommand__NW__MS(*other_value.field_assignmentCommand);
break;
case ALT_handoverCommand:
field_handoverCommand = new PDU__RRM__HandoverCommand__NW__MS(*other_value.field_handoverCommand);
break;
case ALT_physicalInformation:
field_physicalInformation = new PDU__RRM__PhysicalInformation__NW__MS(*other_value.field_physicalInformation);
break;
case ALT_channelRelease:
field_channelRelease = new PDU__RRM__ChannelRelease__NW__MS(*other_value.field_channelRelease);
break;
case ALT_partialRelease:
field_partialRelease = new PDU__RRM__PartialRelease__NW__MS(*other_value.field_partialRelease);
break;
case ALT_pagingReq__Type1:
field_pagingReq__Type1 = new PDU__RRM__PagingReq__Type1__NW__MS(*other_value.field_pagingReq__Type1);
break;
case ALT_pagingReq__Type2:
field_pagingReq__Type2 = new PDU__RRM__PagingReq__Type2__NW__MS(*other_value.field_pagingReq__Type2);
break;
case ALT_pagingReq__Type3:
field_pagingReq__Type3 = new PDU__RRM__PagingReq__Type3__NW__MS(*other_value.field_pagingReq__Type3);
break;
case ALT_channelModeModify:
field_channelModeModify = new PDU__RRM__ChannelModeModify__NW__MS(*other_value.field_channelModeModify);
break;
case ALT_rR__Status:
field_rR__Status = new PDU__RRM__RR__Status(*other_value.field_rR__Status);
break;
case ALT_frequency__Redefinition:
field_frequency__Redefinition = new PDU__RRM__Frequency__Redefinition__NW__MS(*other_value.field_frequency__Redefinition);
break;
case ALT_classmarkEnquiry:
field_classmarkEnquiry = new PDU__RRM__ClassmarkEnquiry__NW__MS(*other_value.field_classmarkEnquiry);
break;
case ALT_mBMS__Announcement:
field_mBMS__Announcement = new MBMS__Announcement__NW__MS(*other_value.field_mBMS__Announcement);
break;
case ALT_vGCS__UplinkGrant:
field_vGCS__UplinkGrant = new PDU__RRM__VGCS__UplinkGrant__NW__MS(*other_value.field_vGCS__UplinkGrant);
break;
case ALT_uplinkRelease:
field_uplinkRelease = new PDU__RRM__UplinkRelease(*other_value.field_uplinkRelease);
break;
case ALT_uplinkBusy:
field_uplinkBusy = new PDU__RRM__UplinkBusy__NW__MS(*other_value.field_uplinkBusy);
break;
case ALT_applicationInformation:
field_applicationInformation = new PDU__RRM__ApplicationInformation(*other_value.field_applicationInformation);
break;
case ALT_dTM__AssignmentCommand:
field_dTM__AssignmentCommand = new PDU__RRM__DTM__AssignmentCommand__NW__MS(*other_value.field_dTM__AssignmentCommand);
break;
case ALT_dTM__Information:
field_dTM__Information = new PDU__RRM__DTM__Information__NW__MS(*other_value.field_dTM__Information);
break;
case ALT_dTM__Reject:
field_dTM__Reject = new PDU__RRM__DTM__Reject__NW__MS(*other_value.field_dTM__Reject);
break;
case ALT_packetNotification:
field_packetNotification = new PDU__RRM__PacketNotification__NW__MS(*other_value.field_packetNotification);
break;
case ALT_interSystemToUTRAN__HandoverCommand:
field_interSystemToUTRAN__HandoverCommand = new PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS(*other_value.field_interSystemToUTRAN__HandoverCommand);
break;
case ALT_interSystemToCDMA2000HandoverCommand:
field_interSystemToCDMA2000HandoverCommand = new PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS(*other_value.field_interSystemToCDMA2000HandoverCommand);
break;
case ALT_interSystemToEUTRAN__HandoverCommand:
field_interSystemToEUTRAN__HandoverCommand = new PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS(*other_value.field_interSystemToEUTRAN__HandoverCommand);
break;
default:
TTCN_error("Assignment of an unbound union value of type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
}
union_selection = other_value.union_selection;
}

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

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

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

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

boolean PDU__RRM__NW__MS::operator==(const PDU__RRM__NW__MS& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_additionalAssignment:
return *field_additionalAssignment == *other_value.field_additionalAssignment;
case ALT_immediatePacketAssignment:
return *field_immediatePacketAssignment == *other_value.field_immediatePacketAssignment;
case ALT_cipheringModeCommand:
return *field_cipheringModeCommand == *other_value.field_cipheringModeCommand;
case ALT_configurationChangeCommand:
return *field_configurationChangeCommand == *other_value.field_configurationChangeCommand;
case ALT_assignmentCommand:
return *field_assignmentCommand == *other_value.field_assignmentCommand;
case ALT_handoverCommand:
return *field_handoverCommand == *other_value.field_handoverCommand;
case ALT_physicalInformation:
return *field_physicalInformation == *other_value.field_physicalInformation;
case ALT_channelRelease:
return *field_channelRelease == *other_value.field_channelRelease;
case ALT_partialRelease:
return *field_partialRelease == *other_value.field_partialRelease;
case ALT_pagingReq__Type1:
return *field_pagingReq__Type1 == *other_value.field_pagingReq__Type1;
case ALT_pagingReq__Type2:
return *field_pagingReq__Type2 == *other_value.field_pagingReq__Type2;
case ALT_pagingReq__Type3:
return *field_pagingReq__Type3 == *other_value.field_pagingReq__Type3;
case ALT_channelModeModify:
return *field_channelModeModify == *other_value.field_channelModeModify;
case ALT_rR__Status:
return *field_rR__Status == *other_value.field_rR__Status;
case ALT_frequency__Redefinition:
return *field_frequency__Redefinition == *other_value.field_frequency__Redefinition;
case ALT_classmarkEnquiry:
return *field_classmarkEnquiry == *other_value.field_classmarkEnquiry;
case ALT_mBMS__Announcement:
return *field_mBMS__Announcement == *other_value.field_mBMS__Announcement;
case ALT_vGCS__UplinkGrant:
return *field_vGCS__UplinkGrant == *other_value.field_vGCS__UplinkGrant;
case ALT_uplinkRelease:
return *field_uplinkRelease == *other_value.field_uplinkRelease;
case ALT_uplinkBusy:
return *field_uplinkBusy == *other_value.field_uplinkBusy;
case ALT_applicationInformation:
return *field_applicationInformation == *other_value.field_applicationInformation;
case ALT_dTM__AssignmentCommand:
return *field_dTM__AssignmentCommand == *other_value.field_dTM__AssignmentCommand;
case ALT_dTM__Information:
return *field_dTM__Information == *other_value.field_dTM__Information;
case ALT_dTM__Reject:
return *field_dTM__Reject == *other_value.field_dTM__Reject;
case ALT_packetNotification:
return *field_packetNotification == *other_value.field_packetNotification;
case ALT_interSystemToUTRAN__HandoverCommand:
return *field_interSystemToUTRAN__HandoverCommand == *other_value.field_interSystemToUTRAN__HandoverCommand;
case ALT_interSystemToCDMA2000HandoverCommand:
return *field_interSystemToCDMA2000HandoverCommand == *other_value.field_interSystemToCDMA2000HandoverCommand;
case ALT_interSystemToEUTRAN__HandoverCommand:
return *field_interSystemToEUTRAN__HandoverCommand == *other_value.field_interSystemToEUTRAN__HandoverCommand;
default:
return FALSE;
}
}

PDU__RRM__AdditionalAssignment__NW__MS& PDU__RRM__NW__MS::additionalAssignment()
{
if (union_selection != ALT_additionalAssignment) {
clean_up();
field_additionalAssignment = new PDU__RRM__AdditionalAssignment__NW__MS;
union_selection = ALT_additionalAssignment;
}
return *field_additionalAssignment;
}

const PDU__RRM__AdditionalAssignment__NW__MS& PDU__RRM__NW__MS::additionalAssignment() const
{
if (union_selection != ALT_additionalAssignment) TTCN_error("Using non-selected field additionalAssignment in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_additionalAssignment;
}

PDU__RRM__ImmediatePacketAssignment__NW__MS& PDU__RRM__NW__MS::immediatePacketAssignment()
{
if (union_selection != ALT_immediatePacketAssignment) {
clean_up();
field_immediatePacketAssignment = new PDU__RRM__ImmediatePacketAssignment__NW__MS;
union_selection = ALT_immediatePacketAssignment;
}
return *field_immediatePacketAssignment;
}

const PDU__RRM__ImmediatePacketAssignment__NW__MS& PDU__RRM__NW__MS::immediatePacketAssignment() const
{
if (union_selection != ALT_immediatePacketAssignment) TTCN_error("Using non-selected field immediatePacketAssignment in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_immediatePacketAssignment;
}

PDU__RRM__CipheringModeCommand__NW__MS& PDU__RRM__NW__MS::cipheringModeCommand()
{
if (union_selection != ALT_cipheringModeCommand) {
clean_up();
field_cipheringModeCommand = new PDU__RRM__CipheringModeCommand__NW__MS;
union_selection = ALT_cipheringModeCommand;
}
return *field_cipheringModeCommand;
}

const PDU__RRM__CipheringModeCommand__NW__MS& PDU__RRM__NW__MS::cipheringModeCommand() const
{
if (union_selection != ALT_cipheringModeCommand) TTCN_error("Using non-selected field cipheringModeCommand in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_cipheringModeCommand;
}

PDU__RRM__ConfigurationChangeCommand__NW__MS& PDU__RRM__NW__MS::configurationChangeCommand()
{
if (union_selection != ALT_configurationChangeCommand) {
clean_up();
field_configurationChangeCommand = new PDU__RRM__ConfigurationChangeCommand__NW__MS;
union_selection = ALT_configurationChangeCommand;
}
return *field_configurationChangeCommand;
}

const PDU__RRM__ConfigurationChangeCommand__NW__MS& PDU__RRM__NW__MS::configurationChangeCommand() const
{
if (union_selection != ALT_configurationChangeCommand) TTCN_error("Using non-selected field configurationChangeCommand in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_configurationChangeCommand;
}

PDU__RRM__AssignmentCommand__NW__MS& PDU__RRM__NW__MS::assignmentCommand()
{
if (union_selection != ALT_assignmentCommand) {
clean_up();
field_assignmentCommand = new PDU__RRM__AssignmentCommand__NW__MS;
union_selection = ALT_assignmentCommand;
}
return *field_assignmentCommand;
}

const PDU__RRM__AssignmentCommand__NW__MS& PDU__RRM__NW__MS::assignmentCommand() const
{
if (union_selection != ALT_assignmentCommand) TTCN_error("Using non-selected field assignmentCommand in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_assignmentCommand;
}

PDU__RRM__HandoverCommand__NW__MS& PDU__RRM__NW__MS::handoverCommand()
{
if (union_selection != ALT_handoverCommand) {
clean_up();
field_handoverCommand = new PDU__RRM__HandoverCommand__NW__MS;
union_selection = ALT_handoverCommand;
}
return *field_handoverCommand;
}

const PDU__RRM__HandoverCommand__NW__MS& PDU__RRM__NW__MS::handoverCommand() const
{
if (union_selection != ALT_handoverCommand) TTCN_error("Using non-selected field handoverCommand in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_handoverCommand;
}

PDU__RRM__PhysicalInformation__NW__MS& PDU__RRM__NW__MS::physicalInformation()
{
if (union_selection != ALT_physicalInformation) {
clean_up();
field_physicalInformation = new PDU__RRM__PhysicalInformation__NW__MS;
union_selection = ALT_physicalInformation;
}
return *field_physicalInformation;
}

const PDU__RRM__PhysicalInformation__NW__MS& PDU__RRM__NW__MS::physicalInformation() const
{
if (union_selection != ALT_physicalInformation) TTCN_error("Using non-selected field physicalInformation in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_physicalInformation;
}

PDU__RRM__ChannelRelease__NW__MS& PDU__RRM__NW__MS::channelRelease()
{
if (union_selection != ALT_channelRelease) {
clean_up();
field_channelRelease = new PDU__RRM__ChannelRelease__NW__MS;
union_selection = ALT_channelRelease;
}
return *field_channelRelease;
}

const PDU__RRM__ChannelRelease__NW__MS& PDU__RRM__NW__MS::channelRelease() const
{
if (union_selection != ALT_channelRelease) TTCN_error("Using non-selected field channelRelease in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_channelRelease;
}

PDU__RRM__PartialRelease__NW__MS& PDU__RRM__NW__MS::partialRelease()
{
if (union_selection != ALT_partialRelease) {
clean_up();
field_partialRelease = new PDU__RRM__PartialRelease__NW__MS;
union_selection = ALT_partialRelease;
}
return *field_partialRelease;
}

const PDU__RRM__PartialRelease__NW__MS& PDU__RRM__NW__MS::partialRelease() const
{
if (union_selection != ALT_partialRelease) TTCN_error("Using non-selected field partialRelease in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_partialRelease;
}

PDU__RRM__PagingReq__Type1__NW__MS& PDU__RRM__NW__MS::pagingReq__Type1()
{
if (union_selection != ALT_pagingReq__Type1) {
clean_up();
field_pagingReq__Type1 = new PDU__RRM__PagingReq__Type1__NW__MS;
union_selection = ALT_pagingReq__Type1;
}
return *field_pagingReq__Type1;
}

const PDU__RRM__PagingReq__Type1__NW__MS& PDU__RRM__NW__MS::pagingReq__Type1() const
{
if (union_selection != ALT_pagingReq__Type1) TTCN_error("Using non-selected field pagingReq_Type1 in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_pagingReq__Type1;
}

PDU__RRM__PagingReq__Type2__NW__MS& PDU__RRM__NW__MS::pagingReq__Type2()
{
if (union_selection != ALT_pagingReq__Type2) {
clean_up();
field_pagingReq__Type2 = new PDU__RRM__PagingReq__Type2__NW__MS;
union_selection = ALT_pagingReq__Type2;
}
return *field_pagingReq__Type2;
}

const PDU__RRM__PagingReq__Type2__NW__MS& PDU__RRM__NW__MS::pagingReq__Type2() const
{
if (union_selection != ALT_pagingReq__Type2) TTCN_error("Using non-selected field pagingReq_Type2 in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_pagingReq__Type2;
}

PDU__RRM__PagingReq__Type3__NW__MS& PDU__RRM__NW__MS::pagingReq__Type3()
{
if (union_selection != ALT_pagingReq__Type3) {
clean_up();
field_pagingReq__Type3 = new PDU__RRM__PagingReq__Type3__NW__MS;
union_selection = ALT_pagingReq__Type3;
}
return *field_pagingReq__Type3;
}

const PDU__RRM__PagingReq__Type3__NW__MS& PDU__RRM__NW__MS::pagingReq__Type3() const
{
if (union_selection != ALT_pagingReq__Type3) TTCN_error("Using non-selected field pagingReq_Type3 in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_pagingReq__Type3;
}

PDU__RRM__ChannelModeModify__NW__MS& PDU__RRM__NW__MS::channelModeModify()
{
if (union_selection != ALT_channelModeModify) {
clean_up();
field_channelModeModify = new PDU__RRM__ChannelModeModify__NW__MS;
union_selection = ALT_channelModeModify;
}
return *field_channelModeModify;
}

const PDU__RRM__ChannelModeModify__NW__MS& PDU__RRM__NW__MS::channelModeModify() const
{
if (union_selection != ALT_channelModeModify) TTCN_error("Using non-selected field channelModeModify in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_channelModeModify;
}

PDU__RRM__RR__Status& PDU__RRM__NW__MS::rR__Status()
{
if (union_selection != ALT_rR__Status) {
clean_up();
field_rR__Status = new PDU__RRM__RR__Status;
union_selection = ALT_rR__Status;
}
return *field_rR__Status;
}

const PDU__RRM__RR__Status& PDU__RRM__NW__MS::rR__Status() const
{
if (union_selection != ALT_rR__Status) TTCN_error("Using non-selected field rR_Status in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_rR__Status;
}

PDU__RRM__Frequency__Redefinition__NW__MS& PDU__RRM__NW__MS::frequency__Redefinition()
{
if (union_selection != ALT_frequency__Redefinition) {
clean_up();
field_frequency__Redefinition = new PDU__RRM__Frequency__Redefinition__NW__MS;
union_selection = ALT_frequency__Redefinition;
}
return *field_frequency__Redefinition;
}

const PDU__RRM__Frequency__Redefinition__NW__MS& PDU__RRM__NW__MS::frequency__Redefinition() const
{
if (union_selection != ALT_frequency__Redefinition) TTCN_error("Using non-selected field frequency_Redefinition in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_frequency__Redefinition;
}

PDU__RRM__ClassmarkEnquiry__NW__MS& PDU__RRM__NW__MS::classmarkEnquiry()
{
if (union_selection != ALT_classmarkEnquiry) {
clean_up();
field_classmarkEnquiry = new PDU__RRM__ClassmarkEnquiry__NW__MS;
union_selection = ALT_classmarkEnquiry;
}
return *field_classmarkEnquiry;
}

const PDU__RRM__ClassmarkEnquiry__NW__MS& PDU__RRM__NW__MS::classmarkEnquiry() const
{
if (union_selection != ALT_classmarkEnquiry) TTCN_error("Using non-selected field classmarkEnquiry in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_classmarkEnquiry;
}

MBMS__Announcement__NW__MS& PDU__RRM__NW__MS::mBMS__Announcement()
{
if (union_selection != ALT_mBMS__Announcement) {
clean_up();
field_mBMS__Announcement = new MBMS__Announcement__NW__MS;
union_selection = ALT_mBMS__Announcement;
}
return *field_mBMS__Announcement;
}

const MBMS__Announcement__NW__MS& PDU__RRM__NW__MS::mBMS__Announcement() const
{
if (union_selection != ALT_mBMS__Announcement) TTCN_error("Using non-selected field mBMS_Announcement in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_mBMS__Announcement;
}

PDU__RRM__VGCS__UplinkGrant__NW__MS& PDU__RRM__NW__MS::vGCS__UplinkGrant()
{
if (union_selection != ALT_vGCS__UplinkGrant) {
clean_up();
field_vGCS__UplinkGrant = new PDU__RRM__VGCS__UplinkGrant__NW__MS;
union_selection = ALT_vGCS__UplinkGrant;
}
return *field_vGCS__UplinkGrant;
}

const PDU__RRM__VGCS__UplinkGrant__NW__MS& PDU__RRM__NW__MS::vGCS__UplinkGrant() const
{
if (union_selection != ALT_vGCS__UplinkGrant) TTCN_error("Using non-selected field vGCS_UplinkGrant in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_vGCS__UplinkGrant;
}

PDU__RRM__UplinkRelease& PDU__RRM__NW__MS::uplinkRelease()
{
if (union_selection != ALT_uplinkRelease) {
clean_up();
field_uplinkRelease = new PDU__RRM__UplinkRelease;
union_selection = ALT_uplinkRelease;
}
return *field_uplinkRelease;
}

const PDU__RRM__UplinkRelease& PDU__RRM__NW__MS::uplinkRelease() const
{
if (union_selection != ALT_uplinkRelease) TTCN_error("Using non-selected field uplinkRelease in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_uplinkRelease;
}

PDU__RRM__UplinkBusy__NW__MS& PDU__RRM__NW__MS::uplinkBusy()
{
if (union_selection != ALT_uplinkBusy) {
clean_up();
field_uplinkBusy = new PDU__RRM__UplinkBusy__NW__MS;
union_selection = ALT_uplinkBusy;
}
return *field_uplinkBusy;
}

const PDU__RRM__UplinkBusy__NW__MS& PDU__RRM__NW__MS::uplinkBusy() const
{
if (union_selection != ALT_uplinkBusy) TTCN_error("Using non-selected field uplinkBusy in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_uplinkBusy;
}

PDU__RRM__ApplicationInformation& PDU__RRM__NW__MS::applicationInformation()
{
if (union_selection != ALT_applicationInformation) {
clean_up();
field_applicationInformation = new PDU__RRM__ApplicationInformation;
union_selection = ALT_applicationInformation;
}
return *field_applicationInformation;
}

const PDU__RRM__ApplicationInformation& PDU__RRM__NW__MS::applicationInformation() const
{
if (union_selection != ALT_applicationInformation) TTCN_error("Using non-selected field applicationInformation in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_applicationInformation;
}

PDU__RRM__DTM__AssignmentCommand__NW__MS& PDU__RRM__NW__MS::dTM__AssignmentCommand()
{
if (union_selection != ALT_dTM__AssignmentCommand) {
clean_up();
field_dTM__AssignmentCommand = new PDU__RRM__DTM__AssignmentCommand__NW__MS;
union_selection = ALT_dTM__AssignmentCommand;
}
return *field_dTM__AssignmentCommand;
}

const PDU__RRM__DTM__AssignmentCommand__NW__MS& PDU__RRM__NW__MS::dTM__AssignmentCommand() const
{
if (union_selection != ALT_dTM__AssignmentCommand) TTCN_error("Using non-selected field dTM_AssignmentCommand in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_dTM__AssignmentCommand;
}

PDU__RRM__DTM__Information__NW__MS& PDU__RRM__NW__MS::dTM__Information()
{
if (union_selection != ALT_dTM__Information) {
clean_up();
field_dTM__Information = new PDU__RRM__DTM__Information__NW__MS;
union_selection = ALT_dTM__Information;
}
return *field_dTM__Information;
}

const PDU__RRM__DTM__Information__NW__MS& PDU__RRM__NW__MS::dTM__Information() const
{
if (union_selection != ALT_dTM__Information) TTCN_error("Using non-selected field dTM_Information in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_dTM__Information;
}

PDU__RRM__DTM__Reject__NW__MS& PDU__RRM__NW__MS::dTM__Reject()
{
if (union_selection != ALT_dTM__Reject) {
clean_up();
field_dTM__Reject = new PDU__RRM__DTM__Reject__NW__MS;
union_selection = ALT_dTM__Reject;
}
return *field_dTM__Reject;
}

const PDU__RRM__DTM__Reject__NW__MS& PDU__RRM__NW__MS::dTM__Reject() const
{
if (union_selection != ALT_dTM__Reject) TTCN_error("Using non-selected field dTM_Reject in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_dTM__Reject;
}

PDU__RRM__PacketNotification__NW__MS& PDU__RRM__NW__MS::packetNotification()
{
if (union_selection != ALT_packetNotification) {
clean_up();
field_packetNotification = new PDU__RRM__PacketNotification__NW__MS;
union_selection = ALT_packetNotification;
}
return *field_packetNotification;
}

const PDU__RRM__PacketNotification__NW__MS& PDU__RRM__NW__MS::packetNotification() const
{
if (union_selection != ALT_packetNotification) TTCN_error("Using non-selected field packetNotification in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_packetNotification;
}

PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS& PDU__RRM__NW__MS::interSystemToUTRAN__HandoverCommand()
{
if (union_selection != ALT_interSystemToUTRAN__HandoverCommand) {
clean_up();
field_interSystemToUTRAN__HandoverCommand = new PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS;
union_selection = ALT_interSystemToUTRAN__HandoverCommand;
}
return *field_interSystemToUTRAN__HandoverCommand;
}

const PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS& PDU__RRM__NW__MS::interSystemToUTRAN__HandoverCommand() const
{
if (union_selection != ALT_interSystemToUTRAN__HandoverCommand) TTCN_error("Using non-selected field interSystemToUTRAN_HandoverCommand in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_interSystemToUTRAN__HandoverCommand;
}

PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS& PDU__RRM__NW__MS::interSystemToCDMA2000HandoverCommand()
{
if (union_selection != ALT_interSystemToCDMA2000HandoverCommand) {
clean_up();
field_interSystemToCDMA2000HandoverCommand = new PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS;
union_selection = ALT_interSystemToCDMA2000HandoverCommand;
}
return *field_interSystemToCDMA2000HandoverCommand;
}

const PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS& PDU__RRM__NW__MS::interSystemToCDMA2000HandoverCommand() const
{
if (union_selection != ALT_interSystemToCDMA2000HandoverCommand) TTCN_error("Using non-selected field interSystemToCDMA2000HandoverCommand in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_interSystemToCDMA2000HandoverCommand;
}

PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS& PDU__RRM__NW__MS::interSystemToEUTRAN__HandoverCommand()
{
if (union_selection != ALT_interSystemToEUTRAN__HandoverCommand) {
clean_up();
field_interSystemToEUTRAN__HandoverCommand = new PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS;
union_selection = ALT_interSystemToEUTRAN__HandoverCommand;
}
return *field_interSystemToEUTRAN__HandoverCommand;
}

const PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS& PDU__RRM__NW__MS::interSystemToEUTRAN__HandoverCommand() const
{
if (union_selection != ALT_interSystemToEUTRAN__HandoverCommand) TTCN_error("Using non-selected field interSystemToEUTRAN_HandoverCommand in a value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *field_interSystemToEUTRAN__HandoverCommand;
}

boolean PDU__RRM__NW__MS::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 @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return union_selection == checked_selection;
}

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

boolean PDU__RRM__NW__MS::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_additionalAssignment: return field_additionalAssignment->is_value();
case ALT_immediatePacketAssignment: return field_immediatePacketAssignment->is_value();
case ALT_cipheringModeCommand: return field_cipheringModeCommand->is_value();
case ALT_configurationChangeCommand: return field_configurationChangeCommand->is_value();
case ALT_assignmentCommand: return field_assignmentCommand->is_value();
case ALT_handoverCommand: return field_handoverCommand->is_value();
case ALT_physicalInformation: return field_physicalInformation->is_value();
case ALT_channelRelease: return field_channelRelease->is_value();
case ALT_partialRelease: return field_partialRelease->is_value();
case ALT_pagingReq__Type1: return field_pagingReq__Type1->is_value();
case ALT_pagingReq__Type2: return field_pagingReq__Type2->is_value();
case ALT_pagingReq__Type3: return field_pagingReq__Type3->is_value();
case ALT_channelModeModify: return field_channelModeModify->is_value();
case ALT_rR__Status: return field_rR__Status->is_value();
case ALT_frequency__Redefinition: return field_frequency__Redefinition->is_value();
case ALT_classmarkEnquiry: return field_classmarkEnquiry->is_value();
case ALT_mBMS__Announcement: return field_mBMS__Announcement->is_value();
case ALT_vGCS__UplinkGrant: return field_vGCS__UplinkGrant->is_value();
case ALT_uplinkRelease: return field_uplinkRelease->is_value();
case ALT_uplinkBusy: return field_uplinkBusy->is_value();
case ALT_applicationInformation: return field_applicationInformation->is_value();
case ALT_dTM__AssignmentCommand: return field_dTM__AssignmentCommand->is_value();
case ALT_dTM__Information: return field_dTM__Information->is_value();
case ALT_dTM__Reject: return field_dTM__Reject->is_value();
case ALT_packetNotification: return field_packetNotification->is_value();
case ALT_interSystemToUTRAN__HandoverCommand: return field_interSystemToUTRAN__HandoverCommand->is_value();
case ALT_interSystemToCDMA2000HandoverCommand: return field_interSystemToCDMA2000HandoverCommand->is_value();
case ALT_interSystemToEUTRAN__HandoverCommand: return field_interSystemToEUTRAN__HandoverCommand->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void PDU__RRM__NW__MS::clean_up()
{
switch (union_selection) {
case ALT_additionalAssignment:
  delete field_additionalAssignment;
  break;
case ALT_immediatePacketAssignment:
  delete field_immediatePacketAssignment;
  break;
case ALT_cipheringModeCommand:
  delete field_cipheringModeCommand;
  break;
case ALT_configurationChangeCommand:
  delete field_configurationChangeCommand;
  break;
case ALT_assignmentCommand:
  delete field_assignmentCommand;
  break;
case ALT_handoverCommand:
  delete field_handoverCommand;
  break;
case ALT_physicalInformation:
  delete field_physicalInformation;
  break;
case ALT_channelRelease:
  delete field_channelRelease;
  break;
case ALT_partialRelease:
  delete field_partialRelease;
  break;
case ALT_pagingReq__Type1:
  delete field_pagingReq__Type1;
  break;
case ALT_pagingReq__Type2:
  delete field_pagingReq__Type2;
  break;
case ALT_pagingReq__Type3:
  delete field_pagingReq__Type3;
  break;
case ALT_channelModeModify:
  delete field_channelModeModify;
  break;
case ALT_rR__Status:
  delete field_rR__Status;
  break;
case ALT_frequency__Redefinition:
  delete field_frequency__Redefinition;
  break;
case ALT_classmarkEnquiry:
  delete field_classmarkEnquiry;
  break;
case ALT_mBMS__Announcement:
  delete field_mBMS__Announcement;
  break;
case ALT_vGCS__UplinkGrant:
  delete field_vGCS__UplinkGrant;
  break;
case ALT_uplinkRelease:
  delete field_uplinkRelease;
  break;
case ALT_uplinkBusy:
  delete field_uplinkBusy;
  break;
case ALT_applicationInformation:
  delete field_applicationInformation;
  break;
case ALT_dTM__AssignmentCommand:
  delete field_dTM__AssignmentCommand;
  break;
case ALT_dTM__Information:
  delete field_dTM__Information;
  break;
case ALT_dTM__Reject:
  delete field_dTM__Reject;
  break;
case ALT_packetNotification:
  delete field_packetNotification;
  break;
case ALT_interSystemToUTRAN__HandoverCommand:
  delete field_interSystemToUTRAN__HandoverCommand;
  break;
case ALT_interSystemToCDMA2000HandoverCommand:
  delete field_interSystemToCDMA2000HandoverCommand;
  break;
case ALT_interSystemToEUTRAN__HandoverCommand:
  delete field_interSystemToEUTRAN__HandoverCommand;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void PDU__RRM__NW__MS::log() const
{
switch (union_selection) {
case ALT_additionalAssignment:
TTCN_Logger::log_event_str("{ additionalAssignment := ");
field_additionalAssignment->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_immediatePacketAssignment:
TTCN_Logger::log_event_str("{ immediatePacketAssignment := ");
field_immediatePacketAssignment->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_cipheringModeCommand:
TTCN_Logger::log_event_str("{ cipheringModeCommand := ");
field_cipheringModeCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_configurationChangeCommand:
TTCN_Logger::log_event_str("{ configurationChangeCommand := ");
field_configurationChangeCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_assignmentCommand:
TTCN_Logger::log_event_str("{ assignmentCommand := ");
field_assignmentCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_handoverCommand:
TTCN_Logger::log_event_str("{ handoverCommand := ");
field_handoverCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_physicalInformation:
TTCN_Logger::log_event_str("{ physicalInformation := ");
field_physicalInformation->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_channelRelease:
TTCN_Logger::log_event_str("{ channelRelease := ");
field_channelRelease->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_partialRelease:
TTCN_Logger::log_event_str("{ partialRelease := ");
field_partialRelease->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_pagingReq__Type1:
TTCN_Logger::log_event_str("{ pagingReq_Type1 := ");
field_pagingReq__Type1->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_pagingReq__Type2:
TTCN_Logger::log_event_str("{ pagingReq_Type2 := ");
field_pagingReq__Type2->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_pagingReq__Type3:
TTCN_Logger::log_event_str("{ pagingReq_Type3 := ");
field_pagingReq__Type3->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_channelModeModify:
TTCN_Logger::log_event_str("{ channelModeModify := ");
field_channelModeModify->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_rR__Status:
TTCN_Logger::log_event_str("{ rR_Status := ");
field_rR__Status->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_frequency__Redefinition:
TTCN_Logger::log_event_str("{ frequency_Redefinition := ");
field_frequency__Redefinition->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_classmarkEnquiry:
TTCN_Logger::log_event_str("{ classmarkEnquiry := ");
field_classmarkEnquiry->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_mBMS__Announcement:
TTCN_Logger::log_event_str("{ mBMS_Announcement := ");
field_mBMS__Announcement->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_vGCS__UplinkGrant:
TTCN_Logger::log_event_str("{ vGCS_UplinkGrant := ");
field_vGCS__UplinkGrant->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_uplinkRelease:
TTCN_Logger::log_event_str("{ uplinkRelease := ");
field_uplinkRelease->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_uplinkBusy:
TTCN_Logger::log_event_str("{ uplinkBusy := ");
field_uplinkBusy->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_applicationInformation:
TTCN_Logger::log_event_str("{ applicationInformation := ");
field_applicationInformation->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_dTM__AssignmentCommand:
TTCN_Logger::log_event_str("{ dTM_AssignmentCommand := ");
field_dTM__AssignmentCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_dTM__Information:
TTCN_Logger::log_event_str("{ dTM_Information := ");
field_dTM__Information->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_dTM__Reject:
TTCN_Logger::log_event_str("{ dTM_Reject := ");
field_dTM__Reject->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_packetNotification:
TTCN_Logger::log_event_str("{ packetNotification := ");
field_packetNotification->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_interSystemToUTRAN__HandoverCommand:
TTCN_Logger::log_event_str("{ interSystemToUTRAN_HandoverCommand := ");
field_interSystemToUTRAN__HandoverCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_interSystemToCDMA2000HandoverCommand:
TTCN_Logger::log_event_str("{ interSystemToCDMA2000HandoverCommand := ");
field_interSystemToCDMA2000HandoverCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_interSystemToEUTRAN__HandoverCommand:
TTCN_Logger::log_event_str("{ interSystemToEUTRAN_HandoverCommand := ");
field_interSystemToEUTRAN__HandoverCommand->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

void PDU__RRM__NW__MS::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, "additionalAssignment")) {
    additionalAssignment().set_param(*mp_last);
    if (!additionalAssignment().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "immediatePacketAssignment")) {
    immediatePacketAssignment().set_param(*mp_last);
    if (!immediatePacketAssignment().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "cipheringModeCommand")) {
    cipheringModeCommand().set_param(*mp_last);
    if (!cipheringModeCommand().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "configurationChangeCommand")) {
    configurationChangeCommand().set_param(*mp_last);
    if (!configurationChangeCommand().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "assignmentCommand")) {
    assignmentCommand().set_param(*mp_last);
    if (!assignmentCommand().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "handoverCommand")) {
    handoverCommand().set_param(*mp_last);
    if (!handoverCommand().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "physicalInformation")) {
    physicalInformation().set_param(*mp_last);
    if (!physicalInformation().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "channelRelease")) {
    channelRelease().set_param(*mp_last);
    if (!channelRelease().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "partialRelease")) {
    partialRelease().set_param(*mp_last);
    if (!partialRelease().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "pagingReq_Type1")) {
    pagingReq__Type1().set_param(*mp_last);
    if (!pagingReq__Type1().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "pagingReq_Type2")) {
    pagingReq__Type2().set_param(*mp_last);
    if (!pagingReq__Type2().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "pagingReq_Type3")) {
    pagingReq__Type3().set_param(*mp_last);
    if (!pagingReq__Type3().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "channelModeModify")) {
    channelModeModify().set_param(*mp_last);
    if (!channelModeModify().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "rR_Status")) {
    rR__Status().set_param(*mp_last);
    if (!rR__Status().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "frequency_Redefinition")) {
    frequency__Redefinition().set_param(*mp_last);
    if (!frequency__Redefinition().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "classmarkEnquiry")) {
    classmarkEnquiry().set_param(*mp_last);
    if (!classmarkEnquiry().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "mBMS_Announcement")) {
    mBMS__Announcement().set_param(*mp_last);
    if (!mBMS__Announcement().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "vGCS_UplinkGrant")) {
    vGCS__UplinkGrant().set_param(*mp_last);
    if (!vGCS__UplinkGrant().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "uplinkRelease")) {
    uplinkRelease().set_param(*mp_last);
    if (!uplinkRelease().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "uplinkBusy")) {
    uplinkBusy().set_param(*mp_last);
    if (!uplinkBusy().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "applicationInformation")) {
    applicationInformation().set_param(*mp_last);
    if (!applicationInformation().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "dTM_AssignmentCommand")) {
    dTM__AssignmentCommand().set_param(*mp_last);
    if (!dTM__AssignmentCommand().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "dTM_Information")) {
    dTM__Information().set_param(*mp_last);
    if (!dTM__Information().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "dTM_Reject")) {
    dTM__Reject().set_param(*mp_last);
    if (!dTM__Reject().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "packetNotification")) {
    packetNotification().set_param(*mp_last);
    if (!packetNotification().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "interSystemToUTRAN_HandoverCommand")) {
    interSystemToUTRAN__HandoverCommand().set_param(*mp_last);
    if (!interSystemToUTRAN__HandoverCommand().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "interSystemToCDMA2000HandoverCommand")) {
    interSystemToCDMA2000HandoverCommand().set_param(*mp_last);
    if (!interSystemToCDMA2000HandoverCommand().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "interSystemToEUTRAN_HandoverCommand")) {
    interSystemToEUTRAN__HandoverCommand().set_param(*mp_last);
    if (!interSystemToEUTRAN__HandoverCommand().is_bound()) clean_up();
    return;
  }
  mp_last->error("Field %s does not exist in type @MobileL3_RRM_Types.PDU_RRM_NW_MS.", last_name);
}

void PDU__RRM__NW__MS::set_implicit_omit()
{
switch (union_selection) {
case ALT_additionalAssignment:
field_additionalAssignment->set_implicit_omit(); break;
case ALT_immediatePacketAssignment:
field_immediatePacketAssignment->set_implicit_omit(); break;
case ALT_cipheringModeCommand:
field_cipheringModeCommand->set_implicit_omit(); break;
case ALT_configurationChangeCommand:
field_configurationChangeCommand->set_implicit_omit(); break;
case ALT_assignmentCommand:
field_assignmentCommand->set_implicit_omit(); break;
case ALT_handoverCommand:
field_handoverCommand->set_implicit_omit(); break;
case ALT_physicalInformation:
field_physicalInformation->set_implicit_omit(); break;
case ALT_channelRelease:
field_channelRelease->set_implicit_omit(); break;
case ALT_partialRelease:
field_partialRelease->set_implicit_omit(); break;
case ALT_pagingReq__Type1:
field_pagingReq__Type1->set_implicit_omit(); break;
case ALT_pagingReq__Type2:
field_pagingReq__Type2->set_implicit_omit(); break;
case ALT_pagingReq__Type3:
field_pagingReq__Type3->set_implicit_omit(); break;
case ALT_channelModeModify:
field_channelModeModify->set_implicit_omit(); break;
case ALT_rR__Status:
field_rR__Status->set_implicit_omit(); break;
case ALT_frequency__Redefinition:
field_frequency__Redefinition->set_implicit_omit(); break;
case ALT_classmarkEnquiry:
field_classmarkEnquiry->set_implicit_omit(); break;
case ALT_mBMS__Announcement:
field_mBMS__Announcement->set_implicit_omit(); break;
case ALT_vGCS__UplinkGrant:
field_vGCS__UplinkGrant->set_implicit_omit(); break;
case ALT_uplinkRelease:
field_uplinkRelease->set_implicit_omit(); break;
case ALT_uplinkBusy:
field_uplinkBusy->set_implicit_omit(); break;
case ALT_applicationInformation:
field_applicationInformation->set_implicit_omit(); break;
case ALT_dTM__AssignmentCommand:
field_dTM__AssignmentCommand->set_implicit_omit(); break;
case ALT_dTM__Information:
field_dTM__Information->set_implicit_omit(); break;
case ALT_dTM__Reject:
field_dTM__Reject->set_implicit_omit(); break;
case ALT_packetNotification:
field_packetNotification->set_implicit_omit(); break;
case ALT_interSystemToUTRAN__HandoverCommand:
field_interSystemToUTRAN__HandoverCommand->set_implicit_omit(); break;
case ALT_interSystemToCDMA2000HandoverCommand:
field_interSystemToCDMA2000HandoverCommand->set_implicit_omit(); break;
case ALT_interSystemToEUTRAN__HandoverCommand:
field_interSystemToEUTRAN__HandoverCommand->set_implicit_omit(); break;
default: break;
}
}

void PDU__RRM__NW__MS::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_additionalAssignment:
field_additionalAssignment->encode_text(text_buf);
break;
case ALT_immediatePacketAssignment:
field_immediatePacketAssignment->encode_text(text_buf);
break;
case ALT_cipheringModeCommand:
field_cipheringModeCommand->encode_text(text_buf);
break;
case ALT_configurationChangeCommand:
field_configurationChangeCommand->encode_text(text_buf);
break;
case ALT_assignmentCommand:
field_assignmentCommand->encode_text(text_buf);
break;
case ALT_handoverCommand:
field_handoverCommand->encode_text(text_buf);
break;
case ALT_physicalInformation:
field_physicalInformation->encode_text(text_buf);
break;
case ALT_channelRelease:
field_channelRelease->encode_text(text_buf);
break;
case ALT_partialRelease:
field_partialRelease->encode_text(text_buf);
break;
case ALT_pagingReq__Type1:
field_pagingReq__Type1->encode_text(text_buf);
break;
case ALT_pagingReq__Type2:
field_pagingReq__Type2->encode_text(text_buf);
break;
case ALT_pagingReq__Type3:
field_pagingReq__Type3->encode_text(text_buf);
break;
case ALT_channelModeModify:
field_channelModeModify->encode_text(text_buf);
break;
case ALT_rR__Status:
field_rR__Status->encode_text(text_buf);
break;
case ALT_frequency__Redefinition:
field_frequency__Redefinition->encode_text(text_buf);
break;
case ALT_classmarkEnquiry:
field_classmarkEnquiry->encode_text(text_buf);
break;
case ALT_mBMS__Announcement:
field_mBMS__Announcement->encode_text(text_buf);
break;
case ALT_vGCS__UplinkGrant:
field_vGCS__UplinkGrant->encode_text(text_buf);
break;
case ALT_uplinkRelease:
field_uplinkRelease->encode_text(text_buf);
break;
case ALT_uplinkBusy:
field_uplinkBusy->encode_text(text_buf);
break;
case ALT_applicationInformation:
field_applicationInformation->encode_text(text_buf);
break;
case ALT_dTM__AssignmentCommand:
field_dTM__AssignmentCommand->encode_text(text_buf);
break;
case ALT_dTM__Information:
field_dTM__Information->encode_text(text_buf);
break;
case ALT_dTM__Reject:
field_dTM__Reject->encode_text(text_buf);
break;
case ALT_packetNotification:
field_packetNotification->encode_text(text_buf);
break;
case ALT_interSystemToUTRAN__HandoverCommand:
field_interSystemToUTRAN__HandoverCommand->encode_text(text_buf);
break;
case ALT_interSystemToCDMA2000HandoverCommand:
field_interSystemToCDMA2000HandoverCommand->encode_text(text_buf);
break;
case ALT_interSystemToEUTRAN__HandoverCommand:
field_interSystemToEUTRAN__HandoverCommand->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
}
}

void PDU__RRM__NW__MS::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_additionalAssignment:
additionalAssignment().decode_text(text_buf);
break;
case ALT_immediatePacketAssignment:
immediatePacketAssignment().decode_text(text_buf);
break;
case ALT_cipheringModeCommand:
cipheringModeCommand().decode_text(text_buf);
break;
case ALT_configurationChangeCommand:
configurationChangeCommand().decode_text(text_buf);
break;
case ALT_assignmentCommand:
assignmentCommand().decode_text(text_buf);
break;
case ALT_handoverCommand:
handoverCommand().decode_text(text_buf);
break;
case ALT_physicalInformation:
physicalInformation().decode_text(text_buf);
break;
case ALT_channelRelease:
channelRelease().decode_text(text_buf);
break;
case ALT_partialRelease:
partialRelease().decode_text(text_buf);
break;
case ALT_pagingReq__Type1:
pagingReq__Type1().decode_text(text_buf);
break;
case ALT_pagingReq__Type2:
pagingReq__Type2().decode_text(text_buf);
break;
case ALT_pagingReq__Type3:
pagingReq__Type3().decode_text(text_buf);
break;
case ALT_channelModeModify:
channelModeModify().decode_text(text_buf);
break;
case ALT_rR__Status:
rR__Status().decode_text(text_buf);
break;
case ALT_frequency__Redefinition:
frequency__Redefinition().decode_text(text_buf);
break;
case ALT_classmarkEnquiry:
classmarkEnquiry().decode_text(text_buf);
break;
case ALT_mBMS__Announcement:
mBMS__Announcement().decode_text(text_buf);
break;
case ALT_vGCS__UplinkGrant:
vGCS__UplinkGrant().decode_text(text_buf);
break;
case ALT_uplinkRelease:
uplinkRelease().decode_text(text_buf);
break;
case ALT_uplinkBusy:
uplinkBusy().decode_text(text_buf);
break;
case ALT_applicationInformation:
applicationInformation().decode_text(text_buf);
break;
case ALT_dTM__AssignmentCommand:
dTM__AssignmentCommand().decode_text(text_buf);
break;
case ALT_dTM__Information:
dTM__Information().decode_text(text_buf);
break;
case ALT_dTM__Reject:
dTM__Reject().decode_text(text_buf);
break;
case ALT_packetNotification:
packetNotification().decode_text(text_buf);
break;
case ALT_interSystemToUTRAN__HandoverCommand:
interSystemToUTRAN__HandoverCommand().decode_text(text_buf);
break;
case ALT_interSystemToCDMA2000HandoverCommand:
interSystemToCDMA2000HandoverCommand().decode_text(text_buf);
break;
case ALT_interSystemToEUTRAN__HandoverCommand:
interSystemToEUTRAN__HandoverCommand().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
}
}

void PDU__RRM__NW__MS::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 PDU__RRM__NW__MS::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 PDU__RRM__NW__MS::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, PDU__RRM__AdditionalAssignment__NW__MS_descr_.raw->forceomit);
      decoded_length = additionalAssignment().RAW_decode(PDU__RRM__AdditionalAssignment__NW__MS_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, PDU__RRM__ImmediatePacketAssignment__NW__MS_descr_.raw->forceomit);
      decoded_length = immediatePacketAssignment().RAW_decode(PDU__RRM__ImmediatePacketAssignment__NW__MS_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, PDU__RRM__CipheringModeCommand__NW__MS_descr_.raw->forceomit);
      decoded_length = cipheringModeCommand().RAW_decode(PDU__RRM__CipheringModeCommand__NW__MS_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, PDU__RRM__ConfigurationChangeCommand__NW__MS_descr_.raw->forceomit);
      decoded_length = configurationChangeCommand().RAW_decode(PDU__RRM__ConfigurationChangeCommand__NW__MS_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, PDU__RRM__AssignmentCommand__NW__MS_descr_.raw->forceomit);
      decoded_length = assignmentCommand().RAW_decode(PDU__RRM__AssignmentCommand__NW__MS_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, PDU__RRM__HandoverCommand__NW__MS_descr_.raw->forceomit);
      decoded_length = handoverCommand().RAW_decode(PDU__RRM__HandoverCommand__NW__MS_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, PDU__RRM__PhysicalInformation__NW__MS_descr_.raw->forceomit);
      decoded_length = physicalInformation().RAW_decode(PDU__RRM__PhysicalInformation__NW__MS_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, PDU__RRM__ChannelRelease__NW__MS_descr_.raw->forceomit);
      decoded_length = channelRelease().RAW_decode(PDU__RRM__ChannelRelease__NW__MS_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, PDU__RRM__PartialRelease__NW__MS_descr_.raw->forceomit);
      decoded_length = partialRelease().RAW_decode(PDU__RRM__PartialRelease__NW__MS_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, PDU__RRM__PagingReq__Type1__NW__MS_descr_.raw->forceomit);
      decoded_length = pagingReq__Type1().RAW_decode(PDU__RRM__PagingReq__Type1__NW__MS_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 10: {
      RAW_Force_Omit field_force_omit(10, force_omit, PDU__RRM__PagingReq__Type2__NW__MS_descr_.raw->forceomit);
      decoded_length = pagingReq__Type2().RAW_decode(PDU__RRM__PagingReq__Type2__NW__MS_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 11: {
      RAW_Force_Omit field_force_omit(11, force_omit, PDU__RRM__PagingReq__Type3__NW__MS_descr_.raw->forceomit);
      decoded_length = pagingReq__Type3().RAW_decode(PDU__RRM__PagingReq__Type3__NW__MS_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 12: {
      RAW_Force_Omit field_force_omit(12, force_omit, PDU__RRM__ChannelModeModify__NW__MS_descr_.raw->forceomit);
      decoded_length = channelModeModify().RAW_decode(PDU__RRM__ChannelModeModify__NW__MS_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 13: {
      RAW_Force_Omit field_force_omit(13, force_omit, PDU__RRM__RR__Status_descr_.raw->forceomit);
      decoded_length = rR__Status().RAW_decode(PDU__RRM__RR__Status_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 14: {
      RAW_Force_Omit field_force_omit(14, force_omit, PDU__RRM__Frequency__Redefinition__NW__MS_descr_.raw->forceomit);
      decoded_length = frequency__Redefinition().RAW_decode(PDU__RRM__Frequency__Redefinition__NW__MS_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 15: {
      RAW_Force_Omit field_force_omit(15, force_omit, PDU__RRM__ClassmarkEnquiry__NW__MS_descr_.raw->forceomit);
      decoded_length = classmarkEnquiry().RAW_decode(PDU__RRM__ClassmarkEnquiry__NW__MS_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 16: {
      RAW_Force_Omit field_force_omit(16, force_omit, MBMS__Announcement__NW__MS_descr_.raw->forceomit);
      decoded_length = mBMS__Announcement().RAW_decode(MBMS__Announcement__NW__MS_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 17: {
      RAW_Force_Omit field_force_omit(17, force_omit, PDU__RRM__VGCS__UplinkGrant__NW__MS_descr_.raw->forceomit);
      decoded_length = vGCS__UplinkGrant().RAW_decode(PDU__RRM__VGCS__UplinkGrant__NW__MS_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 18: {
      RAW_Force_Omit field_force_omit(18, force_omit, PDU__RRM__UplinkRelease_descr_.raw->forceomit);
      decoded_length = uplinkRelease().RAW_decode(PDU__RRM__UplinkRelease_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 19: {
      RAW_Force_Omit field_force_omit(19, force_omit, PDU__RRM__UplinkBusy__NW__MS_descr_.raw->forceomit);
      decoded_length = uplinkBusy().RAW_decode(PDU__RRM__UplinkBusy__NW__MS_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 20: {
      RAW_Force_Omit field_force_omit(20, force_omit, PDU__RRM__ApplicationInformation_descr_.raw->forceomit);
      decoded_length = applicationInformation().RAW_decode(PDU__RRM__ApplicationInformation_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 21: {
      RAW_Force_Omit field_force_omit(21, force_omit, PDU__RRM__DTM__AssignmentCommand__NW__MS_descr_.raw->forceomit);
      decoded_length = dTM__AssignmentCommand().RAW_decode(PDU__RRM__DTM__AssignmentCommand__NW__MS_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 22: {
      RAW_Force_Omit field_force_omit(22, force_omit, PDU__RRM__DTM__Information__NW__MS_descr_.raw->forceomit);
      decoded_length = dTM__Information().RAW_decode(PDU__RRM__DTM__Information__NW__MS_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 23: {
      RAW_Force_Omit field_force_omit(23, force_omit, PDU__RRM__DTM__Reject__NW__MS_descr_.raw->forceomit);
      decoded_length = dTM__Reject().RAW_decode(PDU__RRM__DTM__Reject__NW__MS_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 24: {
      RAW_Force_Omit field_force_omit(24, force_omit, PDU__RRM__PacketNotification__NW__MS_descr_.raw->forceomit);
      decoded_length = packetNotification().RAW_decode(PDU__RRM__PacketNotification__NW__MS_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 25: {
      RAW_Force_Omit field_force_omit(25, force_omit, PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_descr_.raw->forceomit);
      decoded_length = interSystemToUTRAN__HandoverCommand().RAW_decode(PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 26: {
      RAW_Force_Omit field_force_omit(26, force_omit, PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_descr_.raw->forceomit);
      decoded_length = interSystemToCDMA2000HandoverCommand().RAW_decode(PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    case 27: {
      RAW_Force_Omit field_force_omit(27, force_omit, PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_descr_.raw->forceomit);
      decoded_length = interSystemToEUTRAN__HandoverCommand().RAW_decode(PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_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_0;
    int decoded_0_length;
    already_failed = FALSE;
    if (!already_failed) {
      p_buf.set_pos_bit(starting_pos + 0);
      decoded_0_length = temporal_0.RAW_decode(General__Types::BIT8_descr_, p_buf, limit, top_bit_ord, TRUE);
      if (decoded_0_length > 0) {
        if (temporal_0 ==  bs_37) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(0, force_omit, PDU__RRM__AdditionalAssignment__NW__MS_descr_.raw->forceomit);
          decoded_length = additionalAssignment().RAW_decode(PDU__RRM__AdditionalAssignment__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_additionalAssignment).messageType() ==  bs_37) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_38) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(1, force_omit, PDU__RRM__ImmediatePacketAssignment__NW__MS_descr_.raw->forceomit);
          decoded_length = immediatePacketAssignment().RAW_decode(PDU__RRM__ImmediatePacketAssignment__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_immediatePacketAssignment).messageType() ==  bs_38) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_39) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(2, force_omit, PDU__RRM__CipheringModeCommand__NW__MS_descr_.raw->forceomit);
          decoded_length = cipheringModeCommand().RAW_decode(PDU__RRM__CipheringModeCommand__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_cipheringModeCommand).messageType() ==  bs_39) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_40) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(3, force_omit, PDU__RRM__ConfigurationChangeCommand__NW__MS_descr_.raw->forceomit);
          decoded_length = configurationChangeCommand().RAW_decode(PDU__RRM__ConfigurationChangeCommand__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_configurationChangeCommand).messageType() ==  bs_40) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_41) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(4, force_omit, PDU__RRM__AssignmentCommand__NW__MS_descr_.raw->forceomit);
          decoded_length = assignmentCommand().RAW_decode(PDU__RRM__AssignmentCommand__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_assignmentCommand).messageType() ==  bs_41) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_42) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(5, force_omit, PDU__RRM__HandoverCommand__NW__MS_descr_.raw->forceomit);
          decoded_length = handoverCommand().RAW_decode(PDU__RRM__HandoverCommand__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_handoverCommand).messageType() ==  bs_42) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_43) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(6, force_omit, PDU__RRM__PhysicalInformation__NW__MS_descr_.raw->forceomit);
          decoded_length = physicalInformation().RAW_decode(PDU__RRM__PhysicalInformation__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_physicalInformation).messageType() ==  bs_43) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_44) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(7, force_omit, PDU__RRM__ChannelRelease__NW__MS_descr_.raw->forceomit);
          decoded_length = channelRelease().RAW_decode(PDU__RRM__ChannelRelease__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_channelRelease).messageType() ==  bs_44) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_45) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(8, force_omit, PDU__RRM__PartialRelease__NW__MS_descr_.raw->forceomit);
          decoded_length = partialRelease().RAW_decode(PDU__RRM__PartialRelease__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_partialRelease).messageType() ==  bs_45) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_46) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(9, force_omit, PDU__RRM__PagingReq__Type1__NW__MS_descr_.raw->forceomit);
          decoded_length = pagingReq__Type1().RAW_decode(PDU__RRM__PagingReq__Type1__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_pagingReq__Type1).messageType() ==  bs_46) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_47) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(10, force_omit, PDU__RRM__PagingReq__Type2__NW__MS_descr_.raw->forceomit);
          decoded_length = pagingReq__Type2().RAW_decode(PDU__RRM__PagingReq__Type2__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_pagingReq__Type2).messageType() ==  bs_47) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_48) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(11, force_omit, PDU__RRM__PagingReq__Type3__NW__MS_descr_.raw->forceomit);
          decoded_length = pagingReq__Type3().RAW_decode(PDU__RRM__PagingReq__Type3__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_pagingReq__Type3).messageType() ==  bs_48) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_49) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(12, force_omit, PDU__RRM__ChannelModeModify__NW__MS_descr_.raw->forceomit);
          decoded_length = channelModeModify().RAW_decode(PDU__RRM__ChannelModeModify__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_channelModeModify).messageType() ==  bs_49) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_24) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(13, force_omit, PDU__RRM__RR__Status_descr_.raw->forceomit);
          decoded_length = rR__Status().RAW_decode(PDU__RRM__RR__Status_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_rR__Status).messageType() ==  bs_24) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_50) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(14, force_omit, PDU__RRM__Frequency__Redefinition__NW__MS_descr_.raw->forceomit);
          decoded_length = frequency__Redefinition().RAW_decode(PDU__RRM__Frequency__Redefinition__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_frequency__Redefinition).messageType() ==  bs_50) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_51) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(15, force_omit, PDU__RRM__ClassmarkEnquiry__NW__MS_descr_.raw->forceomit);
          decoded_length = classmarkEnquiry().RAW_decode(PDU__RRM__ClassmarkEnquiry__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_classmarkEnquiry).messageType() ==  bs_51) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_26) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(16, force_omit, MBMS__Announcement__NW__MS_descr_.raw->forceomit);
          decoded_length = mBMS__Announcement().RAW_decode(MBMS__Announcement__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_mBMS__Announcement).messageType() ==  bs_26) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_52) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(17, force_omit, PDU__RRM__VGCS__UplinkGrant__NW__MS_descr_.raw->forceomit);
          decoded_length = vGCS__UplinkGrant().RAW_decode(PDU__RRM__VGCS__UplinkGrant__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_vGCS__UplinkGrant).messageType() ==  bs_52) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_29) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(18, force_omit, PDU__RRM__UplinkRelease_descr_.raw->forceomit);
          decoded_length = uplinkRelease().RAW_decode(PDU__RRM__UplinkRelease_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_uplinkRelease).messageType() ==  bs_29) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_53) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(19, force_omit, PDU__RRM__UplinkBusy__NW__MS_descr_.raw->forceomit);
          decoded_length = uplinkBusy().RAW_decode(PDU__RRM__UplinkBusy__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_uplinkBusy).messageType() ==  bs_53) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_31) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(20, force_omit, PDU__RRM__ApplicationInformation_descr_.raw->forceomit);
          decoded_length = applicationInformation().RAW_decode(PDU__RRM__ApplicationInformation_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_applicationInformation).messageType() ==  bs_31) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_54) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(21, force_omit, PDU__RRM__DTM__AssignmentCommand__NW__MS_descr_.raw->forceomit);
          decoded_length = dTM__AssignmentCommand().RAW_decode(PDU__RRM__DTM__AssignmentCommand__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_dTM__AssignmentCommand).messageType() ==  bs_54) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_55) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(22, force_omit, PDU__RRM__DTM__Information__NW__MS_descr_.raw->forceomit);
          decoded_length = dTM__Information().RAW_decode(PDU__RRM__DTM__Information__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_dTM__Information).messageType() ==  bs_55) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_56) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(23, force_omit, PDU__RRM__DTM__Reject__NW__MS_descr_.raw->forceomit);
          decoded_length = dTM__Reject().RAW_decode(PDU__RRM__DTM__Reject__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_dTM__Reject).messageType() ==  bs_56) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_57) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(24, force_omit, PDU__RRM__PacketNotification__NW__MS_descr_.raw->forceomit);
          decoded_length = packetNotification().RAW_decode(PDU__RRM__PacketNotification__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_packetNotification).messageType() ==  bs_57) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_58) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(25, force_omit, PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_descr_.raw->forceomit);
          decoded_length = interSystemToUTRAN__HandoverCommand().RAW_decode(PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_interSystemToUTRAN__HandoverCommand).messageType() ==  bs_58) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_59) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(26, force_omit, PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_descr_.raw->forceomit);
          decoded_length = interSystemToCDMA2000HandoverCommand().RAW_decode(PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_interSystemToCDMA2000HandoverCommand).messageType() ==  bs_59) {
               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_0_length > 0) {
        if (temporal_0 ==  bs_60) {
          p_buf.set_pos_bit(starting_pos);
          RAW_Force_Omit field_force_omit(27, force_omit, PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_descr_.raw->forceomit);
          decoded_length = interSystemToEUTRAN__HandoverCommand().RAW_decode(PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_force_omit);
          if (decoded_length > 0) {
             if ((*field_interSystemToEUTRAN__HandoverCommand).messageType() ==  bs_60) {
               return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
             }else already_failed = TRUE;
          }
        }
      }
    }
 }
 clean_up();
 return -1;
}

int PDU__RRM__NW__MS::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
{
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 28;  myleaf.body.node.nodes = init_nodes_of_enc_tree(28);
  memset(myleaf.body.node.nodes, 0, 28 * sizeof(RAW_enc_tree *));
  switch (union_selection) {
  case ALT_additionalAssignment:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, PDU__RRM__AdditionalAssignment__NW__MS_descr_.raw);
    encoded_length = field_additionalAssignment->RAW_encode(PDU__RRM__AdditionalAssignment__NW__MS_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &PDU__RRM__AdditionalAssignment__NW__MS_descr_;
    if ((*field_additionalAssignment).messageType() !=  bs_37) {
  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_37.RAW_encode(General__Types::BIT8_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_immediatePacketAssignment:
    myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, PDU__RRM__ImmediatePacketAssignment__NW__MS_descr_.raw);
    encoded_length = field_immediatePacketAssignment->RAW_encode(PDU__RRM__ImmediatePacketAssignment__NW__MS_descr_, *myleaf.body.node.nodes[1]);
    myleaf.body.node.nodes[1]->coding_descr = &PDU__RRM__ImmediatePacketAssignment__NW__MS_descr_;
    if ((*field_immediatePacketAssignment).messageType() !=  bs_38) {
  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_38.RAW_encode(General__Types::BIT8_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_cipheringModeCommand:
    myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, PDU__RRM__CipheringModeCommand__NW__MS_descr_.raw);
    encoded_length = field_cipheringModeCommand->RAW_encode(PDU__RRM__CipheringModeCommand__NW__MS_descr_, *myleaf.body.node.nodes[2]);
    myleaf.body.node.nodes[2]->coding_descr = &PDU__RRM__CipheringModeCommand__NW__MS_descr_;
    if ((*field_cipheringModeCommand).messageType() !=  bs_39) {
  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_39.RAW_encode(General__Types::BIT8_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_configurationChangeCommand:
    myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 3, PDU__RRM__ConfigurationChangeCommand__NW__MS_descr_.raw);
    encoded_length = field_configurationChangeCommand->RAW_encode(PDU__RRM__ConfigurationChangeCommand__NW__MS_descr_, *myleaf.body.node.nodes[3]);
    myleaf.body.node.nodes[3]->coding_descr = &PDU__RRM__ConfigurationChangeCommand__NW__MS_descr_;
    if ((*field_configurationChangeCommand).messageType() !=  bs_40) {
  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_40.RAW_encode(General__Types::BIT8_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_assignmentCommand:
    myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 4, PDU__RRM__AssignmentCommand__NW__MS_descr_.raw);
    encoded_length = field_assignmentCommand->RAW_encode(PDU__RRM__AssignmentCommand__NW__MS_descr_, *myleaf.body.node.nodes[4]);
    myleaf.body.node.nodes[4]->coding_descr = &PDU__RRM__AssignmentCommand__NW__MS_descr_;
    if ((*field_assignmentCommand).messageType() !=  bs_41) {
  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_41.RAW_encode(General__Types::BIT8_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_handoverCommand:
    myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 5, PDU__RRM__HandoverCommand__NW__MS_descr_.raw);
    encoded_length = field_handoverCommand->RAW_encode(PDU__RRM__HandoverCommand__NW__MS_descr_, *myleaf.body.node.nodes[5]);
    myleaf.body.node.nodes[5]->coding_descr = &PDU__RRM__HandoverCommand__NW__MS_descr_;
    if ((*field_handoverCommand).messageType() !=  bs_42) {
  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_42.RAW_encode(General__Types::BIT8_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_physicalInformation:
    myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 6, PDU__RRM__PhysicalInformation__NW__MS_descr_.raw);
    encoded_length = field_physicalInformation->RAW_encode(PDU__RRM__PhysicalInformation__NW__MS_descr_, *myleaf.body.node.nodes[6]);
    myleaf.body.node.nodes[6]->coding_descr = &PDU__RRM__PhysicalInformation__NW__MS_descr_;
    if ((*field_physicalInformation).messageType() !=  bs_43) {
  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_43.RAW_encode(General__Types::BIT8_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_channelRelease:
    myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 7, PDU__RRM__ChannelRelease__NW__MS_descr_.raw);
    encoded_length = field_channelRelease->RAW_encode(PDU__RRM__ChannelRelease__NW__MS_descr_, *myleaf.body.node.nodes[7]);
    myleaf.body.node.nodes[7]->coding_descr = &PDU__RRM__ChannelRelease__NW__MS_descr_;
    if ((*field_channelRelease).messageType() !=  bs_44) {
  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_44.RAW_encode(General__Types::BIT8_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_partialRelease:
    myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 8, PDU__RRM__PartialRelease__NW__MS_descr_.raw);
    encoded_length = field_partialRelease->RAW_encode(PDU__RRM__PartialRelease__NW__MS_descr_, *myleaf.body.node.nodes[8]);
    myleaf.body.node.nodes[8]->coding_descr = &PDU__RRM__PartialRelease__NW__MS_descr_;
    if ((*field_partialRelease).messageType() !=  bs_45) {
  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_45.RAW_encode(General__Types::BIT8_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_pagingReq__Type1:
    myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 9, PDU__RRM__PagingReq__Type1__NW__MS_descr_.raw);
    encoded_length = field_pagingReq__Type1->RAW_encode(PDU__RRM__PagingReq__Type1__NW__MS_descr_, *myleaf.body.node.nodes[9]);
    myleaf.body.node.nodes[9]->coding_descr = &PDU__RRM__PagingReq__Type1__NW__MS_descr_;
    if ((*field_pagingReq__Type1).messageType() !=  bs_46) {
  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_46.RAW_encode(General__Types::BIT8_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_pagingReq__Type2:
    myleaf.body.node.nodes[10] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 10, PDU__RRM__PagingReq__Type2__NW__MS_descr_.raw);
    encoded_length = field_pagingReq__Type2->RAW_encode(PDU__RRM__PagingReq__Type2__NW__MS_descr_, *myleaf.body.node.nodes[10]);
    myleaf.body.node.nodes[10]->coding_descr = &PDU__RRM__PagingReq__Type2__NW__MS_descr_;
    if ((*field_pagingReq__Type2).messageType() !=  bs_47) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={10,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_47.RAW_encode(General__Types::BIT8_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_pagingReq__Type3:
    myleaf.body.node.nodes[11] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 11, PDU__RRM__PagingReq__Type3__NW__MS_descr_.raw);
    encoded_length = field_pagingReq__Type3->RAW_encode(PDU__RRM__PagingReq__Type3__NW__MS_descr_, *myleaf.body.node.nodes[11]);
    myleaf.body.node.nodes[11]->coding_descr = &PDU__RRM__PagingReq__Type3__NW__MS_descr_;
    if ((*field_pagingReq__Type3).messageType() !=  bs_48) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={11,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_48.RAW_encode(General__Types::BIT8_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_channelModeModify:
    myleaf.body.node.nodes[12] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 12, PDU__RRM__ChannelModeModify__NW__MS_descr_.raw);
    encoded_length = field_channelModeModify->RAW_encode(PDU__RRM__ChannelModeModify__NW__MS_descr_, *myleaf.body.node.nodes[12]);
    myleaf.body.node.nodes[12]->coding_descr = &PDU__RRM__ChannelModeModify__NW__MS_descr_;
    if ((*field_channelModeModify).messageType() !=  bs_49) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={12,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_49.RAW_encode(General__Types::BIT8_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_rR__Status:
    myleaf.body.node.nodes[13] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 13, PDU__RRM__RR__Status_descr_.raw);
    encoded_length = field_rR__Status->RAW_encode(PDU__RRM__RR__Status_descr_, *myleaf.body.node.nodes[13]);
    myleaf.body.node.nodes[13]->coding_descr = &PDU__RRM__RR__Status_descr_;
    if ((*field_rR__Status).messageType() !=  bs_24) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={13,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_24.RAW_encode(General__Types::BIT8_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_frequency__Redefinition:
    myleaf.body.node.nodes[14] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 14, PDU__RRM__Frequency__Redefinition__NW__MS_descr_.raw);
    encoded_length = field_frequency__Redefinition->RAW_encode(PDU__RRM__Frequency__Redefinition__NW__MS_descr_, *myleaf.body.node.nodes[14]);
    myleaf.body.node.nodes[14]->coding_descr = &PDU__RRM__Frequency__Redefinition__NW__MS_descr_;
    if ((*field_frequency__Redefinition).messageType() !=  bs_50) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={14,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_50.RAW_encode(General__Types::BIT8_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_classmarkEnquiry:
    myleaf.body.node.nodes[15] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 15, PDU__RRM__ClassmarkEnquiry__NW__MS_descr_.raw);
    encoded_length = field_classmarkEnquiry->RAW_encode(PDU__RRM__ClassmarkEnquiry__NW__MS_descr_, *myleaf.body.node.nodes[15]);
    myleaf.body.node.nodes[15]->coding_descr = &PDU__RRM__ClassmarkEnquiry__NW__MS_descr_;
    if ((*field_classmarkEnquiry).messageType() !=  bs_51) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={15,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_51.RAW_encode(General__Types::BIT8_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_mBMS__Announcement:
    myleaf.body.node.nodes[16] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 16, MBMS__Announcement__NW__MS_descr_.raw);
    encoded_length = field_mBMS__Announcement->RAW_encode(MBMS__Announcement__NW__MS_descr_, *myleaf.body.node.nodes[16]);
    myleaf.body.node.nodes[16]->coding_descr = &MBMS__Announcement__NW__MS_descr_;
    if ((*field_mBMS__Announcement).messageType() !=  bs_26) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={16,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_26.RAW_encode(General__Types::BIT8_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_vGCS__UplinkGrant:
    myleaf.body.node.nodes[17] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 17, PDU__RRM__VGCS__UplinkGrant__NW__MS_descr_.raw);
    encoded_length = field_vGCS__UplinkGrant->RAW_encode(PDU__RRM__VGCS__UplinkGrant__NW__MS_descr_, *myleaf.body.node.nodes[17]);
    myleaf.body.node.nodes[17]->coding_descr = &PDU__RRM__VGCS__UplinkGrant__NW__MS_descr_;
    if ((*field_vGCS__UplinkGrant).messageType() !=  bs_52) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={17,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_52.RAW_encode(General__Types::BIT8_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_uplinkRelease:
    myleaf.body.node.nodes[18] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 18, PDU__RRM__UplinkRelease_descr_.raw);
    encoded_length = field_uplinkRelease->RAW_encode(PDU__RRM__UplinkRelease_descr_, *myleaf.body.node.nodes[18]);
    myleaf.body.node.nodes[18]->coding_descr = &PDU__RRM__UplinkRelease_descr_;
    if ((*field_uplinkRelease).messageType() !=  bs_29) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={18,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_29.RAW_encode(General__Types::BIT8_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_uplinkBusy:
    myleaf.body.node.nodes[19] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 19, PDU__RRM__UplinkBusy__NW__MS_descr_.raw);
    encoded_length = field_uplinkBusy->RAW_encode(PDU__RRM__UplinkBusy__NW__MS_descr_, *myleaf.body.node.nodes[19]);
    myleaf.body.node.nodes[19]->coding_descr = &PDU__RRM__UplinkBusy__NW__MS_descr_;
    if ((*field_uplinkBusy).messageType() !=  bs_53) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={19,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_53.RAW_encode(General__Types::BIT8_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_applicationInformation:
    myleaf.body.node.nodes[20] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 20, PDU__RRM__ApplicationInformation_descr_.raw);
    encoded_length = field_applicationInformation->RAW_encode(PDU__RRM__ApplicationInformation_descr_, *myleaf.body.node.nodes[20]);
    myleaf.body.node.nodes[20]->coding_descr = &PDU__RRM__ApplicationInformation_descr_;
    if ((*field_applicationInformation).messageType() !=  bs_31) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={20,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_31.RAW_encode(General__Types::BIT8_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_dTM__AssignmentCommand:
    myleaf.body.node.nodes[21] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 21, PDU__RRM__DTM__AssignmentCommand__NW__MS_descr_.raw);
    encoded_length = field_dTM__AssignmentCommand->RAW_encode(PDU__RRM__DTM__AssignmentCommand__NW__MS_descr_, *myleaf.body.node.nodes[21]);
    myleaf.body.node.nodes[21]->coding_descr = &PDU__RRM__DTM__AssignmentCommand__NW__MS_descr_;
    if ((*field_dTM__AssignmentCommand).messageType() !=  bs_54) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={21,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_54.RAW_encode(General__Types::BIT8_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_dTM__Information:
    myleaf.body.node.nodes[22] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 22, PDU__RRM__DTM__Information__NW__MS_descr_.raw);
    encoded_length = field_dTM__Information->RAW_encode(PDU__RRM__DTM__Information__NW__MS_descr_, *myleaf.body.node.nodes[22]);
    myleaf.body.node.nodes[22]->coding_descr = &PDU__RRM__DTM__Information__NW__MS_descr_;
    if ((*field_dTM__Information).messageType() !=  bs_55) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={22,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_55.RAW_encode(General__Types::BIT8_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_dTM__Reject:
    myleaf.body.node.nodes[23] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 23, PDU__RRM__DTM__Reject__NW__MS_descr_.raw);
    encoded_length = field_dTM__Reject->RAW_encode(PDU__RRM__DTM__Reject__NW__MS_descr_, *myleaf.body.node.nodes[23]);
    myleaf.body.node.nodes[23]->coding_descr = &PDU__RRM__DTM__Reject__NW__MS_descr_;
    if ((*field_dTM__Reject).messageType() !=  bs_56) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={23,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_56.RAW_encode(General__Types::BIT8_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_packetNotification:
    myleaf.body.node.nodes[24] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 24, PDU__RRM__PacketNotification__NW__MS_descr_.raw);
    encoded_length = field_packetNotification->RAW_encode(PDU__RRM__PacketNotification__NW__MS_descr_, *myleaf.body.node.nodes[24]);
    myleaf.body.node.nodes[24]->coding_descr = &PDU__RRM__PacketNotification__NW__MS_descr_;
    if ((*field_packetNotification).messageType() !=  bs_57) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={24,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_57.RAW_encode(General__Types::BIT8_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_interSystemToUTRAN__HandoverCommand:
    myleaf.body.node.nodes[25] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 25, PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_descr_.raw);
    encoded_length = field_interSystemToUTRAN__HandoverCommand->RAW_encode(PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_descr_, *myleaf.body.node.nodes[25]);
    myleaf.body.node.nodes[25]->coding_descr = &PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_descr_;
    if ((*field_interSystemToUTRAN__HandoverCommand).messageType() !=  bs_58) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={25,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_58.RAW_encode(General__Types::BIT8_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_interSystemToCDMA2000HandoverCommand:
    myleaf.body.node.nodes[26] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 26, PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_descr_.raw);
    encoded_length = field_interSystemToCDMA2000HandoverCommand->RAW_encode(PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_descr_, *myleaf.body.node.nodes[26]);
    myleaf.body.node.nodes[26]->coding_descr = &PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_descr_;
    if ((*field_interSystemToCDMA2000HandoverCommand).messageType() !=  bs_59) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={26,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_59.RAW_encode(General__Types::BIT8_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_interSystemToEUTRAN__HandoverCommand:
    myleaf.body.node.nodes[27] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 27, PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_descr_.raw);
    encoded_length = field_interSystemToEUTRAN__HandoverCommand->RAW_encode(PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_descr_, *myleaf.body.node.nodes[27]);
    myleaf.body.node.nodes[27]->coding_descr = &PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_descr_;
    if ((*field_interSystemToEUTRAN__HandoverCommand).messageType() !=  bs_60) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={27,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_60.RAW_encode(General__Types::BIT8_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 PDU__RRM__NW__MS_template::copy_value(const PDU__RRM__NW__MS& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case PDU__RRM__NW__MS::ALT_additionalAssignment:
single_value.field_additionalAssignment = new PDU__RRM__AdditionalAssignment__NW__MS_template(other_value.additionalAssignment());
break;
case PDU__RRM__NW__MS::ALT_immediatePacketAssignment:
single_value.field_immediatePacketAssignment = new PDU__RRM__ImmediatePacketAssignment__NW__MS_template(other_value.immediatePacketAssignment());
break;
case PDU__RRM__NW__MS::ALT_cipheringModeCommand:
single_value.field_cipheringModeCommand = new PDU__RRM__CipheringModeCommand__NW__MS_template(other_value.cipheringModeCommand());
break;
case PDU__RRM__NW__MS::ALT_configurationChangeCommand:
single_value.field_configurationChangeCommand = new PDU__RRM__ConfigurationChangeCommand__NW__MS_template(other_value.configurationChangeCommand());
break;
case PDU__RRM__NW__MS::ALT_assignmentCommand:
single_value.field_assignmentCommand = new PDU__RRM__AssignmentCommand__NW__MS_template(other_value.assignmentCommand());
break;
case PDU__RRM__NW__MS::ALT_handoverCommand:
single_value.field_handoverCommand = new PDU__RRM__HandoverCommand__NW__MS_template(other_value.handoverCommand());
break;
case PDU__RRM__NW__MS::ALT_physicalInformation:
single_value.field_physicalInformation = new PDU__RRM__PhysicalInformation__NW__MS_template(other_value.physicalInformation());
break;
case PDU__RRM__NW__MS::ALT_channelRelease:
single_value.field_channelRelease = new PDU__RRM__ChannelRelease__NW__MS_template(other_value.channelRelease());
break;
case PDU__RRM__NW__MS::ALT_partialRelease:
single_value.field_partialRelease = new PDU__RRM__PartialRelease__NW__MS_template(other_value.partialRelease());
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type1:
single_value.field_pagingReq__Type1 = new PDU__RRM__PagingReq__Type1__NW__MS_template(other_value.pagingReq__Type1());
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type2:
single_value.field_pagingReq__Type2 = new PDU__RRM__PagingReq__Type2__NW__MS_template(other_value.pagingReq__Type2());
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type3:
single_value.field_pagingReq__Type3 = new PDU__RRM__PagingReq__Type3__NW__MS_template(other_value.pagingReq__Type3());
break;
case PDU__RRM__NW__MS::ALT_channelModeModify:
single_value.field_channelModeModify = new PDU__RRM__ChannelModeModify__NW__MS_template(other_value.channelModeModify());
break;
case PDU__RRM__NW__MS::ALT_rR__Status:
single_value.field_rR__Status = new PDU__RRM__RR__Status_template(other_value.rR__Status());
break;
case PDU__RRM__NW__MS::ALT_frequency__Redefinition:
single_value.field_frequency__Redefinition = new PDU__RRM__Frequency__Redefinition__NW__MS_template(other_value.frequency__Redefinition());
break;
case PDU__RRM__NW__MS::ALT_classmarkEnquiry:
single_value.field_classmarkEnquiry = new PDU__RRM__ClassmarkEnquiry__NW__MS_template(other_value.classmarkEnquiry());
break;
case PDU__RRM__NW__MS::ALT_mBMS__Announcement:
single_value.field_mBMS__Announcement = new MBMS__Announcement__NW__MS_template(other_value.mBMS__Announcement());
break;
case PDU__RRM__NW__MS::ALT_vGCS__UplinkGrant:
single_value.field_vGCS__UplinkGrant = new PDU__RRM__VGCS__UplinkGrant__NW__MS_template(other_value.vGCS__UplinkGrant());
break;
case PDU__RRM__NW__MS::ALT_uplinkRelease:
single_value.field_uplinkRelease = new PDU__RRM__UplinkRelease_template(other_value.uplinkRelease());
break;
case PDU__RRM__NW__MS::ALT_uplinkBusy:
single_value.field_uplinkBusy = new PDU__RRM__UplinkBusy__NW__MS_template(other_value.uplinkBusy());
break;
case PDU__RRM__NW__MS::ALT_applicationInformation:
single_value.field_applicationInformation = new PDU__RRM__ApplicationInformation_template(other_value.applicationInformation());
break;
case PDU__RRM__NW__MS::ALT_dTM__AssignmentCommand:
single_value.field_dTM__AssignmentCommand = new PDU__RRM__DTM__AssignmentCommand__NW__MS_template(other_value.dTM__AssignmentCommand());
break;
case PDU__RRM__NW__MS::ALT_dTM__Information:
single_value.field_dTM__Information = new PDU__RRM__DTM__Information__NW__MS_template(other_value.dTM__Information());
break;
case PDU__RRM__NW__MS::ALT_dTM__Reject:
single_value.field_dTM__Reject = new PDU__RRM__DTM__Reject__NW__MS_template(other_value.dTM__Reject());
break;
case PDU__RRM__NW__MS::ALT_packetNotification:
single_value.field_packetNotification = new PDU__RRM__PacketNotification__NW__MS_template(other_value.packetNotification());
break;
case PDU__RRM__NW__MS::ALT_interSystemToUTRAN__HandoverCommand:
single_value.field_interSystemToUTRAN__HandoverCommand = new PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_template(other_value.interSystemToUTRAN__HandoverCommand());
break;
case PDU__RRM__NW__MS::ALT_interSystemToCDMA2000HandoverCommand:
single_value.field_interSystemToCDMA2000HandoverCommand = new PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_template(other_value.interSystemToCDMA2000HandoverCommand());
break;
case PDU__RRM__NW__MS::ALT_interSystemToEUTRAN__HandoverCommand:
single_value.field_interSystemToEUTRAN__HandoverCommand = new PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_template(other_value.interSystemToEUTRAN__HandoverCommand());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
}
set_selection(SPECIFIC_VALUE);
}

void PDU__RRM__NW__MS_template::copy_template(const PDU__RRM__NW__MS_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 PDU__RRM__NW__MS::ALT_additionalAssignment:
single_value.field_additionalAssignment = new PDU__RRM__AdditionalAssignment__NW__MS_template(*other_value.single_value.field_additionalAssignment);
break;
case PDU__RRM__NW__MS::ALT_immediatePacketAssignment:
single_value.field_immediatePacketAssignment = new PDU__RRM__ImmediatePacketAssignment__NW__MS_template(*other_value.single_value.field_immediatePacketAssignment);
break;
case PDU__RRM__NW__MS::ALT_cipheringModeCommand:
single_value.field_cipheringModeCommand = new PDU__RRM__CipheringModeCommand__NW__MS_template(*other_value.single_value.field_cipheringModeCommand);
break;
case PDU__RRM__NW__MS::ALT_configurationChangeCommand:
single_value.field_configurationChangeCommand = new PDU__RRM__ConfigurationChangeCommand__NW__MS_template(*other_value.single_value.field_configurationChangeCommand);
break;
case PDU__RRM__NW__MS::ALT_assignmentCommand:
single_value.field_assignmentCommand = new PDU__RRM__AssignmentCommand__NW__MS_template(*other_value.single_value.field_assignmentCommand);
break;
case PDU__RRM__NW__MS::ALT_handoverCommand:
single_value.field_handoverCommand = new PDU__RRM__HandoverCommand__NW__MS_template(*other_value.single_value.field_handoverCommand);
break;
case PDU__RRM__NW__MS::ALT_physicalInformation:
single_value.field_physicalInformation = new PDU__RRM__PhysicalInformation__NW__MS_template(*other_value.single_value.field_physicalInformation);
break;
case PDU__RRM__NW__MS::ALT_channelRelease:
single_value.field_channelRelease = new PDU__RRM__ChannelRelease__NW__MS_template(*other_value.single_value.field_channelRelease);
break;
case PDU__RRM__NW__MS::ALT_partialRelease:
single_value.field_partialRelease = new PDU__RRM__PartialRelease__NW__MS_template(*other_value.single_value.field_partialRelease);
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type1:
single_value.field_pagingReq__Type1 = new PDU__RRM__PagingReq__Type1__NW__MS_template(*other_value.single_value.field_pagingReq__Type1);
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type2:
single_value.field_pagingReq__Type2 = new PDU__RRM__PagingReq__Type2__NW__MS_template(*other_value.single_value.field_pagingReq__Type2);
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type3:
single_value.field_pagingReq__Type3 = new PDU__RRM__PagingReq__Type3__NW__MS_template(*other_value.single_value.field_pagingReq__Type3);
break;
case PDU__RRM__NW__MS::ALT_channelModeModify:
single_value.field_channelModeModify = new PDU__RRM__ChannelModeModify__NW__MS_template(*other_value.single_value.field_channelModeModify);
break;
case PDU__RRM__NW__MS::ALT_rR__Status:
single_value.field_rR__Status = new PDU__RRM__RR__Status_template(*other_value.single_value.field_rR__Status);
break;
case PDU__RRM__NW__MS::ALT_frequency__Redefinition:
single_value.field_frequency__Redefinition = new PDU__RRM__Frequency__Redefinition__NW__MS_template(*other_value.single_value.field_frequency__Redefinition);
break;
case PDU__RRM__NW__MS::ALT_classmarkEnquiry:
single_value.field_classmarkEnquiry = new PDU__RRM__ClassmarkEnquiry__NW__MS_template(*other_value.single_value.field_classmarkEnquiry);
break;
case PDU__RRM__NW__MS::ALT_mBMS__Announcement:
single_value.field_mBMS__Announcement = new MBMS__Announcement__NW__MS_template(*other_value.single_value.field_mBMS__Announcement);
break;
case PDU__RRM__NW__MS::ALT_vGCS__UplinkGrant:
single_value.field_vGCS__UplinkGrant = new PDU__RRM__VGCS__UplinkGrant__NW__MS_template(*other_value.single_value.field_vGCS__UplinkGrant);
break;
case PDU__RRM__NW__MS::ALT_uplinkRelease:
single_value.field_uplinkRelease = new PDU__RRM__UplinkRelease_template(*other_value.single_value.field_uplinkRelease);
break;
case PDU__RRM__NW__MS::ALT_uplinkBusy:
single_value.field_uplinkBusy = new PDU__RRM__UplinkBusy__NW__MS_template(*other_value.single_value.field_uplinkBusy);
break;
case PDU__RRM__NW__MS::ALT_applicationInformation:
single_value.field_applicationInformation = new PDU__RRM__ApplicationInformation_template(*other_value.single_value.field_applicationInformation);
break;
case PDU__RRM__NW__MS::ALT_dTM__AssignmentCommand:
single_value.field_dTM__AssignmentCommand = new PDU__RRM__DTM__AssignmentCommand__NW__MS_template(*other_value.single_value.field_dTM__AssignmentCommand);
break;
case PDU__RRM__NW__MS::ALT_dTM__Information:
single_value.field_dTM__Information = new PDU__RRM__DTM__Information__NW__MS_template(*other_value.single_value.field_dTM__Information);
break;
case PDU__RRM__NW__MS::ALT_dTM__Reject:
single_value.field_dTM__Reject = new PDU__RRM__DTM__Reject__NW__MS_template(*other_value.single_value.field_dTM__Reject);
break;
case PDU__RRM__NW__MS::ALT_packetNotification:
single_value.field_packetNotification = new PDU__RRM__PacketNotification__NW__MS_template(*other_value.single_value.field_packetNotification);
break;
case PDU__RRM__NW__MS::ALT_interSystemToUTRAN__HandoverCommand:
single_value.field_interSystemToUTRAN__HandoverCommand = new PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_template(*other_value.single_value.field_interSystemToUTRAN__HandoverCommand);
break;
case PDU__RRM__NW__MS::ALT_interSystemToCDMA2000HandoverCommand:
single_value.field_interSystemToCDMA2000HandoverCommand = new PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_template(*other_value.single_value.field_interSystemToCDMA2000HandoverCommand);
break;
case PDU__RRM__NW__MS::ALT_interSystemToEUTRAN__HandoverCommand:
single_value.field_interSystemToEUTRAN__HandoverCommand = new PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_template(*other_value.single_value.field_interSystemToEUTRAN__HandoverCommand);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
}
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 PDU__RRM__NW__MS_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 PDU__RRM__NW__MS_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__RRM__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
}
set_selection(other_value);
}

PDU__RRM__NW__MS_template::PDU__RRM__NW__MS_template()
{
}

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

PDU__RRM__NW__MS_template::PDU__RRM__NW__MS_template(const PDU__RRM__NW__MS& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void PDU__RRM__NW__MS_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case PDU__RRM__NW__MS::ALT_additionalAssignment:
delete single_value.field_additionalAssignment;
break;
case PDU__RRM__NW__MS::ALT_immediatePacketAssignment:
delete single_value.field_immediatePacketAssignment;
break;
case PDU__RRM__NW__MS::ALT_cipheringModeCommand:
delete single_value.field_cipheringModeCommand;
break;
case PDU__RRM__NW__MS::ALT_configurationChangeCommand:
delete single_value.field_configurationChangeCommand;
break;
case PDU__RRM__NW__MS::ALT_assignmentCommand:
delete single_value.field_assignmentCommand;
break;
case PDU__RRM__NW__MS::ALT_handoverCommand:
delete single_value.field_handoverCommand;
break;
case PDU__RRM__NW__MS::ALT_physicalInformation:
delete single_value.field_physicalInformation;
break;
case PDU__RRM__NW__MS::ALT_channelRelease:
delete single_value.field_channelRelease;
break;
case PDU__RRM__NW__MS::ALT_partialRelease:
delete single_value.field_partialRelease;
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type1:
delete single_value.field_pagingReq__Type1;
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type2:
delete single_value.field_pagingReq__Type2;
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type3:
delete single_value.field_pagingReq__Type3;
break;
case PDU__RRM__NW__MS::ALT_channelModeModify:
delete single_value.field_channelModeModify;
break;
case PDU__RRM__NW__MS::ALT_rR__Status:
delete single_value.field_rR__Status;
break;
case PDU__RRM__NW__MS::ALT_frequency__Redefinition:
delete single_value.field_frequency__Redefinition;
break;
case PDU__RRM__NW__MS::ALT_classmarkEnquiry:
delete single_value.field_classmarkEnquiry;
break;
case PDU__RRM__NW__MS::ALT_mBMS__Announcement:
delete single_value.field_mBMS__Announcement;
break;
case PDU__RRM__NW__MS::ALT_vGCS__UplinkGrant:
delete single_value.field_vGCS__UplinkGrant;
break;
case PDU__RRM__NW__MS::ALT_uplinkRelease:
delete single_value.field_uplinkRelease;
break;
case PDU__RRM__NW__MS::ALT_uplinkBusy:
delete single_value.field_uplinkBusy;
break;
case PDU__RRM__NW__MS::ALT_applicationInformation:
delete single_value.field_applicationInformation;
break;
case PDU__RRM__NW__MS::ALT_dTM__AssignmentCommand:
delete single_value.field_dTM__AssignmentCommand;
break;
case PDU__RRM__NW__MS::ALT_dTM__Information:
delete single_value.field_dTM__Information;
break;
case PDU__RRM__NW__MS::ALT_dTM__Reject:
delete single_value.field_dTM__Reject;
break;
case PDU__RRM__NW__MS::ALT_packetNotification:
delete single_value.field_packetNotification;
break;
case PDU__RRM__NW__MS::ALT_interSystemToUTRAN__HandoverCommand:
delete single_value.field_interSystemToUTRAN__HandoverCommand;
break;
case PDU__RRM__NW__MS::ALT_interSystemToCDMA2000HandoverCommand:
delete single_value.field_interSystemToCDMA2000HandoverCommand;
break;
case PDU__RRM__NW__MS::ALT_interSystemToEUTRAN__HandoverCommand:
delete single_value.field_interSystemToEUTRAN__HandoverCommand;
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;
}

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

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

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

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

boolean PDU__RRM__NW__MS_template::match(const PDU__RRM__NW__MS& 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:
{
PDU__RRM__NW__MS::union_selection_type value_selection = other_value.get_selection();
if (value_selection == PDU__RRM__NW__MS::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case PDU__RRM__NW__MS::ALT_additionalAssignment:
return single_value.field_additionalAssignment->match(other_value.additionalAssignment(), legacy);
case PDU__RRM__NW__MS::ALT_immediatePacketAssignment:
return single_value.field_immediatePacketAssignment->match(other_value.immediatePacketAssignment(), legacy);
case PDU__RRM__NW__MS::ALT_cipheringModeCommand:
return single_value.field_cipheringModeCommand->match(other_value.cipheringModeCommand(), legacy);
case PDU__RRM__NW__MS::ALT_configurationChangeCommand:
return single_value.field_configurationChangeCommand->match(other_value.configurationChangeCommand(), legacy);
case PDU__RRM__NW__MS::ALT_assignmentCommand:
return single_value.field_assignmentCommand->match(other_value.assignmentCommand(), legacy);
case PDU__RRM__NW__MS::ALT_handoverCommand:
return single_value.field_handoverCommand->match(other_value.handoverCommand(), legacy);
case PDU__RRM__NW__MS::ALT_physicalInformation:
return single_value.field_physicalInformation->match(other_value.physicalInformation(), legacy);
case PDU__RRM__NW__MS::ALT_channelRelease:
return single_value.field_channelRelease->match(other_value.channelRelease(), legacy);
case PDU__RRM__NW__MS::ALT_partialRelease:
return single_value.field_partialRelease->match(other_value.partialRelease(), legacy);
case PDU__RRM__NW__MS::ALT_pagingReq__Type1:
return single_value.field_pagingReq__Type1->match(other_value.pagingReq__Type1(), legacy);
case PDU__RRM__NW__MS::ALT_pagingReq__Type2:
return single_value.field_pagingReq__Type2->match(other_value.pagingReq__Type2(), legacy);
case PDU__RRM__NW__MS::ALT_pagingReq__Type3:
return single_value.field_pagingReq__Type3->match(other_value.pagingReq__Type3(), legacy);
case PDU__RRM__NW__MS::ALT_channelModeModify:
return single_value.field_channelModeModify->match(other_value.channelModeModify(), legacy);
case PDU__RRM__NW__MS::ALT_rR__Status:
return single_value.field_rR__Status->match(other_value.rR__Status(), legacy);
case PDU__RRM__NW__MS::ALT_frequency__Redefinition:
return single_value.field_frequency__Redefinition->match(other_value.frequency__Redefinition(), legacy);
case PDU__RRM__NW__MS::ALT_classmarkEnquiry:
return single_value.field_classmarkEnquiry->match(other_value.classmarkEnquiry(), legacy);
case PDU__RRM__NW__MS::ALT_mBMS__Announcement:
return single_value.field_mBMS__Announcement->match(other_value.mBMS__Announcement(), legacy);
case PDU__RRM__NW__MS::ALT_vGCS__UplinkGrant:
return single_value.field_vGCS__UplinkGrant->match(other_value.vGCS__UplinkGrant(), legacy);
case PDU__RRM__NW__MS::ALT_uplinkRelease:
return single_value.field_uplinkRelease->match(other_value.uplinkRelease(), legacy);
case PDU__RRM__NW__MS::ALT_uplinkBusy:
return single_value.field_uplinkBusy->match(other_value.uplinkBusy(), legacy);
case PDU__RRM__NW__MS::ALT_applicationInformation:
return single_value.field_applicationInformation->match(other_value.applicationInformation(), legacy);
case PDU__RRM__NW__MS::ALT_dTM__AssignmentCommand:
return single_value.field_dTM__AssignmentCommand->match(other_value.dTM__AssignmentCommand(), legacy);
case PDU__RRM__NW__MS::ALT_dTM__Information:
return single_value.field_dTM__Information->match(other_value.dTM__Information(), legacy);
case PDU__RRM__NW__MS::ALT_dTM__Reject:
return single_value.field_dTM__Reject->match(other_value.dTM__Reject(), legacy);
case PDU__RRM__NW__MS::ALT_packetNotification:
return single_value.field_packetNotification->match(other_value.packetNotification(), legacy);
case PDU__RRM__NW__MS::ALT_interSystemToUTRAN__HandoverCommand:
return single_value.field_interSystemToUTRAN__HandoverCommand->match(other_value.interSystemToUTRAN__HandoverCommand(), legacy);
case PDU__RRM__NW__MS::ALT_interSystemToCDMA2000HandoverCommand:
return single_value.field_interSystemToCDMA2000HandoverCommand->match(other_value.interSystemToCDMA2000HandoverCommand(), legacy);
case PDU__RRM__NW__MS::ALT_interSystemToEUTRAN__HandoverCommand:
return single_value.field_interSystemToEUTRAN__HandoverCommand->match(other_value.interSystemToEUTRAN__HandoverCommand(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
}
}
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 @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
}
return FALSE;
}

boolean PDU__RRM__NW__MS_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case PDU__RRM__NW__MS::ALT_additionalAssignment:
return single_value.field_additionalAssignment->is_value();
case PDU__RRM__NW__MS::ALT_immediatePacketAssignment:
return single_value.field_immediatePacketAssignment->is_value();
case PDU__RRM__NW__MS::ALT_cipheringModeCommand:
return single_value.field_cipheringModeCommand->is_value();
case PDU__RRM__NW__MS::ALT_configurationChangeCommand:
return single_value.field_configurationChangeCommand->is_value();
case PDU__RRM__NW__MS::ALT_assignmentCommand:
return single_value.field_assignmentCommand->is_value();
case PDU__RRM__NW__MS::ALT_handoverCommand:
return single_value.field_handoverCommand->is_value();
case PDU__RRM__NW__MS::ALT_physicalInformation:
return single_value.field_physicalInformation->is_value();
case PDU__RRM__NW__MS::ALT_channelRelease:
return single_value.field_channelRelease->is_value();
case PDU__RRM__NW__MS::ALT_partialRelease:
return single_value.field_partialRelease->is_value();
case PDU__RRM__NW__MS::ALT_pagingReq__Type1:
return single_value.field_pagingReq__Type1->is_value();
case PDU__RRM__NW__MS::ALT_pagingReq__Type2:
return single_value.field_pagingReq__Type2->is_value();
case PDU__RRM__NW__MS::ALT_pagingReq__Type3:
return single_value.field_pagingReq__Type3->is_value();
case PDU__RRM__NW__MS::ALT_channelModeModify:
return single_value.field_channelModeModify->is_value();
case PDU__RRM__NW__MS::ALT_rR__Status:
return single_value.field_rR__Status->is_value();
case PDU__RRM__NW__MS::ALT_frequency__Redefinition:
return single_value.field_frequency__Redefinition->is_value();
case PDU__RRM__NW__MS::ALT_classmarkEnquiry:
return single_value.field_classmarkEnquiry->is_value();
case PDU__RRM__NW__MS::ALT_mBMS__Announcement:
return single_value.field_mBMS__Announcement->is_value();
case PDU__RRM__NW__MS::ALT_vGCS__UplinkGrant:
return single_value.field_vGCS__UplinkGrant->is_value();
case PDU__RRM__NW__MS::ALT_uplinkRelease:
return single_value.field_uplinkRelease->is_value();
case PDU__RRM__NW__MS::ALT_uplinkBusy:
return single_value.field_uplinkBusy->is_value();
case PDU__RRM__NW__MS::ALT_applicationInformation:
return single_value.field_applicationInformation->is_value();
case PDU__RRM__NW__MS::ALT_dTM__AssignmentCommand:
return single_value.field_dTM__AssignmentCommand->is_value();
case PDU__RRM__NW__MS::ALT_dTM__Information:
return single_value.field_dTM__Information->is_value();
case PDU__RRM__NW__MS::ALT_dTM__Reject:
return single_value.field_dTM__Reject->is_value();
case PDU__RRM__NW__MS::ALT_packetNotification:
return single_value.field_packetNotification->is_value();
case PDU__RRM__NW__MS::ALT_interSystemToUTRAN__HandoverCommand:
return single_value.field_interSystemToUTRAN__HandoverCommand->is_value();
case PDU__RRM__NW__MS::ALT_interSystemToCDMA2000HandoverCommand:
return single_value.field_interSystemToCDMA2000HandoverCommand->is_value();
case PDU__RRM__NW__MS::ALT_interSystemToEUTRAN__HandoverCommand:
return single_value.field_interSystemToEUTRAN__HandoverCommand->is_value();
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
}
}

PDU__RRM__NW__MS PDU__RRM__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
PDU__RRM__NW__MS ret_val;
switch (single_value.union_selection) {
case PDU__RRM__NW__MS::ALT_additionalAssignment:
ret_val.additionalAssignment() = single_value.field_additionalAssignment->valueof();
break;
case PDU__RRM__NW__MS::ALT_immediatePacketAssignment:
ret_val.immediatePacketAssignment() = single_value.field_immediatePacketAssignment->valueof();
break;
case PDU__RRM__NW__MS::ALT_cipheringModeCommand:
ret_val.cipheringModeCommand() = single_value.field_cipheringModeCommand->valueof();
break;
case PDU__RRM__NW__MS::ALT_configurationChangeCommand:
ret_val.configurationChangeCommand() = single_value.field_configurationChangeCommand->valueof();
break;
case PDU__RRM__NW__MS::ALT_assignmentCommand:
ret_val.assignmentCommand() = single_value.field_assignmentCommand->valueof();
break;
case PDU__RRM__NW__MS::ALT_handoverCommand:
ret_val.handoverCommand() = single_value.field_handoverCommand->valueof();
break;
case PDU__RRM__NW__MS::ALT_physicalInformation:
ret_val.physicalInformation() = single_value.field_physicalInformation->valueof();
break;
case PDU__RRM__NW__MS::ALT_channelRelease:
ret_val.channelRelease() = single_value.field_channelRelease->valueof();
break;
case PDU__RRM__NW__MS::ALT_partialRelease:
ret_val.partialRelease() = single_value.field_partialRelease->valueof();
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type1:
ret_val.pagingReq__Type1() = single_value.field_pagingReq__Type1->valueof();
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type2:
ret_val.pagingReq__Type2() = single_value.field_pagingReq__Type2->valueof();
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type3:
ret_val.pagingReq__Type3() = single_value.field_pagingReq__Type3->valueof();
break;
case PDU__RRM__NW__MS::ALT_channelModeModify:
ret_val.channelModeModify() = single_value.field_channelModeModify->valueof();
break;
case PDU__RRM__NW__MS::ALT_rR__Status:
ret_val.rR__Status() = single_value.field_rR__Status->valueof();
break;
case PDU__RRM__NW__MS::ALT_frequency__Redefinition:
ret_val.frequency__Redefinition() = single_value.field_frequency__Redefinition->valueof();
break;
case PDU__RRM__NW__MS::ALT_classmarkEnquiry:
ret_val.classmarkEnquiry() = single_value.field_classmarkEnquiry->valueof();
break;
case PDU__RRM__NW__MS::ALT_mBMS__Announcement:
ret_val.mBMS__Announcement() = single_value.field_mBMS__Announcement->valueof();
break;
case PDU__RRM__NW__MS::ALT_vGCS__UplinkGrant:
ret_val.vGCS__UplinkGrant() = single_value.field_vGCS__UplinkGrant->valueof();
break;
case PDU__RRM__NW__MS::ALT_uplinkRelease:
ret_val.uplinkRelease() = single_value.field_uplinkRelease->valueof();
break;
case PDU__RRM__NW__MS::ALT_uplinkBusy:
ret_val.uplinkBusy() = single_value.field_uplinkBusy->valueof();
break;
case PDU__RRM__NW__MS::ALT_applicationInformation:
ret_val.applicationInformation() = single_value.field_applicationInformation->valueof();
break;
case PDU__RRM__NW__MS::ALT_dTM__AssignmentCommand:
ret_val.dTM__AssignmentCommand() = single_value.field_dTM__AssignmentCommand->valueof();
break;
case PDU__RRM__NW__MS::ALT_dTM__Information:
ret_val.dTM__Information() = single_value.field_dTM__Information->valueof();
break;
case PDU__RRM__NW__MS::ALT_dTM__Reject:
ret_val.dTM__Reject() = single_value.field_dTM__Reject->valueof();
break;
case PDU__RRM__NW__MS::ALT_packetNotification:
ret_val.packetNotification() = single_value.field_packetNotification->valueof();
break;
case PDU__RRM__NW__MS::ALT_interSystemToUTRAN__HandoverCommand:
ret_val.interSystemToUTRAN__HandoverCommand() = single_value.field_interSystemToUTRAN__HandoverCommand->valueof();
break;
case PDU__RRM__NW__MS::ALT_interSystemToCDMA2000HandoverCommand:
ret_val.interSystemToCDMA2000HandoverCommand() = single_value.field_interSystemToCDMA2000HandoverCommand->valueof();
break;
case PDU__RRM__NW__MS::ALT_interSystemToEUTRAN__HandoverCommand:
ret_val.interSystemToEUTRAN__HandoverCommand() = single_value.field_interSystemToEUTRAN__HandoverCommand->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
}
return ret_val;
}

PDU__RRM__NW__MS_template& PDU__RRM__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return value_list.list_value[list_index];
}
void PDU__RRM__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__RRM__NW__MS_template[list_length];
}

PDU__RRM__AdditionalAssignment__NW__MS_template& PDU__RRM__NW__MS_template::additionalAssignment()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_additionalAssignment) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_additionalAssignment = new PDU__RRM__AdditionalAssignment__NW__MS_template(ANY_VALUE);
else single_value.field_additionalAssignment = new PDU__RRM__AdditionalAssignment__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_additionalAssignment;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_additionalAssignment;
}

const PDU__RRM__AdditionalAssignment__NW__MS_template& PDU__RRM__NW__MS_template::additionalAssignment() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field additionalAssignment in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_additionalAssignment) TTCN_error("Accessing non-selected field additionalAssignment in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_additionalAssignment;
}

PDU__RRM__ImmediatePacketAssignment__NW__MS_template& PDU__RRM__NW__MS_template::immediatePacketAssignment()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_immediatePacketAssignment) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_immediatePacketAssignment = new PDU__RRM__ImmediatePacketAssignment__NW__MS_template(ANY_VALUE);
else single_value.field_immediatePacketAssignment = new PDU__RRM__ImmediatePacketAssignment__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_immediatePacketAssignment;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_immediatePacketAssignment;
}

const PDU__RRM__ImmediatePacketAssignment__NW__MS_template& PDU__RRM__NW__MS_template::immediatePacketAssignment() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field immediatePacketAssignment in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_immediatePacketAssignment) TTCN_error("Accessing non-selected field immediatePacketAssignment in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_immediatePacketAssignment;
}

PDU__RRM__CipheringModeCommand__NW__MS_template& PDU__RRM__NW__MS_template::cipheringModeCommand()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_cipheringModeCommand) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_cipheringModeCommand = new PDU__RRM__CipheringModeCommand__NW__MS_template(ANY_VALUE);
else single_value.field_cipheringModeCommand = new PDU__RRM__CipheringModeCommand__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_cipheringModeCommand;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_cipheringModeCommand;
}

const PDU__RRM__CipheringModeCommand__NW__MS_template& PDU__RRM__NW__MS_template::cipheringModeCommand() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field cipheringModeCommand in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_cipheringModeCommand) TTCN_error("Accessing non-selected field cipheringModeCommand in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_cipheringModeCommand;
}

PDU__RRM__ConfigurationChangeCommand__NW__MS_template& PDU__RRM__NW__MS_template::configurationChangeCommand()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_configurationChangeCommand) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_configurationChangeCommand = new PDU__RRM__ConfigurationChangeCommand__NW__MS_template(ANY_VALUE);
else single_value.field_configurationChangeCommand = new PDU__RRM__ConfigurationChangeCommand__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_configurationChangeCommand;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_configurationChangeCommand;
}

const PDU__RRM__ConfigurationChangeCommand__NW__MS_template& PDU__RRM__NW__MS_template::configurationChangeCommand() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field configurationChangeCommand in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_configurationChangeCommand) TTCN_error("Accessing non-selected field configurationChangeCommand in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_configurationChangeCommand;
}

PDU__RRM__AssignmentCommand__NW__MS_template& PDU__RRM__NW__MS_template::assignmentCommand()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_assignmentCommand) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_assignmentCommand = new PDU__RRM__AssignmentCommand__NW__MS_template(ANY_VALUE);
else single_value.field_assignmentCommand = new PDU__RRM__AssignmentCommand__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_assignmentCommand;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_assignmentCommand;
}

const PDU__RRM__AssignmentCommand__NW__MS_template& PDU__RRM__NW__MS_template::assignmentCommand() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field assignmentCommand in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_assignmentCommand) TTCN_error("Accessing non-selected field assignmentCommand in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_assignmentCommand;
}

PDU__RRM__HandoverCommand__NW__MS_template& PDU__RRM__NW__MS_template::handoverCommand()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_handoverCommand) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_handoverCommand = new PDU__RRM__HandoverCommand__NW__MS_template(ANY_VALUE);
else single_value.field_handoverCommand = new PDU__RRM__HandoverCommand__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_handoverCommand;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_handoverCommand;
}

const PDU__RRM__HandoverCommand__NW__MS_template& PDU__RRM__NW__MS_template::handoverCommand() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field handoverCommand in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_handoverCommand) TTCN_error("Accessing non-selected field handoverCommand in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_handoverCommand;
}

PDU__RRM__PhysicalInformation__NW__MS_template& PDU__RRM__NW__MS_template::physicalInformation()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_physicalInformation) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_physicalInformation = new PDU__RRM__PhysicalInformation__NW__MS_template(ANY_VALUE);
else single_value.field_physicalInformation = new PDU__RRM__PhysicalInformation__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_physicalInformation;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_physicalInformation;
}

const PDU__RRM__PhysicalInformation__NW__MS_template& PDU__RRM__NW__MS_template::physicalInformation() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field physicalInformation in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_physicalInformation) TTCN_error("Accessing non-selected field physicalInformation in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_physicalInformation;
}

PDU__RRM__ChannelRelease__NW__MS_template& PDU__RRM__NW__MS_template::channelRelease()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_channelRelease) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_channelRelease = new PDU__RRM__ChannelRelease__NW__MS_template(ANY_VALUE);
else single_value.field_channelRelease = new PDU__RRM__ChannelRelease__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_channelRelease;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_channelRelease;
}

const PDU__RRM__ChannelRelease__NW__MS_template& PDU__RRM__NW__MS_template::channelRelease() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field channelRelease in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_channelRelease) TTCN_error("Accessing non-selected field channelRelease in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_channelRelease;
}

PDU__RRM__PartialRelease__NW__MS_template& PDU__RRM__NW__MS_template::partialRelease()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_partialRelease) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_partialRelease = new PDU__RRM__PartialRelease__NW__MS_template(ANY_VALUE);
else single_value.field_partialRelease = new PDU__RRM__PartialRelease__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_partialRelease;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_partialRelease;
}

const PDU__RRM__PartialRelease__NW__MS_template& PDU__RRM__NW__MS_template::partialRelease() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field partialRelease in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_partialRelease) TTCN_error("Accessing non-selected field partialRelease in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_partialRelease;
}

PDU__RRM__PagingReq__Type1__NW__MS_template& PDU__RRM__NW__MS_template::pagingReq__Type1()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_pagingReq__Type1) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_pagingReq__Type1 = new PDU__RRM__PagingReq__Type1__NW__MS_template(ANY_VALUE);
else single_value.field_pagingReq__Type1 = new PDU__RRM__PagingReq__Type1__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_pagingReq__Type1;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_pagingReq__Type1;
}

const PDU__RRM__PagingReq__Type1__NW__MS_template& PDU__RRM__NW__MS_template::pagingReq__Type1() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field pagingReq_Type1 in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_pagingReq__Type1) TTCN_error("Accessing non-selected field pagingReq_Type1 in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_pagingReq__Type1;
}

PDU__RRM__PagingReq__Type2__NW__MS_template& PDU__RRM__NW__MS_template::pagingReq__Type2()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_pagingReq__Type2) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_pagingReq__Type2 = new PDU__RRM__PagingReq__Type2__NW__MS_template(ANY_VALUE);
else single_value.field_pagingReq__Type2 = new PDU__RRM__PagingReq__Type2__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_pagingReq__Type2;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_pagingReq__Type2;
}

const PDU__RRM__PagingReq__Type2__NW__MS_template& PDU__RRM__NW__MS_template::pagingReq__Type2() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field pagingReq_Type2 in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_pagingReq__Type2) TTCN_error("Accessing non-selected field pagingReq_Type2 in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_pagingReq__Type2;
}

PDU__RRM__PagingReq__Type3__NW__MS_template& PDU__RRM__NW__MS_template::pagingReq__Type3()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_pagingReq__Type3) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_pagingReq__Type3 = new PDU__RRM__PagingReq__Type3__NW__MS_template(ANY_VALUE);
else single_value.field_pagingReq__Type3 = new PDU__RRM__PagingReq__Type3__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_pagingReq__Type3;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_pagingReq__Type3;
}

const PDU__RRM__PagingReq__Type3__NW__MS_template& PDU__RRM__NW__MS_template::pagingReq__Type3() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field pagingReq_Type3 in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_pagingReq__Type3) TTCN_error("Accessing non-selected field pagingReq_Type3 in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_pagingReq__Type3;
}

PDU__RRM__ChannelModeModify__NW__MS_template& PDU__RRM__NW__MS_template::channelModeModify()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_channelModeModify) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_channelModeModify = new PDU__RRM__ChannelModeModify__NW__MS_template(ANY_VALUE);
else single_value.field_channelModeModify = new PDU__RRM__ChannelModeModify__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_channelModeModify;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_channelModeModify;
}

const PDU__RRM__ChannelModeModify__NW__MS_template& PDU__RRM__NW__MS_template::channelModeModify() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field channelModeModify in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_channelModeModify) TTCN_error("Accessing non-selected field channelModeModify in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_channelModeModify;
}

PDU__RRM__RR__Status_template& PDU__RRM__NW__MS_template::rR__Status()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_rR__Status) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_rR__Status = new PDU__RRM__RR__Status_template(ANY_VALUE);
else single_value.field_rR__Status = new PDU__RRM__RR__Status_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_rR__Status;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_rR__Status;
}

const PDU__RRM__RR__Status_template& PDU__RRM__NW__MS_template::rR__Status() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field rR_Status in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_rR__Status) TTCN_error("Accessing non-selected field rR_Status in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_rR__Status;
}

PDU__RRM__Frequency__Redefinition__NW__MS_template& PDU__RRM__NW__MS_template::frequency__Redefinition()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_frequency__Redefinition) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_frequency__Redefinition = new PDU__RRM__Frequency__Redefinition__NW__MS_template(ANY_VALUE);
else single_value.field_frequency__Redefinition = new PDU__RRM__Frequency__Redefinition__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_frequency__Redefinition;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_frequency__Redefinition;
}

const PDU__RRM__Frequency__Redefinition__NW__MS_template& PDU__RRM__NW__MS_template::frequency__Redefinition() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field frequency_Redefinition in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_frequency__Redefinition) TTCN_error("Accessing non-selected field frequency_Redefinition in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_frequency__Redefinition;
}

PDU__RRM__ClassmarkEnquiry__NW__MS_template& PDU__RRM__NW__MS_template::classmarkEnquiry()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_classmarkEnquiry) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_classmarkEnquiry = new PDU__RRM__ClassmarkEnquiry__NW__MS_template(ANY_VALUE);
else single_value.field_classmarkEnquiry = new PDU__RRM__ClassmarkEnquiry__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_classmarkEnquiry;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_classmarkEnquiry;
}

const PDU__RRM__ClassmarkEnquiry__NW__MS_template& PDU__RRM__NW__MS_template::classmarkEnquiry() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field classmarkEnquiry in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_classmarkEnquiry) TTCN_error("Accessing non-selected field classmarkEnquiry in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_classmarkEnquiry;
}

MBMS__Announcement__NW__MS_template& PDU__RRM__NW__MS_template::mBMS__Announcement()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_mBMS__Announcement) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_mBMS__Announcement = new MBMS__Announcement__NW__MS_template(ANY_VALUE);
else single_value.field_mBMS__Announcement = new MBMS__Announcement__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_mBMS__Announcement;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_mBMS__Announcement;
}

const MBMS__Announcement__NW__MS_template& PDU__RRM__NW__MS_template::mBMS__Announcement() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field mBMS_Announcement in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_mBMS__Announcement) TTCN_error("Accessing non-selected field mBMS_Announcement in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_mBMS__Announcement;
}

PDU__RRM__VGCS__UplinkGrant__NW__MS_template& PDU__RRM__NW__MS_template::vGCS__UplinkGrant()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_vGCS__UplinkGrant) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_vGCS__UplinkGrant = new PDU__RRM__VGCS__UplinkGrant__NW__MS_template(ANY_VALUE);
else single_value.field_vGCS__UplinkGrant = new PDU__RRM__VGCS__UplinkGrant__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_vGCS__UplinkGrant;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_vGCS__UplinkGrant;
}

const PDU__RRM__VGCS__UplinkGrant__NW__MS_template& PDU__RRM__NW__MS_template::vGCS__UplinkGrant() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field vGCS_UplinkGrant in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_vGCS__UplinkGrant) TTCN_error("Accessing non-selected field vGCS_UplinkGrant in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_vGCS__UplinkGrant;
}

PDU__RRM__UplinkRelease_template& PDU__RRM__NW__MS_template::uplinkRelease()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_uplinkRelease) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_uplinkRelease = new PDU__RRM__UplinkRelease_template(ANY_VALUE);
else single_value.field_uplinkRelease = new PDU__RRM__UplinkRelease_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_uplinkRelease;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_uplinkRelease;
}

const PDU__RRM__UplinkRelease_template& PDU__RRM__NW__MS_template::uplinkRelease() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field uplinkRelease in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_uplinkRelease) TTCN_error("Accessing non-selected field uplinkRelease in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_uplinkRelease;
}

PDU__RRM__UplinkBusy__NW__MS_template& PDU__RRM__NW__MS_template::uplinkBusy()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_uplinkBusy) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_uplinkBusy = new PDU__RRM__UplinkBusy__NW__MS_template(ANY_VALUE);
else single_value.field_uplinkBusy = new PDU__RRM__UplinkBusy__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_uplinkBusy;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_uplinkBusy;
}

const PDU__RRM__UplinkBusy__NW__MS_template& PDU__RRM__NW__MS_template::uplinkBusy() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field uplinkBusy in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_uplinkBusy) TTCN_error("Accessing non-selected field uplinkBusy in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_uplinkBusy;
}

PDU__RRM__ApplicationInformation_template& PDU__RRM__NW__MS_template::applicationInformation()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_applicationInformation) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_applicationInformation = new PDU__RRM__ApplicationInformation_template(ANY_VALUE);
else single_value.field_applicationInformation = new PDU__RRM__ApplicationInformation_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_applicationInformation;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_applicationInformation;
}

const PDU__RRM__ApplicationInformation_template& PDU__RRM__NW__MS_template::applicationInformation() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field applicationInformation in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_applicationInformation) TTCN_error("Accessing non-selected field applicationInformation in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_applicationInformation;
}

PDU__RRM__DTM__AssignmentCommand__NW__MS_template& PDU__RRM__NW__MS_template::dTM__AssignmentCommand()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_dTM__AssignmentCommand) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_dTM__AssignmentCommand = new PDU__RRM__DTM__AssignmentCommand__NW__MS_template(ANY_VALUE);
else single_value.field_dTM__AssignmentCommand = new PDU__RRM__DTM__AssignmentCommand__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_dTM__AssignmentCommand;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_dTM__AssignmentCommand;
}

const PDU__RRM__DTM__AssignmentCommand__NW__MS_template& PDU__RRM__NW__MS_template::dTM__AssignmentCommand() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dTM_AssignmentCommand in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_dTM__AssignmentCommand) TTCN_error("Accessing non-selected field dTM_AssignmentCommand in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_dTM__AssignmentCommand;
}

PDU__RRM__DTM__Information__NW__MS_template& PDU__RRM__NW__MS_template::dTM__Information()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_dTM__Information) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_dTM__Information = new PDU__RRM__DTM__Information__NW__MS_template(ANY_VALUE);
else single_value.field_dTM__Information = new PDU__RRM__DTM__Information__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_dTM__Information;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_dTM__Information;
}

const PDU__RRM__DTM__Information__NW__MS_template& PDU__RRM__NW__MS_template::dTM__Information() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dTM_Information in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_dTM__Information) TTCN_error("Accessing non-selected field dTM_Information in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_dTM__Information;
}

PDU__RRM__DTM__Reject__NW__MS_template& PDU__RRM__NW__MS_template::dTM__Reject()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_dTM__Reject) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_dTM__Reject = new PDU__RRM__DTM__Reject__NW__MS_template(ANY_VALUE);
else single_value.field_dTM__Reject = new PDU__RRM__DTM__Reject__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_dTM__Reject;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_dTM__Reject;
}

const PDU__RRM__DTM__Reject__NW__MS_template& PDU__RRM__NW__MS_template::dTM__Reject() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field dTM_Reject in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_dTM__Reject) TTCN_error("Accessing non-selected field dTM_Reject in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_dTM__Reject;
}

PDU__RRM__PacketNotification__NW__MS_template& PDU__RRM__NW__MS_template::packetNotification()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_packetNotification) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_packetNotification = new PDU__RRM__PacketNotification__NW__MS_template(ANY_VALUE);
else single_value.field_packetNotification = new PDU__RRM__PacketNotification__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_packetNotification;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_packetNotification;
}

const PDU__RRM__PacketNotification__NW__MS_template& PDU__RRM__NW__MS_template::packetNotification() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field packetNotification in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_packetNotification) TTCN_error("Accessing non-selected field packetNotification in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_packetNotification;
}

PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_template& PDU__RRM__NW__MS_template::interSystemToUTRAN__HandoverCommand()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_interSystemToUTRAN__HandoverCommand) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_interSystemToUTRAN__HandoverCommand = new PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_template(ANY_VALUE);
else single_value.field_interSystemToUTRAN__HandoverCommand = new PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_interSystemToUTRAN__HandoverCommand;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_interSystemToUTRAN__HandoverCommand;
}

const PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_template& PDU__RRM__NW__MS_template::interSystemToUTRAN__HandoverCommand() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field interSystemToUTRAN_HandoverCommand in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_interSystemToUTRAN__HandoverCommand) TTCN_error("Accessing non-selected field interSystemToUTRAN_HandoverCommand in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_interSystemToUTRAN__HandoverCommand;
}

PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_template& PDU__RRM__NW__MS_template::interSystemToCDMA2000HandoverCommand()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_interSystemToCDMA2000HandoverCommand) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_interSystemToCDMA2000HandoverCommand = new PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_template(ANY_VALUE);
else single_value.field_interSystemToCDMA2000HandoverCommand = new PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_interSystemToCDMA2000HandoverCommand;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_interSystemToCDMA2000HandoverCommand;
}

const PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_template& PDU__RRM__NW__MS_template::interSystemToCDMA2000HandoverCommand() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field interSystemToCDMA2000HandoverCommand in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_interSystemToCDMA2000HandoverCommand) TTCN_error("Accessing non-selected field interSystemToCDMA2000HandoverCommand in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_interSystemToCDMA2000HandoverCommand;
}

PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_template& PDU__RRM__NW__MS_template::interSystemToEUTRAN__HandoverCommand()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != PDU__RRM__NW__MS::ALT_interSystemToEUTRAN__HandoverCommand) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_interSystemToEUTRAN__HandoverCommand = new PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_template(ANY_VALUE);
else single_value.field_interSystemToEUTRAN__HandoverCommand = new PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_template;
single_value.union_selection = PDU__RRM__NW__MS::ALT_interSystemToEUTRAN__HandoverCommand;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_interSystemToEUTRAN__HandoverCommand;
}

const PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_template& PDU__RRM__NW__MS_template::interSystemToEUTRAN__HandoverCommand() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field interSystemToEUTRAN_HandoverCommand in a non-specific template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
if (single_value.union_selection != PDU__RRM__NW__MS::ALT_interSystemToEUTRAN__HandoverCommand) TTCN_error("Accessing non-selected field interSystemToEUTRAN_HandoverCommand in a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
return *single_value.field_interSystemToEUTRAN__HandoverCommand;
}

boolean PDU__RRM__NW__MS_template::ischosen(PDU__RRM__NW__MS::union_selection_type checked_selection) const
{
if (checked_selection == PDU__RRM__NW__MS::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.union_selection == PDU__RRM__NW__MS::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
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 @MobileL3_RRM_Types.PDU_RRM_NW_MS 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 PDU__RRM__NW__MS_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case PDU__RRM__NW__MS::ALT_additionalAssignment:
TTCN_Logger::log_event_str("{ additionalAssignment := ");
single_value.field_additionalAssignment->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_immediatePacketAssignment:
TTCN_Logger::log_event_str("{ immediatePacketAssignment := ");
single_value.field_immediatePacketAssignment->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_cipheringModeCommand:
TTCN_Logger::log_event_str("{ cipheringModeCommand := ");
single_value.field_cipheringModeCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_configurationChangeCommand:
TTCN_Logger::log_event_str("{ configurationChangeCommand := ");
single_value.field_configurationChangeCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_assignmentCommand:
TTCN_Logger::log_event_str("{ assignmentCommand := ");
single_value.field_assignmentCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_handoverCommand:
TTCN_Logger::log_event_str("{ handoverCommand := ");
single_value.field_handoverCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_physicalInformation:
TTCN_Logger::log_event_str("{ physicalInformation := ");
single_value.field_physicalInformation->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_channelRelease:
TTCN_Logger::log_event_str("{ channelRelease := ");
single_value.field_channelRelease->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_partialRelease:
TTCN_Logger::log_event_str("{ partialRelease := ");
single_value.field_partialRelease->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type1:
TTCN_Logger::log_event_str("{ pagingReq_Type1 := ");
single_value.field_pagingReq__Type1->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type2:
TTCN_Logger::log_event_str("{ pagingReq_Type2 := ");
single_value.field_pagingReq__Type2->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type3:
TTCN_Logger::log_event_str("{ pagingReq_Type3 := ");
single_value.field_pagingReq__Type3->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_channelModeModify:
TTCN_Logger::log_event_str("{ channelModeModify := ");
single_value.field_channelModeModify->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_rR__Status:
TTCN_Logger::log_event_str("{ rR_Status := ");
single_value.field_rR__Status->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_frequency__Redefinition:
TTCN_Logger::log_event_str("{ frequency_Redefinition := ");
single_value.field_frequency__Redefinition->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_classmarkEnquiry:
TTCN_Logger::log_event_str("{ classmarkEnquiry := ");
single_value.field_classmarkEnquiry->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_mBMS__Announcement:
TTCN_Logger::log_event_str("{ mBMS_Announcement := ");
single_value.field_mBMS__Announcement->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_vGCS__UplinkGrant:
TTCN_Logger::log_event_str("{ vGCS_UplinkGrant := ");
single_value.field_vGCS__UplinkGrant->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_uplinkRelease:
TTCN_Logger::log_event_str("{ uplinkRelease := ");
single_value.field_uplinkRelease->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_uplinkBusy:
TTCN_Logger::log_event_str("{ uplinkBusy := ");
single_value.field_uplinkBusy->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_applicationInformation:
TTCN_Logger::log_event_str("{ applicationInformation := ");
single_value.field_applicationInformation->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_dTM__AssignmentCommand:
TTCN_Logger::log_event_str("{ dTM_AssignmentCommand := ");
single_value.field_dTM__AssignmentCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_dTM__Information:
TTCN_Logger::log_event_str("{ dTM_Information := ");
single_value.field_dTM__Information->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_dTM__Reject:
TTCN_Logger::log_event_str("{ dTM_Reject := ");
single_value.field_dTM__Reject->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_packetNotification:
TTCN_Logger::log_event_str("{ packetNotification := ");
single_value.field_packetNotification->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_interSystemToUTRAN__HandoverCommand:
TTCN_Logger::log_event_str("{ interSystemToUTRAN_HandoverCommand := ");
single_value.field_interSystemToUTRAN__HandoverCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_interSystemToCDMA2000HandoverCommand:
TTCN_Logger::log_event_str("{ interSystemToCDMA2000HandoverCommand := ");
single_value.field_interSystemToCDMA2000HandoverCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case PDU__RRM__NW__MS::ALT_interSystemToEUTRAN__HandoverCommand:
TTCN_Logger::log_event_str("{ interSystemToEUTRAN_HandoverCommand := ");
single_value.field_interSystemToEUTRAN__HandoverCommand->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 PDU__RRM__NW__MS_template::log_match(const PDU__RRM__NW__MS& 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 PDU__RRM__NW__MS::ALT_additionalAssignment:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".additionalAssignment");
single_value.field_additionalAssignment->log_match(match_value.additionalAssignment(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ additionalAssignment := ");
single_value.field_additionalAssignment->log_match(match_value.additionalAssignment(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_immediatePacketAssignment:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".immediatePacketAssignment");
single_value.field_immediatePacketAssignment->log_match(match_value.immediatePacketAssignment(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ immediatePacketAssignment := ");
single_value.field_immediatePacketAssignment->log_match(match_value.immediatePacketAssignment(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_cipheringModeCommand:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".cipheringModeCommand");
single_value.field_cipheringModeCommand->log_match(match_value.cipheringModeCommand(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ cipheringModeCommand := ");
single_value.field_cipheringModeCommand->log_match(match_value.cipheringModeCommand(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_configurationChangeCommand:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".configurationChangeCommand");
single_value.field_configurationChangeCommand->log_match(match_value.configurationChangeCommand(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ configurationChangeCommand := ");
single_value.field_configurationChangeCommand->log_match(match_value.configurationChangeCommand(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_assignmentCommand:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".assignmentCommand");
single_value.field_assignmentCommand->log_match(match_value.assignmentCommand(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ assignmentCommand := ");
single_value.field_assignmentCommand->log_match(match_value.assignmentCommand(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_handoverCommand:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".handoverCommand");
single_value.field_handoverCommand->log_match(match_value.handoverCommand(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ handoverCommand := ");
single_value.field_handoverCommand->log_match(match_value.handoverCommand(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_physicalInformation:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".physicalInformation");
single_value.field_physicalInformation->log_match(match_value.physicalInformation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ physicalInformation := ");
single_value.field_physicalInformation->log_match(match_value.physicalInformation(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_channelRelease:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".channelRelease");
single_value.field_channelRelease->log_match(match_value.channelRelease(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ channelRelease := ");
single_value.field_channelRelease->log_match(match_value.channelRelease(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_partialRelease:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".partialRelease");
single_value.field_partialRelease->log_match(match_value.partialRelease(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ partialRelease := ");
single_value.field_partialRelease->log_match(match_value.partialRelease(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type1:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".pagingReq_Type1");
single_value.field_pagingReq__Type1->log_match(match_value.pagingReq__Type1(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ pagingReq_Type1 := ");
single_value.field_pagingReq__Type1->log_match(match_value.pagingReq__Type1(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type2:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".pagingReq_Type2");
single_value.field_pagingReq__Type2->log_match(match_value.pagingReq__Type2(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ pagingReq_Type2 := ");
single_value.field_pagingReq__Type2->log_match(match_value.pagingReq__Type2(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type3:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".pagingReq_Type3");
single_value.field_pagingReq__Type3->log_match(match_value.pagingReq__Type3(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ pagingReq_Type3 := ");
single_value.field_pagingReq__Type3->log_match(match_value.pagingReq__Type3(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_channelModeModify:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".channelModeModify");
single_value.field_channelModeModify->log_match(match_value.channelModeModify(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ channelModeModify := ");
single_value.field_channelModeModify->log_match(match_value.channelModeModify(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_rR__Status:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".rR_Status");
single_value.field_rR__Status->log_match(match_value.rR__Status(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ rR_Status := ");
single_value.field_rR__Status->log_match(match_value.rR__Status(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_frequency__Redefinition:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".frequency_Redefinition");
single_value.field_frequency__Redefinition->log_match(match_value.frequency__Redefinition(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ frequency_Redefinition := ");
single_value.field_frequency__Redefinition->log_match(match_value.frequency__Redefinition(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_classmarkEnquiry:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".classmarkEnquiry");
single_value.field_classmarkEnquiry->log_match(match_value.classmarkEnquiry(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ classmarkEnquiry := ");
single_value.field_classmarkEnquiry->log_match(match_value.classmarkEnquiry(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_mBMS__Announcement:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".mBMS_Announcement");
single_value.field_mBMS__Announcement->log_match(match_value.mBMS__Announcement(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ mBMS_Announcement := ");
single_value.field_mBMS__Announcement->log_match(match_value.mBMS__Announcement(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_vGCS__UplinkGrant:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".vGCS_UplinkGrant");
single_value.field_vGCS__UplinkGrant->log_match(match_value.vGCS__UplinkGrant(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ vGCS_UplinkGrant := ");
single_value.field_vGCS__UplinkGrant->log_match(match_value.vGCS__UplinkGrant(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_uplinkRelease:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".uplinkRelease");
single_value.field_uplinkRelease->log_match(match_value.uplinkRelease(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ uplinkRelease := ");
single_value.field_uplinkRelease->log_match(match_value.uplinkRelease(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_uplinkBusy:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".uplinkBusy");
single_value.field_uplinkBusy->log_match(match_value.uplinkBusy(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ uplinkBusy := ");
single_value.field_uplinkBusy->log_match(match_value.uplinkBusy(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_applicationInformation:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".applicationInformation");
single_value.field_applicationInformation->log_match(match_value.applicationInformation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ applicationInformation := ");
single_value.field_applicationInformation->log_match(match_value.applicationInformation(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_dTM__AssignmentCommand:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".dTM_AssignmentCommand");
single_value.field_dTM__AssignmentCommand->log_match(match_value.dTM__AssignmentCommand(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ dTM_AssignmentCommand := ");
single_value.field_dTM__AssignmentCommand->log_match(match_value.dTM__AssignmentCommand(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_dTM__Information:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".dTM_Information");
single_value.field_dTM__Information->log_match(match_value.dTM__Information(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ dTM_Information := ");
single_value.field_dTM__Information->log_match(match_value.dTM__Information(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_dTM__Reject:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".dTM_Reject");
single_value.field_dTM__Reject->log_match(match_value.dTM__Reject(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ dTM_Reject := ");
single_value.field_dTM__Reject->log_match(match_value.dTM__Reject(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_packetNotification:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".packetNotification");
single_value.field_packetNotification->log_match(match_value.packetNotification(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ packetNotification := ");
single_value.field_packetNotification->log_match(match_value.packetNotification(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_interSystemToUTRAN__HandoverCommand:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".interSystemToUTRAN_HandoverCommand");
single_value.field_interSystemToUTRAN__HandoverCommand->log_match(match_value.interSystemToUTRAN__HandoverCommand(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ interSystemToUTRAN_HandoverCommand := ");
single_value.field_interSystemToUTRAN__HandoverCommand->log_match(match_value.interSystemToUTRAN__HandoverCommand(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_interSystemToCDMA2000HandoverCommand:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".interSystemToCDMA2000HandoverCommand");
single_value.field_interSystemToCDMA2000HandoverCommand->log_match(match_value.interSystemToCDMA2000HandoverCommand(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ interSystemToCDMA2000HandoverCommand := ");
single_value.field_interSystemToCDMA2000HandoverCommand->log_match(match_value.interSystemToCDMA2000HandoverCommand(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case PDU__RRM__NW__MS::ALT_interSystemToEUTRAN__HandoverCommand:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".interSystemToEUTRAN_HandoverCommand");
single_value.field_interSystemToEUTRAN__HandoverCommand->log_match(match_value.interSystemToEUTRAN__HandoverCommand(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ interSystemToEUTRAN_HandoverCommand := ");
single_value.field_interSystemToEUTRAN__HandoverCommand->log_match(match_value.interSystemToEUTRAN__HandoverCommand(), 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 PDU__RRM__NW__MS_template::set_implicit_omit()
{
if (template_selection != SPECIFIC_VALUE) return;
switch (single_value.union_selection) {
case PDU__RRM__NW__MS::ALT_additionalAssignment:
single_value.field_additionalAssignment->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_immediatePacketAssignment:
single_value.field_immediatePacketAssignment->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_cipheringModeCommand:
single_value.field_cipheringModeCommand->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_configurationChangeCommand:
single_value.field_configurationChangeCommand->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_assignmentCommand:
single_value.field_assignmentCommand->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_handoverCommand:
single_value.field_handoverCommand->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_physicalInformation:
single_value.field_physicalInformation->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_channelRelease:
single_value.field_channelRelease->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_partialRelease:
single_value.field_partialRelease->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type1:
single_value.field_pagingReq__Type1->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type2:
single_value.field_pagingReq__Type2->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type3:
single_value.field_pagingReq__Type3->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_channelModeModify:
single_value.field_channelModeModify->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_rR__Status:
single_value.field_rR__Status->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_frequency__Redefinition:
single_value.field_frequency__Redefinition->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_classmarkEnquiry:
single_value.field_classmarkEnquiry->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_mBMS__Announcement:
single_value.field_mBMS__Announcement->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_vGCS__UplinkGrant:
single_value.field_vGCS__UplinkGrant->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_uplinkRelease:
single_value.field_uplinkRelease->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_uplinkBusy:
single_value.field_uplinkBusy->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_applicationInformation:
single_value.field_applicationInformation->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_dTM__AssignmentCommand:
single_value.field_dTM__AssignmentCommand->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_dTM__Information:
single_value.field_dTM__Information->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_dTM__Reject:
single_value.field_dTM__Reject->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_packetNotification:
single_value.field_packetNotification->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_interSystemToUTRAN__HandoverCommand:
single_value.field_interSystemToUTRAN__HandoverCommand->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_interSystemToCDMA2000HandoverCommand:
single_value.field_interSystemToCDMA2000HandoverCommand->set_implicit_omit(); break;
case PDU__RRM__NW__MS::ALT_interSystemToEUTRAN__HandoverCommand:
single_value.field_interSystemToEUTRAN__HandoverCommand->set_implicit_omit(); break;
default: break;
}
}

void PDU__RRM__NW__MS_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 PDU__RRM__NW__MS::ALT_additionalAssignment:
single_value.field_additionalAssignment->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_immediatePacketAssignment:
single_value.field_immediatePacketAssignment->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_cipheringModeCommand:
single_value.field_cipheringModeCommand->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_configurationChangeCommand:
single_value.field_configurationChangeCommand->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_assignmentCommand:
single_value.field_assignmentCommand->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_handoverCommand:
single_value.field_handoverCommand->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_physicalInformation:
single_value.field_physicalInformation->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_channelRelease:
single_value.field_channelRelease->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_partialRelease:
single_value.field_partialRelease->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type1:
single_value.field_pagingReq__Type1->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type2:
single_value.field_pagingReq__Type2->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type3:
single_value.field_pagingReq__Type3->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_channelModeModify:
single_value.field_channelModeModify->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_rR__Status:
single_value.field_rR__Status->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_frequency__Redefinition:
single_value.field_frequency__Redefinition->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_classmarkEnquiry:
single_value.field_classmarkEnquiry->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_mBMS__Announcement:
single_value.field_mBMS__Announcement->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_vGCS__UplinkGrant:
single_value.field_vGCS__UplinkGrant->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_uplinkRelease:
single_value.field_uplinkRelease->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_uplinkBusy:
single_value.field_uplinkBusy->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_applicationInformation:
single_value.field_applicationInformation->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_dTM__AssignmentCommand:
single_value.field_dTM__AssignmentCommand->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_dTM__Information:
single_value.field_dTM__Information->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_dTM__Reject:
single_value.field_dTM__Reject->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_packetNotification:
single_value.field_packetNotification->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_interSystemToUTRAN__HandoverCommand:
single_value.field_interSystemToUTRAN__HandoverCommand->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_interSystemToCDMA2000HandoverCommand:
single_value.field_interSystemToCDMA2000HandoverCommand->encode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_interSystemToEUTRAN__HandoverCommand:
single_value.field_interSystemToEUTRAN__HandoverCommand->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
}
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 @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
}
}

void PDU__RRM__NW__MS_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
{
single_value.union_selection = PDU__RRM__NW__MS::UNBOUND_VALUE;
PDU__RRM__NW__MS::union_selection_type new_selection = (PDU__RRM__NW__MS::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case PDU__RRM__NW__MS::ALT_additionalAssignment:
single_value.field_additionalAssignment = new PDU__RRM__AdditionalAssignment__NW__MS_template;
single_value.field_additionalAssignment->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_immediatePacketAssignment:
single_value.field_immediatePacketAssignment = new PDU__RRM__ImmediatePacketAssignment__NW__MS_template;
single_value.field_immediatePacketAssignment->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_cipheringModeCommand:
single_value.field_cipheringModeCommand = new PDU__RRM__CipheringModeCommand__NW__MS_template;
single_value.field_cipheringModeCommand->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_configurationChangeCommand:
single_value.field_configurationChangeCommand = new PDU__RRM__ConfigurationChangeCommand__NW__MS_template;
single_value.field_configurationChangeCommand->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_assignmentCommand:
single_value.field_assignmentCommand = new PDU__RRM__AssignmentCommand__NW__MS_template;
single_value.field_assignmentCommand->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_handoverCommand:
single_value.field_handoverCommand = new PDU__RRM__HandoverCommand__NW__MS_template;
single_value.field_handoverCommand->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_physicalInformation:
single_value.field_physicalInformation = new PDU__RRM__PhysicalInformation__NW__MS_template;
single_value.field_physicalInformation->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_channelRelease:
single_value.field_channelRelease = new PDU__RRM__ChannelRelease__NW__MS_template;
single_value.field_channelRelease->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_partialRelease:
single_value.field_partialRelease = new PDU__RRM__PartialRelease__NW__MS_template;
single_value.field_partialRelease->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type1:
single_value.field_pagingReq__Type1 = new PDU__RRM__PagingReq__Type1__NW__MS_template;
single_value.field_pagingReq__Type1->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type2:
single_value.field_pagingReq__Type2 = new PDU__RRM__PagingReq__Type2__NW__MS_template;
single_value.field_pagingReq__Type2->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_pagingReq__Type3:
single_value.field_pagingReq__Type3 = new PDU__RRM__PagingReq__Type3__NW__MS_template;
single_value.field_pagingReq__Type3->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_channelModeModify:
single_value.field_channelModeModify = new PDU__RRM__ChannelModeModify__NW__MS_template;
single_value.field_channelModeModify->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_rR__Status:
single_value.field_rR__Status = new PDU__RRM__RR__Status_template;
single_value.field_rR__Status->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_frequency__Redefinition:
single_value.field_frequency__Redefinition = new PDU__RRM__Frequency__Redefinition__NW__MS_template;
single_value.field_frequency__Redefinition->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_classmarkEnquiry:
single_value.field_classmarkEnquiry = new PDU__RRM__ClassmarkEnquiry__NW__MS_template;
single_value.field_classmarkEnquiry->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_mBMS__Announcement:
single_value.field_mBMS__Announcement = new MBMS__Announcement__NW__MS_template;
single_value.field_mBMS__Announcement->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_vGCS__UplinkGrant:
single_value.field_vGCS__UplinkGrant = new PDU__RRM__VGCS__UplinkGrant__NW__MS_template;
single_value.field_vGCS__UplinkGrant->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_uplinkRelease:
single_value.field_uplinkRelease = new PDU__RRM__UplinkRelease_template;
single_value.field_uplinkRelease->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_uplinkBusy:
single_value.field_uplinkBusy = new PDU__RRM__UplinkBusy__NW__MS_template;
single_value.field_uplinkBusy->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_applicationInformation:
single_value.field_applicationInformation = new PDU__RRM__ApplicationInformation_template;
single_value.field_applicationInformation->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_dTM__AssignmentCommand:
single_value.field_dTM__AssignmentCommand = new PDU__RRM__DTM__AssignmentCommand__NW__MS_template;
single_value.field_dTM__AssignmentCommand->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_dTM__Information:
single_value.field_dTM__Information = new PDU__RRM__DTM__Information__NW__MS_template;
single_value.field_dTM__Information->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_dTM__Reject:
single_value.field_dTM__Reject = new PDU__RRM__DTM__Reject__NW__MS_template;
single_value.field_dTM__Reject->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_packetNotification:
single_value.field_packetNotification = new PDU__RRM__PacketNotification__NW__MS_template;
single_value.field_packetNotification->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_interSystemToUTRAN__HandoverCommand:
single_value.field_interSystemToUTRAN__HandoverCommand = new PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_template;
single_value.field_interSystemToUTRAN__HandoverCommand->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_interSystemToCDMA2000HandoverCommand:
single_value.field_interSystemToCDMA2000HandoverCommand = new PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_template;
single_value.field_interSystemToCDMA2000HandoverCommand->decode_text(text_buf);
break;
case PDU__RRM__NW__MS::ALT_interSystemToEUTRAN__HandoverCommand:
single_value.field_interSystemToEUTRAN__HandoverCommand = new PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_template;
single_value.field_interSystemToEUTRAN__HandoverCommand->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
}
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 PDU__RRM__NW__MS_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 @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
}
}

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

boolean PDU__RRM__NW__MS_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 PDU__RRM__NW__MS_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 `@MobileL3_RRM_Types.PDU_RRM_NW_MS'");
    }
    if (strcmp("additionalAssignment", param_field) == 0) {
      additionalAssignment().set_param(param);
      return;
    } else if (strcmp("immediatePacketAssignment", param_field) == 0) {
      immediatePacketAssignment().set_param(param);
      return;
    } else if (strcmp("cipheringModeCommand", param_field) == 0) {
      cipheringModeCommand().set_param(param);
      return;
    } else if (strcmp("configurationChangeCommand", param_field) == 0) {
      configurationChangeCommand().set_param(param);
      return;
    } else if (strcmp("assignmentCommand", param_field) == 0) {
      assignmentCommand().set_param(param);
      return;
    } else if (strcmp("handoverCommand", param_field) == 0) {
      handoverCommand().set_param(param);
      return;
    } else if (strcmp("physicalInformation", param_field) == 0) {
      physicalInformation().set_param(param);
      return;
    } else if (strcmp("channelRelease", param_field) == 0) {
      channelRelease().set_param(param);
      return;
    } else if (strcmp("partialRelease", param_field) == 0) {
      partialRelease().set_param(param);
      return;
    } else if (strcmp("pagingReq_Type1", param_field) == 0) {
      pagingReq__Type1().set_param(param);
      return;
    } else if (strcmp("pagingReq_Type2", param_field) == 0) {
      pagingReq__Type2().set_param(param);
      return;
    } else if (strcmp("pagingReq_Type3", param_field) == 0) {
      pagingReq__Type3().set_param(param);
      return;
    } else if (strcmp("channelModeModify", param_field) == 0) {
      channelModeModify().set_param(param);
      return;
    } else if (strcmp("rR_Status", param_field) == 0) {
      rR__Status().set_param(param);
      return;
    } else if (strcmp("frequency_Redefinition", param_field) == 0) {
      frequency__Redefinition().set_param(param);
      return;
    } else if (strcmp("classmarkEnquiry", param_field) == 0) {
      classmarkEnquiry().set_param(param);
      return;
    } else if (strcmp("mBMS_Announcement", param_field) == 0) {
      mBMS__Announcement().set_param(param);
      return;
    } else if (strcmp("vGCS_UplinkGrant", param_field) == 0) {
      vGCS__UplinkGrant().set_param(param);
      return;
    } else if (strcmp("uplinkRelease", param_field) == 0) {
      uplinkRelease().set_param(param);
      return;
    } else if (strcmp("uplinkBusy", param_field) == 0) {
      uplinkBusy().set_param(param);
      return;
    } else if (strcmp("applicationInformation", param_field) == 0) {
      applicationInformation().set_param(param);
      return;
    } else if (strcmp("dTM_AssignmentCommand", param_field) == 0) {
      dTM__AssignmentCommand().set_param(param);
      return;
    } else if (strcmp("dTM_Information", param_field) == 0) {
      dTM__Information().set_param(param);
      return;
    } else if (strcmp("dTM_Reject", param_field) == 0) {
      dTM__Reject().set_param(param);
      return;
    } else if (strcmp("packetNotification", param_field) == 0) {
      packetNotification().set_param(param);
      return;
    } else if (strcmp("interSystemToUTRAN_HandoverCommand", param_field) == 0) {
      interSystemToUTRAN__HandoverCommand().set_param(param);
      return;
    } else if (strcmp("interSystemToCDMA2000HandoverCommand", param_field) == 0) {
      interSystemToCDMA2000HandoverCommand().set_param(param);
      return;
    } else if (strcmp("interSystemToEUTRAN_HandoverCommand", param_field) == 0) {
      interSystemToEUTRAN__HandoverCommand().set_param(param);
      return;
    } else param.error("Field `%s' not found in union template type `@MobileL3_RRM_Types.PDU_RRM_NW_MS'", 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: {
    PDU__RRM__NW__MS_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", "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
    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, "additionalAssignment")) {
      additionalAssignment().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "immediatePacketAssignment")) {
      immediatePacketAssignment().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "cipheringModeCommand")) {
      cipheringModeCommand().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "configurationChangeCommand")) {
      configurationChangeCommand().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "assignmentCommand")) {
      assignmentCommand().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "handoverCommand")) {
      handoverCommand().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "physicalInformation")) {
      physicalInformation().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "channelRelease")) {
      channelRelease().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "partialRelease")) {
      partialRelease().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "pagingReq_Type1")) {
      pagingReq__Type1().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "pagingReq_Type2")) {
      pagingReq__Type2().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "pagingReq_Type3")) {
      pagingReq__Type3().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "channelModeModify")) {
      channelModeModify().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "rR_Status")) {
      rR__Status().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "frequency_Redefinition")) {
      frequency__Redefinition().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "classmarkEnquiry")) {
      classmarkEnquiry().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "mBMS_Announcement")) {
      mBMS__Announcement().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "vGCS_UplinkGrant")) {
      vGCS__UplinkGrant().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "uplinkRelease")) {
      uplinkRelease().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "uplinkBusy")) {
      uplinkBusy().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "applicationInformation")) {
      applicationInformation().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "dTM_AssignmentCommand")) {
      dTM__AssignmentCommand().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "dTM_Information")) {
      dTM__Information().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "dTM_Reject")) {
      dTM__Reject().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "packetNotification")) {
      packetNotification().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "interSystemToUTRAN_HandoverCommand")) {
      interSystemToUTRAN__HandoverCommand().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "interSystemToCDMA2000HandoverCommand")) {
      interSystemToCDMA2000HandoverCommand().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "interSystemToEUTRAN_HandoverCommand")) {
      interSystemToEUTRAN__HandoverCommand().set_param(*mp_last);
      break;
    }
    mp_last->error("Field %s does not exist in type @MobileL3_RRM_Types.PDU_RRM_NW_MS.", last_name);
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__RRM__NW__MS_template* precondition = new PDU__RRM__NW__MS_template;
    precondition->set_param(*m_p->get_elem(0));
    PDU__RRM__NW__MS_template* implied_template = new PDU__RRM__NW__MS_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = PDU__RRM__NW__MS_template(precondition, implied_template);
  } break;
  default:
    param.type_error("union template", "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__RRM__NW__MS_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 PDU__RRM__NW__MS::ALT_additionalAssignment:
single_value.field_additionalAssignment->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_immediatePacketAssignment:
single_value.field_immediatePacketAssignment->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_cipheringModeCommand:
single_value.field_cipheringModeCommand->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_configurationChangeCommand:
single_value.field_configurationChangeCommand->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_assignmentCommand:
single_value.field_assignmentCommand->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_handoverCommand:
single_value.field_handoverCommand->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_physicalInformation:
single_value.field_physicalInformation->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_channelRelease:
single_value.field_channelRelease->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_partialRelease:
single_value.field_partialRelease->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_pagingReq__Type1:
single_value.field_pagingReq__Type1->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_pagingReq__Type2:
single_value.field_pagingReq__Type2->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_pagingReq__Type3:
single_value.field_pagingReq__Type3->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_channelModeModify:
single_value.field_channelModeModify->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_rR__Status:
single_value.field_rR__Status->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_frequency__Redefinition:
single_value.field_frequency__Redefinition->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_classmarkEnquiry:
single_value.field_classmarkEnquiry->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_mBMS__Announcement:
single_value.field_mBMS__Announcement->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_vGCS__UplinkGrant:
single_value.field_vGCS__UplinkGrant->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_uplinkRelease:
single_value.field_uplinkRelease->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_uplinkBusy:
single_value.field_uplinkBusy->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_applicationInformation:
single_value.field_applicationInformation->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_dTM__AssignmentCommand:
single_value.field_dTM__AssignmentCommand->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_dTM__Information:
single_value.field_dTM__Information->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_dTM__Reject:
single_value.field_dTM__Reject->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_packetNotification:
single_value.field_packetNotification->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_interSystemToUTRAN__HandoverCommand:
single_value.field_interSystemToUTRAN__HandoverCommand->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_interSystemToCDMA2000HandoverCommand:
single_value.field_interSystemToCDMA2000HandoverCommand->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
case PDU__RRM__NW__MS::ALT_interSystemToEUTRAN__HandoverCommand:
single_value.field_interSystemToEUTRAN__HandoverCommand->check_restriction(t_res, t_name ? t_name : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
return;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @MobileL3_RRM_Types.PDU_RRM_NW_MS.");
}
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 : "@MobileL3_RRM_Types.PDU_RRM_NW_MS");
}


/* Bodies of functions, altsteps and testcases */

void BARange__TLV_lengthIndicator_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(BARange__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER BARange__TLV_lengthIndicator_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(BARange__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void BARange__TLV_encoder(const BARange__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.BARange_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(BARange__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER BARange__TLV_decoder(OCTETSTRING& input_stream, BARange__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.BARange_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(BARange__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CellChannelDescription__TV_encoder(const CellChannelDescription__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CellChannelDescription_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CellChannelDescription__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CellChannelDescription__TV_decoder(OCTETSTRING& input_stream, CellChannelDescription__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CellChannelDescription_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CellChannelDescription__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void BAListPref__TLV_lengthIndicator_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(BAListPref__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER BAListPref__TLV_lengthIndicator_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(BAListPref__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void BAListPref__TLV_encoder(const BAListPref__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.BAListPref_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(BAListPref__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER BAListPref__TLV_decoder(OCTETSTRING& input_stream, BAListPref__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.BAListPref_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(BAListPref__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UTRANFrequencyList__TLV_lengthIndicator_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(UTRANFrequencyList__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UTRANFrequencyList__TLV_lengthIndicator_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(UTRANFrequencyList__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UTRANFrequencyList__TLV_encoder(const UTRANFrequencyList__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.UTRANFrequencyList_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UTRANFrequencyList__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UTRANFrequencyList__TLV_decoder(OCTETSTRING& input_stream, UTRANFrequencyList__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.UTRANFrequencyList_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UTRANFrequencyList__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CellSelectionIndicatorAfterReleaseOfAll__TCH__and__SDCCH__IE_lengthIndicator_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(CellSelectionIndicatorAfterReleaseOfAll__TCH__and__SDCCH__IE_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CellSelectionIndicatorAfterReleaseOfAll__TCH__and__SDCCH__IE_lengthIndicator_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(CellSelectionIndicatorAfterReleaseOfAll__TCH__and__SDCCH__IE_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CellSelectionIndicatorAfterReleaseOfAll__TCH__and__SDCCH__IE_cellSelectionIndicatorValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CellSelectionIndicatorAfterReleaseOfAll__TCH__and__SDCCH__IE_cellSelectionIndicatorValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CellSelectionIndicatorAfterReleaseOfAll__TCH__and__SDCCH__IE_encoder(const CellSelectionIndicatorAfterReleaseOfAll__TCH__and__SDCCH__IE& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CellSelectionIndicatorAfterReleaseOfAll_TCH_and_SDCCH_IE' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CellSelectionIndicatorAfterReleaseOfAll__TCH__and__SDCCH__IE_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CellSelectionIndicatorAfterReleaseOfAll__TCH__and__SDCCH__IE_decoder(OCTETSTRING& input_stream, CellSelectionIndicatorAfterReleaseOfAll__TCH__and__SDCCH__IE& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CellSelectionIndicatorAfterReleaseOfAll_TCH_and_SDCCH_IE' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CellSelectionIndicatorAfterReleaseOfAll__TCH__and__SDCCH__IE_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CellDescription__V_encoder(const CellDescription__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CellDescription_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CellDescription__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CellDescription__V_decoder(OCTETSTRING& input_stream, CellDescription__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CellDescription_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CellDescription__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 ChannelDescription__V_encoder(const ChannelDescription__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelDescription_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ChannelDescription__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ChannelDescription__V_decoder(OCTETSTRING& input_stream, ChannelDescription__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelDescription_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ChannelDescription__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 ChannelDescription__TV_encoder(const ChannelDescription__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelDescription_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ChannelDescription__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ChannelDescription__TV_decoder(OCTETSTRING& input_stream, ChannelDescription__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelDescription_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ChannelDescription__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ChannelDescription2__V_encoder(const ChannelDescription2__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelDescription2_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ChannelDescription2__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ChannelDescription2__V_decoder(OCTETSTRING& input_stream, ChannelDescription2__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelDescription2_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ChannelDescription2__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 ChannelDescription2__TV_encoder(const ChannelDescription2__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelDescription2_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ChannelDescription2__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ChannelDescription2__TV_decoder(OCTETSTRING& input_stream, ChannelDescription2__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelDescription2_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ChannelDescription2__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ChannelDescription3__TV_encoder(const ChannelDescription3__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelDescription3_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ChannelDescription3__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ChannelDescription3__TV_decoder(OCTETSTRING& input_stream, ChannelDescription3__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelDescription3_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ChannelDescription3__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ChannelMode__TV_encoder(const ChannelMode__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelMode_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ChannelMode__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ChannelMode__TV_decoder(OCTETSTRING& input_stream, ChannelMode__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelMode_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ChannelMode__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ChannelMode__V_encoder(const ChannelMode__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelMode_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ChannelMode__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ChannelMode__V_decoder(OCTETSTRING& input_stream, ChannelMode__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelMode_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ChannelMode__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 ChannelMode2__TV_encoder(const ChannelMode2__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelMode2_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ChannelMode2__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ChannelMode2__TV_decoder(OCTETSTRING& input_stream, ChannelMode2__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelMode2_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ChannelMode2__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UTRAN__Classmark__LV_lengthIndicator_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(UTRAN__Classmark__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UTRAN__Classmark__LV_lengthIndicator_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(UTRAN__Classmark__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UTRAN__Classmark__LV_uTRAN__ClassmarkValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UTRAN__Classmark__LV_uTRAN__ClassmarkValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UTRAN__Classmark__LV_encoder(const UTRAN__Classmark__LV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.UTRAN_Classmark_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UTRAN__Classmark__LV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UTRAN__Classmark__LV_decoder(OCTETSTRING& input_stream, UTRAN__Classmark__LV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.UTRAN_Classmark_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UTRAN__Classmark__LV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ClassmarkEnquiryMask__TLV_lengthIndicator_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(ClassmarkEnquiryMask__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ClassmarkEnquiryMask__TLV_lengthIndicator_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(ClassmarkEnquiryMask__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ClassmarkEnquiryMask__TLV_encoder(const ClassmarkEnquiryMask__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ClassmarkEnquiryMask_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ClassmarkEnquiryMask__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ClassmarkEnquiryMask__TLV_decoder(OCTETSTRING& input_stream, ClassmarkEnquiryMask__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ClassmarkEnquiryMask_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ClassmarkEnquiryMask__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GERAN__IU__ModeClassmark__LV_lengthIndicator_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(GERAN__IU__ModeClassmark__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GERAN__IU__ModeClassmark__LV_lengthIndicator_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(GERAN__IU__ModeClassmark__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GERAN__IU__ModeClassmark__LV_encoder(const GERAN__IU__ModeClassmark__LV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.GERAN_IU_ModeClassmark_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GERAN__IU__ModeClassmark__LV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GERAN__IU__ModeClassmark__LV_decoder(OCTETSTRING& input_stream, GERAN__IU__ModeClassmark__LV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.GERAN_IU_ModeClassmark_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GERAN__IU__ModeClassmark__LV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ChannelNeeded__TV_encoder(const ChannelNeeded__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelNeeded_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ChannelNeeded__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ChannelNeeded__TV_decoder(OCTETSTRING& input_stream, ChannelNeeded__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelNeeded_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ChannelNeeded__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ChannelNeeded__V_encoder(const ChannelNeeded__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelNeeded_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ChannelNeeded__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ChannelNeeded__V_decoder(OCTETSTRING& input_stream, ChannelNeeded__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelNeeded_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ChannelNeeded__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 ChannelRequestDescription2__LV_lengthIndicator_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(ChannelRequestDescription2__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ChannelRequestDescription2__LV_lengthIndicator_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(ChannelRequestDescription2__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ChannelRequestDescription2__LV_valuePart_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ChannelRequestDescription2__LV_valuePart_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ChannelRequestDescription2__LV_encoder(const ChannelRequestDescription2__LV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelRequestDescription2_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ChannelRequestDescription2__LV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ChannelRequestDescription2__LV_decoder(OCTETSTRING& input_stream, ChannelRequestDescription2__LV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelRequestDescription2_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ChannelRequestDescription2__LV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CipherModeSetting__TV_encoder(const CipherModeSetting__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CipherModeSetting_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CipherModeSetting__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CipherModeSetting__TV_decoder(OCTETSTRING& input_stream, CipherModeSetting__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CipherModeSetting_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CipherModeSetting__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CipherModeSetting__V_encoder(const CipherModeSetting__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CipherModeSetting_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CipherModeSetting__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CipherModeSetting__V_decoder(OCTETSTRING& input_stream, CipherModeSetting__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CipherModeSetting_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CipherModeSetting__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 CipherModeResponse__TV_encoder(const CipherModeResponse__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CipherModeResponse_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CipherModeResponse__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CipherModeResponse__TV_decoder(OCTETSTRING& input_stream, CipherModeResponse__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CipherModeResponse_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CipherModeResponse__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CipherModeResponse__V_encoder(const CipherModeResponse__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CipherModeResponse_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CipherModeResponse__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CipherModeResponse__V_decoder(OCTETSTRING& input_stream, CipherModeResponse__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CipherModeResponse_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CipherModeResponse__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 DTM__InformationDetails__LV_lengthIndicator_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(DTM__InformationDetails__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DTM__InformationDetails__LV_lengthIndicator_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(DTM__InformationDetails__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DTM__InformationDetails__LV_valuePart_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DTM__InformationDetails__LV_valuePart_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DTM__InformationDetails__LV_encoder(const DTM__InformationDetails__LV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.DTM_InformationDetails_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DTM__InformationDetails__LV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DTM__InformationDetails__LV_decoder(OCTETSTRING& input_stream, DTM__InformationDetails__LV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.DTM_InformationDetails_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DTM__InformationDetails__LV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DynamicARFCN__Mapping__TLV_lengthIndicator_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(DynamicARFCN__Mapping__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DynamicARFCN__Mapping__TLV_lengthIndicator_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(DynamicARFCN__Mapping__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DynamicARFCN__Mapping__TLV_valuePart_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DynamicARFCN__Mapping__TLV_valuePart_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DynamicARFCN__Mapping__TLV_encoder(const DynamicARFCN__Mapping__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.DynamicARFCN_Mapping_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DynamicARFCN__Mapping__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DynamicARFCN__Mapping__TLV_decoder(OCTETSTRING& input_stream, DynamicARFCN__Mapping__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.DynamicARFCN_Mapping_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DynamicARFCN__Mapping__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FrequencyChannelSequence__TV_encoder(const FrequencyChannelSequence__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.FrequencyChannelSequence_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FrequencyChannelSequence__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FrequencyChannelSequence__TV_decoder(OCTETSTRING& input_stream, FrequencyChannelSequence__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.FrequencyChannelSequence_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FrequencyChannelSequence__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FrequencyShortList__TV_encoder(const FrequencyShortList__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.FrequencyShortList_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FrequencyShortList__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FrequencyShortList__TV_decoder(OCTETSTRING& input_stream, FrequencyShortList__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.FrequencyShortList_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FrequencyShortList__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GroupChannelDescription__TLV_lengthIndicator_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(GroupChannelDescription__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GroupChannelDescription__TLV_lengthIndicator_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(GroupChannelDescription__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GroupChannelDescription__TLV_encoder(const GroupChannelDescription__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.GroupChannelDescription_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GroupChannelDescription__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GroupChannelDescription__TLV_decoder(OCTETSTRING& input_stream, GroupChannelDescription__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.GroupChannelDescription_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GroupChannelDescription__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GPRS__BroadcastInformation__LV_lengthIndicator_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(GPRS__BroadcastInformation__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GPRS__BroadcastInformation__LV_lengthIndicator_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(GPRS__BroadcastInformation__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GPRS__BroadcastInformation__LV_gPRS__BroadcastInformationValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GPRS__BroadcastInformation__LV_gPRS__BroadcastInformationValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GPRS__BroadcastInformation__LV_encoder(const GPRS__BroadcastInformation__LV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.GPRS_BroadcastInformation_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GPRS__BroadcastInformation__LV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GPRS__BroadcastInformation__LV_decoder(OCTETSTRING& input_stream, GPRS__BroadcastInformation__LV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.GPRS_BroadcastInformation_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GPRS__BroadcastInformation__LV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void Enhanced__DTM__CS__Release__Indication_encoder(const Enhanced__DTM__CS__Release__Indication& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.Enhanced_DTM_CS_Release_Indication' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(Enhanced__DTM__CS__Release__Indication_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER Enhanced__DTM__CS__Release__Indication_decoder(OCTETSTRING& input_stream, Enhanced__DTM__CS__Release__Indication& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.Enhanced_DTM_CS_Release_Indication' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(Enhanced__DTM__CS__Release__Indication_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void Group__Channel__Description__2__TLV_lengthIndicator_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(Group__Channel__Description__2__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER Group__Channel__Description__2__TLV_lengthIndicator_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(Group__Channel__Description__2__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void Group__Channel__Description__2__TLV_tSC_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(Group__Channel__Description__2__TLV_tSC_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER Group__Channel__Description__2__TLV_tSC_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(Group__Channel__Description__2__TLV_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 Group__Channel__Description__2__TLV_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(Group__Channel__Description__2__TLV_spare_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER Group__Channel__Description__2__TLV_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(Group__Channel__Description__2__TLV_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 Group__Channel__Description__2__TLV_mAIO_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(Group__Channel__Description__2__TLV_mAIO_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER Group__Channel__Description__2__TLV_mAIO_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(Group__Channel__Description__2__TLV_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 Group__Channel__Description__2__TLV_hSN_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(Group__Channel__Description__2__TLV_hSN_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER Group__Channel__Description__2__TLV_hSN_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(Group__Channel__Description__2__TLV_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 Group__Channel__Description__2__TLV_frequencyShortList_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(Group__Channel__Description__2__TLV_frequencyShortList_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER Group__Channel__Description__2__TLV_frequencyShortList_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(Group__Channel__Description__2__TLV_frequencyShortList_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void Group__Channel__Description__2__TLV_encoder(const Group__Channel__Description__2__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.Group_Channel_Description_2_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(Group__Channel__Description__2__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER Group__Channel__Description__2__TLV_decoder(OCTETSTRING& input_stream, Group__Channel__Description__2__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.Group_Channel_Description_2_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(Group__Channel__Description__2__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void HandoverReference__V_encoder(const HandoverReference__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.HandoverReference_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(HandoverReference__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER HandoverReference__V_decoder(OCTETSTRING& input_stream, HandoverReference__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.HandoverReference_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(HandoverReference__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 MobileTimeDifference__TLV_lengthIndicator_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(MobileTimeDifference__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MobileTimeDifference__TLV_lengthIndicator_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(MobileTimeDifference__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MobileTimeDifference__TLV_encoder(const MobileTimeDifference__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MobileTimeDifference_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MobileTimeDifference__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MobileTimeDifference__TLV_decoder(OCTETSTRING& input_stream, MobileTimeDifference__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MobileTimeDifference_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MobileTimeDifference__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RRM__OCT1__5_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RRM__OCT1__5_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultiRateConfiguration__TLV_lengthIndicator_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(MultiRateConfiguration__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultiRateConfiguration__TLV_lengthIndicator_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(MultiRateConfiguration__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultiRateConfiguration__TLV_encoder(const MultiRateConfiguration__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MultiRateConfiguration_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultiRateConfiguration__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultiRateConfiguration__TLV_decoder(OCTETSTRING& input_stream, MultiRateConfiguration__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MultiRateConfiguration_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultiRateConfiguration__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotAllocation__octet3__11_encoder(const MultislotAllocation__octet3__11& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MultislotAllocation_octet3_11' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultislotAllocation__octet3__11_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotAllocation__octet3__11_decoder(OCTETSTRING& input_stream, MultislotAllocation__octet3__11& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MultislotAllocation_octet3_11' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultislotAllocation__octet3__11_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotAllocation__TLV_lengthIndicator_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(MultislotAllocation__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotAllocation__TLV_lengthIndicator_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(MultislotAllocation__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotAllocation__TLV_encoder(const MultislotAllocation__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MultislotAllocation_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultislotAllocation__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotAllocation__TLV_decoder(OCTETSTRING& input_stream, MultislotAllocation__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MultislotAllocation_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultislotAllocation__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotAllocation__LV_lengthIndicator_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(MultislotAllocation__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotAllocation__LV_lengthIndicator_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(MultislotAllocation__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotAllocation__LV_encoder(const MultislotAllocation__LV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MultislotAllocation_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultislotAllocation__LV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotAllocation__LV_decoder(OCTETSTRING& input_stream, MultislotAllocation__LV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MultislotAllocation_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultislotAllocation__LV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MobileTimeDifferenceHyperframe__TLV_lengthIndicator_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(MobileTimeDifferenceHyperframe__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MobileTimeDifferenceHyperframe__TLV_lengthIndicator_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(MobileTimeDifferenceHyperframe__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MobileTimeDifferenceHyperframe__TLV_encoder(const MobileTimeDifferenceHyperframe__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MobileTimeDifferenceHyperframe_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MobileTimeDifferenceHyperframe__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MobileTimeDifferenceHyperframe__TLV_decoder(OCTETSTRING& input_stream, MobileTimeDifferenceHyperframe__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MobileTimeDifferenceHyperframe_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MobileTimeDifferenceHyperframe__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void P1RestOctets_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER P1RestOctets_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void P2RestOctets_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER P2RestOctets_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DedicatedModeOrTBF__V_encoder(const DedicatedModeOrTBF__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.DedicatedModeOrTBF_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DedicatedModeOrTBF__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DedicatedModeOrTBF__V_decoder(OCTETSTRING& input_stream, DedicatedModeOrTBF__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.DedicatedModeOrTBF_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DedicatedModeOrTBF__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 RR__PacketUplinkAssignment__TLV_lengthIndicator_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(RR__PacketUplinkAssignment__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RR__PacketUplinkAssignment__TLV_lengthIndicator_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(RR__PacketUplinkAssignment__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RR__PacketUplinkAssignment__TLV_rR__PacketUplinkAssignment_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RR__PacketUplinkAssignment__TLV_rR__PacketUplinkAssignment_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RR__PacketUplinkAssignment__TLV_encoder(const RR__PacketUplinkAssignment__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RR_PacketUplinkAssignment_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RR__PacketUplinkAssignment__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RR__PacketUplinkAssignment__TLV_decoder(OCTETSTRING& input_stream, RR__PacketUplinkAssignment__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RR_PacketUplinkAssignment_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RR__PacketUplinkAssignment__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RR__PacketDownlinkAssignment__TLV_lengthIndicator_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(RR__PacketDownlinkAssignment__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RR__PacketDownlinkAssignment__TLV_lengthIndicator_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(RR__PacketDownlinkAssignment__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RR__PacketDownlinkAssignment__TLV_rR__PacketDownlinkAssignment_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RR__PacketDownlinkAssignment__TLV_rR__PacketDownlinkAssignment_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RR__PacketDownlinkAssignment__TLV_encoder(const RR__PacketDownlinkAssignment__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RR_PacketDownlinkAssignment_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RR__PacketDownlinkAssignment__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RR__PacketDownlinkAssignment__TLV_decoder(OCTETSTRING& input_stream, RR__PacketDownlinkAssignment__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RR_PacketDownlinkAssignment_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RR__PacketDownlinkAssignment__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RR__DualCarrierPacketDownlinkAssignment__TLV_lengthIndicator_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(RR__DualCarrierPacketDownlinkAssignment__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RR__DualCarrierPacketDownlinkAssignment__TLV_lengthIndicator_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(RR__DualCarrierPacketDownlinkAssignment__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RR__DualCarrierPacketDownlinkAssignment__TLV_rR__DualCarrierPacketDownlinkAssignment_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RR__DualCarrierPacketDownlinkAssignment__TLV_rR__DualCarrierPacketDownlinkAssignment_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RR__DualCarrierPacketDownlinkAssignment__TLV_encoder(const RR__DualCarrierPacketDownlinkAssignment__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RR_DualCarrierPacketDownlinkAssignment_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RR__DualCarrierPacketDownlinkAssignment__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RR__DualCarrierPacketDownlinkAssignment__TLV_decoder(OCTETSTRING& input_stream, RR__DualCarrierPacketDownlinkAssignment__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RR_DualCarrierPacketDownlinkAssignment_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RR__DualCarrierPacketDownlinkAssignment__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__TV_encoder(const PageMode__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PageMode_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageMode__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageMode__TV_decoder(OCTETSTRING& input_stream, PageMode__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PageMode_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageMode__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__V_encoder(const PageMode__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PageMode_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PageMode__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PageMode__V_decoder(OCTETSTRING& input_stream, PageMode__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PageMode_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PageMode__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 PowerCommand__V_encoder(const PowerCommand__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PowerCommand_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PowerCommand__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PowerCommand__V_decoder(OCTETSTRING& input_stream, PowerCommand__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PowerCommand_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PowerCommand__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 PowerCommandAndAccesstype__V_encoder(const PowerCommandAndAccesstype__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PowerCommandAndAccesstype_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PowerCommandAndAccesstype__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PowerCommandAndAccesstype__V_decoder(OCTETSTRING& input_stream, PowerCommandAndAccesstype__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PowerCommandAndAccesstype_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PowerCommandAndAccesstype__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 RequestReference__V_t1_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(RequestReference__V_t1_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RequestReference__V_t1_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(RequestReference__V_t1_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RequestReference__V_t3_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(RequestReference__V_t3_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RequestReference__V_t3_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(RequestReference__V_t3_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RequestReference__V_t2_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(RequestReference__V_t2_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RequestReference__V_t2_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(RequestReference__V_t2_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RequestReference__V_encoder(const RequestReference__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RequestReference_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RequestReference__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RequestReference__V_decoder(OCTETSTRING& input_stream, RequestReference__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RequestReference_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RequestReference__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 RR__Cause__TV_encoder(const RR__Cause__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RR_Cause_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RR__Cause__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RR__Cause__TV_decoder(OCTETSTRING& input_stream, RR__Cause__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RR_Cause_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RR__Cause__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RR__Cause__V_encoder(const RR__Cause__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RR_Cause_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RR__Cause__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RR__Cause__V_decoder(OCTETSTRING& input_stream, RR__Cause__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RR_Cause_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RR__Cause__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 StartingTime__TV_t1_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(StartingTime__TV_t1_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER StartingTime__TV_t1_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(StartingTime__TV_t1_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void StartingTime__TV_t3_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(StartingTime__TV_t3_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER StartingTime__TV_t3_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(StartingTime__TV_t3_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void StartingTime__TV_t2_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(StartingTime__TV_t2_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER StartingTime__TV_t2_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(StartingTime__TV_t2_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void StartingTime__TV_encoder(const StartingTime__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.StartingTime_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(StartingTime__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER StartingTime__TV_decoder(OCTETSTRING& input_stream, StartingTime__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.StartingTime_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(StartingTime__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void StartingTime__V_t1_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(StartingTime__V_t1_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER StartingTime__V_t1_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(StartingTime__V_t1_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void StartingTime__V_t3_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(StartingTime__V_t3_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER StartingTime__V_t3_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(StartingTime__V_t3_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void StartingTime__V_t2_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(StartingTime__V_t2_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER StartingTime__V_t2_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(StartingTime__V_t2_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void StartingTime__V_encoder(const StartingTime__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.StartingTime_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(StartingTime__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER StartingTime__V_decoder(OCTETSTRING& input_stream, StartingTime__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.StartingTime_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(StartingTime__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 SynchronizationIndication__TV_encoder(const SynchronizationIndication__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.SynchronizationIndication_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(SynchronizationIndication__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER SynchronizationIndication__TV_decoder(OCTETSTRING& input_stream, SynchronizationIndication__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.SynchronizationIndication_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(SynchronizationIndication__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TimingAdvance__TV_encoder(const TimingAdvance__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.TimingAdvance_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TimingAdvance__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TimingAdvance__TV_decoder(OCTETSTRING& input_stream, TimingAdvance__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.TimingAdvance_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TimingAdvance__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TMSIP__TMSI__TV_encoder(const TMSIP__TMSI__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.TMSIP_TMSI_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TMSIP__TMSI__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TMSIP__TMSI__TV_decoder(OCTETSTRING& input_stream, TMSIP__TMSI__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.TMSIP_TMSI_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TMSIP__TMSI__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void VGCS__TargetModeIndication__TLV_lengthIndicator_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(VGCS__TargetModeIndication__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER VGCS__TargetModeIndication__TLV_lengthIndicator_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(VGCS__TargetModeIndication__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void VGCS__TargetModeIndication__TLV_encoder(const VGCS__TargetModeIndication__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.VGCS_TargetModeIndication_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(VGCS__TargetModeIndication__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER VGCS__TargetModeIndication__TLV_decoder(OCTETSTRING& input_stream, VGCS__TargetModeIndication__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.VGCS_TargetModeIndication_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(VGCS__TargetModeIndication__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void HEX9_encoder(const HEXSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `hexstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(HEX9_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER HEX9_decoder(OCTETSTRING& input_stream, HEXSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `hexstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(HEX9_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void VGCS__Ciphering__Parameters__TLV_lengthIndicator_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(VGCS__Ciphering__Parameters__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER VGCS__Ciphering__Parameters__TLV_lengthIndicator_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(VGCS__Ciphering__Parameters__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void VGCS__Ciphering__Parameters__TLV_cellIdentity_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(VGCS__Ciphering__Parameters__TLV_cellIdentity_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER VGCS__Ciphering__Parameters__TLV_cellIdentity_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(VGCS__Ciphering__Parameters__TLV_cellIdentity_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void VGCS__Ciphering__Parameters__TLV_lAI_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(VGCS__Ciphering__Parameters__TLV_lAI_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER VGCS__Ciphering__Parameters__TLV_lAI_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(VGCS__Ciphering__Parameters__TLV_lAI_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void VGCS__Ciphering__Parameters__TLV_vSTK__RAND_encoder(const HEXSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `hexstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(VGCS__Ciphering__Parameters__TLV_vSTK__RAND_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER VGCS__Ciphering__Parameters__TLV_vSTK__RAND_decoder(OCTETSTRING& input_stream, HEXSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `hexstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(VGCS__Ciphering__Parameters__TLV_vSTK__RAND_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void VGCS__Ciphering__Parameters__TLV_spare2_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(VGCS__Ciphering__Parameters__TLV_spare2_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER VGCS__Ciphering__Parameters__TLV_spare2_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(VGCS__Ciphering__Parameters__TLV_spare2_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void VGCS__Ciphering__Parameters__TLV_encoder(const VGCS__Ciphering__Parameters__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.VGCS_Ciphering_Parameters_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(VGCS__Ciphering__Parameters__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER VGCS__Ciphering__Parameters__TLV_decoder(OCTETSTRING& input_stream, VGCS__Ciphering__Parameters__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.VGCS_Ciphering_Parameters_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(VGCS__Ciphering__Parameters__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void WaitIndication__V_t3122__3142TimeoutValue_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(INTEGER_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER WaitIndication__V_t3122__3142TimeoutValue_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(INTEGER_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void WaitIndication__V_encoder(const WaitIndication__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.WaitIndication_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(WaitIndication__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER WaitIndication__V_decoder(OCTETSTRING& input_stream, WaitIndication__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.WaitIndication_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(WaitIndication__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 APDU__Flags__V_encoder(const APDU__Flags__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.APDU_Flags_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(APDU__Flags__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER APDU__Flags__V_decoder(OCTETSTRING& input_stream, APDU__Flags__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.APDU_Flags_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(APDU__Flags__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 APDU__Data__LV_lengthIndicator_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(APDU__Data__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER APDU__Data__LV_lengthIndicator_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(APDU__Data__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void APDU__Data__LV_aPDU__DataValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER APDU__Data__LV_aPDU__DataValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void APDU__Data__LV_encoder(const APDU__Data__LV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.APDU_Data_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(APDU__Data__LV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER APDU__Data__LV_decoder(OCTETSTRING& input_stream, APDU__Data__LV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.APDU_Data_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(APDU__Data__LV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void HandoverToUTRANCommand__LV_lengthIndicator_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(HandoverToUTRANCommand__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER HandoverToUTRANCommand__LV_lengthIndicator_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(HandoverToUTRANCommand__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void HandoverToUTRANCommand__LV_handoverToUTRANCommandValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER HandoverToUTRANCommand__LV_handoverToUTRANCommandValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void HandoverToUTRANCommand__LV_encoder(const HandoverToUTRANCommand__LV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.HandoverToUTRANCommand_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(HandoverToUTRANCommand__LV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER HandoverToUTRANCommand__LV_decoder(OCTETSTRING& input_stream, HandoverToUTRANCommand__LV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.HandoverToUTRANCommand_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(HandoverToUTRANCommand__LV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void HandoverToCDMA2000Command__LV_lengthIndicator_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(HandoverToCDMA2000Command__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER HandoverToCDMA2000Command__LV_lengthIndicator_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(HandoverToCDMA2000Command__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void HandoverToCDMA2000Command__LV_handoverToCDMA2000CommandValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER HandoverToCDMA2000Command__LV_handoverToCDMA2000CommandValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void HandoverToCDMA2000Command__LV_encoder(const HandoverToCDMA2000Command__LV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.HandoverToCDMA2000Command_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(HandoverToCDMA2000Command__LV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER HandoverToCDMA2000Command__LV_decoder(OCTETSTRING& input_stream, HandoverToCDMA2000Command__LV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.HandoverToCDMA2000Command_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(HandoverToCDMA2000Command__LV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RadioBearerReconfiguration__LV_lengthIndicator_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(RadioBearerReconfiguration__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RadioBearerReconfiguration__LV_lengthIndicator_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(RadioBearerReconfiguration__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RadioBearerReconfiguration__LV_radioBearerReconfiguration44118_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RadioBearerReconfiguration__LV_radioBearerReconfiguration44118_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RadioBearerReconfiguration__LV_encoder(const RadioBearerReconfiguration__LV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RadioBearerReconfiguration_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RadioBearerReconfiguration__LV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RadioBearerReconfiguration__LV_decoder(OCTETSTRING& input_stream, RadioBearerReconfiguration__LV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RadioBearerReconfiguration_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RadioBearerReconfiguration__LV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ServiceSupport__TV_encoder(const ServiceSupport__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ServiceSupport_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ServiceSupport__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ServiceSupport__TV_decoder(OCTETSTRING& input_stream, ServiceSupport__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ServiceSupport_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ServiceSupport__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ServiceSupport__V_encoder(const ServiceSupport__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ServiceSupport_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ServiceSupport__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ServiceSupport__V_decoder(OCTETSTRING& input_stream, ServiceSupport__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ServiceSupport_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ServiceSupport__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 MBMS__ptm__ChannelDescription__TLV_lengthIndicator_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(MBMS__ptm__ChannelDescription__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MBMS__ptm__ChannelDescription__TLV_lengthIndicator_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(MBMS__ptm__ChannelDescription__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MBMS__ptm__ChannelDescription__TLV_mMS__ptm__ChannelDescriptionValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MBMS__ptm__ChannelDescription__TLV_mMS__ptm__ChannelDescriptionValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MBMS__ptm__ChannelDescription__TLV_encoder(const MBMS__ptm__ChannelDescription__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MBMS_ptm_ChannelDescription_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MBMS__ptm__ChannelDescription__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MBMS__ptm__ChannelDescription__TLV_decoder(OCTETSTRING& input_stream, MBMS__ptm__ChannelDescription__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MBMS_ptm_ChannelDescription_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MBMS__ptm__ChannelDescription__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MBMS__SessionParameterList__TLV_lengthIndicator_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(MBMS__SessionParameterList__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MBMS__SessionParameterList__TLV_lengthIndicator_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(MBMS__SessionParameterList__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MBMS__SessionParameterList__TLV_mBMS__SessionParameterListValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MBMS__SessionParameterList__TLV_mBMS__SessionParameterListValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MBMS__SessionParameterList__TLV_encoder(const MBMS__SessionParameterList__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MBMS_SessionParameterList_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MBMS__SessionParameterList__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MBMS__SessionParameterList__TLV_decoder(OCTETSTRING& input_stream, MBMS__SessionParameterList__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MBMS_SessionParameterList_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MBMS__SessionParameterList__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DedicatedServiceInformation__TV_encoder(const DedicatedServiceInformation__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.DedicatedServiceInformation_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DedicatedServiceInformation__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DedicatedServiceInformation__TV_decoder(OCTETSTRING& input_stream, DedicatedServiceInformation__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.DedicatedServiceInformation_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DedicatedServiceInformation__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MPRACH__Description__TLV_lengthIndicator_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(MPRACH__Description__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MPRACH__Description__TLV_lengthIndicator_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(MPRACH__Description__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MPRACH__Description__TLV_mPRACH__DescriptionValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MPRACH__Description__TLV_mPRACH__DescriptionValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MPRACH__Description__TLV_encoder(const MPRACH__Description__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MPRACH_Description_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MPRACH__Description__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MPRACH__Description__TLV_decoder(OCTETSTRING& input_stream, MPRACH__Description__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MPRACH_Description_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MPRACH__Description__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RestrictionTimer__TV_encoder(const RestrictionTimer__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RestrictionTimer_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RestrictionTimer__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RestrictionTimer__TV_decoder(OCTETSTRING& input_stream, RestrictionTimer__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.RestrictionTimer_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RestrictionTimer__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MBMS__SessionIdentity__TV_encoder(const MBMS__SessionIdentity__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MBMS_SessionIdentity_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MBMS__SessionIdentity__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MBMS__SessionIdentity__TV_decoder(OCTETSTRING& input_stream, MBMS__SessionIdentity__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MBMS_SessionIdentity_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MBMS__SessionIdentity__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TalkerPriorityStatus__TLV_lengthIndicator_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(TalkerPriorityStatus__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TalkerPriorityStatus__TLV_lengthIndicator_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(TalkerPriorityStatus__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TalkerPriorityStatus__TLV_encoder(const TalkerPriorityStatus__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.TalkerPriorityStatus_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TalkerPriorityStatus__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TalkerPriorityStatus__TLV_decoder(OCTETSTRING& input_stream, TalkerPriorityStatus__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.TalkerPriorityStatus_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TalkerPriorityStatus__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TalkerIdentity__TLV_lengthIndicator_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(TalkerIdentity__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TalkerIdentity__TLV_lengthIndicator_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(TalkerIdentity__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TalkerIdentity__TLV_encoder(const TalkerIdentity__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.TalkerIdentity_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TalkerIdentity__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TalkerIdentity__TLV_decoder(OCTETSTRING& input_stream, TalkerIdentity__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.TalkerIdentity_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TalkerIdentity__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void Token__TV_encoder(const Token__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.Token_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(Token__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER Token__TV_decoder(OCTETSTRING& input_stream, Token__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.Token_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(Token__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PS__Cause__TV_encoder(const PS__Cause__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PS_Cause_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PS__Cause__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PS__Cause__TV_decoder(OCTETSTRING& input_stream, PS__Cause__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PS_Cause_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PS__Cause__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void VGCS__AMR__Configuration__TLV_lengthIndicator_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(VGCS__AMR__Configuration__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER VGCS__AMR__Configuration__TLV_lengthIndicator_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(VGCS__AMR__Configuration__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void VGCS__AMR__Configuration__TLV_encoder(const VGCS__AMR__Configuration__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.VGCS_AMR_Configuration_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(VGCS__AMR__Configuration__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER VGCS__AMR__Configuration__TLV_decoder(OCTETSTRING& input_stream, VGCS__AMR__Configuration__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.VGCS_AMR_Configuration_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(VGCS__AMR__Configuration__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CarrierIndication__TV_encoder(const CarrierIndication__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CarrierIndication_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CarrierIndication__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CarrierIndication__TV_decoder(OCTETSTRING& input_stream, CarrierIndication__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CarrierIndication_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CarrierIndication__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UplinkAccessIndication__TV_encoder(const UplinkAccessIndication__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.UplinkAccessIndication_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UplinkAccessIndication__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UplinkAccessIndication__TV_decoder(OCTETSTRING& input_stream, UplinkAccessIndication__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.UplinkAccessIndication_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UplinkAccessIndication__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void Individual__Priorities__TLV_lengthIndicator_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(Individual__Priorities__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER Individual__Priorities__TLV_lengthIndicator_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(Individual__Priorities__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void Individual__Priorities__TLV_encoder(const Individual__Priorities__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.Individual_Priorities_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(Individual__Priorities__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER Individual__Priorities__TLV_decoder(OCTETSTRING& input_stream, Individual__Priorities__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.Individual_Priorities_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(Individual__Priorities__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void FeatureIndicator__V_encoder(const FeatureIndicator__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.FeatureIndicator_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(FeatureIndicator__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER FeatureIndicator__V_decoder(OCTETSTRING& input_stream, FeatureIndicator__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.FeatureIndicator_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(FeatureIndicator__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 DL__DCCH__Message__LV_lengthIndicator_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(DL__DCCH__Message__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DL__DCCH__Message__LV_lengthIndicator_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(DL__DCCH__Message__LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DL__DCCH__Message__LV_dL__DCCH__MessageValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DL__DCCH__Message__LV_dL__DCCH__MessageValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DL__DCCH__Message__LV_encoder(const DL__DCCH__Message__LV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.DL_DCCH_Message_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DL__DCCH__Message__LV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DL__DCCH__Message__LV_decoder(OCTETSTRING& input_stream, DL__DCCH__Message__LV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.DL_DCCH_Message_LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DL__DCCH__Message__LV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CNToMSTransparentInformation__TLV_lengthIndicator_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(CNToMSTransparentInformation__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CNToMSTransparentInformation__TLV_lengthIndicator_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(CNToMSTransparentInformation__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CNToMSTransparentInformation__TLV_cNToMSTransparentInformationValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CNToMSTransparentInformation__TLV_cNToMSTransparentInformationValue_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CNToMSTransparentInformation__TLV_encoder(const CNToMSTransparentInformation__TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CNToMSTransparentInformation_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CNToMSTransparentInformation__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CNToMSTransparentInformation__TLV_decoder(OCTETSTRING& input_stream, CNToMSTransparentInformation__TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.CNToMSTransparentInformation_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CNToMSTransparentInformation__TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PLMNIndex__TV_encoder(const PLMNIndex__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PLMNIndex_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PLMNIndex__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PLMNIndex__TV_decoder(OCTETSTRING& input_stream, PLMNIndex__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PLMNIndex_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PLMNIndex__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ExtendedTSCSet__TV_encoder(const ExtendedTSCSet__TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ExtendedTSCSet_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ExtendedTSCSet__TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ExtendedTSCSet__TV_decoder(OCTETSTRING& input_stream, ExtendedTSCSet__TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ExtendedTSCSet_TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ExtendedTSCSet__TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__AdditionalAssignment__NW__MS_encoder(const PDU__RRM__AdditionalAssignment__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_AdditionalAssignment_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__AdditionalAssignment__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__AdditionalAssignment__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__AdditionalAssignment__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_AdditionalAssignment_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__AdditionalAssignment__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__AssignmentCommand__NW__MS_encoder(const PDU__RRM__AssignmentCommand__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_AssignmentCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__AssignmentCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__AssignmentCommand__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__AssignmentCommand__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_AssignmentCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__AssignmentCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__AssignmentComplete__MS__NW_encoder(const PDU__RRM__AssignmentComplete__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_AssignmentComplete_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__AssignmentComplete__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__AssignmentComplete__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__AssignmentComplete__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_AssignmentComplete_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__AssignmentComplete__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__AssignmentFailure__MS__NW_encoder(const PDU__RRM__AssignmentFailure__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_AssignmentFailure_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__AssignmentFailure__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__AssignmentFailure__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__AssignmentFailure__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_AssignmentFailure_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__AssignmentFailure__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ChannelModeModify__NW__MS_encoder(const PDU__RRM__ChannelModeModify__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ChannelModeModify_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__ChannelModeModify__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ChannelModeModify__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__ChannelModeModify__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ChannelModeModify_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__ChannelModeModify__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ChannelModeModifyAck__MS__NW_encoder(const PDU__RRM__ChannelModeModifyAck__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ChannelModeModifyAck_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__ChannelModeModifyAck__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ChannelModeModifyAck__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__ChannelModeModifyAck__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ChannelModeModifyAck_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__ChannelModeModifyAck__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ChannelRelease__NW__MS_encoder(const PDU__RRM__ChannelRelease__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ChannelRelease_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__ChannelRelease__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ChannelRelease__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__ChannelRelease__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ChannelRelease_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__ChannelRelease__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__CipheringModeCommand__NW__MS_encoder(const PDU__RRM__CipheringModeCommand__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_CipheringModeCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__CipheringModeCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__CipheringModeCommand__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__CipheringModeCommand__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_CipheringModeCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__CipheringModeCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__CipheringModeComplete__MS__NW_encoder(const PDU__RRM__CipheringModeComplete__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_CipheringModeComplete_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__CipheringModeComplete__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__CipheringModeComplete__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__CipheringModeComplete__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_CipheringModeComplete_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__CipheringModeComplete__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ClassmarkChange__MS__NW_encoder(const PDU__RRM__ClassmarkChange__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ClassmarkChange_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__ClassmarkChange__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ClassmarkChange__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__ClassmarkChange__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ClassmarkChange_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__ClassmarkChange__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__UTRAN__ClassmarkChange__MS__NW_encoder(const PDU__RRM__UTRAN__ClassmarkChange__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_UTRAN_ClassmarkChange_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__UTRAN__ClassmarkChange__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__UTRAN__ClassmarkChange__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__UTRAN__ClassmarkChange__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_UTRAN_ClassmarkChange_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__UTRAN__ClassmarkChange__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_encoder(const PDU__RRM__CDMA2000__ClassmarkChange__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_CDMA2000_ClassmarkChange_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__CDMA2000__ClassmarkChange__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_CDMA2000_ClassmarkChange_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__CDMA2000__ClassmarkChange__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_encoder(const PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_GERAN_IU_ModeClassmarkChange_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_GERAN_IU_ModeClassmarkChange_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__GERAN__IU__ModeClassmarkChange__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ClassmarkEnquiry__NW__MS_encoder(const PDU__RRM__ClassmarkEnquiry__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ClassmarkEnquiry_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__ClassmarkEnquiry__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ClassmarkEnquiry__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__ClassmarkEnquiry__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ClassmarkEnquiry_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__ClassmarkEnquiry__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ConfigurationChangeCommand__NW__MS_encoder(const PDU__RRM__ConfigurationChangeCommand__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ConfigurationChangeCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__ConfigurationChangeCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ConfigurationChangeCommand__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__ConfigurationChangeCommand__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ConfigurationChangeCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__ConfigurationChangeCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ConfigurationChangeAck__MS__NW_encoder(const PDU__RRM__ConfigurationChangeAck__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ConfigurationChangeAck_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__ConfigurationChangeAck__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ConfigurationChangeAck__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__ConfigurationChangeAck__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ConfigurationChangeAck_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__ConfigurationChangeAck__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ConfigurationChangeRej__MS__NW_encoder(const PDU__RRM__ConfigurationChangeRej__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ConfigurationChangeRej_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__ConfigurationChangeRej__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ConfigurationChangeRej__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__ConfigurationChangeRej__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ConfigurationChangeRej_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__ConfigurationChangeRej__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__DTM__AssignmentCommand__NW__MS_encoder(const PDU__RRM__DTM__AssignmentCommand__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_DTM_AssignmentCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__DTM__AssignmentCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__DTM__AssignmentCommand__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__DTM__AssignmentCommand__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_DTM_AssignmentCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__DTM__AssignmentCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__DTM__AssignmentFailure__MS__NW_encoder(const PDU__RRM__DTM__AssignmentFailure__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_DTM_AssignmentFailure_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__DTM__AssignmentFailure__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__DTM__AssignmentFailure__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__DTM__AssignmentFailure__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_DTM_AssignmentFailure_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__DTM__AssignmentFailure__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__DTM__Information__NW__MS_encoder(const PDU__RRM__DTM__Information__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_DTM_Information_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__DTM__Information__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__DTM__Information__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__DTM__Information__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_DTM_Information_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__DTM__Information__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__DTM__Reject__NW__MS_encoder(const PDU__RRM__DTM__Reject__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_DTM_Reject_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__DTM__Reject__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__DTM__Reject__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__DTM__Reject__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_DTM_Reject_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__DTM__Reject__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__DTM__Request__MS__NW_encoder(const PDU__RRM__DTM__Request__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_DTM_Request_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__DTM__Request__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__DTM__Request__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__DTM__Request__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_DTM_Request_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__DTM__Request__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__Frequency__Redefinition__NW__MS_encoder(const PDU__RRM__Frequency__Redefinition__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_Frequency_Redefinition_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__Frequency__Redefinition__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__Frequency__Redefinition__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__Frequency__Redefinition__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_Frequency_Redefinition_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__Frequency__Redefinition__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__GPRS__SuspensionRequest__MS__NW_encoder(const PDU__RRM__GPRS__SuspensionRequest__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_GPRS_SuspensionRequest_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__GPRS__SuspensionRequest__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__GPRS__SuspensionRequest__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__GPRS__SuspensionRequest__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_GPRS_SuspensionRequest_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__GPRS__SuspensionRequest__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__HandoverAccess__NW__MS_encoder(const PDU__RRM__HandoverAccess__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_HandoverAccess_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__HandoverAccess__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__HandoverAccess__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__HandoverAccess__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_HandoverAccess_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__HandoverAccess__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__HandoverCommand__NW__MS_encoder(const PDU__RRM__HandoverCommand__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_HandoverCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__HandoverCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__HandoverCommand__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__HandoverCommand__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_HandoverCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__HandoverCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_encoder(const PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_InterSystemToUTRAN_HandoverCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_InterSystemToUTRAN_HandoverCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__InterSystemToUTRAN__HandoverCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_encoder(const PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_InterSystemToCDMA2000HandoverCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_InterSystemToCDMA2000HandoverCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__InterSystemToCDMA2000HandoverCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__HandoverToGERAN__IuModeCommand__NW__MS_encoder(const PDU__RRM__HandoverToGERAN__IuModeCommand__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_HandoverToGERAN_IuModeCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__HandoverToGERAN__IuModeCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__HandoverToGERAN__IuModeCommand__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__HandoverToGERAN__IuModeCommand__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_HandoverToGERAN_IuModeCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__HandoverToGERAN__IuModeCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_encoder(const PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_InterSystemToEUTRAN_HandoverCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_InterSystemToEUTRAN_HandoverCommand_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__InterSystemToEUTRAN__HandoverCommand__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__HandoverComplete__MS__NW_encoder(const PDU__RRM__HandoverComplete__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_HandoverComplete_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__HandoverComplete__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__HandoverComplete__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__HandoverComplete__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_HandoverComplete_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__HandoverComplete__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__HandoverFailure__MS__NW_encoder(const PDU__RRM__HandoverFailure__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_HandoverFailure_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__HandoverFailure__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__HandoverFailure__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__HandoverFailure__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_HandoverFailure_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__HandoverFailure__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ImmediateAssignment__NW__MS_channelDescription_encoder(const ChannelDescription__V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelDescription_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__ImmediateAssignment__NW__MS_channelDescription_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ImmediateAssignment__NW__MS_channelDescription_decoder(OCTETSTRING& input_stream, ChannelDescription__V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.ChannelDescription_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__ImmediateAssignment__NW__MS_channelDescription_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ImmediateAssignment__NW__MS_packetChannelDescription_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(PDU__RRM__ImmediateAssignment__NW__MS_packetChannelDescription_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ImmediateAssignment__NW__MS_packetChannelDescription_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(PDU__RRM__ImmediateAssignment__NW__MS_packetChannelDescription_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ImmediateAssignment__NW__MS_iA__RestOctets_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ImmediateAssignment__NW__MS_iA__RestOctets_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ImmediateAssignment__NW__MS_encoder(const PDU__RRM__ImmediateAssignment__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ImmediateAssignment_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__ImmediateAssignment__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ImmediateAssignment__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__ImmediateAssignment__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ImmediateAssignment_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__ImmediateAssignment__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ImmediatePacketAssignment__NW__MS_iPA__RestOctets_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(PDU__RRM__ImmediatePacketAssignment__NW__MS_iPA__RestOctets_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ImmediatePacketAssignment__NW__MS_iPA__RestOctets_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(PDU__RRM__ImmediatePacketAssignment__NW__MS_iPA__RestOctets_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ImmediatePacketAssignment__NW__MS_encoder(const PDU__RRM__ImmediatePacketAssignment__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ImmediatePacketAssignment_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__ImmediatePacketAssignment__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ImmediatePacketAssignment__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__ImmediatePacketAssignment__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ImmediatePacketAssignment_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__ImmediatePacketAssignment__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ImmediateAssignmentExtended__NW__MS_iAX__RestOctets_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ImmediateAssignmentExtended__NW__MS_iAX__RestOctets_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(OCTETSTRING_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ImmediateAssignmentExtended__NW__MS_encoder(const PDU__RRM__ImmediateAssignmentExtended__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ImmediateAssignmentExtended_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__ImmediateAssignmentExtended__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ImmediateAssignmentExtended__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__ImmediateAssignmentExtended__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ImmediateAssignmentExtended_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__ImmediateAssignmentExtended__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ImmediateAssignmentReject__NW__MS_iAR__RestOctets_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(PDU__RRM__ImmediateAssignmentReject__NW__MS_iAR__RestOctets_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ImmediateAssignmentReject__NW__MS_iAR__RestOctets_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(PDU__RRM__ImmediateAssignmentReject__NW__MS_iAR__RestOctets_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ImmediateAssignmentReject__NW__MS_encoder(const PDU__RRM__ImmediateAssignmentReject__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ImmediateAssignmentReject_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__ImmediateAssignmentReject__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ImmediateAssignmentReject__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__ImmediateAssignmentReject__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ImmediateAssignmentReject_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__ImmediateAssignmentReject__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__NotificationResponse__MS__NW_encoder(const PDU__RRM__NotificationResponse__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_NotificationResponse_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__NotificationResponse__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__NotificationResponse__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__NotificationResponse__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_NotificationResponse_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__NotificationResponse__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__PacketNotification__NW__MS_encoder(const PDU__RRM__PacketNotification__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__PacketNotification__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__PacketNotification__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__PacketNotification__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PacketNotification_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__PacketNotification__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MBMS__Announcement__NW__MS_encoder(const MBMS__Announcement__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MBMS_Announcement_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MBMS__Announcement__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MBMS__Announcement__NW__MS_decoder(OCTETSTRING& input_stream, MBMS__Announcement__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.MBMS_Announcement_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MBMS__Announcement__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__PagingReq__Type1__NW__MS_encoder(const PDU__RRM__PagingReq__Type1__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__PagingReq__Type1__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__PagingReq__Type1__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__PagingReq__Type1__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type1_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__PagingReq__Type1__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__PagingReq__Type2__NW__MS_encoder(const PDU__RRM__PagingReq__Type2__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__PagingReq__Type2__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__PagingReq__Type2__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__PagingReq__Type2__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type2_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__PagingReq__Type2__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__PagingReq__Type3__NW__MS_encoder(const PDU__RRM__PagingReq__Type3__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__PagingReq__Type3__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__PagingReq__Type3__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__PagingReq__Type3__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PagingReq_Type3_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__PagingReq__Type3__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__PagingResponse__MS__NW_encoder(const PDU__RRM__PagingResponse__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__PagingResponse__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__PagingResponse__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__PagingResponse__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PagingResponse_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__PagingResponse__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__PartialRelease__NW__MS_encoder(const PDU__RRM__PartialRelease__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PartialRelease_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__PartialRelease__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__PartialRelease__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__PartialRelease__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PartialRelease_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__PartialRelease__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__PartialReleaseComplete__MS__NW_encoder(const PDU__RRM__PartialReleaseComplete__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PartialReleaseComplete_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__PartialReleaseComplete__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__PartialReleaseComplete__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__PartialReleaseComplete__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PartialReleaseComplete_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__PartialReleaseComplete__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__PhysicalInformation__NW__MS_encoder(const PDU__RRM__PhysicalInformation__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PhysicalInformation_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__PhysicalInformation__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__PhysicalInformation__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__PhysicalInformation__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_PhysicalInformation_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__PhysicalInformation__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__RR__Status_encoder(const PDU__RRM__RR__Status& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_RR_Status' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__RR__Status_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__RR__Status_decoder(OCTETSTRING& input_stream, PDU__RRM__RR__Status& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_RR_Status' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__RR__Status_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__TalkerIndication__MS__NW_encoder(const PDU__RRM__TalkerIndication__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__TalkerIndication__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__TalkerIndication__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__TalkerIndication__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_TalkerIndication_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__TalkerIndication__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__UplinkBusy__NW__MS_encoder(const PDU__RRM__UplinkBusy__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__UplinkBusy__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__UplinkBusy__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__UplinkBusy__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_UplinkBusy_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__UplinkBusy__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__UplinkRelease_encoder(const PDU__RRM__UplinkRelease& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_UplinkRelease' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__UplinkRelease_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__UplinkRelease_decoder(OCTETSTRING& input_stream, PDU__RRM__UplinkRelease& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_UplinkRelease' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__UplinkRelease_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__VGCS__UplinkGrant__NW__MS_encoder(const PDU__RRM__VGCS__UplinkGrant__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__VGCS__UplinkGrant__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__VGCS__UplinkGrant__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__VGCS__UplinkGrant__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_VGCS_UplinkGrant_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__VGCS__UplinkGrant__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ApplicationInformation_encoder(const PDU__RRM__ApplicationInformation& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ApplicationInformation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__ApplicationInformation_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ApplicationInformation_decoder(OCTETSTRING& input_stream, PDU__RRM__ApplicationInformation& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ApplicationInformation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__ApplicationInformation_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__ServiceInformationMessage__MS__NW_encoder(const PDU__RRM__ServiceInformationMessage__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__ServiceInformationMessage__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__ServiceInformationMessage__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__ServiceInformationMessage__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_ServiceInformationMessage_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__ServiceInformationMessage__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__MS__NW_encoder(const PDU__RRM__MS__NW& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__MS__NW_decoder(OCTETSTRING& input_stream, PDU__RRM__MS__NW& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_MS_NW' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__MS__NW_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDU__RRM__NW__MS_encoder(const PDU__RRM__NW__MS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__RRM__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__RRM__NW__MS_decoder(OCTETSTRING& input_stream, PDU__RRM__NW__MS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `@MobileL3_RRM_Types.PDU_RRM_NW_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__RRM__NW__MS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}


/* Bodies of static functions */

void pre_init_module()
{
TTCN_Location current_location("MobileL3_RRM_Types.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "MobileL3_RRM_Types");
MobileL3__GMM__SM__Types::module_object.pre_init_module();
}

void post_init_module()
{
TTCN_Location current_location("MobileL3_RRM_Types.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "MobileL3_RRM_Types");
MobileL3__GMM__SM__Types::module_object.post_init_module();
}


} /* end of namespace */
