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

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

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

/* Including header files */

#include "MobileL3_GMM_SM_Types.hh"

namespace MobileL3__GMM__SM__Types {

/* Member functions of C++ classes */

PDU__SM__ActivateSecondaryPDPContextAccept::PDU__SM__ActivateSecondaryPDPContextAccept()
{
}

PDU__SM__ActivateSecondaryPDPContextAccept::PDU__SM__ActivateSecondaryPDPContextAccept(const BITSTRING& par_messageType,
    const LLC__SAPIV& par_negotiatedLLC__SAPI,
    const QoSLV& par_negotiatedQoS,
    const RadioPriorityV& par_radioPriority,
    const BITSTRING& par_spare,
    const OPTIONAL< PacketFlowIDTLV >& par_packetFlowIdentifier,
    const OPTIONAL< ProtocolConfigOptionsTLV >& par_protocolConfigOpts,
    const OPTIONAL< WLANOffloadAcceptabilityTV >& par_wLANOffloadIndication,
    const OPTIONAL< NBIFOM__ContainerTLV >& par_nBIFOM__Container)
  :   field_messageType(par_messageType),
  field_negotiatedLLC__SAPI(par_negotiatedLLC__SAPI),
  field_negotiatedQoS(par_negotiatedQoS),
  field_radioPriority(par_radioPriority),
  field_spare(par_spare),
  field_packetFlowIdentifier(par_packetFlowIdentifier),
  field_protocolConfigOpts(par_protocolConfigOpts),
  field_wLANOffloadIndication(par_wLANOffloadIndication),
  field_nBIFOM__Container(par_nBIFOM__Container)
{
}

PDU__SM__ActivateSecondaryPDPContextAccept::PDU__SM__ActivateSecondaryPDPContextAccept(const PDU__SM__ActivateSecondaryPDPContextAccept& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.negotiatedLLC__SAPI().is_bound()) field_negotiatedLLC__SAPI = other_value.negotiatedLLC__SAPI();
else field_negotiatedLLC__SAPI.clean_up();
if (other_value.negotiatedQoS().is_bound()) field_negotiatedQoS = other_value.negotiatedQoS();
else field_negotiatedQoS.clean_up();
if (other_value.radioPriority().is_bound()) field_radioPriority = other_value.radioPriority();
else field_radioPriority.clean_up();
if (other_value.spare().is_bound()) field_spare = other_value.spare();
else field_spare.clean_up();
if (other_value.packetFlowIdentifier().is_bound()) field_packetFlowIdentifier = other_value.packetFlowIdentifier();
else field_packetFlowIdentifier.clean_up();
if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
else field_protocolConfigOpts.clean_up();
if (other_value.wLANOffloadIndication().is_bound()) field_wLANOffloadIndication = other_value.wLANOffloadIndication();
else field_wLANOffloadIndication.clean_up();
if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
else field_nBIFOM__Container.clean_up();
}

void PDU__SM__ActivateSecondaryPDPContextAccept::clean_up()
{
field_messageType.clean_up();
field_negotiatedLLC__SAPI.clean_up();
field_negotiatedQoS.clean_up();
field_radioPriority.clean_up();
field_spare.clean_up();
field_packetFlowIdentifier.clean_up();
field_protocolConfigOpts.clean_up();
field_wLANOffloadIndication.clean_up();
field_nBIFOM__Container.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__ActivateSecondaryPDPContextAccept::get_descriptor() const { return &PDU__SM__ActivateSecondaryPDPContextAccept_descr_; }
PDU__SM__ActivateSecondaryPDPContextAccept& PDU__SM__ActivateSecondaryPDPContextAccept::operator=(const PDU__SM__ActivateSecondaryPDPContextAccept& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.negotiatedLLC__SAPI().is_bound()) field_negotiatedLLC__SAPI = other_value.negotiatedLLC__SAPI();
  else field_negotiatedLLC__SAPI.clean_up();
  if (other_value.negotiatedQoS().is_bound()) field_negotiatedQoS = other_value.negotiatedQoS();
  else field_negotiatedQoS.clean_up();
  if (other_value.radioPriority().is_bound()) field_radioPriority = other_value.radioPriority();
  else field_radioPriority.clean_up();
  if (other_value.spare().is_bound()) field_spare = other_value.spare();
  else field_spare.clean_up();
  if (other_value.packetFlowIdentifier().is_bound()) field_packetFlowIdentifier = other_value.packetFlowIdentifier();
  else field_packetFlowIdentifier.clean_up();
  if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
  else field_protocolConfigOpts.clean_up();
  if (other_value.wLANOffloadIndication().is_bound()) field_wLANOffloadIndication = other_value.wLANOffloadIndication();
  else field_wLANOffloadIndication.clean_up();
  if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
  else field_nBIFOM__Container.clean_up();
}
return *this;
}

boolean PDU__SM__ActivateSecondaryPDPContextAccept::operator==(const PDU__SM__ActivateSecondaryPDPContextAccept& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_negotiatedLLC__SAPI==other_value.field_negotiatedLLC__SAPI
  && field_negotiatedQoS==other_value.field_negotiatedQoS
  && field_radioPriority==other_value.field_radioPriority
  && field_spare==other_value.field_spare
  && field_packetFlowIdentifier==other_value.field_packetFlowIdentifier
  && field_protocolConfigOpts==other_value.field_protocolConfigOpts
  && field_wLANOffloadIndication==other_value.field_wLANOffloadIndication
  && field_nBIFOM__Container==other_value.field_nBIFOM__Container;
}

boolean PDU__SM__ActivateSecondaryPDPContextAccept::is_bound() const
{
return (field_messageType.is_bound())
  || (field_negotiatedLLC__SAPI.is_bound())
  || (field_negotiatedQoS.is_bound())
  || (field_radioPriority.is_bound())
  || (field_spare.is_bound())
  || (OPTIONAL_OMIT == field_packetFlowIdentifier.get_selection() || field_packetFlowIdentifier.is_bound())
  || (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_bound())
  || (OPTIONAL_OMIT == field_wLANOffloadIndication.get_selection() || field_wLANOffloadIndication.is_bound())
  || (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_bound());
}
boolean PDU__SM__ActivateSecondaryPDPContextAccept::is_value() const
{
return field_messageType.is_value()
  && field_negotiatedLLC__SAPI.is_value()
  && field_negotiatedQoS.is_value()
  && field_radioPriority.is_value()
  && field_spare.is_value()
  && (OPTIONAL_OMIT == field_packetFlowIdentifier.get_selection() || field_packetFlowIdentifier.is_value())
  && (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_value())
  && (OPTIONAL_OMIT == field_wLANOffloadIndication.get_selection() || field_wLANOffloadIndication.is_value())
  && (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_value());
}
int PDU__SM__ActivateSecondaryPDPContextAccept::size_of() const
{
  int ret_val = 5;
  if (field_packetFlowIdentifier.ispresent()) ret_val++;
  if (field_protocolConfigOpts.ispresent()) ret_val++;
  if (field_wLANOffloadIndication.ispresent()) ret_val++;
  if (field_nBIFOM__Container.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__ActivateSecondaryPDPContextAccept::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(", negotiatedLLC_SAPI := ");
field_negotiatedLLC__SAPI.log();
TTCN_Logger::log_event_str(", negotiatedQoS := ");
field_negotiatedQoS.log();
TTCN_Logger::log_event_str(", radioPriority := ");
field_radioPriority.log();
TTCN_Logger::log_event_str(", spare := ");
field_spare.log();
TTCN_Logger::log_event_str(", packetFlowIdentifier := ");
field_packetFlowIdentifier.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", wLANOffloadIndication := ");
field_wLANOffloadIndication.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
field_nBIFOM__Container.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__ActivateSecondaryPDPContextAccept::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (negotiatedLLC__SAPI().is_bound()) negotiatedLLC__SAPI().set_implicit_omit();
if (negotiatedQoS().is_bound()) negotiatedQoS().set_implicit_omit();
if (radioPriority().is_bound()) radioPriority().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (!packetFlowIdentifier().is_bound()) packetFlowIdentifier() = OMIT_VALUE;
else packetFlowIdentifier().set_implicit_omit();
if (!protocolConfigOpts().is_bound()) protocolConfigOpts() = OMIT_VALUE;
else protocolConfigOpts().set_implicit_omit();
if (!wLANOffloadIndication().is_bound()) wLANOffloadIndication() = OMIT_VALUE;
else wLANOffloadIndication().set_implicit_omit();
if (!nBIFOM__Container().is_bound()) nBIFOM__Container() = OMIT_VALUE;
else nBIFOM__Container().set_implicit_omit();
}

void PDU__SM__ActivateSecondaryPDPContextAccept::set_param(Module_Param& param)
{
  param.basic_check(Module_Param::BC_VALUE, "record value");
  switch (param.get_type()) {
  case Module_Param::MP_Value_List:
    if (9<param.get_size()) {
      param.error("record value of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept has 9 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) messageType().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) negotiatedLLC__SAPI().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) negotiatedQoS().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) radioPriority().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) spare().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) packetFlowIdentifier().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) wLANOffloadIndication().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().set_param(*param.get_elem(8));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "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(), "negotiatedLLC_SAPI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          negotiatedLLC__SAPI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "negotiatedQoS")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          negotiatedQoS().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "radioPriority")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          radioPriority().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "packetFlowIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          packetFlowIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "wLANOffloadIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          wLANOffloadIndication().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept");
  }
}

void PDU__SM__ActivateSecondaryPDPContextAccept::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_negotiatedLLC__SAPI.encode_text(text_buf);
field_negotiatedQoS.encode_text(text_buf);
field_radioPriority.encode_text(text_buf);
field_spare.encode_text(text_buf);
field_packetFlowIdentifier.encode_text(text_buf);
field_protocolConfigOpts.encode_text(text_buf);
field_wLANOffloadIndication.encode_text(text_buf);
field_nBIFOM__Container.encode_text(text_buf);
}

void PDU__SM__ActivateSecondaryPDPContextAccept::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_negotiatedLLC__SAPI.decode_text(text_buf);
field_negotiatedQoS.decode_text(text_buf);
field_radioPriority.decode_text(text_buf);
field_spare.decode_text(text_buf);
field_packetFlowIdentifier.decode_text(text_buf);
field_protocolConfigOpts.decode_text(text_buf);
field_wLANOffloadIndication.decode_text(text_buf);
field_nBIFOM__Container.decode_text(text_buf);
}

void PDU__SM__ActivateSecondaryPDPContextAccept::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__ActivateSecondaryPDPContextAccept::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__ActivateSecondaryPDPContextAccept::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, LLC__SAPIV_descr_.raw->forceomit);
  decoded_field_length = field_negotiatedLLC__SAPI.RAW_decode(LLC__SAPIV_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, QoSLV_descr_.raw->forceomit);
  decoded_field_length = field_negotiatedQoS.RAW_decode(QoSLV_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, RadioPriorityV_descr_.raw->forceomit);
  decoded_field_length = field_radioPriority.RAW_decode(RadioPriorityV_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, General__Types::BIT4_descr_.raw->forceomit);
  decoded_field_length = field_spare.RAW_decode(General__Types::BIT4_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_packetFlowIdentifier = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, PacketFlowIDTLV_descr_.raw->forceomit);
  decoded_field_length = field_packetFlowIdentifier().RAW_decode(PacketFlowIDTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_packetFlowIdentifier = 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_packetFlowIdentifier=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_protocolConfigOpts = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, ProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_protocolConfigOpts().RAW_decode(ProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_protocolConfigOpts = 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_protocolConfigOpts=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(7)) {
    field_wLANOffloadIndication = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_7_force_omit(7, force_omit, WLANOffloadAcceptabilityTV_descr_.raw->forceomit);
  decoded_field_length = field_wLANOffloadIndication().RAW_decode(WLANOffloadAcceptabilityTV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 1) {
  field_wLANOffloadIndication = 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_wLANOffloadIndication=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(8)) {
    field_nBIFOM__Container = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_8_force_omit(8, force_omit, NBIFOM__ContainerTLV_descr_.raw->forceomit);
  decoded_field_length = field_nBIFOM__Container().RAW_decode(NBIFOM__ContainerTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_8_force_omit);
  if (decoded_field_length < 1) {
  field_nBIFOM__Container = 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_nBIFOM__Container=OMIT_VALUE;
  if (field_messageType !=  bs_55) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__ActivateSecondaryPDPContextAccept::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const {
  if (!is_bound()) TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 9;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(9);
  myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 0, General__Types::BIT8_descr_.raw);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, LLC__SAPIV_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, QoSLV_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, RadioPriorityV_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, General__Types::BIT4_descr_.raw);
  if (field_packetFlowIdentifier.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, PacketFlowIDTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_protocolConfigOpts.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, ProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  if (field_wLANOffloadIndication.ispresent()) {
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, WLANOffloadAcceptabilityTV_descr_.raw);
  }
  else myleaf.body.node.nodes[7] = NULL;
  if (field_nBIFOM__Container.ispresent()) {
  myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 8, NBIFOM__ContainerTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[8] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_negotiatedLLC__SAPI.RAW_encode(LLC__SAPIV_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_negotiatedQoS.RAW_encode(QoSLV_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_radioPriority.RAW_encode(RadioPriorityV_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_spare.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[4]);
  if (field_packetFlowIdentifier.ispresent()) {
  encoded_length += field_packetFlowIdentifier().RAW_encode(PacketFlowIDTLV_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_protocolConfigOpts.ispresent()) {
  encoded_length += field_protocolConfigOpts().RAW_encode(ProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[6]);
  }
  if (field_wLANOffloadIndication.ispresent()) {
  encoded_length += field_wLANOffloadIndication().RAW_encode(WLANOffloadAcceptabilityTV_descr_, *myleaf.body.node.nodes[7]);
  }
  if (field_nBIFOM__Container.ispresent()) {
  encoded_length += field_nBIFOM__Container().RAW_encode(NBIFOM__ContainerTLV_descr_, *myleaf.body.node.nodes[8]);
  }
  if (field_messageType !=  bs_55) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__ActivateSecondaryPDPContextAccept_template::single_value_struct {
BITSTRING_template field_messageType;
LLC__SAPIV_template field_negotiatedLLC__SAPI;
QoSLV_template field_negotiatedQoS;
RadioPriorityV_template field_radioPriority;
BITSTRING_template field_spare;
PacketFlowIDTLV_template field_packetFlowIdentifier;
ProtocolConfigOptionsTLV_template field_protocolConfigOpts;
WLANOffloadAcceptabilityTV_template field_wLANOffloadIndication;
NBIFOM__ContainerTLV_template field_nBIFOM__Container;
};

void PDU__SM__ActivateSecondaryPDPContextAccept_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_negotiatedLLC__SAPI = ANY_VALUE;
single_value->field_negotiatedQoS = ANY_VALUE;
single_value->field_radioPriority = ANY_VALUE;
single_value->field_spare = ANY_VALUE;
single_value->field_packetFlowIdentifier = ANY_OR_OMIT;
single_value->field_protocolConfigOpts = ANY_OR_OMIT;
single_value->field_wLANOffloadIndication = ANY_OR_OMIT;
single_value->field_nBIFOM__Container = ANY_OR_OMIT;
}
}
}

void PDU__SM__ActivateSecondaryPDPContextAccept_template::copy_value(const PDU__SM__ActivateSecondaryPDPContextAccept& 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.negotiatedLLC__SAPI().is_bound()) {
  single_value->field_negotiatedLLC__SAPI = other_value.negotiatedLLC__SAPI();
} else {
  single_value->field_negotiatedLLC__SAPI.clean_up();
}
if (other_value.negotiatedQoS().is_bound()) {
  single_value->field_negotiatedQoS = other_value.negotiatedQoS();
} else {
  single_value->field_negotiatedQoS.clean_up();
}
if (other_value.radioPriority().is_bound()) {
  single_value->field_radioPriority = other_value.radioPriority();
} else {
  single_value->field_radioPriority.clean_up();
}
if (other_value.spare().is_bound()) {
  single_value->field_spare = other_value.spare();
} else {
  single_value->field_spare.clean_up();
}
if (other_value.packetFlowIdentifier().is_bound()) {
  if (other_value.packetFlowIdentifier().ispresent()) single_value->field_packetFlowIdentifier = other_value.packetFlowIdentifier()();
  else single_value->field_packetFlowIdentifier = OMIT_VALUE;
} else {
  single_value->field_packetFlowIdentifier.clean_up();
}
if (other_value.protocolConfigOpts().is_bound()) {
  if (other_value.protocolConfigOpts().ispresent()) single_value->field_protocolConfigOpts = other_value.protocolConfigOpts()();
  else single_value->field_protocolConfigOpts = OMIT_VALUE;
} else {
  single_value->field_protocolConfigOpts.clean_up();
}
if (other_value.wLANOffloadIndication().is_bound()) {
  if (other_value.wLANOffloadIndication().ispresent()) single_value->field_wLANOffloadIndication = other_value.wLANOffloadIndication()();
  else single_value->field_wLANOffloadIndication = OMIT_VALUE;
} else {
  single_value->field_wLANOffloadIndication.clean_up();
}
if (other_value.nBIFOM__Container().is_bound()) {
  if (other_value.nBIFOM__Container().ispresent()) single_value->field_nBIFOM__Container = other_value.nBIFOM__Container()();
  else single_value->field_nBIFOM__Container = OMIT_VALUE;
} else {
  single_value->field_nBIFOM__Container.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__ActivateSecondaryPDPContextAccept_template::copy_template(const PDU__SM__ActivateSecondaryPDPContextAccept_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.negotiatedLLC__SAPI().get_selection()) {
single_value->field_negotiatedLLC__SAPI = other_value.negotiatedLLC__SAPI();
} else {
single_value->field_negotiatedLLC__SAPI.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.negotiatedQoS().get_selection()) {
single_value->field_negotiatedQoS = other_value.negotiatedQoS();
} else {
single_value->field_negotiatedQoS.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.radioPriority().get_selection()) {
single_value->field_radioPriority = other_value.radioPriority();
} else {
single_value->field_radioPriority.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare().get_selection()) {
single_value->field_spare = other_value.spare();
} else {
single_value->field_spare.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.packetFlowIdentifier().get_selection()) {
single_value->field_packetFlowIdentifier = other_value.packetFlowIdentifier();
} else {
single_value->field_packetFlowIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.protocolConfigOpts().get_selection()) {
single_value->field_protocolConfigOpts = other_value.protocolConfigOpts();
} else {
single_value->field_protocolConfigOpts.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.wLANOffloadIndication().get_selection()) {
single_value->field_wLANOffloadIndication = other_value.wLANOffloadIndication();
} else {
single_value->field_wLANOffloadIndication.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nBIFOM__Container().get_selection()) {
single_value->field_nBIFOM__Container = other_value.nBIFOM__Container();
} else {
single_value->field_nBIFOM__Container.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__SM__ActivateSecondaryPDPContextAccept_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__SM__ActivateSecondaryPDPContextAccept_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__ActivateSecondaryPDPContextAccept_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
break;
}
set_selection(other_value);
}

PDU__SM__ActivateSecondaryPDPContextAccept_template::PDU__SM__ActivateSecondaryPDPContextAccept_template()
{
}

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

PDU__SM__ActivateSecondaryPDPContextAccept_template::PDU__SM__ActivateSecondaryPDPContextAccept_template(const PDU__SM__ActivateSecondaryPDPContextAccept& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__ActivateSecondaryPDPContextAccept_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::operator=(const OPTIONAL<PDU__SM__ActivateSecondaryPDPContextAccept>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__ActivateSecondaryPDPContextAccept&)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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
}
return *this;
}

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

boolean PDU__SM__ActivateSecondaryPDPContextAccept_template::match(const PDU__SM__ActivateSecondaryPDPContextAccept& 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.negotiatedLLC__SAPI().is_bound()) return FALSE;
if(!single_value->field_negotiatedLLC__SAPI.match(other_value.negotiatedLLC__SAPI(), legacy))return FALSE;
if(!other_value.negotiatedQoS().is_bound()) return FALSE;
if(!single_value->field_negotiatedQoS.match(other_value.negotiatedQoS(), legacy))return FALSE;
if(!other_value.radioPriority().is_bound()) return FALSE;
if(!single_value->field_radioPriority.match(other_value.radioPriority(), legacy))return FALSE;
if(!other_value.spare().is_bound()) return FALSE;
if(!single_value->field_spare.match(other_value.spare(), legacy))return FALSE;
if(!other_value.packetFlowIdentifier().is_bound()) return FALSE;
if((other_value.packetFlowIdentifier().ispresent() ? !single_value->field_packetFlowIdentifier.match((const PacketFlowIDTLV&)other_value.packetFlowIdentifier(), legacy) : !single_value->field_packetFlowIdentifier.match_omit(legacy)))return FALSE;
if(!other_value.protocolConfigOpts().is_bound()) return FALSE;
if((other_value.protocolConfigOpts().ispresent() ? !single_value->field_protocolConfigOpts.match((const ProtocolConfigOptionsTLV&)other_value.protocolConfigOpts(), legacy) : !single_value->field_protocolConfigOpts.match_omit(legacy)))return FALSE;
if(!other_value.wLANOffloadIndication().is_bound()) return FALSE;
if((other_value.wLANOffloadIndication().ispresent() ? !single_value->field_wLANOffloadIndication.match((const WLANOffloadAcceptabilityTV&)other_value.wLANOffloadIndication(), legacy) : !single_value->field_wLANOffloadIndication.match_omit(legacy)))return FALSE;
if(!other_value.nBIFOM__Container().is_bound()) return FALSE;
if((other_value.nBIFOM__Container().ispresent() ? !single_value->field_nBIFOM__Container.match((const NBIFOM__ContainerTLV&)other_value.nBIFOM__Container(), legacy) : !single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
}
return FALSE;
}

boolean PDU__SM__ActivateSecondaryPDPContextAccept_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_negotiatedLLC__SAPI.is_bound()
 || single_value->field_negotiatedQoS.is_bound()
 || single_value->field_radioPriority.is_bound()
 || single_value->field_spare.is_bound()
 || (single_value->field_packetFlowIdentifier.is_omit() || single_value->field_packetFlowIdentifier.is_bound())
 || (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_bound())
 || (single_value->field_wLANOffloadIndication.is_omit() || single_value->field_wLANOffloadIndication.is_bound())
 || (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_bound());
}

boolean PDU__SM__ActivateSecondaryPDPContextAccept_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_negotiatedLLC__SAPI.is_value()
 && single_value->field_negotiatedQoS.is_value()
 && single_value->field_radioPriority.is_value()
 && single_value->field_spare.is_value()
 && (single_value->field_packetFlowIdentifier.is_omit() || single_value->field_packetFlowIdentifier.is_value())
 && (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_value())
 && (single_value->field_wLANOffloadIndication.is_omit() || single_value->field_wLANOffloadIndication.is_value())
 && (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_value());
}

void PDU__SM__ActivateSecondaryPDPContextAccept_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__SM__ActivateSecondaryPDPContextAccept PDU__SM__ActivateSecondaryPDPContextAccept_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
PDU__SM__ActivateSecondaryPDPContextAccept ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_negotiatedLLC__SAPI.is_bound()) {
ret_val.negotiatedLLC__SAPI() = single_value->field_negotiatedLLC__SAPI.valueof();
}
if (single_value->field_negotiatedQoS.is_bound()) {
ret_val.negotiatedQoS() = single_value->field_negotiatedQoS.valueof();
}
if (single_value->field_radioPriority.is_bound()) {
ret_val.radioPriority() = single_value->field_radioPriority.valueof();
}
if (single_value->field_spare.is_bound()) {
ret_val.spare() = single_value->field_spare.valueof();
}
if (single_value->field_packetFlowIdentifier.is_omit()) ret_val.packetFlowIdentifier() = OMIT_VALUE;
else if (single_value->field_packetFlowIdentifier.is_bound()) {
ret_val.packetFlowIdentifier() = single_value->field_packetFlowIdentifier.valueof();
}
if (single_value->field_protocolConfigOpts.is_omit()) ret_val.protocolConfigOpts() = OMIT_VALUE;
else if (single_value->field_protocolConfigOpts.is_bound()) {
ret_val.protocolConfigOpts() = single_value->field_protocolConfigOpts.valueof();
}
if (single_value->field_wLANOffloadIndication.is_omit()) ret_val.wLANOffloadIndication() = OMIT_VALUE;
else if (single_value->field_wLANOffloadIndication.is_bound()) {
ret_val.wLANOffloadIndication() = single_value->field_wLANOffloadIndication.valueof();
}
if (single_value->field_nBIFOM__Container.is_omit()) ret_val.nBIFOM__Container() = OMIT_VALUE;
else if (single_value->field_nBIFOM__Container.is_bound()) {
ret_val.nBIFOM__Container() = single_value->field_nBIFOM__Container.valueof();
}
return ret_val;
}

void PDU__SM__ActivateSecondaryPDPContextAccept_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__ActivateSecondaryPDPContextAccept_template[list_length];
}

PDU__SM__ActivateSecondaryPDPContextAccept_template& PDU__SM__ActivateSecondaryPDPContextAccept_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
return value_list.list_value[list_index];
}

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

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

LLC__SAPIV_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::negotiatedLLC__SAPI()
{
set_specific();
return single_value->field_negotiatedLLC__SAPI;
}

const LLC__SAPIV_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::negotiatedLLC__SAPI() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field negotiatedLLC_SAPI of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
return single_value->field_negotiatedLLC__SAPI;
}

QoSLV_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::negotiatedQoS()
{
set_specific();
return single_value->field_negotiatedQoS;
}

const QoSLV_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::negotiatedQoS() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field negotiatedQoS of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
return single_value->field_negotiatedQoS;
}

RadioPriorityV_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::radioPriority()
{
set_specific();
return single_value->field_radioPriority;
}

const RadioPriorityV_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::radioPriority() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field radioPriority of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
return single_value->field_radioPriority;
}

BITSTRING_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::spare()
{
set_specific();
return single_value->field_spare;
}

const BITSTRING_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::spare() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
return single_value->field_spare;
}

PacketFlowIDTLV_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::packetFlowIdentifier()
{
set_specific();
return single_value->field_packetFlowIdentifier;
}

const PacketFlowIDTLV_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::packetFlowIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field packetFlowIdentifier of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
return single_value->field_packetFlowIdentifier;
}

ProtocolConfigOptionsTLV_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::protocolConfigOpts()
{
set_specific();
return single_value->field_protocolConfigOpts;
}

const ProtocolConfigOptionsTLV_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::protocolConfigOpts() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field protocolConfigOpts of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
return single_value->field_protocolConfigOpts;
}

WLANOffloadAcceptabilityTV_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::wLANOffloadIndication()
{
set_specific();
return single_value->field_wLANOffloadIndication;
}

const WLANOffloadAcceptabilityTV_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::wLANOffloadIndication() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field wLANOffloadIndication of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
return single_value->field_wLANOffloadIndication;
}

NBIFOM__ContainerTLV_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::nBIFOM__Container()
{
set_specific();
return single_value->field_nBIFOM__Container;
}

const NBIFOM__ContainerTLV_template& PDU__SM__ActivateSecondaryPDPContextAccept_template::nBIFOM__Container() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nBIFOM_Container of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
return single_value->field_nBIFOM__Container;
}

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

void PDU__SM__ActivateSecondaryPDPContextAccept_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(", negotiatedLLC_SAPI := ");
single_value->field_negotiatedLLC__SAPI.log();
TTCN_Logger::log_event_str(", negotiatedQoS := ");
single_value->field_negotiatedQoS.log();
TTCN_Logger::log_event_str(", radioPriority := ");
single_value->field_radioPriority.log();
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log();
TTCN_Logger::log_event_str(", packetFlowIdentifier := ");
single_value->field_packetFlowIdentifier.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", wLANOffloadIndication := ");
single_value->field_wLANOffloadIndication.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
single_value->field_nBIFOM__Container.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__SM__ActivateSecondaryPDPContextAccept_template::log_match(const PDU__SM__ActivateSecondaryPDPContextAccept& 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_negotiatedLLC__SAPI.match(match_value.negotiatedLLC__SAPI(), legacy)){
TTCN_Logger::log_logmatch_info(".negotiatedLLC_SAPI");
single_value->field_negotiatedLLC__SAPI.log_match(match_value.negotiatedLLC__SAPI(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_negotiatedQoS.match(match_value.negotiatedQoS(), legacy)){
TTCN_Logger::log_logmatch_info(".negotiatedQoS");
single_value->field_negotiatedQoS.log_match(match_value.negotiatedQoS(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_radioPriority.match(match_value.radioPriority(), legacy)){
TTCN_Logger::log_logmatch_info(".radioPriority");
single_value->field_radioPriority.log_match(match_value.radioPriority(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare.match(match_value.spare(), legacy)){
TTCN_Logger::log_logmatch_info(".spare");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.packetFlowIdentifier().ispresent()){
if(!single_value->field_packetFlowIdentifier.match(match_value.packetFlowIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".packetFlowIdentifier");
single_value->field_packetFlowIdentifier.log_match(match_value.packetFlowIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_packetFlowIdentifier.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".packetFlowIdentifier := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_packetFlowIdentifier.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.protocolConfigOpts().ispresent()){
if(!single_value->field_protocolConfigOpts.match(match_value.protocolConfigOpts(), legacy)){
TTCN_Logger::log_logmatch_info(".protocolConfigOpts");
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_protocolConfigOpts.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".protocolConfigOpts := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.wLANOffloadIndication().ispresent()){
if(!single_value->field_wLANOffloadIndication.match(match_value.wLANOffloadIndication(), legacy)){
TTCN_Logger::log_logmatch_info(".wLANOffloadIndication");
single_value->field_wLANOffloadIndication.log_match(match_value.wLANOffloadIndication(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_wLANOffloadIndication.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".wLANOffloadIndication := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_wLANOffloadIndication.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nBIFOM__Container().ispresent()){
if(!single_value->field_nBIFOM__Container.match(match_value.nBIFOM__Container(), legacy)){
TTCN_Logger::log_logmatch_info(".nBIFOM_Container");
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nBIFOM__Container.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nBIFOM_Container := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nBIFOM__Container.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(", negotiatedLLC_SAPI := ");
single_value->field_negotiatedLLC__SAPI.log_match(match_value.negotiatedLLC__SAPI(), legacy);
TTCN_Logger::log_event_str(", negotiatedQoS := ");
single_value->field_negotiatedQoS.log_match(match_value.negotiatedQoS(), legacy);
TTCN_Logger::log_event_str(", radioPriority := ");
single_value->field_radioPriority.log_match(match_value.radioPriority(), legacy);
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::log_event_str(", packetFlowIdentifier := ");
if (match_value.packetFlowIdentifier().ispresent()) {
single_value->field_packetFlowIdentifier.log_match(match_value.packetFlowIdentifier(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_packetFlowIdentifier.log();
if (single_value->field_packetFlowIdentifier.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
if (match_value.protocolConfigOpts().ispresent()) {
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_protocolConfigOpts.log();
if (single_value->field_protocolConfigOpts.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", wLANOffloadIndication := ");
if (match_value.wLANOffloadIndication().ispresent()) {
single_value->field_wLANOffloadIndication.log_match(match_value.wLANOffloadIndication(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_wLANOffloadIndication.log();
if (single_value->field_wLANOffloadIndication.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
if (match_value.nBIFOM__Container().ispresent()) {
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nBIFOM__Container.log();
if (single_value->field_nBIFOM__Container.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__SM__ActivateSecondaryPDPContextAccept_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_negotiatedLLC__SAPI.encode_text(text_buf);
single_value->field_negotiatedQoS.encode_text(text_buf);
single_value->field_radioPriority.encode_text(text_buf);
single_value->field_spare.encode_text(text_buf);
single_value->field_packetFlowIdentifier.encode_text(text_buf);
single_value->field_protocolConfigOpts.encode_text(text_buf);
single_value->field_wLANOffloadIndication.encode_text(text_buf);
single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
}
}

void PDU__SM__ActivateSecondaryPDPContextAccept_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_negotiatedLLC__SAPI.decode_text(text_buf);
single_value->field_negotiatedQoS.decode_text(text_buf);
single_value->field_radioPriority.decode_text(text_buf);
single_value->field_spare.decode_text(text_buf);
single_value->field_packetFlowIdentifier.decode_text(text_buf);
single_value->field_protocolConfigOpts.decode_text(text_buf);
single_value->field_wLANOffloadIndication.decode_text(text_buf);
single_value->field_nBIFOM__Container.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__SM__ActivateSecondaryPDPContextAccept_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept.");
}
}

void PDU__SM__ActivateSecondaryPDPContextAccept_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__SM__ActivateSecondaryPDPContextAccept_template new_temp;
    new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size());
    for (size_t p_i=0; p_i<param.get_size(); p_i++) {
      new_temp.list_item(p_i).set_param(*param.get_elem(p_i));
    }
    *this = new_temp;
    break; }
  case Module_Param::MP_Value_List:
    if (9<param.get_size()) {
      param.error("record template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept has 9 fields but list value has %d fields", (int)param.get_size());
    }
    if (param.get_size()>0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) messageType().set_param(*param.get_elem(0));
    if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) negotiatedLLC__SAPI().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) negotiatedQoS().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) radioPriority().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) spare().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) packetFlowIdentifier().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) wLANOffloadIndication().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().set_param(*param.get_elem(8));
    break;
  case Module_Param::MP_Assignment_List: {
    Vector<bool> value_used(param.get_size());
    value_used.resize(param.get_size(), FALSE);
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "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(), "negotiatedLLC_SAPI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          negotiatedLLC__SAPI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "negotiatedQoS")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          negotiatedQoS().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "radioPriority")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          radioPriority().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "packetFlowIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          packetFlowIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "wLANOffloadIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          wLANOffloadIndication().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__ActivateSecondaryPDPContextAccept_template* precondition = new PDU__SM__ActivateSecondaryPDPContextAccept_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__ActivateSecondaryPDPContextAccept_template* implied_template = new PDU__SM__ActivateSecondaryPDPContextAccept_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__ActivateSecondaryPDPContextAccept_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__ActivateSecondaryPDPContextAccept_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept");
single_value->field_negotiatedLLC__SAPI.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept");
single_value->field_negotiatedQoS.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept");
single_value->field_radioPriority.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept");
single_value->field_spare.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept");
single_value->field_packetFlowIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept");
single_value->field_protocolConfigOpts.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept");
single_value->field_wLANOffloadIndication.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept");
single_value->field_nBIFOM__Container.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept");
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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept");
}

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

boolean PDU__SM__ActivateSecondaryPDPContextAccept_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__SM__ActivateSecondaryPDPContextReject::PDU__SM__ActivateSecondaryPDPContextReject()
{
}

PDU__SM__ActivateSecondaryPDPContextReject::PDU__SM__ActivateSecondaryPDPContextReject(const BITSTRING& par_messageType,
    const OCTETSTRING& par_smCause,
    const OPTIONAL< ProtocolConfigOptionsTLV >& par_protocolConfigOpts,
    const OPTIONAL< MobileL3__CommonIE__Types::GPRSTimer3TLV >& par_backOffTimer,
    const OPTIONAL< ReAttemptIndicatorTLV >& par_reAttemptIndicator,
    const OPTIONAL< NBIFOM__ContainerTLV >& par_nBIFOM__Container)
  :   field_messageType(par_messageType),
  field_smCause(par_smCause),
  field_protocolConfigOpts(par_protocolConfigOpts),
  field_backOffTimer(par_backOffTimer),
  field_reAttemptIndicator(par_reAttemptIndicator),
  field_nBIFOM__Container(par_nBIFOM__Container)
{
}

PDU__SM__ActivateSecondaryPDPContextReject::PDU__SM__ActivateSecondaryPDPContextReject(const PDU__SM__ActivateSecondaryPDPContextReject& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
else field_smCause.clean_up();
if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
else field_protocolConfigOpts.clean_up();
if (other_value.backOffTimer().is_bound()) field_backOffTimer = other_value.backOffTimer();
else field_backOffTimer.clean_up();
if (other_value.reAttemptIndicator().is_bound()) field_reAttemptIndicator = other_value.reAttemptIndicator();
else field_reAttemptIndicator.clean_up();
if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
else field_nBIFOM__Container.clean_up();
}

void PDU__SM__ActivateSecondaryPDPContextReject::clean_up()
{
field_messageType.clean_up();
field_smCause.clean_up();
field_protocolConfigOpts.clean_up();
field_backOffTimer.clean_up();
field_reAttemptIndicator.clean_up();
field_nBIFOM__Container.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__ActivateSecondaryPDPContextReject::get_descriptor() const { return &PDU__SM__ActivateSecondaryPDPContextReject_descr_; }
PDU__SM__ActivateSecondaryPDPContextReject& PDU__SM__ActivateSecondaryPDPContextReject::operator=(const PDU__SM__ActivateSecondaryPDPContextReject& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
  else field_smCause.clean_up();
  if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
  else field_protocolConfigOpts.clean_up();
  if (other_value.backOffTimer().is_bound()) field_backOffTimer = other_value.backOffTimer();
  else field_backOffTimer.clean_up();
  if (other_value.reAttemptIndicator().is_bound()) field_reAttemptIndicator = other_value.reAttemptIndicator();
  else field_reAttemptIndicator.clean_up();
  if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
  else field_nBIFOM__Container.clean_up();
}
return *this;
}

boolean PDU__SM__ActivateSecondaryPDPContextReject::operator==(const PDU__SM__ActivateSecondaryPDPContextReject& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_smCause==other_value.field_smCause
  && field_protocolConfigOpts==other_value.field_protocolConfigOpts
  && field_backOffTimer==other_value.field_backOffTimer
  && field_reAttemptIndicator==other_value.field_reAttemptIndicator
  && field_nBIFOM__Container==other_value.field_nBIFOM__Container;
}

boolean PDU__SM__ActivateSecondaryPDPContextReject::is_bound() const
{
return (field_messageType.is_bound())
  || (field_smCause.is_bound())
  || (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_bound())
  || (OPTIONAL_OMIT == field_backOffTimer.get_selection() || field_backOffTimer.is_bound())
  || (OPTIONAL_OMIT == field_reAttemptIndicator.get_selection() || field_reAttemptIndicator.is_bound())
  || (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_bound());
}
boolean PDU__SM__ActivateSecondaryPDPContextReject::is_value() const
{
return field_messageType.is_value()
  && field_smCause.is_value()
  && (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_value())
  && (OPTIONAL_OMIT == field_backOffTimer.get_selection() || field_backOffTimer.is_value())
  && (OPTIONAL_OMIT == field_reAttemptIndicator.get_selection() || field_reAttemptIndicator.is_value())
  && (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_value());
}
int PDU__SM__ActivateSecondaryPDPContextReject::size_of() const
{
  int ret_val = 2;
  if (field_protocolConfigOpts.ispresent()) ret_val++;
  if (field_backOffTimer.ispresent()) ret_val++;
  if (field_reAttemptIndicator.ispresent()) ret_val++;
  if (field_nBIFOM__Container.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__ActivateSecondaryPDPContextReject::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(", smCause := ");
field_smCause.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", backOffTimer := ");
field_backOffTimer.log();
TTCN_Logger::log_event_str(", reAttemptIndicator := ");
field_reAttemptIndicator.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
field_nBIFOM__Container.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__ActivateSecondaryPDPContextReject::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (smCause().is_bound()) smCause().set_implicit_omit();
if (!protocolConfigOpts().is_bound()) protocolConfigOpts() = OMIT_VALUE;
else protocolConfigOpts().set_implicit_omit();
if (!backOffTimer().is_bound()) backOffTimer() = OMIT_VALUE;
else backOffTimer().set_implicit_omit();
if (!reAttemptIndicator().is_bound()) reAttemptIndicator() = OMIT_VALUE;
else reAttemptIndicator().set_implicit_omit();
if (!nBIFOM__Container().is_bound()) nBIFOM__Container() = OMIT_VALUE;
else nBIFOM__Container().set_implicit_omit();
}

void PDU__SM__ActivateSecondaryPDPContextReject::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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject 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) smCause().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) backOffTimer().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) reAttemptIndicator().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "smCause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          smCause().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "backOffTimer")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          backOffTimer().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "reAttemptIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          reAttemptIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject");
  }
}

void PDU__SM__ActivateSecondaryPDPContextReject::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_smCause.encode_text(text_buf);
field_protocolConfigOpts.encode_text(text_buf);
field_backOffTimer.encode_text(text_buf);
field_reAttemptIndicator.encode_text(text_buf);
field_nBIFOM__Container.encode_text(text_buf);
}

void PDU__SM__ActivateSecondaryPDPContextReject::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_smCause.decode_text(text_buf);
field_protocolConfigOpts.decode_text(text_buf);
field_backOffTimer.decode_text(text_buf);
field_reAttemptIndicator.decode_text(text_buf);
field_nBIFOM__Container.decode_text(text_buf);
}

void PDU__SM__ActivateSecondaryPDPContextReject::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__ActivateSecondaryPDPContextReject::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__ActivateSecondaryPDPContextReject::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, SMCauseV_descr_.raw->forceomit);
  decoded_field_length = field_smCause.RAW_decode(SMCauseV_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_protocolConfigOpts = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, ProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_protocolConfigOpts().RAW_decode(ProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_protocolConfigOpts = 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_protocolConfigOpts=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_backOffTimer = 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::GPRSTimer3TLV_descr_.raw->forceomit);
  decoded_field_length = field_backOffTimer().RAW_decode(MobileL3__CommonIE__Types::GPRSTimer3TLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_backOffTimer = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_backOffTimer.ispresent() || field_backOffTimer().elementIdentifier() !=  os_33){
  field_backOffTimer=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_backOffTimer=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_reAttemptIndicator = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, ReAttemptIndicatorTLV_descr_.raw->forceomit);
  decoded_field_length = field_reAttemptIndicator().RAW_decode(ReAttemptIndicatorTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_reAttemptIndicator = 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_reAttemptIndicator=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_nBIFOM__Container = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, NBIFOM__ContainerTLV_descr_.raw->forceomit);
  decoded_field_length = field_nBIFOM__Container().RAW_decode(NBIFOM__ContainerTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_nBIFOM__Container = 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_nBIFOM__Container=OMIT_VALUE;
  if (field_messageType !=  bs_56) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__ActivateSecondaryPDPContextReject::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, SMCauseV_descr_.raw);
  if (field_protocolConfigOpts.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, ProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_backOffTimer.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, MobileL3__CommonIE__Types::GPRSTimer3TLV_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_reAttemptIndicator.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, ReAttemptIndicatorTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_nBIFOM__Container.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, NBIFOM__ContainerTLV_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_smCause.RAW_encode(SMCauseV_descr_, *myleaf.body.node.nodes[1]);
  if (field_protocolConfigOpts.ispresent()) {
  encoded_length += field_protocolConfigOpts().RAW_encode(ProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_backOffTimer.ispresent()) {
  encoded_length += field_backOffTimer().RAW_encode(MobileL3__CommonIE__Types::GPRSTimer3TLV_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_reAttemptIndicator.ispresent()) {
  encoded_length += field_reAttemptIndicator().RAW_encode(ReAttemptIndicatorTLV_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_nBIFOM__Container.ispresent()) {
  encoded_length += field_nBIFOM__Container().RAW_encode(NBIFOM__ContainerTLV_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_backOffTimer.ispresent() && (!field_backOffTimer.ispresent() || field_backOffTimer().elementIdentifier() !=  os_33)) {
  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_33.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_messageType !=  bs_56) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__ActivateSecondaryPDPContextReject_template::single_value_struct {
BITSTRING_template field_messageType;
OCTETSTRING_template field_smCause;
ProtocolConfigOptionsTLV_template field_protocolConfigOpts;
MobileL3__CommonIE__Types::GPRSTimer3TLV_template field_backOffTimer;
ReAttemptIndicatorTLV_template field_reAttemptIndicator;
NBIFOM__ContainerTLV_template field_nBIFOM__Container;
};

void PDU__SM__ActivateSecondaryPDPContextReject_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_smCause = ANY_VALUE;
single_value->field_protocolConfigOpts = ANY_OR_OMIT;
single_value->field_backOffTimer = ANY_OR_OMIT;
single_value->field_reAttemptIndicator = ANY_OR_OMIT;
single_value->field_nBIFOM__Container = ANY_OR_OMIT;
}
}
}

void PDU__SM__ActivateSecondaryPDPContextReject_template::copy_value(const PDU__SM__ActivateSecondaryPDPContextReject& 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.smCause().is_bound()) {
  single_value->field_smCause = other_value.smCause();
} else {
  single_value->field_smCause.clean_up();
}
if (other_value.protocolConfigOpts().is_bound()) {
  if (other_value.protocolConfigOpts().ispresent()) single_value->field_protocolConfigOpts = other_value.protocolConfigOpts()();
  else single_value->field_protocolConfigOpts = OMIT_VALUE;
} else {
  single_value->field_protocolConfigOpts.clean_up();
}
if (other_value.backOffTimer().is_bound()) {
  if (other_value.backOffTimer().ispresent()) single_value->field_backOffTimer = other_value.backOffTimer()();
  else single_value->field_backOffTimer = OMIT_VALUE;
} else {
  single_value->field_backOffTimer.clean_up();
}
if (other_value.reAttemptIndicator().is_bound()) {
  if (other_value.reAttemptIndicator().ispresent()) single_value->field_reAttemptIndicator = other_value.reAttemptIndicator()();
  else single_value->field_reAttemptIndicator = OMIT_VALUE;
} else {
  single_value->field_reAttemptIndicator.clean_up();
}
if (other_value.nBIFOM__Container().is_bound()) {
  if (other_value.nBIFOM__Container().ispresent()) single_value->field_nBIFOM__Container = other_value.nBIFOM__Container()();
  else single_value->field_nBIFOM__Container = OMIT_VALUE;
} else {
  single_value->field_nBIFOM__Container.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__ActivateSecondaryPDPContextReject_template::copy_template(const PDU__SM__ActivateSecondaryPDPContextReject_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.smCause().get_selection()) {
single_value->field_smCause = other_value.smCause();
} else {
single_value->field_smCause.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.protocolConfigOpts().get_selection()) {
single_value->field_protocolConfigOpts = other_value.protocolConfigOpts();
} else {
single_value->field_protocolConfigOpts.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.backOffTimer().get_selection()) {
single_value->field_backOffTimer = other_value.backOffTimer();
} else {
single_value->field_backOffTimer.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.reAttemptIndicator().get_selection()) {
single_value->field_reAttemptIndicator = other_value.reAttemptIndicator();
} else {
single_value->field_reAttemptIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nBIFOM__Container().get_selection()) {
single_value->field_nBIFOM__Container = other_value.nBIFOM__Container();
} else {
single_value->field_nBIFOM__Container.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__SM__ActivateSecondaryPDPContextReject_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__SM__ActivateSecondaryPDPContextReject_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__ActivateSecondaryPDPContextReject_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
break;
}
set_selection(other_value);
}

PDU__SM__ActivateSecondaryPDPContextReject_template::PDU__SM__ActivateSecondaryPDPContextReject_template()
{
}

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

PDU__SM__ActivateSecondaryPDPContextReject_template::PDU__SM__ActivateSecondaryPDPContextReject_template(const PDU__SM__ActivateSecondaryPDPContextReject& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__ActivateSecondaryPDPContextReject_template& PDU__SM__ActivateSecondaryPDPContextReject_template::operator=(const OPTIONAL<PDU__SM__ActivateSecondaryPDPContextReject>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__ActivateSecondaryPDPContextReject&)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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
}
return *this;
}

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

boolean PDU__SM__ActivateSecondaryPDPContextReject_template::match(const PDU__SM__ActivateSecondaryPDPContextReject& 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.smCause().is_bound()) return FALSE;
if(!single_value->field_smCause.match(other_value.smCause(), legacy))return FALSE;
if(!other_value.protocolConfigOpts().is_bound()) return FALSE;
if((other_value.protocolConfigOpts().ispresent() ? !single_value->field_protocolConfigOpts.match((const ProtocolConfigOptionsTLV&)other_value.protocolConfigOpts(), legacy) : !single_value->field_protocolConfigOpts.match_omit(legacy)))return FALSE;
if(!other_value.backOffTimer().is_bound()) return FALSE;
if((other_value.backOffTimer().ispresent() ? !single_value->field_backOffTimer.match((const MobileL3__CommonIE__Types::GPRSTimer3TLV&)other_value.backOffTimer(), legacy) : !single_value->field_backOffTimer.match_omit(legacy)))return FALSE;
if(!other_value.reAttemptIndicator().is_bound()) return FALSE;
if((other_value.reAttemptIndicator().ispresent() ? !single_value->field_reAttemptIndicator.match((const ReAttemptIndicatorTLV&)other_value.reAttemptIndicator(), legacy) : !single_value->field_reAttemptIndicator.match_omit(legacy)))return FALSE;
if(!other_value.nBIFOM__Container().is_bound()) return FALSE;
if((other_value.nBIFOM__Container().ispresent() ? !single_value->field_nBIFOM__Container.match((const NBIFOM__ContainerTLV&)other_value.nBIFOM__Container(), legacy) : !single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
}
return FALSE;
}

boolean PDU__SM__ActivateSecondaryPDPContextReject_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_smCause.is_bound()
 || (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_bound())
 || (single_value->field_backOffTimer.is_omit() || single_value->field_backOffTimer.is_bound())
 || (single_value->field_reAttemptIndicator.is_omit() || single_value->field_reAttemptIndicator.is_bound())
 || (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_bound());
}

boolean PDU__SM__ActivateSecondaryPDPContextReject_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_smCause.is_value()
 && (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_value())
 && (single_value->field_backOffTimer.is_omit() || single_value->field_backOffTimer.is_value())
 && (single_value->field_reAttemptIndicator.is_omit() || single_value->field_reAttemptIndicator.is_value())
 && (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_value());
}

void PDU__SM__ActivateSecondaryPDPContextReject_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__SM__ActivateSecondaryPDPContextReject PDU__SM__ActivateSecondaryPDPContextReject_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
PDU__SM__ActivateSecondaryPDPContextReject ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_smCause.is_bound()) {
ret_val.smCause() = single_value->field_smCause.valueof();
}
if (single_value->field_protocolConfigOpts.is_omit()) ret_val.protocolConfigOpts() = OMIT_VALUE;
else if (single_value->field_protocolConfigOpts.is_bound()) {
ret_val.protocolConfigOpts() = single_value->field_protocolConfigOpts.valueof();
}
if (single_value->field_backOffTimer.is_omit()) ret_val.backOffTimer() = OMIT_VALUE;
else if (single_value->field_backOffTimer.is_bound()) {
ret_val.backOffTimer() = single_value->field_backOffTimer.valueof();
}
if (single_value->field_reAttemptIndicator.is_omit()) ret_val.reAttemptIndicator() = OMIT_VALUE;
else if (single_value->field_reAttemptIndicator.is_bound()) {
ret_val.reAttemptIndicator() = single_value->field_reAttemptIndicator.valueof();
}
if (single_value->field_nBIFOM__Container.is_omit()) ret_val.nBIFOM__Container() = OMIT_VALUE;
else if (single_value->field_nBIFOM__Container.is_bound()) {
ret_val.nBIFOM__Container() = single_value->field_nBIFOM__Container.valueof();
}
return ret_val;
}

void PDU__SM__ActivateSecondaryPDPContextReject_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__ActivateSecondaryPDPContextReject_template[list_length];
}

PDU__SM__ActivateSecondaryPDPContextReject_template& PDU__SM__ActivateSecondaryPDPContextReject_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
return value_list.list_value[list_index];
}

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

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

OCTETSTRING_template& PDU__SM__ActivateSecondaryPDPContextReject_template::smCause()
{
set_specific();
return single_value->field_smCause;
}

const OCTETSTRING_template& PDU__SM__ActivateSecondaryPDPContextReject_template::smCause() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field smCause of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
return single_value->field_smCause;
}

ProtocolConfigOptionsTLV_template& PDU__SM__ActivateSecondaryPDPContextReject_template::protocolConfigOpts()
{
set_specific();
return single_value->field_protocolConfigOpts;
}

const ProtocolConfigOptionsTLV_template& PDU__SM__ActivateSecondaryPDPContextReject_template::protocolConfigOpts() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field protocolConfigOpts of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
return single_value->field_protocolConfigOpts;
}

MobileL3__CommonIE__Types::GPRSTimer3TLV_template& PDU__SM__ActivateSecondaryPDPContextReject_template::backOffTimer()
{
set_specific();
return single_value->field_backOffTimer;
}

const MobileL3__CommonIE__Types::GPRSTimer3TLV_template& PDU__SM__ActivateSecondaryPDPContextReject_template::backOffTimer() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field backOffTimer of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
return single_value->field_backOffTimer;
}

ReAttemptIndicatorTLV_template& PDU__SM__ActivateSecondaryPDPContextReject_template::reAttemptIndicator()
{
set_specific();
return single_value->field_reAttemptIndicator;
}

const ReAttemptIndicatorTLV_template& PDU__SM__ActivateSecondaryPDPContextReject_template::reAttemptIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field reAttemptIndicator of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
return single_value->field_reAttemptIndicator;
}

NBIFOM__ContainerTLV_template& PDU__SM__ActivateSecondaryPDPContextReject_template::nBIFOM__Container()
{
set_specific();
return single_value->field_nBIFOM__Container;
}

const NBIFOM__ContainerTLV_template& PDU__SM__ActivateSecondaryPDPContextReject_template::nBIFOM__Container() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nBIFOM_Container of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
return single_value->field_nBIFOM__Container;
}

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

void PDU__SM__ActivateSecondaryPDPContextReject_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(", smCause := ");
single_value->field_smCause.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", backOffTimer := ");
single_value->field_backOffTimer.log();
TTCN_Logger::log_event_str(", reAttemptIndicator := ");
single_value->field_reAttemptIndicator.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
single_value->field_nBIFOM__Container.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__SM__ActivateSecondaryPDPContextReject_template::log_match(const PDU__SM__ActivateSecondaryPDPContextReject& 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_smCause.match(match_value.smCause(), legacy)){
TTCN_Logger::log_logmatch_info(".smCause");
single_value->field_smCause.log_match(match_value.smCause(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.protocolConfigOpts().ispresent()){
if(!single_value->field_protocolConfigOpts.match(match_value.protocolConfigOpts(), legacy)){
TTCN_Logger::log_logmatch_info(".protocolConfigOpts");
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_protocolConfigOpts.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".protocolConfigOpts := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.backOffTimer().ispresent()){
if(!single_value->field_backOffTimer.match(match_value.backOffTimer(), legacy)){
TTCN_Logger::log_logmatch_info(".backOffTimer");
single_value->field_backOffTimer.log_match(match_value.backOffTimer(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_backOffTimer.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".backOffTimer := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_backOffTimer.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.reAttemptIndicator().ispresent()){
if(!single_value->field_reAttemptIndicator.match(match_value.reAttemptIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".reAttemptIndicator");
single_value->field_reAttemptIndicator.log_match(match_value.reAttemptIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_reAttemptIndicator.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".reAttemptIndicator := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_reAttemptIndicator.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nBIFOM__Container().ispresent()){
if(!single_value->field_nBIFOM__Container.match(match_value.nBIFOM__Container(), legacy)){
TTCN_Logger::log_logmatch_info(".nBIFOM_Container");
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nBIFOM__Container.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nBIFOM_Container := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nBIFOM__Container.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(", smCause := ");
single_value->field_smCause.log_match(match_value.smCause(), legacy);
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
if (match_value.protocolConfigOpts().ispresent()) {
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_protocolConfigOpts.log();
if (single_value->field_protocolConfigOpts.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", backOffTimer := ");
if (match_value.backOffTimer().ispresent()) {
single_value->field_backOffTimer.log_match(match_value.backOffTimer(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_backOffTimer.log();
if (single_value->field_backOffTimer.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", reAttemptIndicator := ");
if (match_value.reAttemptIndicator().ispresent()) {
single_value->field_reAttemptIndicator.log_match(match_value.reAttemptIndicator(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_reAttemptIndicator.log();
if (single_value->field_reAttemptIndicator.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
if (match_value.nBIFOM__Container().ispresent()) {
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nBIFOM__Container.log();
if (single_value->field_nBIFOM__Container.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__SM__ActivateSecondaryPDPContextReject_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_smCause.encode_text(text_buf);
single_value->field_protocolConfigOpts.encode_text(text_buf);
single_value->field_backOffTimer.encode_text(text_buf);
single_value->field_reAttemptIndicator.encode_text(text_buf);
single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
}
}

void PDU__SM__ActivateSecondaryPDPContextReject_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_smCause.decode_text(text_buf);
single_value->field_protocolConfigOpts.decode_text(text_buf);
single_value->field_backOffTimer.decode_text(text_buf);
single_value->field_reAttemptIndicator.decode_text(text_buf);
single_value->field_nBIFOM__Container.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__SM__ActivateSecondaryPDPContextReject_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject.");
}
}

void PDU__SM__ActivateSecondaryPDPContextReject_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__SM__ActivateSecondaryPDPContextReject_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject 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) smCause().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) backOffTimer().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) reAttemptIndicator().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "smCause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          smCause().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "backOffTimer")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          backOffTimer().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "reAttemptIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          reAttemptIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__ActivateSecondaryPDPContextReject_template* precondition = new PDU__SM__ActivateSecondaryPDPContextReject_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__ActivateSecondaryPDPContextReject_template* implied_template = new PDU__SM__ActivateSecondaryPDPContextReject_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__ActivateSecondaryPDPContextReject_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__ActivateSecondaryPDPContextReject_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject");
single_value->field_smCause.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject");
single_value->field_protocolConfigOpts.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject");
single_value->field_backOffTimer.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject");
single_value->field_reAttemptIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject");
single_value->field_nBIFOM__Container.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject");
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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject");
}

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

boolean PDU__SM__ActivateSecondaryPDPContextReject_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__SM__RequestPDPContextActivation::PDU__SM__RequestPDPContextActivation()
{
}

PDU__SM__RequestPDPContextActivation::PDU__SM__RequestPDPContextActivation(const BITSTRING& par_messageType,
    const PDPAddressLV& par_offeredPDPAdress,
    const OPTIONAL< AccessPointNameTLV >& par_accessPointName,
    const OPTIONAL< ProtocolConfigOptionsTLV >& par_protocolConfigOpts,
    const OPTIONAL< NBIFOM__ContainerTLV >& par_nBIFOM__Container)
  :   field_messageType(par_messageType),
  field_offeredPDPAdress(par_offeredPDPAdress),
  field_accessPointName(par_accessPointName),
  field_protocolConfigOpts(par_protocolConfigOpts),
  field_nBIFOM__Container(par_nBIFOM__Container)
{
}

PDU__SM__RequestPDPContextActivation::PDU__SM__RequestPDPContextActivation(const PDU__SM__RequestPDPContextActivation& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivation.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.offeredPDPAdress().is_bound()) field_offeredPDPAdress = other_value.offeredPDPAdress();
else field_offeredPDPAdress.clean_up();
if (other_value.accessPointName().is_bound()) field_accessPointName = other_value.accessPointName();
else field_accessPointName.clean_up();
if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
else field_protocolConfigOpts.clean_up();
if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
else field_nBIFOM__Container.clean_up();
}

void PDU__SM__RequestPDPContextActivation::clean_up()
{
field_messageType.clean_up();
field_offeredPDPAdress.clean_up();
field_accessPointName.clean_up();
field_protocolConfigOpts.clean_up();
field_nBIFOM__Container.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__RequestPDPContextActivation::get_descriptor() const { return &PDU__SM__RequestPDPContextActivation_descr_; }
PDU__SM__RequestPDPContextActivation& PDU__SM__RequestPDPContextActivation::operator=(const PDU__SM__RequestPDPContextActivation& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivation.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.offeredPDPAdress().is_bound()) field_offeredPDPAdress = other_value.offeredPDPAdress();
  else field_offeredPDPAdress.clean_up();
  if (other_value.accessPointName().is_bound()) field_accessPointName = other_value.accessPointName();
  else field_accessPointName.clean_up();
  if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
  else field_protocolConfigOpts.clean_up();
  if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
  else field_nBIFOM__Container.clean_up();
}
return *this;
}

boolean PDU__SM__RequestPDPContextActivation::operator==(const PDU__SM__RequestPDPContextActivation& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_offeredPDPAdress==other_value.field_offeredPDPAdress
  && field_accessPointName==other_value.field_accessPointName
  && field_protocolConfigOpts==other_value.field_protocolConfigOpts
  && field_nBIFOM__Container==other_value.field_nBIFOM__Container;
}

boolean PDU__SM__RequestPDPContextActivation::is_bound() const
{
return (field_messageType.is_bound())
  || (field_offeredPDPAdress.is_bound())
  || (OPTIONAL_OMIT == field_accessPointName.get_selection() || field_accessPointName.is_bound())
  || (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_bound())
  || (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_bound());
}
boolean PDU__SM__RequestPDPContextActivation::is_value() const
{
return field_messageType.is_value()
  && field_offeredPDPAdress.is_value()
  && (OPTIONAL_OMIT == field_accessPointName.get_selection() || field_accessPointName.is_value())
  && (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_value())
  && (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_value());
}
int PDU__SM__RequestPDPContextActivation::size_of() const
{
  int ret_val = 2;
  if (field_accessPointName.ispresent()) ret_val++;
  if (field_protocolConfigOpts.ispresent()) ret_val++;
  if (field_nBIFOM__Container.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__RequestPDPContextActivation::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(", offeredPDPAdress := ");
field_offeredPDPAdress.log();
TTCN_Logger::log_event_str(", accessPointName := ");
field_accessPointName.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
field_nBIFOM__Container.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__RequestPDPContextActivation::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (offeredPDPAdress().is_bound()) offeredPDPAdress().set_implicit_omit();
if (!accessPointName().is_bound()) accessPointName() = OMIT_VALUE;
else accessPointName().set_implicit_omit();
if (!protocolConfigOpts().is_bound()) protocolConfigOpts() = OMIT_VALUE;
else protocolConfigOpts().set_implicit_omit();
if (!nBIFOM__Container().is_bound()) nBIFOM__Container() = OMIT_VALUE;
else nBIFOM__Container().set_implicit_omit();
}

void PDU__SM__RequestPDPContextActivation::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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation 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) offeredPDPAdress().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) accessPointName().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "offeredPDPAdress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          offeredPDPAdress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "accessPointName")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          accessPointName().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivation");
  }
}

void PDU__SM__RequestPDPContextActivation::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_offeredPDPAdress.encode_text(text_buf);
field_accessPointName.encode_text(text_buf);
field_protocolConfigOpts.encode_text(text_buf);
field_nBIFOM__Container.encode_text(text_buf);
}

void PDU__SM__RequestPDPContextActivation::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_offeredPDPAdress.decode_text(text_buf);
field_accessPointName.decode_text(text_buf);
field_protocolConfigOpts.decode_text(text_buf);
field_nBIFOM__Container.decode_text(text_buf);
}

void PDU__SM__RequestPDPContextActivation::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__RequestPDPContextActivation::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__RequestPDPContextActivation::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, PDPAddressLV_descr_.raw->forceomit);
  decoded_field_length = field_offeredPDPAdress.RAW_decode(PDPAddressLV_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_accessPointName = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, AccessPointNameTLV_descr_.raw->forceomit);
  decoded_field_length = field_accessPointName().RAW_decode(AccessPointNameTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_accessPointName = 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_accessPointName=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_protocolConfigOpts = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, ProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_protocolConfigOpts().RAW_decode(ProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_protocolConfigOpts = 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_protocolConfigOpts=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_nBIFOM__Container = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, NBIFOM__ContainerTLV_descr_.raw->forceomit);
  decoded_field_length = field_nBIFOM__Container().RAW_decode(NBIFOM__ContainerTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_nBIFOM__Container = 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_nBIFOM__Container=OMIT_VALUE;
  if (field_messageType !=  bs_57) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__RequestPDPContextActivation::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);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, PDPAddressLV_descr_.raw);
  if (field_accessPointName.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, AccessPointNameTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_protocolConfigOpts.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, ProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_nBIFOM__Container.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, NBIFOM__ContainerTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_offeredPDPAdress.RAW_encode(PDPAddressLV_descr_, *myleaf.body.node.nodes[1]);
  if (field_accessPointName.ispresent()) {
  encoded_length += field_accessPointName().RAW_encode(AccessPointNameTLV_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_protocolConfigOpts.ispresent()) {
  encoded_length += field_protocolConfigOpts().RAW_encode(ProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_nBIFOM__Container.ispresent()) {
  encoded_length += field_nBIFOM__Container().RAW_encode(NBIFOM__ContainerTLV_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_messageType !=  bs_57) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__RequestPDPContextActivation_template::single_value_struct {
BITSTRING_template field_messageType;
PDPAddressLV_template field_offeredPDPAdress;
AccessPointNameTLV_template field_accessPointName;
ProtocolConfigOptionsTLV_template field_protocolConfigOpts;
NBIFOM__ContainerTLV_template field_nBIFOM__Container;
};

void PDU__SM__RequestPDPContextActivation_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_offeredPDPAdress = ANY_VALUE;
single_value->field_accessPointName = ANY_OR_OMIT;
single_value->field_protocolConfigOpts = ANY_OR_OMIT;
single_value->field_nBIFOM__Container = ANY_OR_OMIT;
}
}
}

void PDU__SM__RequestPDPContextActivation_template::copy_value(const PDU__SM__RequestPDPContextActivation& 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.offeredPDPAdress().is_bound()) {
  single_value->field_offeredPDPAdress = other_value.offeredPDPAdress();
} else {
  single_value->field_offeredPDPAdress.clean_up();
}
if (other_value.accessPointName().is_bound()) {
  if (other_value.accessPointName().ispresent()) single_value->field_accessPointName = other_value.accessPointName()();
  else single_value->field_accessPointName = OMIT_VALUE;
} else {
  single_value->field_accessPointName.clean_up();
}
if (other_value.protocolConfigOpts().is_bound()) {
  if (other_value.protocolConfigOpts().ispresent()) single_value->field_protocolConfigOpts = other_value.protocolConfigOpts()();
  else single_value->field_protocolConfigOpts = OMIT_VALUE;
} else {
  single_value->field_protocolConfigOpts.clean_up();
}
if (other_value.nBIFOM__Container().is_bound()) {
  if (other_value.nBIFOM__Container().ispresent()) single_value->field_nBIFOM__Container = other_value.nBIFOM__Container()();
  else single_value->field_nBIFOM__Container = OMIT_VALUE;
} else {
  single_value->field_nBIFOM__Container.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__RequestPDPContextActivation_template::copy_template(const PDU__SM__RequestPDPContextActivation_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.offeredPDPAdress().get_selection()) {
single_value->field_offeredPDPAdress = other_value.offeredPDPAdress();
} else {
single_value->field_offeredPDPAdress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.accessPointName().get_selection()) {
single_value->field_accessPointName = other_value.accessPointName();
} else {
single_value->field_accessPointName.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.protocolConfigOpts().get_selection()) {
single_value->field_protocolConfigOpts = other_value.protocolConfigOpts();
} else {
single_value->field_protocolConfigOpts.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nBIFOM__Container().get_selection()) {
single_value->field_nBIFOM__Container = other_value.nBIFOM__Container();
} else {
single_value->field_nBIFOM__Container.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__SM__RequestPDPContextActivation_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__SM__RequestPDPContextActivation_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__RequestPDPContextActivation_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation.");
break;
}
set_selection(other_value);
}

PDU__SM__RequestPDPContextActivation_template::PDU__SM__RequestPDPContextActivation_template()
{
}

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

PDU__SM__RequestPDPContextActivation_template::PDU__SM__RequestPDPContextActivation_template(const PDU__SM__RequestPDPContextActivation& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__RequestPDPContextActivation_template& PDU__SM__RequestPDPContextActivation_template::operator=(const OPTIONAL<PDU__SM__RequestPDPContextActivation>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__RequestPDPContextActivation&)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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation.");
}
return *this;
}

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

boolean PDU__SM__RequestPDPContextActivation_template::match(const PDU__SM__RequestPDPContextActivation& 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.offeredPDPAdress().is_bound()) return FALSE;
if(!single_value->field_offeredPDPAdress.match(other_value.offeredPDPAdress(), legacy))return FALSE;
if(!other_value.accessPointName().is_bound()) return FALSE;
if((other_value.accessPointName().ispresent() ? !single_value->field_accessPointName.match((const AccessPointNameTLV&)other_value.accessPointName(), legacy) : !single_value->field_accessPointName.match_omit(legacy)))return FALSE;
if(!other_value.protocolConfigOpts().is_bound()) return FALSE;
if((other_value.protocolConfigOpts().ispresent() ? !single_value->field_protocolConfigOpts.match((const ProtocolConfigOptionsTLV&)other_value.protocolConfigOpts(), legacy) : !single_value->field_protocolConfigOpts.match_omit(legacy)))return FALSE;
if(!other_value.nBIFOM__Container().is_bound()) return FALSE;
if((other_value.nBIFOM__Container().ispresent() ? !single_value->field_nBIFOM__Container.match((const NBIFOM__ContainerTLV&)other_value.nBIFOM__Container(), legacy) : !single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation.");
}
return FALSE;
}

boolean PDU__SM__RequestPDPContextActivation_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_offeredPDPAdress.is_bound()
 || (single_value->field_accessPointName.is_omit() || single_value->field_accessPointName.is_bound())
 || (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_bound())
 || (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_bound());
}

boolean PDU__SM__RequestPDPContextActivation_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_offeredPDPAdress.is_value()
 && (single_value->field_accessPointName.is_omit() || single_value->field_accessPointName.is_value())
 && (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_value())
 && (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_value());
}

void PDU__SM__RequestPDPContextActivation_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__SM__RequestPDPContextActivation PDU__SM__RequestPDPContextActivation_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation.");
PDU__SM__RequestPDPContextActivation ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_offeredPDPAdress.is_bound()) {
ret_val.offeredPDPAdress() = single_value->field_offeredPDPAdress.valueof();
}
if (single_value->field_accessPointName.is_omit()) ret_val.accessPointName() = OMIT_VALUE;
else if (single_value->field_accessPointName.is_bound()) {
ret_val.accessPointName() = single_value->field_accessPointName.valueof();
}
if (single_value->field_protocolConfigOpts.is_omit()) ret_val.protocolConfigOpts() = OMIT_VALUE;
else if (single_value->field_protocolConfigOpts.is_bound()) {
ret_val.protocolConfigOpts() = single_value->field_protocolConfigOpts.valueof();
}
if (single_value->field_nBIFOM__Container.is_omit()) ret_val.nBIFOM__Container() = OMIT_VALUE;
else if (single_value->field_nBIFOM__Container.is_bound()) {
ret_val.nBIFOM__Container() = single_value->field_nBIFOM__Container.valueof();
}
return ret_val;
}

void PDU__SM__RequestPDPContextActivation_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__RequestPDPContextActivation_template[list_length];
}

PDU__SM__RequestPDPContextActivation_template& PDU__SM__RequestPDPContextActivation_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivation.");
return value_list.list_value[list_index];
}

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

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

PDPAddressLV_template& PDU__SM__RequestPDPContextActivation_template::offeredPDPAdress()
{
set_specific();
return single_value->field_offeredPDPAdress;
}

const PDPAddressLV_template& PDU__SM__RequestPDPContextActivation_template::offeredPDPAdress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field offeredPDPAdress of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivation.");
return single_value->field_offeredPDPAdress;
}

AccessPointNameTLV_template& PDU__SM__RequestPDPContextActivation_template::accessPointName()
{
set_specific();
return single_value->field_accessPointName;
}

const AccessPointNameTLV_template& PDU__SM__RequestPDPContextActivation_template::accessPointName() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field accessPointName of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivation.");
return single_value->field_accessPointName;
}

ProtocolConfigOptionsTLV_template& PDU__SM__RequestPDPContextActivation_template::protocolConfigOpts()
{
set_specific();
return single_value->field_protocolConfigOpts;
}

const ProtocolConfigOptionsTLV_template& PDU__SM__RequestPDPContextActivation_template::protocolConfigOpts() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field protocolConfigOpts of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivation.");
return single_value->field_protocolConfigOpts;
}

NBIFOM__ContainerTLV_template& PDU__SM__RequestPDPContextActivation_template::nBIFOM__Container()
{
set_specific();
return single_value->field_nBIFOM__Container;
}

const NBIFOM__ContainerTLV_template& PDU__SM__RequestPDPContextActivation_template::nBIFOM__Container() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nBIFOM_Container of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivation.");
return single_value->field_nBIFOM__Container;
}

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

void PDU__SM__RequestPDPContextActivation_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(", offeredPDPAdress := ");
single_value->field_offeredPDPAdress.log();
TTCN_Logger::log_event_str(", accessPointName := ");
single_value->field_accessPointName.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
single_value->field_nBIFOM__Container.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__SM__RequestPDPContextActivation_template::log_match(const PDU__SM__RequestPDPContextActivation& 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_offeredPDPAdress.match(match_value.offeredPDPAdress(), legacy)){
TTCN_Logger::log_logmatch_info(".offeredPDPAdress");
single_value->field_offeredPDPAdress.log_match(match_value.offeredPDPAdress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.accessPointName().ispresent()){
if(!single_value->field_accessPointName.match(match_value.accessPointName(), legacy)){
TTCN_Logger::log_logmatch_info(".accessPointName");
single_value->field_accessPointName.log_match(match_value.accessPointName(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_accessPointName.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".accessPointName := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_accessPointName.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.protocolConfigOpts().ispresent()){
if(!single_value->field_protocolConfigOpts.match(match_value.protocolConfigOpts(), legacy)){
TTCN_Logger::log_logmatch_info(".protocolConfigOpts");
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_protocolConfigOpts.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".protocolConfigOpts := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nBIFOM__Container().ispresent()){
if(!single_value->field_nBIFOM__Container.match(match_value.nBIFOM__Container(), legacy)){
TTCN_Logger::log_logmatch_info(".nBIFOM_Container");
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nBIFOM__Container.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nBIFOM_Container := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nBIFOM__Container.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(", offeredPDPAdress := ");
single_value->field_offeredPDPAdress.log_match(match_value.offeredPDPAdress(), legacy);
TTCN_Logger::log_event_str(", accessPointName := ");
if (match_value.accessPointName().ispresent()) {
single_value->field_accessPointName.log_match(match_value.accessPointName(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_accessPointName.log();
if (single_value->field_accessPointName.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
if (match_value.protocolConfigOpts().ispresent()) {
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_protocolConfigOpts.log();
if (single_value->field_protocolConfigOpts.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
if (match_value.nBIFOM__Container().ispresent()) {
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nBIFOM__Container.log();
if (single_value->field_nBIFOM__Container.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__SM__RequestPDPContextActivation_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_offeredPDPAdress.encode_text(text_buf);
single_value->field_accessPointName.encode_text(text_buf);
single_value->field_protocolConfigOpts.encode_text(text_buf);
single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation.");
}
}

void PDU__SM__RequestPDPContextActivation_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_offeredPDPAdress.decode_text(text_buf);
single_value->field_accessPointName.decode_text(text_buf);
single_value->field_protocolConfigOpts.decode_text(text_buf);
single_value->field_nBIFOM__Container.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__SM__RequestPDPContextActivation_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation.");
}
}

void PDU__SM__RequestPDPContextActivation_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__SM__RequestPDPContextActivation_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation 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) offeredPDPAdress().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) accessPointName().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "offeredPDPAdress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          offeredPDPAdress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "accessPointName")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          accessPointName().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__RequestPDPContextActivation_template* precondition = new PDU__SM__RequestPDPContextActivation_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__RequestPDPContextActivation_template* implied_template = new PDU__SM__RequestPDPContextActivation_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__RequestPDPContextActivation_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivation");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__RequestPDPContextActivation_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation");
single_value->field_offeredPDPAdress.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivation");
single_value->field_accessPointName.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivation");
single_value->field_protocolConfigOpts.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivation");
single_value->field_nBIFOM__Container.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivation");
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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation");
}

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

boolean PDU__SM__RequestPDPContextActivation_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__SM__RequestPDPContextActivationReject::PDU__SM__RequestPDPContextActivationReject()
{
}

PDU__SM__RequestPDPContextActivationReject::PDU__SM__RequestPDPContextActivationReject(const BITSTRING& par_messageType,
    const OCTETSTRING& par_smCause,
    const OPTIONAL< ProtocolConfigOptionsTLV >& par_protocolConfigOpts,
    const OPTIONAL< NBIFOM__ContainerTLV >& par_nBIFOM__Container)
  :   field_messageType(par_messageType),
  field_smCause(par_smCause),
  field_protocolConfigOpts(par_protocolConfigOpts),
  field_nBIFOM__Container(par_nBIFOM__Container)
{
}

PDU__SM__RequestPDPContextActivationReject::PDU__SM__RequestPDPContextActivationReject(const PDU__SM__RequestPDPContextActivationReject& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
else field_smCause.clean_up();
if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
else field_protocolConfigOpts.clean_up();
if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
else field_nBIFOM__Container.clean_up();
}

void PDU__SM__RequestPDPContextActivationReject::clean_up()
{
field_messageType.clean_up();
field_smCause.clean_up();
field_protocolConfigOpts.clean_up();
field_nBIFOM__Container.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__RequestPDPContextActivationReject::get_descriptor() const { return &PDU__SM__RequestPDPContextActivationReject_descr_; }
PDU__SM__RequestPDPContextActivationReject& PDU__SM__RequestPDPContextActivationReject::operator=(const PDU__SM__RequestPDPContextActivationReject& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
  else field_smCause.clean_up();
  if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
  else field_protocolConfigOpts.clean_up();
  if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
  else field_nBIFOM__Container.clean_up();
}
return *this;
}

boolean PDU__SM__RequestPDPContextActivationReject::operator==(const PDU__SM__RequestPDPContextActivationReject& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_smCause==other_value.field_smCause
  && field_protocolConfigOpts==other_value.field_protocolConfigOpts
  && field_nBIFOM__Container==other_value.field_nBIFOM__Container;
}

boolean PDU__SM__RequestPDPContextActivationReject::is_bound() const
{
return (field_messageType.is_bound())
  || (field_smCause.is_bound())
  || (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_bound())
  || (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_bound());
}
boolean PDU__SM__RequestPDPContextActivationReject::is_value() const
{
return field_messageType.is_value()
  && field_smCause.is_value()
  && (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_value())
  && (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_value());
}
int PDU__SM__RequestPDPContextActivationReject::size_of() const
{
  int ret_val = 2;
  if (field_protocolConfigOpts.ispresent()) ret_val++;
  if (field_nBIFOM__Container.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__RequestPDPContextActivationReject::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(", smCause := ");
field_smCause.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
field_nBIFOM__Container.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__RequestPDPContextActivationReject::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (smCause().is_bound()) smCause().set_implicit_omit();
if (!protocolConfigOpts().is_bound()) protocolConfigOpts() = OMIT_VALUE;
else protocolConfigOpts().set_implicit_omit();
if (!nBIFOM__Container().is_bound()) nBIFOM__Container() = OMIT_VALUE;
else nBIFOM__Container().set_implicit_omit();
}

void PDU__SM__RequestPDPContextActivationReject::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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject 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) smCause().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "smCause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          smCause().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject");
  }
}

void PDU__SM__RequestPDPContextActivationReject::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_smCause.encode_text(text_buf);
field_protocolConfigOpts.encode_text(text_buf);
field_nBIFOM__Container.encode_text(text_buf);
}

void PDU__SM__RequestPDPContextActivationReject::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_smCause.decode_text(text_buf);
field_protocolConfigOpts.decode_text(text_buf);
field_nBIFOM__Container.decode_text(text_buf);
}

void PDU__SM__RequestPDPContextActivationReject::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__RequestPDPContextActivationReject::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__RequestPDPContextActivationReject::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, SMCauseV_descr_.raw->forceomit);
  decoded_field_length = field_smCause.RAW_decode(SMCauseV_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_protocolConfigOpts = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, ProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_protocolConfigOpts().RAW_decode(ProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_protocolConfigOpts = 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_protocolConfigOpts=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_nBIFOM__Container = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, NBIFOM__ContainerTLV_descr_.raw->forceomit);
  decoded_field_length = field_nBIFOM__Container().RAW_decode(NBIFOM__ContainerTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_nBIFOM__Container = 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_nBIFOM__Container=OMIT_VALUE;
  if (field_messageType !=  bs_58) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__RequestPDPContextActivationReject::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, SMCauseV_descr_.raw);
  if (field_protocolConfigOpts.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, ProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_nBIFOM__Container.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, NBIFOM__ContainerTLV_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_smCause.RAW_encode(SMCauseV_descr_, *myleaf.body.node.nodes[1]);
  if (field_protocolConfigOpts.ispresent()) {
  encoded_length += field_protocolConfigOpts().RAW_encode(ProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_nBIFOM__Container.ispresent()) {
  encoded_length += field_nBIFOM__Container().RAW_encode(NBIFOM__ContainerTLV_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_messageType !=  bs_58) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__RequestPDPContextActivationReject_template::single_value_struct {
BITSTRING_template field_messageType;
OCTETSTRING_template field_smCause;
ProtocolConfigOptionsTLV_template field_protocolConfigOpts;
NBIFOM__ContainerTLV_template field_nBIFOM__Container;
};

void PDU__SM__RequestPDPContextActivationReject_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_smCause = ANY_VALUE;
single_value->field_protocolConfigOpts = ANY_OR_OMIT;
single_value->field_nBIFOM__Container = ANY_OR_OMIT;
}
}
}

void PDU__SM__RequestPDPContextActivationReject_template::copy_value(const PDU__SM__RequestPDPContextActivationReject& 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.smCause().is_bound()) {
  single_value->field_smCause = other_value.smCause();
} else {
  single_value->field_smCause.clean_up();
}
if (other_value.protocolConfigOpts().is_bound()) {
  if (other_value.protocolConfigOpts().ispresent()) single_value->field_protocolConfigOpts = other_value.protocolConfigOpts()();
  else single_value->field_protocolConfigOpts = OMIT_VALUE;
} else {
  single_value->field_protocolConfigOpts.clean_up();
}
if (other_value.nBIFOM__Container().is_bound()) {
  if (other_value.nBIFOM__Container().ispresent()) single_value->field_nBIFOM__Container = other_value.nBIFOM__Container()();
  else single_value->field_nBIFOM__Container = OMIT_VALUE;
} else {
  single_value->field_nBIFOM__Container.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__RequestPDPContextActivationReject_template::copy_template(const PDU__SM__RequestPDPContextActivationReject_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.smCause().get_selection()) {
single_value->field_smCause = other_value.smCause();
} else {
single_value->field_smCause.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.protocolConfigOpts().get_selection()) {
single_value->field_protocolConfigOpts = other_value.protocolConfigOpts();
} else {
single_value->field_protocolConfigOpts.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nBIFOM__Container().get_selection()) {
single_value->field_nBIFOM__Container = other_value.nBIFOM__Container();
} else {
single_value->field_nBIFOM__Container.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__SM__RequestPDPContextActivationReject_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__SM__RequestPDPContextActivationReject_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__RequestPDPContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject.");
break;
}
set_selection(other_value);
}

PDU__SM__RequestPDPContextActivationReject_template::PDU__SM__RequestPDPContextActivationReject_template()
{
}

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

PDU__SM__RequestPDPContextActivationReject_template::PDU__SM__RequestPDPContextActivationReject_template(const PDU__SM__RequestPDPContextActivationReject& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__RequestPDPContextActivationReject_template& PDU__SM__RequestPDPContextActivationReject_template::operator=(const OPTIONAL<PDU__SM__RequestPDPContextActivationReject>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__RequestPDPContextActivationReject&)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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject.");
}
return *this;
}

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

boolean PDU__SM__RequestPDPContextActivationReject_template::match(const PDU__SM__RequestPDPContextActivationReject& 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.smCause().is_bound()) return FALSE;
if(!single_value->field_smCause.match(other_value.smCause(), legacy))return FALSE;
if(!other_value.protocolConfigOpts().is_bound()) return FALSE;
if((other_value.protocolConfigOpts().ispresent() ? !single_value->field_protocolConfigOpts.match((const ProtocolConfigOptionsTLV&)other_value.protocolConfigOpts(), legacy) : !single_value->field_protocolConfigOpts.match_omit(legacy)))return FALSE;
if(!other_value.nBIFOM__Container().is_bound()) return FALSE;
if((other_value.nBIFOM__Container().ispresent() ? !single_value->field_nBIFOM__Container.match((const NBIFOM__ContainerTLV&)other_value.nBIFOM__Container(), legacy) : !single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject.");
}
return FALSE;
}

boolean PDU__SM__RequestPDPContextActivationReject_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_smCause.is_bound()
 || (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_bound())
 || (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_bound());
}

boolean PDU__SM__RequestPDPContextActivationReject_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_smCause.is_value()
 && (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_value())
 && (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_value());
}

void PDU__SM__RequestPDPContextActivationReject_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__SM__RequestPDPContextActivationReject PDU__SM__RequestPDPContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject.");
PDU__SM__RequestPDPContextActivationReject ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_smCause.is_bound()) {
ret_val.smCause() = single_value->field_smCause.valueof();
}
if (single_value->field_protocolConfigOpts.is_omit()) ret_val.protocolConfigOpts() = OMIT_VALUE;
else if (single_value->field_protocolConfigOpts.is_bound()) {
ret_val.protocolConfigOpts() = single_value->field_protocolConfigOpts.valueof();
}
if (single_value->field_nBIFOM__Container.is_omit()) ret_val.nBIFOM__Container() = OMIT_VALUE;
else if (single_value->field_nBIFOM__Container.is_bound()) {
ret_val.nBIFOM__Container() = single_value->field_nBIFOM__Container.valueof();
}
return ret_val;
}

void PDU__SM__RequestPDPContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__RequestPDPContextActivationReject_template[list_length];
}

PDU__SM__RequestPDPContextActivationReject_template& PDU__SM__RequestPDPContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject.");
return value_list.list_value[list_index];
}

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

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

OCTETSTRING_template& PDU__SM__RequestPDPContextActivationReject_template::smCause()
{
set_specific();
return single_value->field_smCause;
}

const OCTETSTRING_template& PDU__SM__RequestPDPContextActivationReject_template::smCause() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field smCause of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject.");
return single_value->field_smCause;
}

ProtocolConfigOptionsTLV_template& PDU__SM__RequestPDPContextActivationReject_template::protocolConfigOpts()
{
set_specific();
return single_value->field_protocolConfigOpts;
}

const ProtocolConfigOptionsTLV_template& PDU__SM__RequestPDPContextActivationReject_template::protocolConfigOpts() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field protocolConfigOpts of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject.");
return single_value->field_protocolConfigOpts;
}

NBIFOM__ContainerTLV_template& PDU__SM__RequestPDPContextActivationReject_template::nBIFOM__Container()
{
set_specific();
return single_value->field_nBIFOM__Container;
}

const NBIFOM__ContainerTLV_template& PDU__SM__RequestPDPContextActivationReject_template::nBIFOM__Container() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nBIFOM_Container of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject.");
return single_value->field_nBIFOM__Container;
}

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

void PDU__SM__RequestPDPContextActivationReject_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(", smCause := ");
single_value->field_smCause.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
single_value->field_nBIFOM__Container.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__SM__RequestPDPContextActivationReject_template::log_match(const PDU__SM__RequestPDPContextActivationReject& 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_smCause.match(match_value.smCause(), legacy)){
TTCN_Logger::log_logmatch_info(".smCause");
single_value->field_smCause.log_match(match_value.smCause(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.protocolConfigOpts().ispresent()){
if(!single_value->field_protocolConfigOpts.match(match_value.protocolConfigOpts(), legacy)){
TTCN_Logger::log_logmatch_info(".protocolConfigOpts");
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_protocolConfigOpts.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".protocolConfigOpts := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nBIFOM__Container().ispresent()){
if(!single_value->field_nBIFOM__Container.match(match_value.nBIFOM__Container(), legacy)){
TTCN_Logger::log_logmatch_info(".nBIFOM_Container");
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nBIFOM__Container.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nBIFOM_Container := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nBIFOM__Container.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(", smCause := ");
single_value->field_smCause.log_match(match_value.smCause(), legacy);
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
if (match_value.protocolConfigOpts().ispresent()) {
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_protocolConfigOpts.log();
if (single_value->field_protocolConfigOpts.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
if (match_value.nBIFOM__Container().ispresent()) {
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nBIFOM__Container.log();
if (single_value->field_nBIFOM__Container.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__SM__RequestPDPContextActivationReject_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_smCause.encode_text(text_buf);
single_value->field_protocolConfigOpts.encode_text(text_buf);
single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject.");
}
}

void PDU__SM__RequestPDPContextActivationReject_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_smCause.decode_text(text_buf);
single_value->field_protocolConfigOpts.decode_text(text_buf);
single_value->field_nBIFOM__Container.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__SM__RequestPDPContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject.");
}
}

void PDU__SM__RequestPDPContextActivationReject_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__SM__RequestPDPContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject 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) smCause().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "smCause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          smCause().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__RequestPDPContextActivationReject_template* precondition = new PDU__SM__RequestPDPContextActivationReject_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__RequestPDPContextActivationReject_template* implied_template = new PDU__SM__RequestPDPContextActivationReject_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__RequestPDPContextActivationReject_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__RequestPDPContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject");
single_value->field_smCause.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject");
single_value->field_protocolConfigOpts.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject");
single_value->field_nBIFOM__Container.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject");
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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject");
}

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

boolean PDU__SM__RequestPDPContextActivationReject_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__SM__ModifyPDPContextRequest__SGSN__MS::PDU__SM__ModifyPDPContextRequest__SGSN__MS()
{
}

PDU__SM__ModifyPDPContextRequest__SGSN__MS::PDU__SM__ModifyPDPContextRequest__SGSN__MS(const BITSTRING& par_messageType,
    const RadioPriorityV& par_radioPriority,
    const BITSTRING& par_spare,
    const LLC__SAPIV& par_requestedLLC__SAPI,
    const QoSLV& par_newQoS,
    const OPTIONAL< PDPAddressTLV >& par_pdpAddress,
    const OPTIONAL< PacketFlowIDTLV >& par_packetFlowIdentifier,
    const OPTIONAL< ProtocolConfigOptionsTLV >& par_protocolConfigOpts,
    const OPTIONAL< TrafficFlowTemplateTLV >& par_tFT,
    const OPTIONAL< WLANOffloadAcceptabilityTV >& par_wLANOffloadIndication,
    const OPTIONAL< NBIFOM__ContainerTLV >& par_nBIFOM__Container)
  :   field_messageType(par_messageType),
  field_radioPriority(par_radioPriority),
  field_spare(par_spare),
  field_requestedLLC__SAPI(par_requestedLLC__SAPI),
  field_newQoS(par_newQoS),
  field_pdpAddress(par_pdpAddress),
  field_packetFlowIdentifier(par_packetFlowIdentifier),
  field_protocolConfigOpts(par_protocolConfigOpts),
  field_tFT(par_tFT),
  field_wLANOffloadIndication(par_wLANOffloadIndication),
  field_nBIFOM__Container(par_nBIFOM__Container)
{
}

PDU__SM__ModifyPDPContextRequest__SGSN__MS::PDU__SM__ModifyPDPContextRequest__SGSN__MS(const PDU__SM__ModifyPDPContextRequest__SGSN__MS& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.radioPriority().is_bound()) field_radioPriority = other_value.radioPriority();
else field_radioPriority.clean_up();
if (other_value.spare().is_bound()) field_spare = other_value.spare();
else field_spare.clean_up();
if (other_value.requestedLLC__SAPI().is_bound()) field_requestedLLC__SAPI = other_value.requestedLLC__SAPI();
else field_requestedLLC__SAPI.clean_up();
if (other_value.newQoS().is_bound()) field_newQoS = other_value.newQoS();
else field_newQoS.clean_up();
if (other_value.pdpAddress().is_bound()) field_pdpAddress = other_value.pdpAddress();
else field_pdpAddress.clean_up();
if (other_value.packetFlowIdentifier().is_bound()) field_packetFlowIdentifier = other_value.packetFlowIdentifier();
else field_packetFlowIdentifier.clean_up();
if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
else field_protocolConfigOpts.clean_up();
if (other_value.tFT().is_bound()) field_tFT = other_value.tFT();
else field_tFT.clean_up();
if (other_value.wLANOffloadIndication().is_bound()) field_wLANOffloadIndication = other_value.wLANOffloadIndication();
else field_wLANOffloadIndication.clean_up();
if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
else field_nBIFOM__Container.clean_up();
}

void PDU__SM__ModifyPDPContextRequest__SGSN__MS::clean_up()
{
field_messageType.clean_up();
field_radioPriority.clean_up();
field_spare.clean_up();
field_requestedLLC__SAPI.clean_up();
field_newQoS.clean_up();
field_pdpAddress.clean_up();
field_packetFlowIdentifier.clean_up();
field_protocolConfigOpts.clean_up();
field_tFT.clean_up();
field_wLANOffloadIndication.clean_up();
field_nBIFOM__Container.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__ModifyPDPContextRequest__SGSN__MS::get_descriptor() const { return &PDU__SM__ModifyPDPContextRequest__SGSN__MS_descr_; }
PDU__SM__ModifyPDPContextRequest__SGSN__MS& PDU__SM__ModifyPDPContextRequest__SGSN__MS::operator=(const PDU__SM__ModifyPDPContextRequest__SGSN__MS& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.radioPriority().is_bound()) field_radioPriority = other_value.radioPriority();
  else field_radioPriority.clean_up();
  if (other_value.spare().is_bound()) field_spare = other_value.spare();
  else field_spare.clean_up();
  if (other_value.requestedLLC__SAPI().is_bound()) field_requestedLLC__SAPI = other_value.requestedLLC__SAPI();
  else field_requestedLLC__SAPI.clean_up();
  if (other_value.newQoS().is_bound()) field_newQoS = other_value.newQoS();
  else field_newQoS.clean_up();
  if (other_value.pdpAddress().is_bound()) field_pdpAddress = other_value.pdpAddress();
  else field_pdpAddress.clean_up();
  if (other_value.packetFlowIdentifier().is_bound()) field_packetFlowIdentifier = other_value.packetFlowIdentifier();
  else field_packetFlowIdentifier.clean_up();
  if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
  else field_protocolConfigOpts.clean_up();
  if (other_value.tFT().is_bound()) field_tFT = other_value.tFT();
  else field_tFT.clean_up();
  if (other_value.wLANOffloadIndication().is_bound()) field_wLANOffloadIndication = other_value.wLANOffloadIndication();
  else field_wLANOffloadIndication.clean_up();
  if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
  else field_nBIFOM__Container.clean_up();
}
return *this;
}

boolean PDU__SM__ModifyPDPContextRequest__SGSN__MS::operator==(const PDU__SM__ModifyPDPContextRequest__SGSN__MS& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_radioPriority==other_value.field_radioPriority
  && field_spare==other_value.field_spare
  && field_requestedLLC__SAPI==other_value.field_requestedLLC__SAPI
  && field_newQoS==other_value.field_newQoS
  && field_pdpAddress==other_value.field_pdpAddress
  && field_packetFlowIdentifier==other_value.field_packetFlowIdentifier
  && field_protocolConfigOpts==other_value.field_protocolConfigOpts
  && field_tFT==other_value.field_tFT
  && field_wLANOffloadIndication==other_value.field_wLANOffloadIndication
  && field_nBIFOM__Container==other_value.field_nBIFOM__Container;
}

boolean PDU__SM__ModifyPDPContextRequest__SGSN__MS::is_bound() const
{
return (field_messageType.is_bound())
  || (field_radioPriority.is_bound())
  || (field_spare.is_bound())
  || (field_requestedLLC__SAPI.is_bound())
  || (field_newQoS.is_bound())
  || (OPTIONAL_OMIT == field_pdpAddress.get_selection() || field_pdpAddress.is_bound())
  || (OPTIONAL_OMIT == field_packetFlowIdentifier.get_selection() || field_packetFlowIdentifier.is_bound())
  || (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_bound())
  || (OPTIONAL_OMIT == field_tFT.get_selection() || field_tFT.is_bound())
  || (OPTIONAL_OMIT == field_wLANOffloadIndication.get_selection() || field_wLANOffloadIndication.is_bound())
  || (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_bound());
}
boolean PDU__SM__ModifyPDPContextRequest__SGSN__MS::is_value() const
{
return field_messageType.is_value()
  && field_radioPriority.is_value()
  && field_spare.is_value()
  && field_requestedLLC__SAPI.is_value()
  && field_newQoS.is_value()
  && (OPTIONAL_OMIT == field_pdpAddress.get_selection() || field_pdpAddress.is_value())
  && (OPTIONAL_OMIT == field_packetFlowIdentifier.get_selection() || field_packetFlowIdentifier.is_value())
  && (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_value())
  && (OPTIONAL_OMIT == field_tFT.get_selection() || field_tFT.is_value())
  && (OPTIONAL_OMIT == field_wLANOffloadIndication.get_selection() || field_wLANOffloadIndication.is_value())
  && (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_value());
}
int PDU__SM__ModifyPDPContextRequest__SGSN__MS::size_of() const
{
  int ret_val = 5;
  if (field_pdpAddress.ispresent()) ret_val++;
  if (field_packetFlowIdentifier.ispresent()) ret_val++;
  if (field_protocolConfigOpts.ispresent()) ret_val++;
  if (field_tFT.ispresent()) ret_val++;
  if (field_wLANOffloadIndication.ispresent()) ret_val++;
  if (field_nBIFOM__Container.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__ModifyPDPContextRequest__SGSN__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(", radioPriority := ");
field_radioPriority.log();
TTCN_Logger::log_event_str(", spare := ");
field_spare.log();
TTCN_Logger::log_event_str(", requestedLLC_SAPI := ");
field_requestedLLC__SAPI.log();
TTCN_Logger::log_event_str(", newQoS := ");
field_newQoS.log();
TTCN_Logger::log_event_str(", pdpAddress := ");
field_pdpAddress.log();
TTCN_Logger::log_event_str(", packetFlowIdentifier := ");
field_packetFlowIdentifier.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", tFT := ");
field_tFT.log();
TTCN_Logger::log_event_str(", wLANOffloadIndication := ");
field_wLANOffloadIndication.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
field_nBIFOM__Container.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__ModifyPDPContextRequest__SGSN__MS::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (radioPriority().is_bound()) radioPriority().set_implicit_omit();
if (spare().is_bound()) spare().set_implicit_omit();
if (requestedLLC__SAPI().is_bound()) requestedLLC__SAPI().set_implicit_omit();
if (newQoS().is_bound()) newQoS().set_implicit_omit();
if (!pdpAddress().is_bound()) pdpAddress() = OMIT_VALUE;
else pdpAddress().set_implicit_omit();
if (!packetFlowIdentifier().is_bound()) packetFlowIdentifier() = OMIT_VALUE;
else packetFlowIdentifier().set_implicit_omit();
if (!protocolConfigOpts().is_bound()) protocolConfigOpts() = OMIT_VALUE;
else protocolConfigOpts().set_implicit_omit();
if (!tFT().is_bound()) tFT() = OMIT_VALUE;
else tFT().set_implicit_omit();
if (!wLANOffloadIndication().is_bound()) wLANOffloadIndication() = OMIT_VALUE;
else wLANOffloadIndication().set_implicit_omit();
if (!nBIFOM__Container().is_bound()) nBIFOM__Container() = OMIT_VALUE;
else nBIFOM__Container().set_implicit_omit();
}

void PDU__SM__ModifyPDPContextRequest__SGSN__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 (11<param.get_size()) {
      param.error("record value of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS has 11 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) radioPriority().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) requestedLLC__SAPI().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) newQoS().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) pdpAddress().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) packetFlowIdentifier().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) tFT().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) wLANOffloadIndication().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().set_param(*param.get_elem(10));
    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(), "radioPriority")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          radioPriority().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "requestedLLC_SAPI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          requestedLLC__SAPI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "newQoS")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          newQoS().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "pdpAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pdpAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "packetFlowIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          packetFlowIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tFT")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tFT().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "wLANOffloadIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          wLANOffloadIndication().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS");
  }
}

void PDU__SM__ModifyPDPContextRequest__SGSN__MS::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_radioPriority.encode_text(text_buf);
field_spare.encode_text(text_buf);
field_requestedLLC__SAPI.encode_text(text_buf);
field_newQoS.encode_text(text_buf);
field_pdpAddress.encode_text(text_buf);
field_packetFlowIdentifier.encode_text(text_buf);
field_protocolConfigOpts.encode_text(text_buf);
field_tFT.encode_text(text_buf);
field_wLANOffloadIndication.encode_text(text_buf);
field_nBIFOM__Container.encode_text(text_buf);
}

void PDU__SM__ModifyPDPContextRequest__SGSN__MS::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_radioPriority.decode_text(text_buf);
field_spare.decode_text(text_buf);
field_requestedLLC__SAPI.decode_text(text_buf);
field_newQoS.decode_text(text_buf);
field_pdpAddress.decode_text(text_buf);
field_packetFlowIdentifier.decode_text(text_buf);
field_protocolConfigOpts.decode_text(text_buf);
field_tFT.decode_text(text_buf);
field_wLANOffloadIndication.decode_text(text_buf);
field_nBIFOM__Container.decode_text(text_buf);
}

void PDU__SM__ModifyPDPContextRequest__SGSN__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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__ModifyPDPContextRequest__SGSN__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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__ModifyPDPContextRequest__SGSN__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, RadioPriorityV_descr_.raw->forceomit);
  decoded_field_length = field_radioPriority.RAW_decode(RadioPriorityV_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_spare.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, LLC__SAPIV_descr_.raw->forceomit);
  decoded_field_length = field_requestedLLC__SAPI.RAW_decode(LLC__SAPIV_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, QoSLV_descr_.raw->forceomit);
  decoded_field_length = field_newQoS.RAW_decode(QoSLV_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_pdpAddress = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, PDPAddressTLV_descr_.raw->forceomit);
  decoded_field_length = field_pdpAddress().RAW_decode(PDPAddressTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_pdpAddress = 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_pdpAddress=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_packetFlowIdentifier = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, PacketFlowIDTLV_descr_.raw->forceomit);
  decoded_field_length = field_packetFlowIdentifier().RAW_decode(PacketFlowIDTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_packetFlowIdentifier = 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_packetFlowIdentifier=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(7)) {
    field_protocolConfigOpts = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_7_force_omit(7, force_omit, ProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_protocolConfigOpts().RAW_decode(ProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 1) {
  field_protocolConfigOpts = 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_protocolConfigOpts=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(8)) {
    field_tFT = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_8_force_omit(8, force_omit, TrafficFlowTemplateTLV_descr_.raw->forceomit);
  decoded_field_length = field_tFT().RAW_decode(TrafficFlowTemplateTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_8_force_omit);
  if (decoded_field_length < 1) {
  field_tFT = 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_tFT=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(9)) {
    field_wLANOffloadIndication = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_9_force_omit(9, force_omit, WLANOffloadAcceptabilityTV_descr_.raw->forceomit);
  decoded_field_length = field_wLANOffloadIndication().RAW_decode(WLANOffloadAcceptabilityTV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_9_force_omit);
  if (decoded_field_length < 1) {
  field_wLANOffloadIndication = 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_wLANOffloadIndication=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(10)) {
    field_nBIFOM__Container = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_10_force_omit(10, force_omit, NBIFOM__ContainerTLV_descr_.raw->forceomit);
  decoded_field_length = field_nBIFOM__Container().RAW_decode(NBIFOM__ContainerTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_10_force_omit);
  if (decoded_field_length < 1) {
  field_nBIFOM__Container = 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_nBIFOM__Container=OMIT_VALUE;
  if (field_messageType !=  bs_59) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__ModifyPDPContextRequest__SGSN__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 = 11;
  myleaf.body.node.nodes = init_nodes_of_enc_tree(11);
  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, RadioPriorityV_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, LLC__SAPIV_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, QoSLV_descr_.raw);
  if (field_pdpAddress.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, PDPAddressTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_packetFlowIdentifier.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, PacketFlowIDTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  if (field_protocolConfigOpts.ispresent()) {
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, ProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[7] = NULL;
  if (field_tFT.ispresent()) {
  myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 8, TrafficFlowTemplateTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[8] = NULL;
  if (field_wLANOffloadIndication.ispresent()) {
  myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 9, WLANOffloadAcceptabilityTV_descr_.raw);
  }
  else myleaf.body.node.nodes[9] = NULL;
  if (field_nBIFOM__Container.ispresent()) {
  myleaf.body.node.nodes[10] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 10, NBIFOM__ContainerTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[10] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_radioPriority.RAW_encode(RadioPriorityV_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_spare.RAW_encode(General__Types::BIT4_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_requestedLLC__SAPI.RAW_encode(LLC__SAPIV_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_newQoS.RAW_encode(QoSLV_descr_, *myleaf.body.node.nodes[4]);
  if (field_pdpAddress.ispresent()) {
  encoded_length += field_pdpAddress().RAW_encode(PDPAddressTLV_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_packetFlowIdentifier.ispresent()) {
  encoded_length += field_packetFlowIdentifier().RAW_encode(PacketFlowIDTLV_descr_, *myleaf.body.node.nodes[6]);
  }
  if (field_protocolConfigOpts.ispresent()) {
  encoded_length += field_protocolConfigOpts().RAW_encode(ProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[7]);
  }
  if (field_tFT.ispresent()) {
  encoded_length += field_tFT().RAW_encode(TrafficFlowTemplateTLV_descr_, *myleaf.body.node.nodes[8]);
  }
  if (field_wLANOffloadIndication.ispresent()) {
  encoded_length += field_wLANOffloadIndication().RAW_encode(WLANOffloadAcceptabilityTV_descr_, *myleaf.body.node.nodes[9]);
  }
  if (field_nBIFOM__Container.ispresent()) {
  encoded_length += field_nBIFOM__Container().RAW_encode(NBIFOM__ContainerTLV_descr_, *myleaf.body.node.nodes[10]);
  }
  if (field_messageType !=  bs_59) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::single_value_struct {
BITSTRING_template field_messageType;
RadioPriorityV_template field_radioPriority;
BITSTRING_template field_spare;
LLC__SAPIV_template field_requestedLLC__SAPI;
QoSLV_template field_newQoS;
PDPAddressTLV_template field_pdpAddress;
PacketFlowIDTLV_template field_packetFlowIdentifier;
ProtocolConfigOptionsTLV_template field_protocolConfigOpts;
TrafficFlowTemplateTLV_template field_tFT;
WLANOffloadAcceptabilityTV_template field_wLANOffloadIndication;
NBIFOM__ContainerTLV_template field_nBIFOM__Container;
};

void PDU__SM__ModifyPDPContextRequest__SGSN__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_radioPriority = ANY_VALUE;
single_value->field_spare = ANY_VALUE;
single_value->field_requestedLLC__SAPI = ANY_VALUE;
single_value->field_newQoS = ANY_VALUE;
single_value->field_pdpAddress = ANY_OR_OMIT;
single_value->field_packetFlowIdentifier = ANY_OR_OMIT;
single_value->field_protocolConfigOpts = ANY_OR_OMIT;
single_value->field_tFT = ANY_OR_OMIT;
single_value->field_wLANOffloadIndication = ANY_OR_OMIT;
single_value->field_nBIFOM__Container = ANY_OR_OMIT;
}
}
}

void PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::copy_value(const PDU__SM__ModifyPDPContextRequest__SGSN__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.radioPriority().is_bound()) {
  single_value->field_radioPriority = other_value.radioPriority();
} else {
  single_value->field_radioPriority.clean_up();
}
if (other_value.spare().is_bound()) {
  single_value->field_spare = other_value.spare();
} else {
  single_value->field_spare.clean_up();
}
if (other_value.requestedLLC__SAPI().is_bound()) {
  single_value->field_requestedLLC__SAPI = other_value.requestedLLC__SAPI();
} else {
  single_value->field_requestedLLC__SAPI.clean_up();
}
if (other_value.newQoS().is_bound()) {
  single_value->field_newQoS = other_value.newQoS();
} else {
  single_value->field_newQoS.clean_up();
}
if (other_value.pdpAddress().is_bound()) {
  if (other_value.pdpAddress().ispresent()) single_value->field_pdpAddress = other_value.pdpAddress()();
  else single_value->field_pdpAddress = OMIT_VALUE;
} else {
  single_value->field_pdpAddress.clean_up();
}
if (other_value.packetFlowIdentifier().is_bound()) {
  if (other_value.packetFlowIdentifier().ispresent()) single_value->field_packetFlowIdentifier = other_value.packetFlowIdentifier()();
  else single_value->field_packetFlowIdentifier = OMIT_VALUE;
} else {
  single_value->field_packetFlowIdentifier.clean_up();
}
if (other_value.protocolConfigOpts().is_bound()) {
  if (other_value.protocolConfigOpts().ispresent()) single_value->field_protocolConfigOpts = other_value.protocolConfigOpts()();
  else single_value->field_protocolConfigOpts = OMIT_VALUE;
} else {
  single_value->field_protocolConfigOpts.clean_up();
}
if (other_value.tFT().is_bound()) {
  if (other_value.tFT().ispresent()) single_value->field_tFT = other_value.tFT()();
  else single_value->field_tFT = OMIT_VALUE;
} else {
  single_value->field_tFT.clean_up();
}
if (other_value.wLANOffloadIndication().is_bound()) {
  if (other_value.wLANOffloadIndication().ispresent()) single_value->field_wLANOffloadIndication = other_value.wLANOffloadIndication()();
  else single_value->field_wLANOffloadIndication = OMIT_VALUE;
} else {
  single_value->field_wLANOffloadIndication.clean_up();
}
if (other_value.nBIFOM__Container().is_bound()) {
  if (other_value.nBIFOM__Container().ispresent()) single_value->field_nBIFOM__Container = other_value.nBIFOM__Container()();
  else single_value->field_nBIFOM__Container = OMIT_VALUE;
} else {
  single_value->field_nBIFOM__Container.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::copy_template(const PDU__SM__ModifyPDPContextRequest__SGSN__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.radioPriority().get_selection()) {
single_value->field_radioPriority = other_value.radioPriority();
} else {
single_value->field_radioPriority.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.spare().get_selection()) {
single_value->field_spare = other_value.spare();
} else {
single_value->field_spare.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.requestedLLC__SAPI().get_selection()) {
single_value->field_requestedLLC__SAPI = other_value.requestedLLC__SAPI();
} else {
single_value->field_requestedLLC__SAPI.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.newQoS().get_selection()) {
single_value->field_newQoS = other_value.newQoS();
} else {
single_value->field_newQoS.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.pdpAddress().get_selection()) {
single_value->field_pdpAddress = other_value.pdpAddress();
} else {
single_value->field_pdpAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.packetFlowIdentifier().get_selection()) {
single_value->field_packetFlowIdentifier = other_value.packetFlowIdentifier();
} else {
single_value->field_packetFlowIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.protocolConfigOpts().get_selection()) {
single_value->field_protocolConfigOpts = other_value.protocolConfigOpts();
} else {
single_value->field_protocolConfigOpts.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.tFT().get_selection()) {
single_value->field_tFT = other_value.tFT();
} else {
single_value->field_tFT.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.wLANOffloadIndication().get_selection()) {
single_value->field_wLANOffloadIndication = other_value.wLANOffloadIndication();
} else {
single_value->field_wLANOffloadIndication.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nBIFOM__Container().get_selection()) {
single_value->field_nBIFOM__Container = other_value.nBIFOM__Container();
} else {
single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextRequest__SGSN__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__SM__ModifyPDPContextRequest__SGSN__MS_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__ModifyPDPContextRequest__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
break;
}
set_selection(other_value);
}

PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::PDU__SM__ModifyPDPContextRequest__SGSN__MS_template()
{
}

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

PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::PDU__SM__ModifyPDPContextRequest__SGSN__MS_template(const PDU__SM__ModifyPDPContextRequest__SGSN__MS& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__ModifyPDPContextRequest__SGSN__MS_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::operator=(const OPTIONAL<PDU__SM__ModifyPDPContextRequest__SGSN__MS>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__ModifyPDPContextRequest__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
}
return *this;
}

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

boolean PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::match(const PDU__SM__ModifyPDPContextRequest__SGSN__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.radioPriority().is_bound()) return FALSE;
if(!single_value->field_radioPriority.match(other_value.radioPriority(), legacy))return FALSE;
if(!other_value.spare().is_bound()) return FALSE;
if(!single_value->field_spare.match(other_value.spare(), legacy))return FALSE;
if(!other_value.requestedLLC__SAPI().is_bound()) return FALSE;
if(!single_value->field_requestedLLC__SAPI.match(other_value.requestedLLC__SAPI(), legacy))return FALSE;
if(!other_value.newQoS().is_bound()) return FALSE;
if(!single_value->field_newQoS.match(other_value.newQoS(), legacy))return FALSE;
if(!other_value.pdpAddress().is_bound()) return FALSE;
if((other_value.pdpAddress().ispresent() ? !single_value->field_pdpAddress.match((const PDPAddressTLV&)other_value.pdpAddress(), legacy) : !single_value->field_pdpAddress.match_omit(legacy)))return FALSE;
if(!other_value.packetFlowIdentifier().is_bound()) return FALSE;
if((other_value.packetFlowIdentifier().ispresent() ? !single_value->field_packetFlowIdentifier.match((const PacketFlowIDTLV&)other_value.packetFlowIdentifier(), legacy) : !single_value->field_packetFlowIdentifier.match_omit(legacy)))return FALSE;
if(!other_value.protocolConfigOpts().is_bound()) return FALSE;
if((other_value.protocolConfigOpts().ispresent() ? !single_value->field_protocolConfigOpts.match((const ProtocolConfigOptionsTLV&)other_value.protocolConfigOpts(), legacy) : !single_value->field_protocolConfigOpts.match_omit(legacy)))return FALSE;
if(!other_value.tFT().is_bound()) return FALSE;
if((other_value.tFT().ispresent() ? !single_value->field_tFT.match((const TrafficFlowTemplateTLV&)other_value.tFT(), legacy) : !single_value->field_tFT.match_omit(legacy)))return FALSE;
if(!other_value.wLANOffloadIndication().is_bound()) return FALSE;
if((other_value.wLANOffloadIndication().ispresent() ? !single_value->field_wLANOffloadIndication.match((const WLANOffloadAcceptabilityTV&)other_value.wLANOffloadIndication(), legacy) : !single_value->field_wLANOffloadIndication.match_omit(legacy)))return FALSE;
if(!other_value.nBIFOM__Container().is_bound()) return FALSE;
if((other_value.nBIFOM__Container().ispresent() ? !single_value->field_nBIFOM__Container.match((const NBIFOM__ContainerTLV&)other_value.nBIFOM__Container(), legacy) : !single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
}
return FALSE;
}

boolean PDU__SM__ModifyPDPContextRequest__SGSN__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_radioPriority.is_bound()
 || single_value->field_spare.is_bound()
 || single_value->field_requestedLLC__SAPI.is_bound()
 || single_value->field_newQoS.is_bound()
 || (single_value->field_pdpAddress.is_omit() || single_value->field_pdpAddress.is_bound())
 || (single_value->field_packetFlowIdentifier.is_omit() || single_value->field_packetFlowIdentifier.is_bound())
 || (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_bound())
 || (single_value->field_tFT.is_omit() || single_value->field_tFT.is_bound())
 || (single_value->field_wLANOffloadIndication.is_omit() || single_value->field_wLANOffloadIndication.is_bound())
 || (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_bound());
}

boolean PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_radioPriority.is_value()
 && single_value->field_spare.is_value()
 && single_value->field_requestedLLC__SAPI.is_value()
 && single_value->field_newQoS.is_value()
 && (single_value->field_pdpAddress.is_omit() || single_value->field_pdpAddress.is_value())
 && (single_value->field_packetFlowIdentifier.is_omit() || single_value->field_packetFlowIdentifier.is_value())
 && (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_value())
 && (single_value->field_tFT.is_omit() || single_value->field_tFT.is_value())
 && (single_value->field_wLANOffloadIndication.is_omit() || single_value->field_wLANOffloadIndication.is_value())
 && (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_value());
}

void PDU__SM__ModifyPDPContextRequest__SGSN__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__SM__ModifyPDPContextRequest__SGSN__MS PDU__SM__ModifyPDPContextRequest__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
PDU__SM__ModifyPDPContextRequest__SGSN__MS ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_radioPriority.is_bound()) {
ret_val.radioPriority() = single_value->field_radioPriority.valueof();
}
if (single_value->field_spare.is_bound()) {
ret_val.spare() = single_value->field_spare.valueof();
}
if (single_value->field_requestedLLC__SAPI.is_bound()) {
ret_val.requestedLLC__SAPI() = single_value->field_requestedLLC__SAPI.valueof();
}
if (single_value->field_newQoS.is_bound()) {
ret_val.newQoS() = single_value->field_newQoS.valueof();
}
if (single_value->field_pdpAddress.is_omit()) ret_val.pdpAddress() = OMIT_VALUE;
else if (single_value->field_pdpAddress.is_bound()) {
ret_val.pdpAddress() = single_value->field_pdpAddress.valueof();
}
if (single_value->field_packetFlowIdentifier.is_omit()) ret_val.packetFlowIdentifier() = OMIT_VALUE;
else if (single_value->field_packetFlowIdentifier.is_bound()) {
ret_val.packetFlowIdentifier() = single_value->field_packetFlowIdentifier.valueof();
}
if (single_value->field_protocolConfigOpts.is_omit()) ret_val.protocolConfigOpts() = OMIT_VALUE;
else if (single_value->field_protocolConfigOpts.is_bound()) {
ret_val.protocolConfigOpts() = single_value->field_protocolConfigOpts.valueof();
}
if (single_value->field_tFT.is_omit()) ret_val.tFT() = OMIT_VALUE;
else if (single_value->field_tFT.is_bound()) {
ret_val.tFT() = single_value->field_tFT.valueof();
}
if (single_value->field_wLANOffloadIndication.is_omit()) ret_val.wLANOffloadIndication() = OMIT_VALUE;
else if (single_value->field_wLANOffloadIndication.is_bound()) {
ret_val.wLANOffloadIndication() = single_value->field_wLANOffloadIndication.valueof();
}
if (single_value->field_nBIFOM__Container.is_omit()) ret_val.nBIFOM__Container() = OMIT_VALUE;
else if (single_value->field_nBIFOM__Container.is_bound()) {
ret_val.nBIFOM__Container() = single_value->field_nBIFOM__Container.valueof();
}
return ret_val;
}

void PDU__SM__ModifyPDPContextRequest__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__ModifyPDPContextRequest__SGSN__MS_template[list_length];
}

PDU__SM__ModifyPDPContextRequest__SGSN__MS_template& PDU__SM__ModifyPDPContextRequest__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
return value_list.list_value[list_index];
}

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

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

RadioPriorityV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::radioPriority()
{
set_specific();
return single_value->field_radioPriority;
}

const RadioPriorityV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::radioPriority() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field radioPriority of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
return single_value->field_radioPriority;
}

BITSTRING_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::spare()
{
set_specific();
return single_value->field_spare;
}

const BITSTRING_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::spare() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field spare of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
return single_value->field_spare;
}

LLC__SAPIV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::requestedLLC__SAPI()
{
set_specific();
return single_value->field_requestedLLC__SAPI;
}

const LLC__SAPIV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::requestedLLC__SAPI() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field requestedLLC_SAPI of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
return single_value->field_requestedLLC__SAPI;
}

QoSLV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::newQoS()
{
set_specific();
return single_value->field_newQoS;
}

const QoSLV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::newQoS() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field newQoS of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
return single_value->field_newQoS;
}

PDPAddressTLV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::pdpAddress()
{
set_specific();
return single_value->field_pdpAddress;
}

const PDPAddressTLV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::pdpAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field pdpAddress of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
return single_value->field_pdpAddress;
}

PacketFlowIDTLV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::packetFlowIdentifier()
{
set_specific();
return single_value->field_packetFlowIdentifier;
}

const PacketFlowIDTLV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::packetFlowIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field packetFlowIdentifier of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
return single_value->field_packetFlowIdentifier;
}

ProtocolConfigOptionsTLV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::protocolConfigOpts()
{
set_specific();
return single_value->field_protocolConfigOpts;
}

const ProtocolConfigOptionsTLV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::protocolConfigOpts() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field protocolConfigOpts of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
return single_value->field_protocolConfigOpts;
}

TrafficFlowTemplateTLV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::tFT()
{
set_specific();
return single_value->field_tFT;
}

const TrafficFlowTemplateTLV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::tFT() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tFT of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
return single_value->field_tFT;
}

WLANOffloadAcceptabilityTV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::wLANOffloadIndication()
{
set_specific();
return single_value->field_wLANOffloadIndication;
}

const WLANOffloadAcceptabilityTV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::wLANOffloadIndication() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field wLANOffloadIndication of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
return single_value->field_wLANOffloadIndication;
}

NBIFOM__ContainerTLV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::nBIFOM__Container()
{
set_specific();
return single_value->field_nBIFOM__Container;
}

const NBIFOM__ContainerTLV_template& PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::nBIFOM__Container() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nBIFOM_Container of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
return single_value->field_nBIFOM__Container;
}

int PDU__SM__ModifyPDPContextRequest__SGSN__MS_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
  {    int ret_val = 5;
      if (single_value->field_pdpAddress.is_present()) ret_val++;
      if (single_value->field_packetFlowIdentifier.is_present()) ret_val++;
      if (single_value->field_protocolConfigOpts.is_present()) ret_val++;
      if (single_value->field_tFT.is_present()) ret_val++;
      if (single_value->field_wLANOffloadIndication.is_present()) ret_val++;
      if (single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
  }
  return 0;
}

void PDU__SM__ModifyPDPContextRequest__SGSN__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(", radioPriority := ");
single_value->field_radioPriority.log();
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log();
TTCN_Logger::log_event_str(", requestedLLC_SAPI := ");
single_value->field_requestedLLC__SAPI.log();
TTCN_Logger::log_event_str(", newQoS := ");
single_value->field_newQoS.log();
TTCN_Logger::log_event_str(", pdpAddress := ");
single_value->field_pdpAddress.log();
TTCN_Logger::log_event_str(", packetFlowIdentifier := ");
single_value->field_packetFlowIdentifier.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", tFT := ");
single_value->field_tFT.log();
TTCN_Logger::log_event_str(", wLANOffloadIndication := ");
single_value->field_wLANOffloadIndication.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextRequest__SGSN__MS_template::log_match(const PDU__SM__ModifyPDPContextRequest__SGSN__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_radioPriority.match(match_value.radioPriority(), legacy)){
TTCN_Logger::log_logmatch_info(".radioPriority");
single_value->field_radioPriority.log_match(match_value.radioPriority(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_spare.match(match_value.spare(), legacy)){
TTCN_Logger::log_logmatch_info(".spare");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_requestedLLC__SAPI.match(match_value.requestedLLC__SAPI(), legacy)){
TTCN_Logger::log_logmatch_info(".requestedLLC_SAPI");
single_value->field_requestedLLC__SAPI.log_match(match_value.requestedLLC__SAPI(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_newQoS.match(match_value.newQoS(), legacy)){
TTCN_Logger::log_logmatch_info(".newQoS");
single_value->field_newQoS.log_match(match_value.newQoS(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.pdpAddress().ispresent()){
if(!single_value->field_pdpAddress.match(match_value.pdpAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".pdpAddress");
single_value->field_pdpAddress.log_match(match_value.pdpAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_pdpAddress.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".pdpAddress := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_pdpAddress.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.packetFlowIdentifier().ispresent()){
if(!single_value->field_packetFlowIdentifier.match(match_value.packetFlowIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".packetFlowIdentifier");
single_value->field_packetFlowIdentifier.log_match(match_value.packetFlowIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_packetFlowIdentifier.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".packetFlowIdentifier := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_packetFlowIdentifier.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.protocolConfigOpts().ispresent()){
if(!single_value->field_protocolConfigOpts.match(match_value.protocolConfigOpts(), legacy)){
TTCN_Logger::log_logmatch_info(".protocolConfigOpts");
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_protocolConfigOpts.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".protocolConfigOpts := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.tFT().ispresent()){
if(!single_value->field_tFT.match(match_value.tFT(), legacy)){
TTCN_Logger::log_logmatch_info(".tFT");
single_value->field_tFT.log_match(match_value.tFT(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_tFT.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".tFT := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_tFT.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.wLANOffloadIndication().ispresent()){
if(!single_value->field_wLANOffloadIndication.match(match_value.wLANOffloadIndication(), legacy)){
TTCN_Logger::log_logmatch_info(".wLANOffloadIndication");
single_value->field_wLANOffloadIndication.log_match(match_value.wLANOffloadIndication(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_wLANOffloadIndication.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".wLANOffloadIndication := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_wLANOffloadIndication.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nBIFOM__Container().ispresent()){
if(!single_value->field_nBIFOM__Container.match(match_value.nBIFOM__Container(), legacy)){
TTCN_Logger::log_logmatch_info(".nBIFOM_Container");
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nBIFOM__Container.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nBIFOM_Container := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nBIFOM__Container.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(", radioPriority := ");
single_value->field_radioPriority.log_match(match_value.radioPriority(), legacy);
TTCN_Logger::log_event_str(", spare := ");
single_value->field_spare.log_match(match_value.spare(), legacy);
TTCN_Logger::log_event_str(", requestedLLC_SAPI := ");
single_value->field_requestedLLC__SAPI.log_match(match_value.requestedLLC__SAPI(), legacy);
TTCN_Logger::log_event_str(", newQoS := ");
single_value->field_newQoS.log_match(match_value.newQoS(), legacy);
TTCN_Logger::log_event_str(", pdpAddress := ");
if (match_value.pdpAddress().ispresent()) {
single_value->field_pdpAddress.log_match(match_value.pdpAddress(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_pdpAddress.log();
if (single_value->field_pdpAddress.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", packetFlowIdentifier := ");
if (match_value.packetFlowIdentifier().ispresent()) {
single_value->field_packetFlowIdentifier.log_match(match_value.packetFlowIdentifier(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_packetFlowIdentifier.log();
if (single_value->field_packetFlowIdentifier.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
if (match_value.protocolConfigOpts().ispresent()) {
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_protocolConfigOpts.log();
if (single_value->field_protocolConfigOpts.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", tFT := ");
if (match_value.tFT().ispresent()) {
single_value->field_tFT.log_match(match_value.tFT(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_tFT.log();
if (single_value->field_tFT.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", wLANOffloadIndication := ");
if (match_value.wLANOffloadIndication().ispresent()) {
single_value->field_wLANOffloadIndication.log_match(match_value.wLANOffloadIndication(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_wLANOffloadIndication.log();
if (single_value->field_wLANOffloadIndication.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
if (match_value.nBIFOM__Container().ispresent()) {
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nBIFOM__Container.log();
if (single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextRequest__SGSN__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_radioPriority.encode_text(text_buf);
single_value->field_spare.encode_text(text_buf);
single_value->field_requestedLLC__SAPI.encode_text(text_buf);
single_value->field_newQoS.encode_text(text_buf);
single_value->field_pdpAddress.encode_text(text_buf);
single_value->field_packetFlowIdentifier.encode_text(text_buf);
single_value->field_protocolConfigOpts.encode_text(text_buf);
single_value->field_tFT.encode_text(text_buf);
single_value->field_wLANOffloadIndication.encode_text(text_buf);
single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
}
}

void PDU__SM__ModifyPDPContextRequest__SGSN__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_radioPriority.decode_text(text_buf);
single_value->field_spare.decode_text(text_buf);
single_value->field_requestedLLC__SAPI.decode_text(text_buf);
single_value->field_newQoS.decode_text(text_buf);
single_value->field_pdpAddress.decode_text(text_buf);
single_value->field_packetFlowIdentifier.decode_text(text_buf);
single_value->field_protocolConfigOpts.decode_text(text_buf);
single_value->field_tFT.decode_text(text_buf);
single_value->field_wLANOffloadIndication.decode_text(text_buf);
single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextRequest__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS.");
}
}

void PDU__SM__ModifyPDPContextRequest__SGSN__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__SM__ModifyPDPContextRequest__SGSN__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 (11<param.get_size()) {
      param.error("record template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS has 11 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) radioPriority().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) spare().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) requestedLLC__SAPI().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) newQoS().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) pdpAddress().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) packetFlowIdentifier().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(7));
    if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) tFT().set_param(*param.get_elem(8));
    if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) wLANOffloadIndication().set_param(*param.get_elem(9));
    if (param.get_size()>10 && param.get_elem(10)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().set_param(*param.get_elem(10));
    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(), "radioPriority")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          radioPriority().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "spare")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          spare().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "requestedLLC_SAPI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          requestedLLC__SAPI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "newQoS")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          newQoS().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "pdpAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          pdpAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "packetFlowIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          packetFlowIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tFT")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tFT().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "wLANOffloadIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          wLANOffloadIndication().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__ModifyPDPContextRequest__SGSN__MS_template* precondition = new PDU__SM__ModifyPDPContextRequest__SGSN__MS_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__ModifyPDPContextRequest__SGSN__MS_template* implied_template = new PDU__SM__ModifyPDPContextRequest__SGSN__MS_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__ModifyPDPContextRequest__SGSN__MS_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__ModifyPDPContextRequest__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS");
single_value->field_radioPriority.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS");
single_value->field_spare.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS");
single_value->field_requestedLLC__SAPI.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS");
single_value->field_newQoS.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS");
single_value->field_pdpAddress.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS");
single_value->field_packetFlowIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS");
single_value->field_protocolConfigOpts.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS");
single_value->field_tFT.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS");
single_value->field_wLANOffloadIndication.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS");
single_value->field_nBIFOM__Container.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS");
}

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

boolean PDU__SM__ModifyPDPContextRequest__SGSN__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__SM__ModifyPDPContextRequest__MS__SGSN::PDU__SM__ModifyPDPContextRequest__MS__SGSN()
{
}

PDU__SM__ModifyPDPContextRequest__MS__SGSN::PDU__SM__ModifyPDPContextRequest__MS__SGSN(const BITSTRING& par_messageType,
    const OPTIONAL< LLC__SAPITV >& par_requestedLLC__SAPI,
    const OPTIONAL< QoSTLV >& par_requestedNewQoS,
    const OPTIONAL< TrafficFlowTemplateTLV >& par_newTFT,
    const OPTIONAL< ProtocolConfigOptionsTLV >& par_protocolConfigOpts,
    const OPTIONAL< MobileL3__CommonIE__Types::DevicePropertiesTV >& par_deviceProperties,
    const OPTIONAL< NBIFOM__ContainerTLV >& par_nBIFOM__Container)
  :   field_messageType(par_messageType),
  field_requestedLLC__SAPI(par_requestedLLC__SAPI),
  field_requestedNewQoS(par_requestedNewQoS),
  field_newTFT(par_newTFT),
  field_protocolConfigOpts(par_protocolConfigOpts),
  field_deviceProperties(par_deviceProperties),
  field_nBIFOM__Container(par_nBIFOM__Container)
{
}

PDU__SM__ModifyPDPContextRequest__MS__SGSN::PDU__SM__ModifyPDPContextRequest__MS__SGSN(const PDU__SM__ModifyPDPContextRequest__MS__SGSN& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.requestedLLC__SAPI().is_bound()) field_requestedLLC__SAPI = other_value.requestedLLC__SAPI();
else field_requestedLLC__SAPI.clean_up();
if (other_value.requestedNewQoS().is_bound()) field_requestedNewQoS = other_value.requestedNewQoS();
else field_requestedNewQoS.clean_up();
if (other_value.newTFT().is_bound()) field_newTFT = other_value.newTFT();
else field_newTFT.clean_up();
if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
else field_protocolConfigOpts.clean_up();
if (other_value.deviceProperties().is_bound()) field_deviceProperties = other_value.deviceProperties();
else field_deviceProperties.clean_up();
if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
else field_nBIFOM__Container.clean_up();
}

void PDU__SM__ModifyPDPContextRequest__MS__SGSN::clean_up()
{
field_messageType.clean_up();
field_requestedLLC__SAPI.clean_up();
field_requestedNewQoS.clean_up();
field_newTFT.clean_up();
field_protocolConfigOpts.clean_up();
field_deviceProperties.clean_up();
field_nBIFOM__Container.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__ModifyPDPContextRequest__MS__SGSN::get_descriptor() const { return &PDU__SM__ModifyPDPContextRequest__MS__SGSN_descr_; }
PDU__SM__ModifyPDPContextRequest__MS__SGSN& PDU__SM__ModifyPDPContextRequest__MS__SGSN::operator=(const PDU__SM__ModifyPDPContextRequest__MS__SGSN& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.requestedLLC__SAPI().is_bound()) field_requestedLLC__SAPI = other_value.requestedLLC__SAPI();
  else field_requestedLLC__SAPI.clean_up();
  if (other_value.requestedNewQoS().is_bound()) field_requestedNewQoS = other_value.requestedNewQoS();
  else field_requestedNewQoS.clean_up();
  if (other_value.newTFT().is_bound()) field_newTFT = other_value.newTFT();
  else field_newTFT.clean_up();
  if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
  else field_protocolConfigOpts.clean_up();
  if (other_value.deviceProperties().is_bound()) field_deviceProperties = other_value.deviceProperties();
  else field_deviceProperties.clean_up();
  if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
  else field_nBIFOM__Container.clean_up();
}
return *this;
}

boolean PDU__SM__ModifyPDPContextRequest__MS__SGSN::operator==(const PDU__SM__ModifyPDPContextRequest__MS__SGSN& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_requestedLLC__SAPI==other_value.field_requestedLLC__SAPI
  && field_requestedNewQoS==other_value.field_requestedNewQoS
  && field_newTFT==other_value.field_newTFT
  && field_protocolConfigOpts==other_value.field_protocolConfigOpts
  && field_deviceProperties==other_value.field_deviceProperties
  && field_nBIFOM__Container==other_value.field_nBIFOM__Container;
}

boolean PDU__SM__ModifyPDPContextRequest__MS__SGSN::is_bound() const
{
return (field_messageType.is_bound())
  || (OPTIONAL_OMIT == field_requestedLLC__SAPI.get_selection() || field_requestedLLC__SAPI.is_bound())
  || (OPTIONAL_OMIT == field_requestedNewQoS.get_selection() || field_requestedNewQoS.is_bound())
  || (OPTIONAL_OMIT == field_newTFT.get_selection() || field_newTFT.is_bound())
  || (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_bound())
  || (OPTIONAL_OMIT == field_deviceProperties.get_selection() || field_deviceProperties.is_bound())
  || (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_bound());
}
boolean PDU__SM__ModifyPDPContextRequest__MS__SGSN::is_value() const
{
return field_messageType.is_value()
  && (OPTIONAL_OMIT == field_requestedLLC__SAPI.get_selection() || field_requestedLLC__SAPI.is_value())
  && (OPTIONAL_OMIT == field_requestedNewQoS.get_selection() || field_requestedNewQoS.is_value())
  && (OPTIONAL_OMIT == field_newTFT.get_selection() || field_newTFT.is_value())
  && (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_value())
  && (OPTIONAL_OMIT == field_deviceProperties.get_selection() || field_deviceProperties.is_value())
  && (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_value());
}
int PDU__SM__ModifyPDPContextRequest__MS__SGSN::size_of() const
{
  int ret_val = 1;
  if (field_requestedLLC__SAPI.ispresent()) ret_val++;
  if (field_requestedNewQoS.ispresent()) ret_val++;
  if (field_newTFT.ispresent()) ret_val++;
  if (field_protocolConfigOpts.ispresent()) ret_val++;
  if (field_deviceProperties.ispresent()) ret_val++;
  if (field_nBIFOM__Container.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__ModifyPDPContextRequest__MS__SGSN::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(", requestedLLC_SAPI := ");
field_requestedLLC__SAPI.log();
TTCN_Logger::log_event_str(", requestedNewQoS := ");
field_requestedNewQoS.log();
TTCN_Logger::log_event_str(", newTFT := ");
field_newTFT.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", deviceProperties := ");
field_deviceProperties.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
field_nBIFOM__Container.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__ModifyPDPContextRequest__MS__SGSN::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (!requestedLLC__SAPI().is_bound()) requestedLLC__SAPI() = OMIT_VALUE;
else requestedLLC__SAPI().set_implicit_omit();
if (!requestedNewQoS().is_bound()) requestedNewQoS() = OMIT_VALUE;
else requestedNewQoS().set_implicit_omit();
if (!newTFT().is_bound()) newTFT() = OMIT_VALUE;
else newTFT().set_implicit_omit();
if (!protocolConfigOpts().is_bound()) protocolConfigOpts() = OMIT_VALUE;
else protocolConfigOpts().set_implicit_omit();
if (!deviceProperties().is_bound()) deviceProperties() = OMIT_VALUE;
else deviceProperties().set_implicit_omit();
if (!nBIFOM__Container().is_bound()) nBIFOM__Container() = OMIT_VALUE;
else nBIFOM__Container().set_implicit_omit();
}

void PDU__SM__ModifyPDPContextRequest__MS__SGSN::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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN 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) requestedLLC__SAPI().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) requestedNewQoS().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) newTFT().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) deviceProperties().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "requestedLLC_SAPI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          requestedLLC__SAPI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "requestedNewQoS")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          requestedNewQoS().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "newTFT")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          newTFT().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "deviceProperties")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          deviceProperties().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN");
  }
}

void PDU__SM__ModifyPDPContextRequest__MS__SGSN::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_requestedLLC__SAPI.encode_text(text_buf);
field_requestedNewQoS.encode_text(text_buf);
field_newTFT.encode_text(text_buf);
field_protocolConfigOpts.encode_text(text_buf);
field_deviceProperties.encode_text(text_buf);
field_nBIFOM__Container.encode_text(text_buf);
}

void PDU__SM__ModifyPDPContextRequest__MS__SGSN::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_requestedLLC__SAPI.decode_text(text_buf);
field_requestedNewQoS.decode_text(text_buf);
field_newTFT.decode_text(text_buf);
field_protocolConfigOpts.decode_text(text_buf);
field_deviceProperties.decode_text(text_buf);
field_nBIFOM__Container.decode_text(text_buf);
}

void PDU__SM__ModifyPDPContextRequest__MS__SGSN::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__ModifyPDPContextRequest__MS__SGSN::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__ModifyPDPContextRequest__MS__SGSN::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_requestedLLC__SAPI = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_1_force_omit(1, force_omit, LLC__SAPITV_descr_.raw->forceomit);
  decoded_field_length = field_requestedLLC__SAPI().RAW_decode(LLC__SAPITV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 1) {
  field_requestedLLC__SAPI = 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_requestedLLC__SAPI=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_requestedNewQoS = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, QoSTLV_descr_.raw->forceomit);
  decoded_field_length = field_requestedNewQoS().RAW_decode(QoSTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_requestedNewQoS = 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_requestedNewQoS=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_newTFT = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, TrafficFlowTemplateTLV_descr_.raw->forceomit);
  decoded_field_length = field_newTFT().RAW_decode(TrafficFlowTemplateTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_newTFT = 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_newTFT=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_protocolConfigOpts = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, ProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_protocolConfigOpts().RAW_decode(ProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_protocolConfigOpts = 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_protocolConfigOpts=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_deviceProperties = 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::DevicePropertiesTV_descr_.raw->forceomit);
  decoded_field_length = field_deviceProperties().RAW_decode(MobileL3__CommonIE__Types::DevicePropertiesTV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_deviceProperties = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_deviceProperties.ispresent() || field_deviceProperties().elementIdentifier() !=  bs_21){
  field_deviceProperties=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_deviceProperties=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_nBIFOM__Container = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, NBIFOM__ContainerTLV_descr_.raw->forceomit);
  decoded_field_length = field_nBIFOM__Container().RAW_decode(NBIFOM__ContainerTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_nBIFOM__Container = 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_nBIFOM__Container=OMIT_VALUE;
  if (field_messageType !=  bs_60) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__ModifyPDPContextRequest__MS__SGSN::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);
  if (field_requestedLLC__SAPI.ispresent()) {
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, LLC__SAPITV_descr_.raw);
  }
  else myleaf.body.node.nodes[1] = NULL;
  if (field_requestedNewQoS.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, QoSTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_newTFT.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, TrafficFlowTemplateTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_protocolConfigOpts.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, ProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_deviceProperties.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, MobileL3__CommonIE__Types::DevicePropertiesTV_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_nBIFOM__Container.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, NBIFOM__ContainerTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  if (field_requestedLLC__SAPI.ispresent()) {
  encoded_length += field_requestedLLC__SAPI().RAW_encode(LLC__SAPITV_descr_, *myleaf.body.node.nodes[1]);
  }
  if (field_requestedNewQoS.ispresent()) {
  encoded_length += field_requestedNewQoS().RAW_encode(QoSTLV_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_newTFT.ispresent()) {
  encoded_length += field_newTFT().RAW_encode(TrafficFlowTemplateTLV_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_protocolConfigOpts.ispresent()) {
  encoded_length += field_protocolConfigOpts().RAW_encode(ProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_deviceProperties.ispresent()) {
  encoded_length += field_deviceProperties().RAW_encode(MobileL3__CommonIE__Types::DevicePropertiesTV_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_nBIFOM__Container.ispresent()) {
  encoded_length += field_nBIFOM__Container().RAW_encode(NBIFOM__ContainerTLV_descr_, *myleaf.body.node.nodes[6]);
  }
  if (field_deviceProperties.ispresent() && (!field_deviceProperties.ispresent() || field_deviceProperties().elementIdentifier() !=  bs_21)) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+2;
  int new_pos0[]={5,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_21.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);
  }
  }
  if (field_messageType !=  bs_60) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::single_value_struct {
BITSTRING_template field_messageType;
LLC__SAPITV_template field_requestedLLC__SAPI;
QoSTLV_template field_requestedNewQoS;
TrafficFlowTemplateTLV_template field_newTFT;
ProtocolConfigOptionsTLV_template field_protocolConfigOpts;
MobileL3__CommonIE__Types::DevicePropertiesTV_template field_deviceProperties;
NBIFOM__ContainerTLV_template field_nBIFOM__Container;
};

void PDU__SM__ModifyPDPContextRequest__MS__SGSN_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_requestedLLC__SAPI = ANY_OR_OMIT;
single_value->field_requestedNewQoS = ANY_OR_OMIT;
single_value->field_newTFT = ANY_OR_OMIT;
single_value->field_protocolConfigOpts = ANY_OR_OMIT;
single_value->field_deviceProperties = ANY_OR_OMIT;
single_value->field_nBIFOM__Container = ANY_OR_OMIT;
}
}
}

void PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::copy_value(const PDU__SM__ModifyPDPContextRequest__MS__SGSN& 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.requestedLLC__SAPI().is_bound()) {
  if (other_value.requestedLLC__SAPI().ispresent()) single_value->field_requestedLLC__SAPI = other_value.requestedLLC__SAPI()();
  else single_value->field_requestedLLC__SAPI = OMIT_VALUE;
} else {
  single_value->field_requestedLLC__SAPI.clean_up();
}
if (other_value.requestedNewQoS().is_bound()) {
  if (other_value.requestedNewQoS().ispresent()) single_value->field_requestedNewQoS = other_value.requestedNewQoS()();
  else single_value->field_requestedNewQoS = OMIT_VALUE;
} else {
  single_value->field_requestedNewQoS.clean_up();
}
if (other_value.newTFT().is_bound()) {
  if (other_value.newTFT().ispresent()) single_value->field_newTFT = other_value.newTFT()();
  else single_value->field_newTFT = OMIT_VALUE;
} else {
  single_value->field_newTFT.clean_up();
}
if (other_value.protocolConfigOpts().is_bound()) {
  if (other_value.protocolConfigOpts().ispresent()) single_value->field_protocolConfigOpts = other_value.protocolConfigOpts()();
  else single_value->field_protocolConfigOpts = OMIT_VALUE;
} else {
  single_value->field_protocolConfigOpts.clean_up();
}
if (other_value.deviceProperties().is_bound()) {
  if (other_value.deviceProperties().ispresent()) single_value->field_deviceProperties = other_value.deviceProperties()();
  else single_value->field_deviceProperties = OMIT_VALUE;
} else {
  single_value->field_deviceProperties.clean_up();
}
if (other_value.nBIFOM__Container().is_bound()) {
  if (other_value.nBIFOM__Container().ispresent()) single_value->field_nBIFOM__Container = other_value.nBIFOM__Container()();
  else single_value->field_nBIFOM__Container = OMIT_VALUE;
} else {
  single_value->field_nBIFOM__Container.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::copy_template(const PDU__SM__ModifyPDPContextRequest__MS__SGSN_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.requestedLLC__SAPI().get_selection()) {
single_value->field_requestedLLC__SAPI = other_value.requestedLLC__SAPI();
} else {
single_value->field_requestedLLC__SAPI.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.requestedNewQoS().get_selection()) {
single_value->field_requestedNewQoS = other_value.requestedNewQoS();
} else {
single_value->field_requestedNewQoS.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.newTFT().get_selection()) {
single_value->field_newTFT = other_value.newTFT();
} else {
single_value->field_newTFT.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.protocolConfigOpts().get_selection()) {
single_value->field_protocolConfigOpts = other_value.protocolConfigOpts();
} else {
single_value->field_protocolConfigOpts.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.deviceProperties().get_selection()) {
single_value->field_deviceProperties = other_value.deviceProperties();
} else {
single_value->field_deviceProperties.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nBIFOM__Container().get_selection()) {
single_value->field_nBIFOM__Container = other_value.nBIFOM__Container();
} else {
single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextRequest__MS__SGSN_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__SM__ModifyPDPContextRequest__MS__SGSN_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__ModifyPDPContextRequest__MS__SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
break;
}
set_selection(other_value);
}

PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::PDU__SM__ModifyPDPContextRequest__MS__SGSN_template()
{
}

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

PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::PDU__SM__ModifyPDPContextRequest__MS__SGSN_template(const PDU__SM__ModifyPDPContextRequest__MS__SGSN& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__ModifyPDPContextRequest__MS__SGSN_template& PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::operator=(const OPTIONAL<PDU__SM__ModifyPDPContextRequest__MS__SGSN>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__ModifyPDPContextRequest__MS__SGSN&)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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
}
return *this;
}

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

boolean PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::match(const PDU__SM__ModifyPDPContextRequest__MS__SGSN& 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.requestedLLC__SAPI().is_bound()) return FALSE;
if((other_value.requestedLLC__SAPI().ispresent() ? !single_value->field_requestedLLC__SAPI.match((const LLC__SAPITV&)other_value.requestedLLC__SAPI(), legacy) : !single_value->field_requestedLLC__SAPI.match_omit(legacy)))return FALSE;
if(!other_value.requestedNewQoS().is_bound()) return FALSE;
if((other_value.requestedNewQoS().ispresent() ? !single_value->field_requestedNewQoS.match((const QoSTLV&)other_value.requestedNewQoS(), legacy) : !single_value->field_requestedNewQoS.match_omit(legacy)))return FALSE;
if(!other_value.newTFT().is_bound()) return FALSE;
if((other_value.newTFT().ispresent() ? !single_value->field_newTFT.match((const TrafficFlowTemplateTLV&)other_value.newTFT(), legacy) : !single_value->field_newTFT.match_omit(legacy)))return FALSE;
if(!other_value.protocolConfigOpts().is_bound()) return FALSE;
if((other_value.protocolConfigOpts().ispresent() ? !single_value->field_protocolConfigOpts.match((const ProtocolConfigOptionsTLV&)other_value.protocolConfigOpts(), legacy) : !single_value->field_protocolConfigOpts.match_omit(legacy)))return FALSE;
if(!other_value.deviceProperties().is_bound()) return FALSE;
if((other_value.deviceProperties().ispresent() ? !single_value->field_deviceProperties.match((const MobileL3__CommonIE__Types::DevicePropertiesTV&)other_value.deviceProperties(), legacy) : !single_value->field_deviceProperties.match_omit(legacy)))return FALSE;
if(!other_value.nBIFOM__Container().is_bound()) return FALSE;
if((other_value.nBIFOM__Container().ispresent() ? !single_value->field_nBIFOM__Container.match((const NBIFOM__ContainerTLV&)other_value.nBIFOM__Container(), legacy) : !single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
}
return FALSE;
}

boolean PDU__SM__ModifyPDPContextRequest__MS__SGSN_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_requestedLLC__SAPI.is_omit() || single_value->field_requestedLLC__SAPI.is_bound())
 || (single_value->field_requestedNewQoS.is_omit() || single_value->field_requestedNewQoS.is_bound())
 || (single_value->field_newTFT.is_omit() || single_value->field_newTFT.is_bound())
 || (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_bound())
 || (single_value->field_deviceProperties.is_omit() || single_value->field_deviceProperties.is_bound())
 || (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_bound());
}

boolean PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && (single_value->field_requestedLLC__SAPI.is_omit() || single_value->field_requestedLLC__SAPI.is_value())
 && (single_value->field_requestedNewQoS.is_omit() || single_value->field_requestedNewQoS.is_value())
 && (single_value->field_newTFT.is_omit() || single_value->field_newTFT.is_value())
 && (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_value())
 && (single_value->field_deviceProperties.is_omit() || single_value->field_deviceProperties.is_value())
 && (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_value());
}

void PDU__SM__ModifyPDPContextRequest__MS__SGSN_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__SM__ModifyPDPContextRequest__MS__SGSN PDU__SM__ModifyPDPContextRequest__MS__SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
PDU__SM__ModifyPDPContextRequest__MS__SGSN ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_requestedLLC__SAPI.is_omit()) ret_val.requestedLLC__SAPI() = OMIT_VALUE;
else if (single_value->field_requestedLLC__SAPI.is_bound()) {
ret_val.requestedLLC__SAPI() = single_value->field_requestedLLC__SAPI.valueof();
}
if (single_value->field_requestedNewQoS.is_omit()) ret_val.requestedNewQoS() = OMIT_VALUE;
else if (single_value->field_requestedNewQoS.is_bound()) {
ret_val.requestedNewQoS() = single_value->field_requestedNewQoS.valueof();
}
if (single_value->field_newTFT.is_omit()) ret_val.newTFT() = OMIT_VALUE;
else if (single_value->field_newTFT.is_bound()) {
ret_val.newTFT() = single_value->field_newTFT.valueof();
}
if (single_value->field_protocolConfigOpts.is_omit()) ret_val.protocolConfigOpts() = OMIT_VALUE;
else if (single_value->field_protocolConfigOpts.is_bound()) {
ret_val.protocolConfigOpts() = single_value->field_protocolConfigOpts.valueof();
}
if (single_value->field_deviceProperties.is_omit()) ret_val.deviceProperties() = OMIT_VALUE;
else if (single_value->field_deviceProperties.is_bound()) {
ret_val.deviceProperties() = single_value->field_deviceProperties.valueof();
}
if (single_value->field_nBIFOM__Container.is_omit()) ret_val.nBIFOM__Container() = OMIT_VALUE;
else if (single_value->field_nBIFOM__Container.is_bound()) {
ret_val.nBIFOM__Container() = single_value->field_nBIFOM__Container.valueof();
}
return ret_val;
}

void PDU__SM__ModifyPDPContextRequest__MS__SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__ModifyPDPContextRequest__MS__SGSN_template[list_length];
}

PDU__SM__ModifyPDPContextRequest__MS__SGSN_template& PDU__SM__ModifyPDPContextRequest__MS__SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
return value_list.list_value[list_index];
}

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

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

LLC__SAPITV_template& PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::requestedLLC__SAPI()
{
set_specific();
return single_value->field_requestedLLC__SAPI;
}

const LLC__SAPITV_template& PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::requestedLLC__SAPI() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field requestedLLC_SAPI of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
return single_value->field_requestedLLC__SAPI;
}

QoSTLV_template& PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::requestedNewQoS()
{
set_specific();
return single_value->field_requestedNewQoS;
}

const QoSTLV_template& PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::requestedNewQoS() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field requestedNewQoS of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
return single_value->field_requestedNewQoS;
}

TrafficFlowTemplateTLV_template& PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::newTFT()
{
set_specific();
return single_value->field_newTFT;
}

const TrafficFlowTemplateTLV_template& PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::newTFT() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field newTFT of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
return single_value->field_newTFT;
}

ProtocolConfigOptionsTLV_template& PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::protocolConfigOpts()
{
set_specific();
return single_value->field_protocolConfigOpts;
}

const ProtocolConfigOptionsTLV_template& PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::protocolConfigOpts() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field protocolConfigOpts of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
return single_value->field_protocolConfigOpts;
}

MobileL3__CommonIE__Types::DevicePropertiesTV_template& PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::deviceProperties()
{
set_specific();
return single_value->field_deviceProperties;
}

const MobileL3__CommonIE__Types::DevicePropertiesTV_template& PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::deviceProperties() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field deviceProperties of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
return single_value->field_deviceProperties;
}

NBIFOM__ContainerTLV_template& PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::nBIFOM__Container()
{
set_specific();
return single_value->field_nBIFOM__Container;
}

const NBIFOM__ContainerTLV_template& PDU__SM__ModifyPDPContextRequest__MS__SGSN_template::nBIFOM__Container() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nBIFOM_Container of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
return single_value->field_nBIFOM__Container;
}

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

void PDU__SM__ModifyPDPContextRequest__MS__SGSN_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(", requestedLLC_SAPI := ");
single_value->field_requestedLLC__SAPI.log();
TTCN_Logger::log_event_str(", requestedNewQoS := ");
single_value->field_requestedNewQoS.log();
TTCN_Logger::log_event_str(", newTFT := ");
single_value->field_newTFT.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", deviceProperties := ");
single_value->field_deviceProperties.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextRequest__MS__SGSN_template::log_match(const PDU__SM__ModifyPDPContextRequest__MS__SGSN& 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.requestedLLC__SAPI().ispresent()){
if(!single_value->field_requestedLLC__SAPI.match(match_value.requestedLLC__SAPI(), legacy)){
TTCN_Logger::log_logmatch_info(".requestedLLC_SAPI");
single_value->field_requestedLLC__SAPI.log_match(match_value.requestedLLC__SAPI(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_requestedLLC__SAPI.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".requestedLLC_SAPI := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_requestedLLC__SAPI.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.requestedNewQoS().ispresent()){
if(!single_value->field_requestedNewQoS.match(match_value.requestedNewQoS(), legacy)){
TTCN_Logger::log_logmatch_info(".requestedNewQoS");
single_value->field_requestedNewQoS.log_match(match_value.requestedNewQoS(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_requestedNewQoS.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".requestedNewQoS := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_requestedNewQoS.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.newTFT().ispresent()){
if(!single_value->field_newTFT.match(match_value.newTFT(), legacy)){
TTCN_Logger::log_logmatch_info(".newTFT");
single_value->field_newTFT.log_match(match_value.newTFT(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_newTFT.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".newTFT := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_newTFT.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.protocolConfigOpts().ispresent()){
if(!single_value->field_protocolConfigOpts.match(match_value.protocolConfigOpts(), legacy)){
TTCN_Logger::log_logmatch_info(".protocolConfigOpts");
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_protocolConfigOpts.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".protocolConfigOpts := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.deviceProperties().ispresent()){
if(!single_value->field_deviceProperties.match(match_value.deviceProperties(), legacy)){
TTCN_Logger::log_logmatch_info(".deviceProperties");
single_value->field_deviceProperties.log_match(match_value.deviceProperties(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_deviceProperties.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".deviceProperties := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_deviceProperties.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nBIFOM__Container().ispresent()){
if(!single_value->field_nBIFOM__Container.match(match_value.nBIFOM__Container(), legacy)){
TTCN_Logger::log_logmatch_info(".nBIFOM_Container");
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nBIFOM__Container.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nBIFOM_Container := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nBIFOM__Container.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(", requestedLLC_SAPI := ");
if (match_value.requestedLLC__SAPI().ispresent()) {
single_value->field_requestedLLC__SAPI.log_match(match_value.requestedLLC__SAPI(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_requestedLLC__SAPI.log();
if (single_value->field_requestedLLC__SAPI.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", requestedNewQoS := ");
if (match_value.requestedNewQoS().ispresent()) {
single_value->field_requestedNewQoS.log_match(match_value.requestedNewQoS(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_requestedNewQoS.log();
if (single_value->field_requestedNewQoS.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", newTFT := ");
if (match_value.newTFT().ispresent()) {
single_value->field_newTFT.log_match(match_value.newTFT(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_newTFT.log();
if (single_value->field_newTFT.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
if (match_value.protocolConfigOpts().ispresent()) {
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_protocolConfigOpts.log();
if (single_value->field_protocolConfigOpts.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", deviceProperties := ");
if (match_value.deviceProperties().ispresent()) {
single_value->field_deviceProperties.log_match(match_value.deviceProperties(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_deviceProperties.log();
if (single_value->field_deviceProperties.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
if (match_value.nBIFOM__Container().ispresent()) {
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nBIFOM__Container.log();
if (single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextRequest__MS__SGSN_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_requestedLLC__SAPI.encode_text(text_buf);
single_value->field_requestedNewQoS.encode_text(text_buf);
single_value->field_newTFT.encode_text(text_buf);
single_value->field_protocolConfigOpts.encode_text(text_buf);
single_value->field_deviceProperties.encode_text(text_buf);
single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
}
}

void PDU__SM__ModifyPDPContextRequest__MS__SGSN_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_requestedLLC__SAPI.decode_text(text_buf);
single_value->field_requestedNewQoS.decode_text(text_buf);
single_value->field_newTFT.decode_text(text_buf);
single_value->field_protocolConfigOpts.decode_text(text_buf);
single_value->field_deviceProperties.decode_text(text_buf);
single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextRequest__MS__SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN.");
}
}

void PDU__SM__ModifyPDPContextRequest__MS__SGSN_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__SM__ModifyPDPContextRequest__MS__SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN 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) requestedLLC__SAPI().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) requestedNewQoS().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) newTFT().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) deviceProperties().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "requestedLLC_SAPI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          requestedLLC__SAPI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "requestedNewQoS")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          requestedNewQoS().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "newTFT")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          newTFT().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "deviceProperties")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          deviceProperties().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__ModifyPDPContextRequest__MS__SGSN_template* precondition = new PDU__SM__ModifyPDPContextRequest__MS__SGSN_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__ModifyPDPContextRequest__MS__SGSN_template* implied_template = new PDU__SM__ModifyPDPContextRequest__MS__SGSN_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__ModifyPDPContextRequest__MS__SGSN_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__ModifyPDPContextRequest__MS__SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN");
single_value->field_requestedLLC__SAPI.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN");
single_value->field_requestedNewQoS.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN");
single_value->field_newTFT.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN");
single_value->field_protocolConfigOpts.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN");
single_value->field_deviceProperties.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN");
single_value->field_nBIFOM__Container.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN");
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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN");
}

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

boolean PDU__SM__ModifyPDPContextRequest__MS__SGSN_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__SM__ModifyPDPContextAccept__MS__SGSN::PDU__SM__ModifyPDPContextAccept__MS__SGSN()
{
}

PDU__SM__ModifyPDPContextAccept__MS__SGSN::PDU__SM__ModifyPDPContextAccept__MS__SGSN(const BITSTRING& par_messageType,
    const OPTIONAL< ProtocolConfigOptionsTLV >& par_protocolConfigOpts,
    const OPTIONAL< NBIFOM__ContainerTLV >& par_nBIFOM__Container)
  :   field_messageType(par_messageType),
  field_protocolConfigOpts(par_protocolConfigOpts),
  field_nBIFOM__Container(par_nBIFOM__Container)
{
}

PDU__SM__ModifyPDPContextAccept__MS__SGSN::PDU__SM__ModifyPDPContextAccept__MS__SGSN(const PDU__SM__ModifyPDPContextAccept__MS__SGSN& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
else field_protocolConfigOpts.clean_up();
if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
else field_nBIFOM__Container.clean_up();
}

void PDU__SM__ModifyPDPContextAccept__MS__SGSN::clean_up()
{
field_messageType.clean_up();
field_protocolConfigOpts.clean_up();
field_nBIFOM__Container.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__ModifyPDPContextAccept__MS__SGSN::get_descriptor() const { return &PDU__SM__ModifyPDPContextAccept__MS__SGSN_descr_; }
PDU__SM__ModifyPDPContextAccept__MS__SGSN& PDU__SM__ModifyPDPContextAccept__MS__SGSN::operator=(const PDU__SM__ModifyPDPContextAccept__MS__SGSN& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
  else field_protocolConfigOpts.clean_up();
  if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
  else field_nBIFOM__Container.clean_up();
}
return *this;
}

boolean PDU__SM__ModifyPDPContextAccept__MS__SGSN::operator==(const PDU__SM__ModifyPDPContextAccept__MS__SGSN& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_protocolConfigOpts==other_value.field_protocolConfigOpts
  && field_nBIFOM__Container==other_value.field_nBIFOM__Container;
}

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

void PDU__SM__ModifyPDPContextAccept__MS__SGSN::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(", protocolConfigOpts := ");
field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
field_nBIFOM__Container.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__ModifyPDPContextAccept__MS__SGSN::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (!protocolConfigOpts().is_bound()) protocolConfigOpts() = OMIT_VALUE;
else protocolConfigOpts().set_implicit_omit();
if (!nBIFOM__Container().is_bound()) nBIFOM__Container() = OMIT_VALUE;
else nBIFOM__Container().set_implicit_omit();
}

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

void PDU__SM__ModifyPDPContextAccept__MS__SGSN::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_protocolConfigOpts.encode_text(text_buf);
field_nBIFOM__Container.encode_text(text_buf);
}

void PDU__SM__ModifyPDPContextAccept__MS__SGSN::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_protocolConfigOpts.decode_text(text_buf);
field_nBIFOM__Container.decode_text(text_buf);
}

void PDU__SM__ModifyPDPContextAccept__MS__SGSN::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__ModifyPDPContextAccept__MS__SGSN::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__ModifyPDPContextAccept__MS__SGSN::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_protocolConfigOpts = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_1_force_omit(1, force_omit, ProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_protocolConfigOpts().RAW_decode(ProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 1) {
  field_protocolConfigOpts = 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_protocolConfigOpts=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_nBIFOM__Container = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, NBIFOM__ContainerTLV_descr_.raw->forceomit);
  decoded_field_length = field_nBIFOM__Container().RAW_decode(NBIFOM__ContainerTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_nBIFOM__Container = 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_nBIFOM__Container=OMIT_VALUE;
  if (field_messageType !=  bs_61) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__ModifyPDPContextAccept__MS__SGSN::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_protocolConfigOpts.ispresent()) {
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, ProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[1] = NULL;
  if (field_nBIFOM__Container.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, NBIFOM__ContainerTLV_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_protocolConfigOpts.ispresent()) {
  encoded_length += field_protocolConfigOpts().RAW_encode(ProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[1]);
  }
  if (field_nBIFOM__Container.ispresent()) {
  encoded_length += field_nBIFOM__Container().RAW_encode(NBIFOM__ContainerTLV_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_messageType !=  bs_61) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_61.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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__ModifyPDPContextAccept__MS__SGSN_template::single_value_struct {
BITSTRING_template field_messageType;
ProtocolConfigOptionsTLV_template field_protocolConfigOpts;
NBIFOM__ContainerTLV_template field_nBIFOM__Container;
};

void PDU__SM__ModifyPDPContextAccept__MS__SGSN_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_protocolConfigOpts = ANY_OR_OMIT;
single_value->field_nBIFOM__Container = ANY_OR_OMIT;
}
}
}

void PDU__SM__ModifyPDPContextAccept__MS__SGSN_template::copy_value(const PDU__SM__ModifyPDPContextAccept__MS__SGSN& 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.protocolConfigOpts().is_bound()) {
  if (other_value.protocolConfigOpts().ispresent()) single_value->field_protocolConfigOpts = other_value.protocolConfigOpts()();
  else single_value->field_protocolConfigOpts = OMIT_VALUE;
} else {
  single_value->field_protocolConfigOpts.clean_up();
}
if (other_value.nBIFOM__Container().is_bound()) {
  if (other_value.nBIFOM__Container().ispresent()) single_value->field_nBIFOM__Container = other_value.nBIFOM__Container()();
  else single_value->field_nBIFOM__Container = OMIT_VALUE;
} else {
  single_value->field_nBIFOM__Container.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__ModifyPDPContextAccept__MS__SGSN_template::copy_template(const PDU__SM__ModifyPDPContextAccept__MS__SGSN_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.protocolConfigOpts().get_selection()) {
single_value->field_protocolConfigOpts = other_value.protocolConfigOpts();
} else {
single_value->field_protocolConfigOpts.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nBIFOM__Container().get_selection()) {
single_value->field_nBIFOM__Container = other_value.nBIFOM__Container();
} else {
single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextAccept__MS__SGSN_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__SM__ModifyPDPContextAccept__MS__SGSN_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__ModifyPDPContextAccept__MS__SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN.");
break;
}
set_selection(other_value);
}

PDU__SM__ModifyPDPContextAccept__MS__SGSN_template::PDU__SM__ModifyPDPContextAccept__MS__SGSN_template()
{
}

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

PDU__SM__ModifyPDPContextAccept__MS__SGSN_template::PDU__SM__ModifyPDPContextAccept__MS__SGSN_template(const PDU__SM__ModifyPDPContextAccept__MS__SGSN& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__ModifyPDPContextAccept__MS__SGSN_template& PDU__SM__ModifyPDPContextAccept__MS__SGSN_template::operator=(const OPTIONAL<PDU__SM__ModifyPDPContextAccept__MS__SGSN>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__ModifyPDPContextAccept__MS__SGSN&)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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN.");
}
return *this;
}

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

boolean PDU__SM__ModifyPDPContextAccept__MS__SGSN_template::match(const PDU__SM__ModifyPDPContextAccept__MS__SGSN& 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.protocolConfigOpts().is_bound()) return FALSE;
if((other_value.protocolConfigOpts().ispresent() ? !single_value->field_protocolConfigOpts.match((const ProtocolConfigOptionsTLV&)other_value.protocolConfigOpts(), legacy) : !single_value->field_protocolConfigOpts.match_omit(legacy)))return FALSE;
if(!other_value.nBIFOM__Container().is_bound()) return FALSE;
if((other_value.nBIFOM__Container().ispresent() ? !single_value->field_nBIFOM__Container.match((const NBIFOM__ContainerTLV&)other_value.nBIFOM__Container(), legacy) : !single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN.");
}
return FALSE;
}

boolean PDU__SM__ModifyPDPContextAccept__MS__SGSN_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_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_bound())
 || (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_bound());
}

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

void PDU__SM__ModifyPDPContextAccept__MS__SGSN_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__SM__ModifyPDPContextAccept__MS__SGSN PDU__SM__ModifyPDPContextAccept__MS__SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN.");
PDU__SM__ModifyPDPContextAccept__MS__SGSN ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_protocolConfigOpts.is_omit()) ret_val.protocolConfigOpts() = OMIT_VALUE;
else if (single_value->field_protocolConfigOpts.is_bound()) {
ret_val.protocolConfigOpts() = single_value->field_protocolConfigOpts.valueof();
}
if (single_value->field_nBIFOM__Container.is_omit()) ret_val.nBIFOM__Container() = OMIT_VALUE;
else if (single_value->field_nBIFOM__Container.is_bound()) {
ret_val.nBIFOM__Container() = single_value->field_nBIFOM__Container.valueof();
}
return ret_val;
}

void PDU__SM__ModifyPDPContextAccept__MS__SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__ModifyPDPContextAccept__MS__SGSN_template[list_length];
}

PDU__SM__ModifyPDPContextAccept__MS__SGSN_template& PDU__SM__ModifyPDPContextAccept__MS__SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN.");
return value_list.list_value[list_index];
}

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

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

ProtocolConfigOptionsTLV_template& PDU__SM__ModifyPDPContextAccept__MS__SGSN_template::protocolConfigOpts()
{
set_specific();
return single_value->field_protocolConfigOpts;
}

const ProtocolConfigOptionsTLV_template& PDU__SM__ModifyPDPContextAccept__MS__SGSN_template::protocolConfigOpts() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field protocolConfigOpts of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN.");
return single_value->field_protocolConfigOpts;
}

NBIFOM__ContainerTLV_template& PDU__SM__ModifyPDPContextAccept__MS__SGSN_template::nBIFOM__Container()
{
set_specific();
return single_value->field_nBIFOM__Container;
}

const NBIFOM__ContainerTLV_template& PDU__SM__ModifyPDPContextAccept__MS__SGSN_template::nBIFOM__Container() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nBIFOM_Container of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN.");
return single_value->field_nBIFOM__Container;
}

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

void PDU__SM__ModifyPDPContextAccept__MS__SGSN_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(", protocolConfigOpts := ");
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextAccept__MS__SGSN_template::log_match(const PDU__SM__ModifyPDPContextAccept__MS__SGSN& 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.protocolConfigOpts().ispresent()){
if(!single_value->field_protocolConfigOpts.match(match_value.protocolConfigOpts(), legacy)){
TTCN_Logger::log_logmatch_info(".protocolConfigOpts");
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_protocolConfigOpts.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".protocolConfigOpts := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nBIFOM__Container().ispresent()){
if(!single_value->field_nBIFOM__Container.match(match_value.nBIFOM__Container(), legacy)){
TTCN_Logger::log_logmatch_info(".nBIFOM_Container");
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nBIFOM__Container.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nBIFOM_Container := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nBIFOM__Container.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(", protocolConfigOpts := ");
if (match_value.protocolConfigOpts().ispresent()) {
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_protocolConfigOpts.log();
if (single_value->field_protocolConfigOpts.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
if (match_value.nBIFOM__Container().ispresent()) {
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nBIFOM__Container.log();
if (single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextAccept__MS__SGSN_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_protocolConfigOpts.encode_text(text_buf);
single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN.");
}
}

void PDU__SM__ModifyPDPContextAccept__MS__SGSN_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_protocolConfigOpts.decode_text(text_buf);
single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextAccept__MS__SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN.");
}
}

void PDU__SM__ModifyPDPContextAccept__MS__SGSN_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__SM__ModifyPDPContextAccept__MS__SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN 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) protocolConfigOpts().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__ModifyPDPContextAccept__MS__SGSN_template* precondition = new PDU__SM__ModifyPDPContextAccept__MS__SGSN_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__ModifyPDPContextAccept__MS__SGSN_template* implied_template = new PDU__SM__ModifyPDPContextAccept__MS__SGSN_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__ModifyPDPContextAccept__MS__SGSN_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__ModifyPDPContextAccept__MS__SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN");
single_value->field_protocolConfigOpts.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN");
single_value->field_nBIFOM__Container.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN");
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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN");
}

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

boolean PDU__SM__ModifyPDPContextAccept__MS__SGSN_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__SM__ModifyPDPContextAccept__SGSN__MS::PDU__SM__ModifyPDPContextAccept__SGSN__MS()
{
}

PDU__SM__ModifyPDPContextAccept__SGSN__MS::PDU__SM__ModifyPDPContextAccept__SGSN__MS(const BITSTRING& par_messageType,
    const OPTIONAL< QoSTLV >& par_negotiatedQoS,
    const OPTIONAL< LLC__SAPITV >& par_negotiatedLLC__SAPI,
    const OPTIONAL< RadioPriorityTV >& par_newRadioPriority,
    const OPTIONAL< PacketFlowIDTLV >& par_packetFlowIdentifier,
    const OPTIONAL< ProtocolConfigOptionsTLV >& par_protocolConfigOpts,
    const OPTIONAL< WLANOffloadAcceptabilityTV >& par_wLANOffloadIndication,
    const OPTIONAL< NBIFOM__ContainerTLV >& par_nBIFOM__Container)
  :   field_messageType(par_messageType),
  field_negotiatedQoS(par_negotiatedQoS),
  field_negotiatedLLC__SAPI(par_negotiatedLLC__SAPI),
  field_newRadioPriority(par_newRadioPriority),
  field_packetFlowIdentifier(par_packetFlowIdentifier),
  field_protocolConfigOpts(par_protocolConfigOpts),
  field_wLANOffloadIndication(par_wLANOffloadIndication),
  field_nBIFOM__Container(par_nBIFOM__Container)
{
}

PDU__SM__ModifyPDPContextAccept__SGSN__MS::PDU__SM__ModifyPDPContextAccept__SGSN__MS(const PDU__SM__ModifyPDPContextAccept__SGSN__MS& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.negotiatedQoS().is_bound()) field_negotiatedQoS = other_value.negotiatedQoS();
else field_negotiatedQoS.clean_up();
if (other_value.negotiatedLLC__SAPI().is_bound()) field_negotiatedLLC__SAPI = other_value.negotiatedLLC__SAPI();
else field_negotiatedLLC__SAPI.clean_up();
if (other_value.newRadioPriority().is_bound()) field_newRadioPriority = other_value.newRadioPriority();
else field_newRadioPriority.clean_up();
if (other_value.packetFlowIdentifier().is_bound()) field_packetFlowIdentifier = other_value.packetFlowIdentifier();
else field_packetFlowIdentifier.clean_up();
if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
else field_protocolConfigOpts.clean_up();
if (other_value.wLANOffloadIndication().is_bound()) field_wLANOffloadIndication = other_value.wLANOffloadIndication();
else field_wLANOffloadIndication.clean_up();
if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
else field_nBIFOM__Container.clean_up();
}

void PDU__SM__ModifyPDPContextAccept__SGSN__MS::clean_up()
{
field_messageType.clean_up();
field_negotiatedQoS.clean_up();
field_negotiatedLLC__SAPI.clean_up();
field_newRadioPriority.clean_up();
field_packetFlowIdentifier.clean_up();
field_protocolConfigOpts.clean_up();
field_wLANOffloadIndication.clean_up();
field_nBIFOM__Container.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__ModifyPDPContextAccept__SGSN__MS::get_descriptor() const { return &PDU__SM__ModifyPDPContextAccept__SGSN__MS_descr_; }
PDU__SM__ModifyPDPContextAccept__SGSN__MS& PDU__SM__ModifyPDPContextAccept__SGSN__MS::operator=(const PDU__SM__ModifyPDPContextAccept__SGSN__MS& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.negotiatedQoS().is_bound()) field_negotiatedQoS = other_value.negotiatedQoS();
  else field_negotiatedQoS.clean_up();
  if (other_value.negotiatedLLC__SAPI().is_bound()) field_negotiatedLLC__SAPI = other_value.negotiatedLLC__SAPI();
  else field_negotiatedLLC__SAPI.clean_up();
  if (other_value.newRadioPriority().is_bound()) field_newRadioPriority = other_value.newRadioPriority();
  else field_newRadioPriority.clean_up();
  if (other_value.packetFlowIdentifier().is_bound()) field_packetFlowIdentifier = other_value.packetFlowIdentifier();
  else field_packetFlowIdentifier.clean_up();
  if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
  else field_protocolConfigOpts.clean_up();
  if (other_value.wLANOffloadIndication().is_bound()) field_wLANOffloadIndication = other_value.wLANOffloadIndication();
  else field_wLANOffloadIndication.clean_up();
  if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
  else field_nBIFOM__Container.clean_up();
}
return *this;
}

boolean PDU__SM__ModifyPDPContextAccept__SGSN__MS::operator==(const PDU__SM__ModifyPDPContextAccept__SGSN__MS& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_negotiatedQoS==other_value.field_negotiatedQoS
  && field_negotiatedLLC__SAPI==other_value.field_negotiatedLLC__SAPI
  && field_newRadioPriority==other_value.field_newRadioPriority
  && field_packetFlowIdentifier==other_value.field_packetFlowIdentifier
  && field_protocolConfigOpts==other_value.field_protocolConfigOpts
  && field_wLANOffloadIndication==other_value.field_wLANOffloadIndication
  && field_nBIFOM__Container==other_value.field_nBIFOM__Container;
}

boolean PDU__SM__ModifyPDPContextAccept__SGSN__MS::is_bound() const
{
return (field_messageType.is_bound())
  || (OPTIONAL_OMIT == field_negotiatedQoS.get_selection() || field_negotiatedQoS.is_bound())
  || (OPTIONAL_OMIT == field_negotiatedLLC__SAPI.get_selection() || field_negotiatedLLC__SAPI.is_bound())
  || (OPTIONAL_OMIT == field_newRadioPriority.get_selection() || field_newRadioPriority.is_bound())
  || (OPTIONAL_OMIT == field_packetFlowIdentifier.get_selection() || field_packetFlowIdentifier.is_bound())
  || (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_bound())
  || (OPTIONAL_OMIT == field_wLANOffloadIndication.get_selection() || field_wLANOffloadIndication.is_bound())
  || (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_bound());
}
boolean PDU__SM__ModifyPDPContextAccept__SGSN__MS::is_value() const
{
return field_messageType.is_value()
  && (OPTIONAL_OMIT == field_negotiatedQoS.get_selection() || field_negotiatedQoS.is_value())
  && (OPTIONAL_OMIT == field_negotiatedLLC__SAPI.get_selection() || field_negotiatedLLC__SAPI.is_value())
  && (OPTIONAL_OMIT == field_newRadioPriority.get_selection() || field_newRadioPriority.is_value())
  && (OPTIONAL_OMIT == field_packetFlowIdentifier.get_selection() || field_packetFlowIdentifier.is_value())
  && (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_value())
  && (OPTIONAL_OMIT == field_wLANOffloadIndication.get_selection() || field_wLANOffloadIndication.is_value())
  && (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_value());
}
int PDU__SM__ModifyPDPContextAccept__SGSN__MS::size_of() const
{
  int ret_val = 1;
  if (field_negotiatedQoS.ispresent()) ret_val++;
  if (field_negotiatedLLC__SAPI.ispresent()) ret_val++;
  if (field_newRadioPriority.ispresent()) ret_val++;
  if (field_packetFlowIdentifier.ispresent()) ret_val++;
  if (field_protocolConfigOpts.ispresent()) ret_val++;
  if (field_wLANOffloadIndication.ispresent()) ret_val++;
  if (field_nBIFOM__Container.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__ModifyPDPContextAccept__SGSN__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(", negotiatedQoS := ");
field_negotiatedQoS.log();
TTCN_Logger::log_event_str(", negotiatedLLC_SAPI := ");
field_negotiatedLLC__SAPI.log();
TTCN_Logger::log_event_str(", newRadioPriority := ");
field_newRadioPriority.log();
TTCN_Logger::log_event_str(", packetFlowIdentifier := ");
field_packetFlowIdentifier.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", wLANOffloadIndication := ");
field_wLANOffloadIndication.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
field_nBIFOM__Container.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__ModifyPDPContextAccept__SGSN__MS::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (!negotiatedQoS().is_bound()) negotiatedQoS() = OMIT_VALUE;
else negotiatedQoS().set_implicit_omit();
if (!negotiatedLLC__SAPI().is_bound()) negotiatedLLC__SAPI() = OMIT_VALUE;
else negotiatedLLC__SAPI().set_implicit_omit();
if (!newRadioPriority().is_bound()) newRadioPriority() = OMIT_VALUE;
else newRadioPriority().set_implicit_omit();
if (!packetFlowIdentifier().is_bound()) packetFlowIdentifier() = OMIT_VALUE;
else packetFlowIdentifier().set_implicit_omit();
if (!protocolConfigOpts().is_bound()) protocolConfigOpts() = OMIT_VALUE;
else protocolConfigOpts().set_implicit_omit();
if (!wLANOffloadIndication().is_bound()) wLANOffloadIndication() = OMIT_VALUE;
else wLANOffloadIndication().set_implicit_omit();
if (!nBIFOM__Container().is_bound()) nBIFOM__Container() = OMIT_VALUE;
else nBIFOM__Container().set_implicit_omit();
}

void PDU__SM__ModifyPDPContextAccept__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_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) negotiatedQoS().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) negotiatedLLC__SAPI().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) newRadioPriority().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) packetFlowIdentifier().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) wLANOffloadIndication().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "negotiatedQoS")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          negotiatedQoS().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "negotiatedLLC_SAPI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          negotiatedLLC__SAPI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "newRadioPriority")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          newRadioPriority().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "packetFlowIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          packetFlowIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "wLANOffloadIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          wLANOffloadIndication().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS");
  }
}

void PDU__SM__ModifyPDPContextAccept__SGSN__MS::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_negotiatedQoS.encode_text(text_buf);
field_negotiatedLLC__SAPI.encode_text(text_buf);
field_newRadioPriority.encode_text(text_buf);
field_packetFlowIdentifier.encode_text(text_buf);
field_protocolConfigOpts.encode_text(text_buf);
field_wLANOffloadIndication.encode_text(text_buf);
field_nBIFOM__Container.encode_text(text_buf);
}

void PDU__SM__ModifyPDPContextAccept__SGSN__MS::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_negotiatedQoS.decode_text(text_buf);
field_negotiatedLLC__SAPI.decode_text(text_buf);
field_newRadioPriority.decode_text(text_buf);
field_packetFlowIdentifier.decode_text(text_buf);
field_protocolConfigOpts.decode_text(text_buf);
field_wLANOffloadIndication.decode_text(text_buf);
field_nBIFOM__Container.decode_text(text_buf);
}

void PDU__SM__ModifyPDPContextAccept__SGSN__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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__ModifyPDPContextAccept__SGSN__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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__ModifyPDPContextAccept__SGSN__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_negotiatedQoS = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_1_force_omit(1, force_omit, QoSTLV_descr_.raw->forceomit);
  decoded_field_length = field_negotiatedQoS().RAW_decode(QoSTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 1) {
  field_negotiatedQoS = 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_negotiatedQoS=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_negotiatedLLC__SAPI = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, LLC__SAPITV_descr_.raw->forceomit);
  decoded_field_length = field_negotiatedLLC__SAPI().RAW_decode(LLC__SAPITV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_negotiatedLLC__SAPI = 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_negotiatedLLC__SAPI=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_newRadioPriority = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, RadioPriorityTV_descr_.raw->forceomit);
  decoded_field_length = field_newRadioPriority().RAW_decode(RadioPriorityTV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_newRadioPriority = 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_newRadioPriority=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_packetFlowIdentifier = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, PacketFlowIDTLV_descr_.raw->forceomit);
  decoded_field_length = field_packetFlowIdentifier().RAW_decode(PacketFlowIDTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_packetFlowIdentifier = 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_packetFlowIdentifier=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_protocolConfigOpts = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, ProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_protocolConfigOpts().RAW_decode(ProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_protocolConfigOpts = 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_protocolConfigOpts=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_wLANOffloadIndication = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, WLANOffloadAcceptabilityTV_descr_.raw->forceomit);
  decoded_field_length = field_wLANOffloadIndication().RAW_decode(WLANOffloadAcceptabilityTV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_wLANOffloadIndication = 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_wLANOffloadIndication=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(7)) {
    field_nBIFOM__Container = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_7_force_omit(7, force_omit, NBIFOM__ContainerTLV_descr_.raw->forceomit);
  decoded_field_length = field_nBIFOM__Container().RAW_decode(NBIFOM__ContainerTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 1) {
  field_nBIFOM__Container = 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_nBIFOM__Container=OMIT_VALUE;
  if (field_messageType !=  bs_62) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__ModifyPDPContextAccept__SGSN__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);
  if (field_negotiatedQoS.ispresent()) {
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, QoSTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[1] = NULL;
  if (field_negotiatedLLC__SAPI.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, LLC__SAPITV_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_newRadioPriority.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, RadioPriorityTV_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_packetFlowIdentifier.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, PacketFlowIDTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_protocolConfigOpts.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, ProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_wLANOffloadIndication.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, WLANOffloadAcceptabilityTV_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  if (field_nBIFOM__Container.ispresent()) {
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, NBIFOM__ContainerTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[7] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  if (field_negotiatedQoS.ispresent()) {
  encoded_length += field_negotiatedQoS().RAW_encode(QoSTLV_descr_, *myleaf.body.node.nodes[1]);
  }
  if (field_negotiatedLLC__SAPI.ispresent()) {
  encoded_length += field_negotiatedLLC__SAPI().RAW_encode(LLC__SAPITV_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_newRadioPriority.ispresent()) {
  encoded_length += field_newRadioPriority().RAW_encode(RadioPriorityTV_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_packetFlowIdentifier.ispresent()) {
  encoded_length += field_packetFlowIdentifier().RAW_encode(PacketFlowIDTLV_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_protocolConfigOpts.ispresent()) {
  encoded_length += field_protocolConfigOpts().RAW_encode(ProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_wLANOffloadIndication.ispresent()) {
  encoded_length += field_wLANOffloadIndication().RAW_encode(WLANOffloadAcceptabilityTV_descr_, *myleaf.body.node.nodes[6]);
  }
  if (field_nBIFOM__Container.ispresent()) {
  encoded_length += field_nBIFOM__Container().RAW_encode(NBIFOM__ContainerTLV_descr_, *myleaf.body.node.nodes[7]);
  }
  if (field_messageType !=  bs_62) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_62.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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::single_value_struct {
BITSTRING_template field_messageType;
QoSTLV_template field_negotiatedQoS;
LLC__SAPITV_template field_negotiatedLLC__SAPI;
RadioPriorityTV_template field_newRadioPriority;
PacketFlowIDTLV_template field_packetFlowIdentifier;
ProtocolConfigOptionsTLV_template field_protocolConfigOpts;
WLANOffloadAcceptabilityTV_template field_wLANOffloadIndication;
NBIFOM__ContainerTLV_template field_nBIFOM__Container;
};

void PDU__SM__ModifyPDPContextAccept__SGSN__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_negotiatedQoS = ANY_OR_OMIT;
single_value->field_negotiatedLLC__SAPI = ANY_OR_OMIT;
single_value->field_newRadioPriority = ANY_OR_OMIT;
single_value->field_packetFlowIdentifier = ANY_OR_OMIT;
single_value->field_protocolConfigOpts = ANY_OR_OMIT;
single_value->field_wLANOffloadIndication = ANY_OR_OMIT;
single_value->field_nBIFOM__Container = ANY_OR_OMIT;
}
}
}

void PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::copy_value(const PDU__SM__ModifyPDPContextAccept__SGSN__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.negotiatedQoS().is_bound()) {
  if (other_value.negotiatedQoS().ispresent()) single_value->field_negotiatedQoS = other_value.negotiatedQoS()();
  else single_value->field_negotiatedQoS = OMIT_VALUE;
} else {
  single_value->field_negotiatedQoS.clean_up();
}
if (other_value.negotiatedLLC__SAPI().is_bound()) {
  if (other_value.negotiatedLLC__SAPI().ispresent()) single_value->field_negotiatedLLC__SAPI = other_value.negotiatedLLC__SAPI()();
  else single_value->field_negotiatedLLC__SAPI = OMIT_VALUE;
} else {
  single_value->field_negotiatedLLC__SAPI.clean_up();
}
if (other_value.newRadioPriority().is_bound()) {
  if (other_value.newRadioPriority().ispresent()) single_value->field_newRadioPriority = other_value.newRadioPriority()();
  else single_value->field_newRadioPriority = OMIT_VALUE;
} else {
  single_value->field_newRadioPriority.clean_up();
}
if (other_value.packetFlowIdentifier().is_bound()) {
  if (other_value.packetFlowIdentifier().ispresent()) single_value->field_packetFlowIdentifier = other_value.packetFlowIdentifier()();
  else single_value->field_packetFlowIdentifier = OMIT_VALUE;
} else {
  single_value->field_packetFlowIdentifier.clean_up();
}
if (other_value.protocolConfigOpts().is_bound()) {
  if (other_value.protocolConfigOpts().ispresent()) single_value->field_protocolConfigOpts = other_value.protocolConfigOpts()();
  else single_value->field_protocolConfigOpts = OMIT_VALUE;
} else {
  single_value->field_protocolConfigOpts.clean_up();
}
if (other_value.wLANOffloadIndication().is_bound()) {
  if (other_value.wLANOffloadIndication().ispresent()) single_value->field_wLANOffloadIndication = other_value.wLANOffloadIndication()();
  else single_value->field_wLANOffloadIndication = OMIT_VALUE;
} else {
  single_value->field_wLANOffloadIndication.clean_up();
}
if (other_value.nBIFOM__Container().is_bound()) {
  if (other_value.nBIFOM__Container().ispresent()) single_value->field_nBIFOM__Container = other_value.nBIFOM__Container()();
  else single_value->field_nBIFOM__Container = OMIT_VALUE;
} else {
  single_value->field_nBIFOM__Container.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::copy_template(const PDU__SM__ModifyPDPContextAccept__SGSN__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.negotiatedQoS().get_selection()) {
single_value->field_negotiatedQoS = other_value.negotiatedQoS();
} else {
single_value->field_negotiatedQoS.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.negotiatedLLC__SAPI().get_selection()) {
single_value->field_negotiatedLLC__SAPI = other_value.negotiatedLLC__SAPI();
} else {
single_value->field_negotiatedLLC__SAPI.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.newRadioPriority().get_selection()) {
single_value->field_newRadioPriority = other_value.newRadioPriority();
} else {
single_value->field_newRadioPriority.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.packetFlowIdentifier().get_selection()) {
single_value->field_packetFlowIdentifier = other_value.packetFlowIdentifier();
} else {
single_value->field_packetFlowIdentifier.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.protocolConfigOpts().get_selection()) {
single_value->field_protocolConfigOpts = other_value.protocolConfigOpts();
} else {
single_value->field_protocolConfigOpts.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.wLANOffloadIndication().get_selection()) {
single_value->field_wLANOffloadIndication = other_value.wLANOffloadIndication();
} else {
single_value->field_wLANOffloadIndication.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nBIFOM__Container().get_selection()) {
single_value->field_nBIFOM__Container = other_value.nBIFOM__Container();
} else {
single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextAccept__SGSN__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__SM__ModifyPDPContextAccept__SGSN__MS_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__ModifyPDPContextAccept__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
break;
}
set_selection(other_value);
}

PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::PDU__SM__ModifyPDPContextAccept__SGSN__MS_template()
{
}

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

PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::PDU__SM__ModifyPDPContextAccept__SGSN__MS_template(const PDU__SM__ModifyPDPContextAccept__SGSN__MS& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__ModifyPDPContextAccept__SGSN__MS_template& PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::operator=(const OPTIONAL<PDU__SM__ModifyPDPContextAccept__SGSN__MS>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__ModifyPDPContextAccept__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
}
return *this;
}

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

boolean PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::match(const PDU__SM__ModifyPDPContextAccept__SGSN__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.negotiatedQoS().is_bound()) return FALSE;
if((other_value.negotiatedQoS().ispresent() ? !single_value->field_negotiatedQoS.match((const QoSTLV&)other_value.negotiatedQoS(), legacy) : !single_value->field_negotiatedQoS.match_omit(legacy)))return FALSE;
if(!other_value.negotiatedLLC__SAPI().is_bound()) return FALSE;
if((other_value.negotiatedLLC__SAPI().ispresent() ? !single_value->field_negotiatedLLC__SAPI.match((const LLC__SAPITV&)other_value.negotiatedLLC__SAPI(), legacy) : !single_value->field_negotiatedLLC__SAPI.match_omit(legacy)))return FALSE;
if(!other_value.newRadioPriority().is_bound()) return FALSE;
if((other_value.newRadioPriority().ispresent() ? !single_value->field_newRadioPriority.match((const RadioPriorityTV&)other_value.newRadioPriority(), legacy) : !single_value->field_newRadioPriority.match_omit(legacy)))return FALSE;
if(!other_value.packetFlowIdentifier().is_bound()) return FALSE;
if((other_value.packetFlowIdentifier().ispresent() ? !single_value->field_packetFlowIdentifier.match((const PacketFlowIDTLV&)other_value.packetFlowIdentifier(), legacy) : !single_value->field_packetFlowIdentifier.match_omit(legacy)))return FALSE;
if(!other_value.protocolConfigOpts().is_bound()) return FALSE;
if((other_value.protocolConfigOpts().ispresent() ? !single_value->field_protocolConfigOpts.match((const ProtocolConfigOptionsTLV&)other_value.protocolConfigOpts(), legacy) : !single_value->field_protocolConfigOpts.match_omit(legacy)))return FALSE;
if(!other_value.wLANOffloadIndication().is_bound()) return FALSE;
if((other_value.wLANOffloadIndication().ispresent() ? !single_value->field_wLANOffloadIndication.match((const WLANOffloadAcceptabilityTV&)other_value.wLANOffloadIndication(), legacy) : !single_value->field_wLANOffloadIndication.match_omit(legacy)))return FALSE;
if(!other_value.nBIFOM__Container().is_bound()) return FALSE;
if((other_value.nBIFOM__Container().ispresent() ? !single_value->field_nBIFOM__Container.match((const NBIFOM__ContainerTLV&)other_value.nBIFOM__Container(), legacy) : !single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
}
return FALSE;
}

boolean PDU__SM__ModifyPDPContextAccept__SGSN__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_negotiatedQoS.is_omit() || single_value->field_negotiatedQoS.is_bound())
 || (single_value->field_negotiatedLLC__SAPI.is_omit() || single_value->field_negotiatedLLC__SAPI.is_bound())
 || (single_value->field_newRadioPriority.is_omit() || single_value->field_newRadioPriority.is_bound())
 || (single_value->field_packetFlowIdentifier.is_omit() || single_value->field_packetFlowIdentifier.is_bound())
 || (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_bound())
 || (single_value->field_wLANOffloadIndication.is_omit() || single_value->field_wLANOffloadIndication.is_bound())
 || (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_bound());
}

boolean PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && (single_value->field_negotiatedQoS.is_omit() || single_value->field_negotiatedQoS.is_value())
 && (single_value->field_negotiatedLLC__SAPI.is_omit() || single_value->field_negotiatedLLC__SAPI.is_value())
 && (single_value->field_newRadioPriority.is_omit() || single_value->field_newRadioPriority.is_value())
 && (single_value->field_packetFlowIdentifier.is_omit() || single_value->field_packetFlowIdentifier.is_value())
 && (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_value())
 && (single_value->field_wLANOffloadIndication.is_omit() || single_value->field_wLANOffloadIndication.is_value())
 && (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_value());
}

void PDU__SM__ModifyPDPContextAccept__SGSN__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__SM__ModifyPDPContextAccept__SGSN__MS PDU__SM__ModifyPDPContextAccept__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
PDU__SM__ModifyPDPContextAccept__SGSN__MS ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_negotiatedQoS.is_omit()) ret_val.negotiatedQoS() = OMIT_VALUE;
else if (single_value->field_negotiatedQoS.is_bound()) {
ret_val.negotiatedQoS() = single_value->field_negotiatedQoS.valueof();
}
if (single_value->field_negotiatedLLC__SAPI.is_omit()) ret_val.negotiatedLLC__SAPI() = OMIT_VALUE;
else if (single_value->field_negotiatedLLC__SAPI.is_bound()) {
ret_val.negotiatedLLC__SAPI() = single_value->field_negotiatedLLC__SAPI.valueof();
}
if (single_value->field_newRadioPriority.is_omit()) ret_val.newRadioPriority() = OMIT_VALUE;
else if (single_value->field_newRadioPriority.is_bound()) {
ret_val.newRadioPriority() = single_value->field_newRadioPriority.valueof();
}
if (single_value->field_packetFlowIdentifier.is_omit()) ret_val.packetFlowIdentifier() = OMIT_VALUE;
else if (single_value->field_packetFlowIdentifier.is_bound()) {
ret_val.packetFlowIdentifier() = single_value->field_packetFlowIdentifier.valueof();
}
if (single_value->field_protocolConfigOpts.is_omit()) ret_val.protocolConfigOpts() = OMIT_VALUE;
else if (single_value->field_protocolConfigOpts.is_bound()) {
ret_val.protocolConfigOpts() = single_value->field_protocolConfigOpts.valueof();
}
if (single_value->field_wLANOffloadIndication.is_omit()) ret_val.wLANOffloadIndication() = OMIT_VALUE;
else if (single_value->field_wLANOffloadIndication.is_bound()) {
ret_val.wLANOffloadIndication() = single_value->field_wLANOffloadIndication.valueof();
}
if (single_value->field_nBIFOM__Container.is_omit()) ret_val.nBIFOM__Container() = OMIT_VALUE;
else if (single_value->field_nBIFOM__Container.is_bound()) {
ret_val.nBIFOM__Container() = single_value->field_nBIFOM__Container.valueof();
}
return ret_val;
}

void PDU__SM__ModifyPDPContextAccept__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__ModifyPDPContextAccept__SGSN__MS_template[list_length];
}

PDU__SM__ModifyPDPContextAccept__SGSN__MS_template& PDU__SM__ModifyPDPContextAccept__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
return value_list.list_value[list_index];
}

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

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

QoSTLV_template& PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::negotiatedQoS()
{
set_specific();
return single_value->field_negotiatedQoS;
}

const QoSTLV_template& PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::negotiatedQoS() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field negotiatedQoS of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
return single_value->field_negotiatedQoS;
}

LLC__SAPITV_template& PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::negotiatedLLC__SAPI()
{
set_specific();
return single_value->field_negotiatedLLC__SAPI;
}

const LLC__SAPITV_template& PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::negotiatedLLC__SAPI() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field negotiatedLLC_SAPI of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
return single_value->field_negotiatedLLC__SAPI;
}

RadioPriorityTV_template& PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::newRadioPriority()
{
set_specific();
return single_value->field_newRadioPriority;
}

const RadioPriorityTV_template& PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::newRadioPriority() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field newRadioPriority of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
return single_value->field_newRadioPriority;
}

PacketFlowIDTLV_template& PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::packetFlowIdentifier()
{
set_specific();
return single_value->field_packetFlowIdentifier;
}

const PacketFlowIDTLV_template& PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::packetFlowIdentifier() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field packetFlowIdentifier of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
return single_value->field_packetFlowIdentifier;
}

ProtocolConfigOptionsTLV_template& PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::protocolConfigOpts()
{
set_specific();
return single_value->field_protocolConfigOpts;
}

const ProtocolConfigOptionsTLV_template& PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::protocolConfigOpts() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field protocolConfigOpts of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
return single_value->field_protocolConfigOpts;
}

WLANOffloadAcceptabilityTV_template& PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::wLANOffloadIndication()
{
set_specific();
return single_value->field_wLANOffloadIndication;
}

const WLANOffloadAcceptabilityTV_template& PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::wLANOffloadIndication() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field wLANOffloadIndication of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
return single_value->field_wLANOffloadIndication;
}

NBIFOM__ContainerTLV_template& PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::nBIFOM__Container()
{
set_specific();
return single_value->field_nBIFOM__Container;
}

const NBIFOM__ContainerTLV_template& PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::nBIFOM__Container() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nBIFOM_Container of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
return single_value->field_nBIFOM__Container;
}

int PDU__SM__ModifyPDPContextAccept__SGSN__MS_template::size_of() const
{
  if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS which has an ifpresent attribute.");
  switch (template_selection)
  {
  case SPECIFIC_VALUE:
  {    int ret_val = 1;
      if (single_value->field_negotiatedQoS.is_present()) ret_val++;
      if (single_value->field_negotiatedLLC__SAPI.is_present()) ret_val++;
      if (single_value->field_newRadioPriority.is_present()) ret_val++;
      if (single_value->field_packetFlowIdentifier.is_present()) ret_val++;
      if (single_value->field_protocolConfigOpts.is_present()) ret_val++;
      if (single_value->field_wLANOffloadIndication.is_present()) ret_val++;
      if (single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS containing omit value.");
  case ANY_VALUE:
  case ANY_OR_OMIT:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS containing */? value.");
  case COMPLEMENTED_LIST:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS containing complemented list.");
  case CONJUNCTION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS containing a conjunction list match.");
  case IMPLICATION_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS containing an implication match.");
  case DYNAMIC_MATCH:
    TTCN_error("Performing sizeof() operation on a template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS containing a dynamic match.");
  default:
    TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
  }
  return 0;
}

void PDU__SM__ModifyPDPContextAccept__SGSN__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(", negotiatedQoS := ");
single_value->field_negotiatedQoS.log();
TTCN_Logger::log_event_str(", negotiatedLLC_SAPI := ");
single_value->field_negotiatedLLC__SAPI.log();
TTCN_Logger::log_event_str(", newRadioPriority := ");
single_value->field_newRadioPriority.log();
TTCN_Logger::log_event_str(", packetFlowIdentifier := ");
single_value->field_packetFlowIdentifier.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", wLANOffloadIndication := ");
single_value->field_wLANOffloadIndication.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextAccept__SGSN__MS_template::log_match(const PDU__SM__ModifyPDPContextAccept__SGSN__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.negotiatedQoS().ispresent()){
if(!single_value->field_negotiatedQoS.match(match_value.negotiatedQoS(), legacy)){
TTCN_Logger::log_logmatch_info(".negotiatedQoS");
single_value->field_negotiatedQoS.log_match(match_value.negotiatedQoS(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_negotiatedQoS.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".negotiatedQoS := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_negotiatedQoS.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.negotiatedLLC__SAPI().ispresent()){
if(!single_value->field_negotiatedLLC__SAPI.match(match_value.negotiatedLLC__SAPI(), legacy)){
TTCN_Logger::log_logmatch_info(".negotiatedLLC_SAPI");
single_value->field_negotiatedLLC__SAPI.log_match(match_value.negotiatedLLC__SAPI(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_negotiatedLLC__SAPI.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".negotiatedLLC_SAPI := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_negotiatedLLC__SAPI.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.newRadioPriority().ispresent()){
if(!single_value->field_newRadioPriority.match(match_value.newRadioPriority(), legacy)){
TTCN_Logger::log_logmatch_info(".newRadioPriority");
single_value->field_newRadioPriority.log_match(match_value.newRadioPriority(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_newRadioPriority.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".newRadioPriority := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_newRadioPriority.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.packetFlowIdentifier().ispresent()){
if(!single_value->field_packetFlowIdentifier.match(match_value.packetFlowIdentifier(), legacy)){
TTCN_Logger::log_logmatch_info(".packetFlowIdentifier");
single_value->field_packetFlowIdentifier.log_match(match_value.packetFlowIdentifier(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_packetFlowIdentifier.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".packetFlowIdentifier := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_packetFlowIdentifier.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.protocolConfigOpts().ispresent()){
if(!single_value->field_protocolConfigOpts.match(match_value.protocolConfigOpts(), legacy)){
TTCN_Logger::log_logmatch_info(".protocolConfigOpts");
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_protocolConfigOpts.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".protocolConfigOpts := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.wLANOffloadIndication().ispresent()){
if(!single_value->field_wLANOffloadIndication.match(match_value.wLANOffloadIndication(), legacy)){
TTCN_Logger::log_logmatch_info(".wLANOffloadIndication");
single_value->field_wLANOffloadIndication.log_match(match_value.wLANOffloadIndication(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_wLANOffloadIndication.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".wLANOffloadIndication := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_wLANOffloadIndication.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nBIFOM__Container().ispresent()){
if(!single_value->field_nBIFOM__Container.match(match_value.nBIFOM__Container(), legacy)){
TTCN_Logger::log_logmatch_info(".nBIFOM_Container");
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nBIFOM__Container.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nBIFOM_Container := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nBIFOM__Container.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(", negotiatedQoS := ");
if (match_value.negotiatedQoS().ispresent()) {
single_value->field_negotiatedQoS.log_match(match_value.negotiatedQoS(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_negotiatedQoS.log();
if (single_value->field_negotiatedQoS.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", negotiatedLLC_SAPI := ");
if (match_value.negotiatedLLC__SAPI().ispresent()) {
single_value->field_negotiatedLLC__SAPI.log_match(match_value.negotiatedLLC__SAPI(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_negotiatedLLC__SAPI.log();
if (single_value->field_negotiatedLLC__SAPI.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", newRadioPriority := ");
if (match_value.newRadioPriority().ispresent()) {
single_value->field_newRadioPriority.log_match(match_value.newRadioPriority(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_newRadioPriority.log();
if (single_value->field_newRadioPriority.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", packetFlowIdentifier := ");
if (match_value.packetFlowIdentifier().ispresent()) {
single_value->field_packetFlowIdentifier.log_match(match_value.packetFlowIdentifier(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_packetFlowIdentifier.log();
if (single_value->field_packetFlowIdentifier.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
if (match_value.protocolConfigOpts().ispresent()) {
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_protocolConfigOpts.log();
if (single_value->field_protocolConfigOpts.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", wLANOffloadIndication := ");
if (match_value.wLANOffloadIndication().ispresent()) {
single_value->field_wLANOffloadIndication.log_match(match_value.wLANOffloadIndication(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_wLANOffloadIndication.log();
if (single_value->field_wLANOffloadIndication.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
if (match_value.nBIFOM__Container().ispresent()) {
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nBIFOM__Container.log();
if (single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextAccept__SGSN__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_negotiatedQoS.encode_text(text_buf);
single_value->field_negotiatedLLC__SAPI.encode_text(text_buf);
single_value->field_newRadioPriority.encode_text(text_buf);
single_value->field_packetFlowIdentifier.encode_text(text_buf);
single_value->field_protocolConfigOpts.encode_text(text_buf);
single_value->field_wLANOffloadIndication.encode_text(text_buf);
single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
}
}

void PDU__SM__ModifyPDPContextAccept__SGSN__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_negotiatedQoS.decode_text(text_buf);
single_value->field_negotiatedLLC__SAPI.decode_text(text_buf);
single_value->field_newRadioPriority.decode_text(text_buf);
single_value->field_packetFlowIdentifier.decode_text(text_buf);
single_value->field_protocolConfigOpts.decode_text(text_buf);
single_value->field_wLANOffloadIndication.decode_text(text_buf);
single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextAccept__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS.");
}
}

void PDU__SM__ModifyPDPContextAccept__SGSN__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__SM__ModifyPDPContextAccept__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_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) negotiatedQoS().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) negotiatedLLC__SAPI().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) newRadioPriority().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) packetFlowIdentifier().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) wLANOffloadIndication().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "negotiatedQoS")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          negotiatedQoS().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "negotiatedLLC_SAPI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          negotiatedLLC__SAPI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "newRadioPriority")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          newRadioPriority().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "packetFlowIdentifier")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          packetFlowIdentifier().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "wLANOffloadIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          wLANOffloadIndication().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__ModifyPDPContextAccept__SGSN__MS_template* precondition = new PDU__SM__ModifyPDPContextAccept__SGSN__MS_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__ModifyPDPContextAccept__SGSN__MS_template* implied_template = new PDU__SM__ModifyPDPContextAccept__SGSN__MS_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__ModifyPDPContextAccept__SGSN__MS_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__ModifyPDPContextAccept__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS");
single_value->field_negotiatedQoS.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS");
single_value->field_negotiatedLLC__SAPI.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS");
single_value->field_newRadioPriority.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS");
single_value->field_packetFlowIdentifier.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS");
single_value->field_protocolConfigOpts.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS");
single_value->field_wLANOffloadIndication.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS");
single_value->field_nBIFOM__Container.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS");
}

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

boolean PDU__SM__ModifyPDPContextAccept__SGSN__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__SM__ModifyPDPContextReject::PDU__SM__ModifyPDPContextReject()
{
}

PDU__SM__ModifyPDPContextReject::PDU__SM__ModifyPDPContextReject(const BITSTRING& par_messageType,
    const OCTETSTRING& par_smCause,
    const OPTIONAL< ProtocolConfigOptionsTLV >& par_protocolConfigOpts,
    const OPTIONAL< MobileL3__CommonIE__Types::GPRSTimer3TLV >& par_backOffTimer,
    const OPTIONAL< ReAttemptIndicatorTLV >& par_reAttemptIndicator,
    const OPTIONAL< NBIFOM__ContainerTLV >& par_nBIFOM__Container)
  :   field_messageType(par_messageType),
  field_smCause(par_smCause),
  field_protocolConfigOpts(par_protocolConfigOpts),
  field_backOffTimer(par_backOffTimer),
  field_reAttemptIndicator(par_reAttemptIndicator),
  field_nBIFOM__Container(par_nBIFOM__Container)
{
}

PDU__SM__ModifyPDPContextReject::PDU__SM__ModifyPDPContextReject(const PDU__SM__ModifyPDPContextReject& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
else field_smCause.clean_up();
if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
else field_protocolConfigOpts.clean_up();
if (other_value.backOffTimer().is_bound()) field_backOffTimer = other_value.backOffTimer();
else field_backOffTimer.clean_up();
if (other_value.reAttemptIndicator().is_bound()) field_reAttemptIndicator = other_value.reAttemptIndicator();
else field_reAttemptIndicator.clean_up();
if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
else field_nBIFOM__Container.clean_up();
}

void PDU__SM__ModifyPDPContextReject::clean_up()
{
field_messageType.clean_up();
field_smCause.clean_up();
field_protocolConfigOpts.clean_up();
field_backOffTimer.clean_up();
field_reAttemptIndicator.clean_up();
field_nBIFOM__Container.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__ModifyPDPContextReject::get_descriptor() const { return &PDU__SM__ModifyPDPContextReject_descr_; }
PDU__SM__ModifyPDPContextReject& PDU__SM__ModifyPDPContextReject::operator=(const PDU__SM__ModifyPDPContextReject& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
  else field_smCause.clean_up();
  if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
  else field_protocolConfigOpts.clean_up();
  if (other_value.backOffTimer().is_bound()) field_backOffTimer = other_value.backOffTimer();
  else field_backOffTimer.clean_up();
  if (other_value.reAttemptIndicator().is_bound()) field_reAttemptIndicator = other_value.reAttemptIndicator();
  else field_reAttemptIndicator.clean_up();
  if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
  else field_nBIFOM__Container.clean_up();
}
return *this;
}

boolean PDU__SM__ModifyPDPContextReject::operator==(const PDU__SM__ModifyPDPContextReject& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_smCause==other_value.field_smCause
  && field_protocolConfigOpts==other_value.field_protocolConfigOpts
  && field_backOffTimer==other_value.field_backOffTimer
  && field_reAttemptIndicator==other_value.field_reAttemptIndicator
  && field_nBIFOM__Container==other_value.field_nBIFOM__Container;
}

boolean PDU__SM__ModifyPDPContextReject::is_bound() const
{
return (field_messageType.is_bound())
  || (field_smCause.is_bound())
  || (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_bound())
  || (OPTIONAL_OMIT == field_backOffTimer.get_selection() || field_backOffTimer.is_bound())
  || (OPTIONAL_OMIT == field_reAttemptIndicator.get_selection() || field_reAttemptIndicator.is_bound())
  || (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_bound());
}
boolean PDU__SM__ModifyPDPContextReject::is_value() const
{
return field_messageType.is_value()
  && field_smCause.is_value()
  && (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_value())
  && (OPTIONAL_OMIT == field_backOffTimer.get_selection() || field_backOffTimer.is_value())
  && (OPTIONAL_OMIT == field_reAttemptIndicator.get_selection() || field_reAttemptIndicator.is_value())
  && (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_value());
}
int PDU__SM__ModifyPDPContextReject::size_of() const
{
  int ret_val = 2;
  if (field_protocolConfigOpts.ispresent()) ret_val++;
  if (field_backOffTimer.ispresent()) ret_val++;
  if (field_reAttemptIndicator.ispresent()) ret_val++;
  if (field_nBIFOM__Container.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__ModifyPDPContextReject::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(", smCause := ");
field_smCause.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", backOffTimer := ");
field_backOffTimer.log();
TTCN_Logger::log_event_str(", reAttemptIndicator := ");
field_reAttemptIndicator.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
field_nBIFOM__Container.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__ModifyPDPContextReject::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (smCause().is_bound()) smCause().set_implicit_omit();
if (!protocolConfigOpts().is_bound()) protocolConfigOpts() = OMIT_VALUE;
else protocolConfigOpts().set_implicit_omit();
if (!backOffTimer().is_bound()) backOffTimer() = OMIT_VALUE;
else backOffTimer().set_implicit_omit();
if (!reAttemptIndicator().is_bound()) reAttemptIndicator() = OMIT_VALUE;
else reAttemptIndicator().set_implicit_omit();
if (!nBIFOM__Container().is_bound()) nBIFOM__Container() = OMIT_VALUE;
else nBIFOM__Container().set_implicit_omit();
}

void PDU__SM__ModifyPDPContextReject::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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject 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) smCause().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) backOffTimer().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) reAttemptIndicator().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "smCause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          smCause().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "backOffTimer")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          backOffTimer().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "reAttemptIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          reAttemptIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextReject");
  }
}

void PDU__SM__ModifyPDPContextReject::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_smCause.encode_text(text_buf);
field_protocolConfigOpts.encode_text(text_buf);
field_backOffTimer.encode_text(text_buf);
field_reAttemptIndicator.encode_text(text_buf);
field_nBIFOM__Container.encode_text(text_buf);
}

void PDU__SM__ModifyPDPContextReject::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_smCause.decode_text(text_buf);
field_protocolConfigOpts.decode_text(text_buf);
field_backOffTimer.decode_text(text_buf);
field_reAttemptIndicator.decode_text(text_buf);
field_nBIFOM__Container.decode_text(text_buf);
}

void PDU__SM__ModifyPDPContextReject::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__ModifyPDPContextReject::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__ModifyPDPContextReject::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, SMCauseV_descr_.raw->forceomit);
  decoded_field_length = field_smCause.RAW_decode(SMCauseV_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_protocolConfigOpts = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, ProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_protocolConfigOpts().RAW_decode(ProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_protocolConfigOpts = 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_protocolConfigOpts=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_backOffTimer = 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::GPRSTimer3TLV_descr_.raw->forceomit);
  decoded_field_length = field_backOffTimer().RAW_decode(MobileL3__CommonIE__Types::GPRSTimer3TLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_backOffTimer = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_backOffTimer.ispresent() || field_backOffTimer().elementIdentifier() !=  os_33){
  field_backOffTimer=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_backOffTimer=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_reAttemptIndicator = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, ReAttemptIndicatorTLV_descr_.raw->forceomit);
  decoded_field_length = field_reAttemptIndicator().RAW_decode(ReAttemptIndicatorTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_reAttemptIndicator = 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_reAttemptIndicator=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_nBIFOM__Container = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, NBIFOM__ContainerTLV_descr_.raw->forceomit);
  decoded_field_length = field_nBIFOM__Container().RAW_decode(NBIFOM__ContainerTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_nBIFOM__Container = 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_nBIFOM__Container=OMIT_VALUE;
  if (field_messageType !=  bs_63) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__ModifyPDPContextReject::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, SMCauseV_descr_.raw);
  if (field_protocolConfigOpts.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, ProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_backOffTimer.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, MobileL3__CommonIE__Types::GPRSTimer3TLV_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_reAttemptIndicator.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, ReAttemptIndicatorTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_nBIFOM__Container.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, NBIFOM__ContainerTLV_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_smCause.RAW_encode(SMCauseV_descr_, *myleaf.body.node.nodes[1]);
  if (field_protocolConfigOpts.ispresent()) {
  encoded_length += field_protocolConfigOpts().RAW_encode(ProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_backOffTimer.ispresent()) {
  encoded_length += field_backOffTimer().RAW_encode(MobileL3__CommonIE__Types::GPRSTimer3TLV_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_reAttemptIndicator.ispresent()) {
  encoded_length += field_reAttemptIndicator().RAW_encode(ReAttemptIndicatorTLV_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_nBIFOM__Container.ispresent()) {
  encoded_length += field_nBIFOM__Container().RAW_encode(NBIFOM__ContainerTLV_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_backOffTimer.ispresent() && (!field_backOffTimer.ispresent() || field_backOffTimer().elementIdentifier() !=  os_33)) {
  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_33.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_messageType !=  bs_63) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_63.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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__ModifyPDPContextReject_template::single_value_struct {
BITSTRING_template field_messageType;
OCTETSTRING_template field_smCause;
ProtocolConfigOptionsTLV_template field_protocolConfigOpts;
MobileL3__CommonIE__Types::GPRSTimer3TLV_template field_backOffTimer;
ReAttemptIndicatorTLV_template field_reAttemptIndicator;
NBIFOM__ContainerTLV_template field_nBIFOM__Container;
};

void PDU__SM__ModifyPDPContextReject_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_smCause = ANY_VALUE;
single_value->field_protocolConfigOpts = ANY_OR_OMIT;
single_value->field_backOffTimer = ANY_OR_OMIT;
single_value->field_reAttemptIndicator = ANY_OR_OMIT;
single_value->field_nBIFOM__Container = ANY_OR_OMIT;
}
}
}

void PDU__SM__ModifyPDPContextReject_template::copy_value(const PDU__SM__ModifyPDPContextReject& 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.smCause().is_bound()) {
  single_value->field_smCause = other_value.smCause();
} else {
  single_value->field_smCause.clean_up();
}
if (other_value.protocolConfigOpts().is_bound()) {
  if (other_value.protocolConfigOpts().ispresent()) single_value->field_protocolConfigOpts = other_value.protocolConfigOpts()();
  else single_value->field_protocolConfigOpts = OMIT_VALUE;
} else {
  single_value->field_protocolConfigOpts.clean_up();
}
if (other_value.backOffTimer().is_bound()) {
  if (other_value.backOffTimer().ispresent()) single_value->field_backOffTimer = other_value.backOffTimer()();
  else single_value->field_backOffTimer = OMIT_VALUE;
} else {
  single_value->field_backOffTimer.clean_up();
}
if (other_value.reAttemptIndicator().is_bound()) {
  if (other_value.reAttemptIndicator().ispresent()) single_value->field_reAttemptIndicator = other_value.reAttemptIndicator()();
  else single_value->field_reAttemptIndicator = OMIT_VALUE;
} else {
  single_value->field_reAttemptIndicator.clean_up();
}
if (other_value.nBIFOM__Container().is_bound()) {
  if (other_value.nBIFOM__Container().ispresent()) single_value->field_nBIFOM__Container = other_value.nBIFOM__Container()();
  else single_value->field_nBIFOM__Container = OMIT_VALUE;
} else {
  single_value->field_nBIFOM__Container.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__ModifyPDPContextReject_template::copy_template(const PDU__SM__ModifyPDPContextReject_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.smCause().get_selection()) {
single_value->field_smCause = other_value.smCause();
} else {
single_value->field_smCause.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.protocolConfigOpts().get_selection()) {
single_value->field_protocolConfigOpts = other_value.protocolConfigOpts();
} else {
single_value->field_protocolConfigOpts.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.backOffTimer().get_selection()) {
single_value->field_backOffTimer = other_value.backOffTimer();
} else {
single_value->field_backOffTimer.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.reAttemptIndicator().get_selection()) {
single_value->field_reAttemptIndicator = other_value.reAttemptIndicator();
} else {
single_value->field_reAttemptIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nBIFOM__Container().get_selection()) {
single_value->field_nBIFOM__Container = other_value.nBIFOM__Container();
} else {
single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextReject_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__SM__ModifyPDPContextReject_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__ModifyPDPContextReject_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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
break;
}
set_selection(other_value);
}

PDU__SM__ModifyPDPContextReject_template::PDU__SM__ModifyPDPContextReject_template()
{
}

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

PDU__SM__ModifyPDPContextReject_template::PDU__SM__ModifyPDPContextReject_template(const PDU__SM__ModifyPDPContextReject& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__ModifyPDPContextReject_template& PDU__SM__ModifyPDPContextReject_template::operator=(const OPTIONAL<PDU__SM__ModifyPDPContextReject>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__ModifyPDPContextReject&)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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
}
return *this;
}

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

boolean PDU__SM__ModifyPDPContextReject_template::match(const PDU__SM__ModifyPDPContextReject& 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.smCause().is_bound()) return FALSE;
if(!single_value->field_smCause.match(other_value.smCause(), legacy))return FALSE;
if(!other_value.protocolConfigOpts().is_bound()) return FALSE;
if((other_value.protocolConfigOpts().ispresent() ? !single_value->field_protocolConfigOpts.match((const ProtocolConfigOptionsTLV&)other_value.protocolConfigOpts(), legacy) : !single_value->field_protocolConfigOpts.match_omit(legacy)))return FALSE;
if(!other_value.backOffTimer().is_bound()) return FALSE;
if((other_value.backOffTimer().ispresent() ? !single_value->field_backOffTimer.match((const MobileL3__CommonIE__Types::GPRSTimer3TLV&)other_value.backOffTimer(), legacy) : !single_value->field_backOffTimer.match_omit(legacy)))return FALSE;
if(!other_value.reAttemptIndicator().is_bound()) return FALSE;
if((other_value.reAttemptIndicator().ispresent() ? !single_value->field_reAttemptIndicator.match((const ReAttemptIndicatorTLV&)other_value.reAttemptIndicator(), legacy) : !single_value->field_reAttemptIndicator.match_omit(legacy)))return FALSE;
if(!other_value.nBIFOM__Container().is_bound()) return FALSE;
if((other_value.nBIFOM__Container().ispresent() ? !single_value->field_nBIFOM__Container.match((const NBIFOM__ContainerTLV&)other_value.nBIFOM__Container(), legacy) : !single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
}
return FALSE;
}

boolean PDU__SM__ModifyPDPContextReject_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_smCause.is_bound()
 || (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_bound())
 || (single_value->field_backOffTimer.is_omit() || single_value->field_backOffTimer.is_bound())
 || (single_value->field_reAttemptIndicator.is_omit() || single_value->field_reAttemptIndicator.is_bound())
 || (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_bound());
}

boolean PDU__SM__ModifyPDPContextReject_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_smCause.is_value()
 && (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_value())
 && (single_value->field_backOffTimer.is_omit() || single_value->field_backOffTimer.is_value())
 && (single_value->field_reAttemptIndicator.is_omit() || single_value->field_reAttemptIndicator.is_value())
 && (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_value());
}

void PDU__SM__ModifyPDPContextReject_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__SM__ModifyPDPContextReject PDU__SM__ModifyPDPContextReject_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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
PDU__SM__ModifyPDPContextReject ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_smCause.is_bound()) {
ret_val.smCause() = single_value->field_smCause.valueof();
}
if (single_value->field_protocolConfigOpts.is_omit()) ret_val.protocolConfigOpts() = OMIT_VALUE;
else if (single_value->field_protocolConfigOpts.is_bound()) {
ret_val.protocolConfigOpts() = single_value->field_protocolConfigOpts.valueof();
}
if (single_value->field_backOffTimer.is_omit()) ret_val.backOffTimer() = OMIT_VALUE;
else if (single_value->field_backOffTimer.is_bound()) {
ret_val.backOffTimer() = single_value->field_backOffTimer.valueof();
}
if (single_value->field_reAttemptIndicator.is_omit()) ret_val.reAttemptIndicator() = OMIT_VALUE;
else if (single_value->field_reAttemptIndicator.is_bound()) {
ret_val.reAttemptIndicator() = single_value->field_reAttemptIndicator.valueof();
}
if (single_value->field_nBIFOM__Container.is_omit()) ret_val.nBIFOM__Container() = OMIT_VALUE;
else if (single_value->field_nBIFOM__Container.is_bound()) {
ret_val.nBIFOM__Container() = single_value->field_nBIFOM__Container.valueof();
}
return ret_val;
}

void PDU__SM__ModifyPDPContextReject_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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__ModifyPDPContextReject_template[list_length];
}

PDU__SM__ModifyPDPContextReject_template& PDU__SM__ModifyPDPContextReject_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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
return value_list.list_value[list_index];
}

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

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

OCTETSTRING_template& PDU__SM__ModifyPDPContextReject_template::smCause()
{
set_specific();
return single_value->field_smCause;
}

const OCTETSTRING_template& PDU__SM__ModifyPDPContextReject_template::smCause() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field smCause of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
return single_value->field_smCause;
}

ProtocolConfigOptionsTLV_template& PDU__SM__ModifyPDPContextReject_template::protocolConfigOpts()
{
set_specific();
return single_value->field_protocolConfigOpts;
}

const ProtocolConfigOptionsTLV_template& PDU__SM__ModifyPDPContextReject_template::protocolConfigOpts() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field protocolConfigOpts of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
return single_value->field_protocolConfigOpts;
}

MobileL3__CommonIE__Types::GPRSTimer3TLV_template& PDU__SM__ModifyPDPContextReject_template::backOffTimer()
{
set_specific();
return single_value->field_backOffTimer;
}

const MobileL3__CommonIE__Types::GPRSTimer3TLV_template& PDU__SM__ModifyPDPContextReject_template::backOffTimer() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field backOffTimer of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
return single_value->field_backOffTimer;
}

ReAttemptIndicatorTLV_template& PDU__SM__ModifyPDPContextReject_template::reAttemptIndicator()
{
set_specific();
return single_value->field_reAttemptIndicator;
}

const ReAttemptIndicatorTLV_template& PDU__SM__ModifyPDPContextReject_template::reAttemptIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field reAttemptIndicator of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
return single_value->field_reAttemptIndicator;
}

NBIFOM__ContainerTLV_template& PDU__SM__ModifyPDPContextReject_template::nBIFOM__Container()
{
set_specific();
return single_value->field_nBIFOM__Container;
}

const NBIFOM__ContainerTLV_template& PDU__SM__ModifyPDPContextReject_template::nBIFOM__Container() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nBIFOM_Container of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
return single_value->field_nBIFOM__Container;
}

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

void PDU__SM__ModifyPDPContextReject_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(", smCause := ");
single_value->field_smCause.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", backOffTimer := ");
single_value->field_backOffTimer.log();
TTCN_Logger::log_event_str(", reAttemptIndicator := ");
single_value->field_reAttemptIndicator.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextReject_template::log_match(const PDU__SM__ModifyPDPContextReject& 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_smCause.match(match_value.smCause(), legacy)){
TTCN_Logger::log_logmatch_info(".smCause");
single_value->field_smCause.log_match(match_value.smCause(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.protocolConfigOpts().ispresent()){
if(!single_value->field_protocolConfigOpts.match(match_value.protocolConfigOpts(), legacy)){
TTCN_Logger::log_logmatch_info(".protocolConfigOpts");
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_protocolConfigOpts.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".protocolConfigOpts := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.backOffTimer().ispresent()){
if(!single_value->field_backOffTimer.match(match_value.backOffTimer(), legacy)){
TTCN_Logger::log_logmatch_info(".backOffTimer");
single_value->field_backOffTimer.log_match(match_value.backOffTimer(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_backOffTimer.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".backOffTimer := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_backOffTimer.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.reAttemptIndicator().ispresent()){
if(!single_value->field_reAttemptIndicator.match(match_value.reAttemptIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".reAttemptIndicator");
single_value->field_reAttemptIndicator.log_match(match_value.reAttemptIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_reAttemptIndicator.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".reAttemptIndicator := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_reAttemptIndicator.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nBIFOM__Container().ispresent()){
if(!single_value->field_nBIFOM__Container.match(match_value.nBIFOM__Container(), legacy)){
TTCN_Logger::log_logmatch_info(".nBIFOM_Container");
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nBIFOM__Container.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nBIFOM_Container := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nBIFOM__Container.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(", smCause := ");
single_value->field_smCause.log_match(match_value.smCause(), legacy);
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
if (match_value.protocolConfigOpts().ispresent()) {
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_protocolConfigOpts.log();
if (single_value->field_protocolConfigOpts.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", backOffTimer := ");
if (match_value.backOffTimer().ispresent()) {
single_value->field_backOffTimer.log_match(match_value.backOffTimer(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_backOffTimer.log();
if (single_value->field_backOffTimer.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", reAttemptIndicator := ");
if (match_value.reAttemptIndicator().ispresent()) {
single_value->field_reAttemptIndicator.log_match(match_value.reAttemptIndicator(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_reAttemptIndicator.log();
if (single_value->field_reAttemptIndicator.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
if (match_value.nBIFOM__Container().ispresent()) {
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nBIFOM__Container.log();
if (single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextReject_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_smCause.encode_text(text_buf);
single_value->field_protocolConfigOpts.encode_text(text_buf);
single_value->field_backOffTimer.encode_text(text_buf);
single_value->field_reAttemptIndicator.encode_text(text_buf);
single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
}
}

void PDU__SM__ModifyPDPContextReject_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_smCause.decode_text(text_buf);
single_value->field_protocolConfigOpts.decode_text(text_buf);
single_value->field_backOffTimer.decode_text(text_buf);
single_value->field_reAttemptIndicator.decode_text(text_buf);
single_value->field_nBIFOM__Container.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__SM__ModifyPDPContextReject_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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject.");
}
}

void PDU__SM__ModifyPDPContextReject_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__SM__ModifyPDPContextReject_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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject 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) smCause().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) backOffTimer().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) reAttemptIndicator().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "smCause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          smCause().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "backOffTimer")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          backOffTimer().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "reAttemptIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          reAttemptIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__ModifyPDPContextReject_template* precondition = new PDU__SM__ModifyPDPContextReject_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__ModifyPDPContextReject_template* implied_template = new PDU__SM__ModifyPDPContextReject_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__ModifyPDPContextReject_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextReject");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__ModifyPDPContextReject_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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject");
single_value->field_smCause.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextReject");
single_value->field_protocolConfigOpts.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextReject");
single_value->field_backOffTimer.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextReject");
single_value->field_reAttemptIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextReject");
single_value->field_nBIFOM__Container.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ModifyPDPContextReject");
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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject");
}

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

boolean PDU__SM__ModifyPDPContextReject_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__SM__DeactivatePDPContextRequest::PDU__SM__DeactivatePDPContextRequest()
{
}

PDU__SM__DeactivatePDPContextRequest::PDU__SM__DeactivatePDPContextRequest(const BITSTRING& par_messageType,
    const OCTETSTRING& par_smCause,
    const OPTIONAL< TearDownIndicatorTV >& par_tearDownIndicator,
    const OPTIONAL< ProtocolConfigOptionsTLV >& par_protocolConfigOpts,
    const OPTIONAL< MBMSProtocolConfigOptionsTLV >& par_mBMSprotocolConfigOptions,
    const OPTIONAL< MobileL3__CommonIE__Types::GPRSTimer3TLV >& par_t3396,
    const OPTIONAL< WLANOffloadAcceptabilityTV >& par_wLANOffloadIndication,
    const OPTIONAL< NBIFOM__ContainerTLV >& par_nBIFOM__Container)
  :   field_messageType(par_messageType),
  field_smCause(par_smCause),
  field_tearDownIndicator(par_tearDownIndicator),
  field_protocolConfigOpts(par_protocolConfigOpts),
  field_mBMSprotocolConfigOptions(par_mBMSprotocolConfigOptions),
  field_t3396(par_t3396),
  field_wLANOffloadIndication(par_wLANOffloadIndication),
  field_nBIFOM__Container(par_nBIFOM__Container)
{
}

PDU__SM__DeactivatePDPContextRequest::PDU__SM__DeactivatePDPContextRequest(const PDU__SM__DeactivatePDPContextRequest& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
else field_smCause.clean_up();
if (other_value.tearDownIndicator().is_bound()) field_tearDownIndicator = other_value.tearDownIndicator();
else field_tearDownIndicator.clean_up();
if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
else field_protocolConfigOpts.clean_up();
if (other_value.mBMSprotocolConfigOptions().is_bound()) field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
else field_mBMSprotocolConfigOptions.clean_up();
if (other_value.t3396().is_bound()) field_t3396 = other_value.t3396();
else field_t3396.clean_up();
if (other_value.wLANOffloadIndication().is_bound()) field_wLANOffloadIndication = other_value.wLANOffloadIndication();
else field_wLANOffloadIndication.clean_up();
if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
else field_nBIFOM__Container.clean_up();
}

void PDU__SM__DeactivatePDPContextRequest::clean_up()
{
field_messageType.clean_up();
field_smCause.clean_up();
field_tearDownIndicator.clean_up();
field_protocolConfigOpts.clean_up();
field_mBMSprotocolConfigOptions.clean_up();
field_t3396.clean_up();
field_wLANOffloadIndication.clean_up();
field_nBIFOM__Container.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__DeactivatePDPContextRequest::get_descriptor() const { return &PDU__SM__DeactivatePDPContextRequest_descr_; }
PDU__SM__DeactivatePDPContextRequest& PDU__SM__DeactivatePDPContextRequest::operator=(const PDU__SM__DeactivatePDPContextRequest& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
  else field_smCause.clean_up();
  if (other_value.tearDownIndicator().is_bound()) field_tearDownIndicator = other_value.tearDownIndicator();
  else field_tearDownIndicator.clean_up();
  if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
  else field_protocolConfigOpts.clean_up();
  if (other_value.mBMSprotocolConfigOptions().is_bound()) field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
  else field_mBMSprotocolConfigOptions.clean_up();
  if (other_value.t3396().is_bound()) field_t3396 = other_value.t3396();
  else field_t3396.clean_up();
  if (other_value.wLANOffloadIndication().is_bound()) field_wLANOffloadIndication = other_value.wLANOffloadIndication();
  else field_wLANOffloadIndication.clean_up();
  if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
  else field_nBIFOM__Container.clean_up();
}
return *this;
}

boolean PDU__SM__DeactivatePDPContextRequest::operator==(const PDU__SM__DeactivatePDPContextRequest& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_smCause==other_value.field_smCause
  && field_tearDownIndicator==other_value.field_tearDownIndicator
  && field_protocolConfigOpts==other_value.field_protocolConfigOpts
  && field_mBMSprotocolConfigOptions==other_value.field_mBMSprotocolConfigOptions
  && field_t3396==other_value.field_t3396
  && field_wLANOffloadIndication==other_value.field_wLANOffloadIndication
  && field_nBIFOM__Container==other_value.field_nBIFOM__Container;
}

boolean PDU__SM__DeactivatePDPContextRequest::is_bound() const
{
return (field_messageType.is_bound())
  || (field_smCause.is_bound())
  || (OPTIONAL_OMIT == field_tearDownIndicator.get_selection() || field_tearDownIndicator.is_bound())
  || (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_bound())
  || (OPTIONAL_OMIT == field_mBMSprotocolConfigOptions.get_selection() || field_mBMSprotocolConfigOptions.is_bound())
  || (OPTIONAL_OMIT == field_t3396.get_selection() || field_t3396.is_bound())
  || (OPTIONAL_OMIT == field_wLANOffloadIndication.get_selection() || field_wLANOffloadIndication.is_bound())
  || (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_bound());
}
boolean PDU__SM__DeactivatePDPContextRequest::is_value() const
{
return field_messageType.is_value()
  && field_smCause.is_value()
  && (OPTIONAL_OMIT == field_tearDownIndicator.get_selection() || field_tearDownIndicator.is_value())
  && (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_value())
  && (OPTIONAL_OMIT == field_mBMSprotocolConfigOptions.get_selection() || field_mBMSprotocolConfigOptions.is_value())
  && (OPTIONAL_OMIT == field_t3396.get_selection() || field_t3396.is_value())
  && (OPTIONAL_OMIT == field_wLANOffloadIndication.get_selection() || field_wLANOffloadIndication.is_value())
  && (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_value());
}
int PDU__SM__DeactivatePDPContextRequest::size_of() const
{
  int ret_val = 2;
  if (field_tearDownIndicator.ispresent()) ret_val++;
  if (field_protocolConfigOpts.ispresent()) ret_val++;
  if (field_mBMSprotocolConfigOptions.ispresent()) ret_val++;
  if (field_t3396.ispresent()) ret_val++;
  if (field_wLANOffloadIndication.ispresent()) ret_val++;
  if (field_nBIFOM__Container.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__DeactivatePDPContextRequest::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(", smCause := ");
field_smCause.log();
TTCN_Logger::log_event_str(", tearDownIndicator := ");
field_tearDownIndicator.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
field_mBMSprotocolConfigOptions.log();
TTCN_Logger::log_event_str(", t3396 := ");
field_t3396.log();
TTCN_Logger::log_event_str(", wLANOffloadIndication := ");
field_wLANOffloadIndication.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
field_nBIFOM__Container.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__DeactivatePDPContextRequest::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (smCause().is_bound()) smCause().set_implicit_omit();
if (!tearDownIndicator().is_bound()) tearDownIndicator() = OMIT_VALUE;
else tearDownIndicator().set_implicit_omit();
if (!protocolConfigOpts().is_bound()) protocolConfigOpts() = OMIT_VALUE;
else protocolConfigOpts().set_implicit_omit();
if (!mBMSprotocolConfigOptions().is_bound()) mBMSprotocolConfigOptions() = OMIT_VALUE;
else mBMSprotocolConfigOptions().set_implicit_omit();
if (!t3396().is_bound()) t3396() = OMIT_VALUE;
else t3396().set_implicit_omit();
if (!wLANOffloadIndication().is_bound()) wLANOffloadIndication() = OMIT_VALUE;
else wLANOffloadIndication().set_implicit_omit();
if (!nBIFOM__Container().is_bound()) nBIFOM__Container() = OMIT_VALUE;
else nBIFOM__Container().set_implicit_omit();
}

void PDU__SM__DeactivatePDPContextRequest::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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest 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) smCause().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) tearDownIndicator().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) mBMSprotocolConfigOptions().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) t3396().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) wLANOffloadIndication().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "smCause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          smCause().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tearDownIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tearDownIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMSprotocolConfigOptions")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMSprotocolConfigOptions().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "t3396")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3396().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "wLANOffloadIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          wLANOffloadIndication().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest");
  }
}

void PDU__SM__DeactivatePDPContextRequest::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_smCause.encode_text(text_buf);
field_tearDownIndicator.encode_text(text_buf);
field_protocolConfigOpts.encode_text(text_buf);
field_mBMSprotocolConfigOptions.encode_text(text_buf);
field_t3396.encode_text(text_buf);
field_wLANOffloadIndication.encode_text(text_buf);
field_nBIFOM__Container.encode_text(text_buf);
}

void PDU__SM__DeactivatePDPContextRequest::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_smCause.decode_text(text_buf);
field_tearDownIndicator.decode_text(text_buf);
field_protocolConfigOpts.decode_text(text_buf);
field_mBMSprotocolConfigOptions.decode_text(text_buf);
field_t3396.decode_text(text_buf);
field_wLANOffloadIndication.decode_text(text_buf);
field_nBIFOM__Container.decode_text(text_buf);
}

void PDU__SM__DeactivatePDPContextRequest::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__DeactivatePDPContextRequest::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__DeactivatePDPContextRequest::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, SMCauseV_descr_.raw->forceomit);
  decoded_field_length = field_smCause.RAW_decode(SMCauseV_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_tearDownIndicator = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, TearDownIndicatorTV_descr_.raw->forceomit);
  decoded_field_length = field_tearDownIndicator().RAW_decode(TearDownIndicatorTV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_tearDownIndicator = 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_tearDownIndicator=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_protocolConfigOpts = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, ProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_protocolConfigOpts().RAW_decode(ProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_protocolConfigOpts = 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_protocolConfigOpts=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_mBMSprotocolConfigOptions = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, MBMSProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_mBMSprotocolConfigOptions().RAW_decode(MBMSProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_mBMSprotocolConfigOptions = 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_mBMSprotocolConfigOptions=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_t3396 = 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::GPRSTimer3TLV_descr_.raw->forceomit);
  decoded_field_length = field_t3396().RAW_decode(MobileL3__CommonIE__Types::GPRSTimer3TLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_t3396 = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_t3396.ispresent() || field_t3396().elementIdentifier() !=  os_33){
  field_t3396=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_t3396=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_wLANOffloadIndication = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, WLANOffloadAcceptabilityTV_descr_.raw->forceomit);
  decoded_field_length = field_wLANOffloadIndication().RAW_decode(WLANOffloadAcceptabilityTV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_wLANOffloadIndication = 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_wLANOffloadIndication=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(7)) {
    field_nBIFOM__Container = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_7_force_omit(7, force_omit, NBIFOM__ContainerTLV_descr_.raw->forceomit);
  decoded_field_length = field_nBIFOM__Container().RAW_decode(NBIFOM__ContainerTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 1) {
  field_nBIFOM__Container = 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_nBIFOM__Container=OMIT_VALUE;
  if (field_messageType !=  bs_64) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__DeactivatePDPContextRequest::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, SMCauseV_descr_.raw);
  if (field_tearDownIndicator.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, TearDownIndicatorTV_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_protocolConfigOpts.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, ProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_mBMSprotocolConfigOptions.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, MBMSProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_t3396.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, MobileL3__CommonIE__Types::GPRSTimer3TLV_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_wLANOffloadIndication.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, WLANOffloadAcceptabilityTV_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  if (field_nBIFOM__Container.ispresent()) {
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, NBIFOM__ContainerTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[7] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_smCause.RAW_encode(SMCauseV_descr_, *myleaf.body.node.nodes[1]);
  if (field_tearDownIndicator.ispresent()) {
  encoded_length += field_tearDownIndicator().RAW_encode(TearDownIndicatorTV_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_protocolConfigOpts.ispresent()) {
  encoded_length += field_protocolConfigOpts().RAW_encode(ProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_mBMSprotocolConfigOptions.ispresent()) {
  encoded_length += field_mBMSprotocolConfigOptions().RAW_encode(MBMSProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_t3396.ispresent()) {
  encoded_length += field_t3396().RAW_encode(MobileL3__CommonIE__Types::GPRSTimer3TLV_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_wLANOffloadIndication.ispresent()) {
  encoded_length += field_wLANOffloadIndication().RAW_encode(WLANOffloadAcceptabilityTV_descr_, *myleaf.body.node.nodes[6]);
  }
  if (field_nBIFOM__Container.ispresent()) {
  encoded_length += field_nBIFOM__Container().RAW_encode(NBIFOM__ContainerTLV_descr_, *myleaf.body.node.nodes[7]);
  }
  if (field_t3396.ispresent() && (!field_t3396.ispresent() || field_t3396().elementIdentifier() !=  os_33)) {
  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_33.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_messageType !=  bs_64) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_64.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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__DeactivatePDPContextRequest_template::single_value_struct {
BITSTRING_template field_messageType;
OCTETSTRING_template field_smCause;
TearDownIndicatorTV_template field_tearDownIndicator;
ProtocolConfigOptionsTLV_template field_protocolConfigOpts;
MBMSProtocolConfigOptionsTLV_template field_mBMSprotocolConfigOptions;
MobileL3__CommonIE__Types::GPRSTimer3TLV_template field_t3396;
WLANOffloadAcceptabilityTV_template field_wLANOffloadIndication;
NBIFOM__ContainerTLV_template field_nBIFOM__Container;
};

void PDU__SM__DeactivatePDPContextRequest_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_smCause = ANY_VALUE;
single_value->field_tearDownIndicator = ANY_OR_OMIT;
single_value->field_protocolConfigOpts = ANY_OR_OMIT;
single_value->field_mBMSprotocolConfigOptions = ANY_OR_OMIT;
single_value->field_t3396 = ANY_OR_OMIT;
single_value->field_wLANOffloadIndication = ANY_OR_OMIT;
single_value->field_nBIFOM__Container = ANY_OR_OMIT;
}
}
}

void PDU__SM__DeactivatePDPContextRequest_template::copy_value(const PDU__SM__DeactivatePDPContextRequest& 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.smCause().is_bound()) {
  single_value->field_smCause = other_value.smCause();
} else {
  single_value->field_smCause.clean_up();
}
if (other_value.tearDownIndicator().is_bound()) {
  if (other_value.tearDownIndicator().ispresent()) single_value->field_tearDownIndicator = other_value.tearDownIndicator()();
  else single_value->field_tearDownIndicator = OMIT_VALUE;
} else {
  single_value->field_tearDownIndicator.clean_up();
}
if (other_value.protocolConfigOpts().is_bound()) {
  if (other_value.protocolConfigOpts().ispresent()) single_value->field_protocolConfigOpts = other_value.protocolConfigOpts()();
  else single_value->field_protocolConfigOpts = OMIT_VALUE;
} else {
  single_value->field_protocolConfigOpts.clean_up();
}
if (other_value.mBMSprotocolConfigOptions().is_bound()) {
  if (other_value.mBMSprotocolConfigOptions().ispresent()) single_value->field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions()();
  else single_value->field_mBMSprotocolConfigOptions = OMIT_VALUE;
} else {
  single_value->field_mBMSprotocolConfigOptions.clean_up();
}
if (other_value.t3396().is_bound()) {
  if (other_value.t3396().ispresent()) single_value->field_t3396 = other_value.t3396()();
  else single_value->field_t3396 = OMIT_VALUE;
} else {
  single_value->field_t3396.clean_up();
}
if (other_value.wLANOffloadIndication().is_bound()) {
  if (other_value.wLANOffloadIndication().ispresent()) single_value->field_wLANOffloadIndication = other_value.wLANOffloadIndication()();
  else single_value->field_wLANOffloadIndication = OMIT_VALUE;
} else {
  single_value->field_wLANOffloadIndication.clean_up();
}
if (other_value.nBIFOM__Container().is_bound()) {
  if (other_value.nBIFOM__Container().ispresent()) single_value->field_nBIFOM__Container = other_value.nBIFOM__Container()();
  else single_value->field_nBIFOM__Container = OMIT_VALUE;
} else {
  single_value->field_nBIFOM__Container.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__DeactivatePDPContextRequest_template::copy_template(const PDU__SM__DeactivatePDPContextRequest_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.smCause().get_selection()) {
single_value->field_smCause = other_value.smCause();
} else {
single_value->field_smCause.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.tearDownIndicator().get_selection()) {
single_value->field_tearDownIndicator = other_value.tearDownIndicator();
} else {
single_value->field_tearDownIndicator.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.protocolConfigOpts().get_selection()) {
single_value->field_protocolConfigOpts = other_value.protocolConfigOpts();
} else {
single_value->field_protocolConfigOpts.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mBMSprotocolConfigOptions().get_selection()) {
single_value->field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
} else {
single_value->field_mBMSprotocolConfigOptions.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.t3396().get_selection()) {
single_value->field_t3396 = other_value.t3396();
} else {
single_value->field_t3396.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.wLANOffloadIndication().get_selection()) {
single_value->field_wLANOffloadIndication = other_value.wLANOffloadIndication();
} else {
single_value->field_wLANOffloadIndication.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nBIFOM__Container().get_selection()) {
single_value->field_nBIFOM__Container = other_value.nBIFOM__Container();
} else {
single_value->field_nBIFOM__Container.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__SM__DeactivatePDPContextRequest_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__SM__DeactivatePDPContextRequest_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__DeactivatePDPContextRequest_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
break;
}
set_selection(other_value);
}

PDU__SM__DeactivatePDPContextRequest_template::PDU__SM__DeactivatePDPContextRequest_template()
{
}

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

PDU__SM__DeactivatePDPContextRequest_template::PDU__SM__DeactivatePDPContextRequest_template(const PDU__SM__DeactivatePDPContextRequest& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__DeactivatePDPContextRequest_template& PDU__SM__DeactivatePDPContextRequest_template::operator=(const OPTIONAL<PDU__SM__DeactivatePDPContextRequest>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__DeactivatePDPContextRequest&)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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
}
return *this;
}

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

boolean PDU__SM__DeactivatePDPContextRequest_template::match(const PDU__SM__DeactivatePDPContextRequest& 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.smCause().is_bound()) return FALSE;
if(!single_value->field_smCause.match(other_value.smCause(), legacy))return FALSE;
if(!other_value.tearDownIndicator().is_bound()) return FALSE;
if((other_value.tearDownIndicator().ispresent() ? !single_value->field_tearDownIndicator.match((const TearDownIndicatorTV&)other_value.tearDownIndicator(), legacy) : !single_value->field_tearDownIndicator.match_omit(legacy)))return FALSE;
if(!other_value.protocolConfigOpts().is_bound()) return FALSE;
if((other_value.protocolConfigOpts().ispresent() ? !single_value->field_protocolConfigOpts.match((const ProtocolConfigOptionsTLV&)other_value.protocolConfigOpts(), legacy) : !single_value->field_protocolConfigOpts.match_omit(legacy)))return FALSE;
if(!other_value.mBMSprotocolConfigOptions().is_bound()) return FALSE;
if((other_value.mBMSprotocolConfigOptions().ispresent() ? !single_value->field_mBMSprotocolConfigOptions.match((const MBMSProtocolConfigOptionsTLV&)other_value.mBMSprotocolConfigOptions(), legacy) : !single_value->field_mBMSprotocolConfigOptions.match_omit(legacy)))return FALSE;
if(!other_value.t3396().is_bound()) return FALSE;
if((other_value.t3396().ispresent() ? !single_value->field_t3396.match((const MobileL3__CommonIE__Types::GPRSTimer3TLV&)other_value.t3396(), legacy) : !single_value->field_t3396.match_omit(legacy)))return FALSE;
if(!other_value.wLANOffloadIndication().is_bound()) return FALSE;
if((other_value.wLANOffloadIndication().ispresent() ? !single_value->field_wLANOffloadIndication.match((const WLANOffloadAcceptabilityTV&)other_value.wLANOffloadIndication(), legacy) : !single_value->field_wLANOffloadIndication.match_omit(legacy)))return FALSE;
if(!other_value.nBIFOM__Container().is_bound()) return FALSE;
if((other_value.nBIFOM__Container().ispresent() ? !single_value->field_nBIFOM__Container.match((const NBIFOM__ContainerTLV&)other_value.nBIFOM__Container(), legacy) : !single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
}
return FALSE;
}

boolean PDU__SM__DeactivatePDPContextRequest_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_smCause.is_bound()
 || (single_value->field_tearDownIndicator.is_omit() || single_value->field_tearDownIndicator.is_bound())
 || (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_bound())
 || (single_value->field_mBMSprotocolConfigOptions.is_omit() || single_value->field_mBMSprotocolConfigOptions.is_bound())
 || (single_value->field_t3396.is_omit() || single_value->field_t3396.is_bound())
 || (single_value->field_wLANOffloadIndication.is_omit() || single_value->field_wLANOffloadIndication.is_bound())
 || (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_bound());
}

boolean PDU__SM__DeactivatePDPContextRequest_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_smCause.is_value()
 && (single_value->field_tearDownIndicator.is_omit() || single_value->field_tearDownIndicator.is_value())
 && (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_value())
 && (single_value->field_mBMSprotocolConfigOptions.is_omit() || single_value->field_mBMSprotocolConfigOptions.is_value())
 && (single_value->field_t3396.is_omit() || single_value->field_t3396.is_value())
 && (single_value->field_wLANOffloadIndication.is_omit() || single_value->field_wLANOffloadIndication.is_value())
 && (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_value());
}

void PDU__SM__DeactivatePDPContextRequest_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__SM__DeactivatePDPContextRequest PDU__SM__DeactivatePDPContextRequest_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
PDU__SM__DeactivatePDPContextRequest ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_smCause.is_bound()) {
ret_val.smCause() = single_value->field_smCause.valueof();
}
if (single_value->field_tearDownIndicator.is_omit()) ret_val.tearDownIndicator() = OMIT_VALUE;
else if (single_value->field_tearDownIndicator.is_bound()) {
ret_val.tearDownIndicator() = single_value->field_tearDownIndicator.valueof();
}
if (single_value->field_protocolConfigOpts.is_omit()) ret_val.protocolConfigOpts() = OMIT_VALUE;
else if (single_value->field_protocolConfigOpts.is_bound()) {
ret_val.protocolConfigOpts() = single_value->field_protocolConfigOpts.valueof();
}
if (single_value->field_mBMSprotocolConfigOptions.is_omit()) ret_val.mBMSprotocolConfigOptions() = OMIT_VALUE;
else if (single_value->field_mBMSprotocolConfigOptions.is_bound()) {
ret_val.mBMSprotocolConfigOptions() = single_value->field_mBMSprotocolConfigOptions.valueof();
}
if (single_value->field_t3396.is_omit()) ret_val.t3396() = OMIT_VALUE;
else if (single_value->field_t3396.is_bound()) {
ret_val.t3396() = single_value->field_t3396.valueof();
}
if (single_value->field_wLANOffloadIndication.is_omit()) ret_val.wLANOffloadIndication() = OMIT_VALUE;
else if (single_value->field_wLANOffloadIndication.is_bound()) {
ret_val.wLANOffloadIndication() = single_value->field_wLANOffloadIndication.valueof();
}
if (single_value->field_nBIFOM__Container.is_omit()) ret_val.nBIFOM__Container() = OMIT_VALUE;
else if (single_value->field_nBIFOM__Container.is_bound()) {
ret_val.nBIFOM__Container() = single_value->field_nBIFOM__Container.valueof();
}
return ret_val;
}

void PDU__SM__DeactivatePDPContextRequest_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__DeactivatePDPContextRequest_template[list_length];
}

PDU__SM__DeactivatePDPContextRequest_template& PDU__SM__DeactivatePDPContextRequest_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
return value_list.list_value[list_index];
}

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

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

OCTETSTRING_template& PDU__SM__DeactivatePDPContextRequest_template::smCause()
{
set_specific();
return single_value->field_smCause;
}

const OCTETSTRING_template& PDU__SM__DeactivatePDPContextRequest_template::smCause() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field smCause of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
return single_value->field_smCause;
}

TearDownIndicatorTV_template& PDU__SM__DeactivatePDPContextRequest_template::tearDownIndicator()
{
set_specific();
return single_value->field_tearDownIndicator;
}

const TearDownIndicatorTV_template& PDU__SM__DeactivatePDPContextRequest_template::tearDownIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tearDownIndicator of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
return single_value->field_tearDownIndicator;
}

ProtocolConfigOptionsTLV_template& PDU__SM__DeactivatePDPContextRequest_template::protocolConfigOpts()
{
set_specific();
return single_value->field_protocolConfigOpts;
}

const ProtocolConfigOptionsTLV_template& PDU__SM__DeactivatePDPContextRequest_template::protocolConfigOpts() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field protocolConfigOpts of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
return single_value->field_protocolConfigOpts;
}

MBMSProtocolConfigOptionsTLV_template& PDU__SM__DeactivatePDPContextRequest_template::mBMSprotocolConfigOptions()
{
set_specific();
return single_value->field_mBMSprotocolConfigOptions;
}

const MBMSProtocolConfigOptionsTLV_template& PDU__SM__DeactivatePDPContextRequest_template::mBMSprotocolConfigOptions() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mBMSprotocolConfigOptions of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
return single_value->field_mBMSprotocolConfigOptions;
}

MobileL3__CommonIE__Types::GPRSTimer3TLV_template& PDU__SM__DeactivatePDPContextRequest_template::t3396()
{
set_specific();
return single_value->field_t3396;
}

const MobileL3__CommonIE__Types::GPRSTimer3TLV_template& PDU__SM__DeactivatePDPContextRequest_template::t3396() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field t3396 of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
return single_value->field_t3396;
}

WLANOffloadAcceptabilityTV_template& PDU__SM__DeactivatePDPContextRequest_template::wLANOffloadIndication()
{
set_specific();
return single_value->field_wLANOffloadIndication;
}

const WLANOffloadAcceptabilityTV_template& PDU__SM__DeactivatePDPContextRequest_template::wLANOffloadIndication() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field wLANOffloadIndication of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
return single_value->field_wLANOffloadIndication;
}

NBIFOM__ContainerTLV_template& PDU__SM__DeactivatePDPContextRequest_template::nBIFOM__Container()
{
set_specific();
return single_value->field_nBIFOM__Container;
}

const NBIFOM__ContainerTLV_template& PDU__SM__DeactivatePDPContextRequest_template::nBIFOM__Container() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nBIFOM_Container of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
return single_value->field_nBIFOM__Container;
}

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

void PDU__SM__DeactivatePDPContextRequest_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(", smCause := ");
single_value->field_smCause.log();
TTCN_Logger::log_event_str(", tearDownIndicator := ");
single_value->field_tearDownIndicator.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
single_value->field_mBMSprotocolConfigOptions.log();
TTCN_Logger::log_event_str(", t3396 := ");
single_value->field_t3396.log();
TTCN_Logger::log_event_str(", wLANOffloadIndication := ");
single_value->field_wLANOffloadIndication.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
single_value->field_nBIFOM__Container.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__SM__DeactivatePDPContextRequest_template::log_match(const PDU__SM__DeactivatePDPContextRequest& 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_smCause.match(match_value.smCause(), legacy)){
TTCN_Logger::log_logmatch_info(".smCause");
single_value->field_smCause.log_match(match_value.smCause(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.tearDownIndicator().ispresent()){
if(!single_value->field_tearDownIndicator.match(match_value.tearDownIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".tearDownIndicator");
single_value->field_tearDownIndicator.log_match(match_value.tearDownIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_tearDownIndicator.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".tearDownIndicator := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_tearDownIndicator.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.protocolConfigOpts().ispresent()){
if(!single_value->field_protocolConfigOpts.match(match_value.protocolConfigOpts(), legacy)){
TTCN_Logger::log_logmatch_info(".protocolConfigOpts");
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_protocolConfigOpts.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".protocolConfigOpts := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.mBMSprotocolConfigOptions().ispresent()){
if(!single_value->field_mBMSprotocolConfigOptions.match(match_value.mBMSprotocolConfigOptions(), legacy)){
TTCN_Logger::log_logmatch_info(".mBMSprotocolConfigOptions");
single_value->field_mBMSprotocolConfigOptions.log_match(match_value.mBMSprotocolConfigOptions(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_mBMSprotocolConfigOptions.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".mBMSprotocolConfigOptions := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_mBMSprotocolConfigOptions.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.t3396().ispresent()){
if(!single_value->field_t3396.match(match_value.t3396(), legacy)){
TTCN_Logger::log_logmatch_info(".t3396");
single_value->field_t3396.log_match(match_value.t3396(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_t3396.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".t3396 := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_t3396.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.wLANOffloadIndication().ispresent()){
if(!single_value->field_wLANOffloadIndication.match(match_value.wLANOffloadIndication(), legacy)){
TTCN_Logger::log_logmatch_info(".wLANOffloadIndication");
single_value->field_wLANOffloadIndication.log_match(match_value.wLANOffloadIndication(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_wLANOffloadIndication.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".wLANOffloadIndication := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_wLANOffloadIndication.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nBIFOM__Container().ispresent()){
if(!single_value->field_nBIFOM__Container.match(match_value.nBIFOM__Container(), legacy)){
TTCN_Logger::log_logmatch_info(".nBIFOM_Container");
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nBIFOM__Container.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nBIFOM_Container := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nBIFOM__Container.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(", smCause := ");
single_value->field_smCause.log_match(match_value.smCause(), legacy);
TTCN_Logger::log_event_str(", tearDownIndicator := ");
if (match_value.tearDownIndicator().ispresent()) {
single_value->field_tearDownIndicator.log_match(match_value.tearDownIndicator(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_tearDownIndicator.log();
if (single_value->field_tearDownIndicator.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
if (match_value.protocolConfigOpts().ispresent()) {
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_protocolConfigOpts.log();
if (single_value->field_protocolConfigOpts.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
if (match_value.mBMSprotocolConfigOptions().ispresent()) {
single_value->field_mBMSprotocolConfigOptions.log_match(match_value.mBMSprotocolConfigOptions(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_mBMSprotocolConfigOptions.log();
if (single_value->field_mBMSprotocolConfigOptions.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", t3396 := ");
if (match_value.t3396().ispresent()) {
single_value->field_t3396.log_match(match_value.t3396(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_t3396.log();
if (single_value->field_t3396.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", wLANOffloadIndication := ");
if (match_value.wLANOffloadIndication().ispresent()) {
single_value->field_wLANOffloadIndication.log_match(match_value.wLANOffloadIndication(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_wLANOffloadIndication.log();
if (single_value->field_wLANOffloadIndication.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
if (match_value.nBIFOM__Container().ispresent()) {
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nBIFOM__Container.log();
if (single_value->field_nBIFOM__Container.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__SM__DeactivatePDPContextRequest_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_smCause.encode_text(text_buf);
single_value->field_tearDownIndicator.encode_text(text_buf);
single_value->field_protocolConfigOpts.encode_text(text_buf);
single_value->field_mBMSprotocolConfigOptions.encode_text(text_buf);
single_value->field_t3396.encode_text(text_buf);
single_value->field_wLANOffloadIndication.encode_text(text_buf);
single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
}
}

void PDU__SM__DeactivatePDPContextRequest_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_smCause.decode_text(text_buf);
single_value->field_tearDownIndicator.decode_text(text_buf);
single_value->field_protocolConfigOpts.decode_text(text_buf);
single_value->field_mBMSprotocolConfigOptions.decode_text(text_buf);
single_value->field_t3396.decode_text(text_buf);
single_value->field_wLANOffloadIndication.decode_text(text_buf);
single_value->field_nBIFOM__Container.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__SM__DeactivatePDPContextRequest_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest.");
}
}

void PDU__SM__DeactivatePDPContextRequest_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__SM__DeactivatePDPContextRequest_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest 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) smCause().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) tearDownIndicator().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) mBMSprotocolConfigOptions().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) t3396().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) wLANOffloadIndication().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "smCause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          smCause().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tearDownIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tearDownIndicator().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMSprotocolConfigOptions")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMSprotocolConfigOptions().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "t3396")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          t3396().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "wLANOffloadIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          wLANOffloadIndication().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__DeactivatePDPContextRequest_template* precondition = new PDU__SM__DeactivatePDPContextRequest_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__DeactivatePDPContextRequest_template* implied_template = new PDU__SM__DeactivatePDPContextRequest_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__DeactivatePDPContextRequest_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__DeactivatePDPContextRequest_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest");
single_value->field_smCause.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest");
single_value->field_tearDownIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest");
single_value->field_protocolConfigOpts.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest");
single_value->field_mBMSprotocolConfigOptions.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest");
single_value->field_t3396.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest");
single_value->field_wLANOffloadIndication.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest");
single_value->field_nBIFOM__Container.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest");
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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest");
}

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

boolean PDU__SM__DeactivatePDPContextRequest_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__SM__DeactivatePDPContextAccept::PDU__SM__DeactivatePDPContextAccept()
{
}

PDU__SM__DeactivatePDPContextAccept::PDU__SM__DeactivatePDPContextAccept(const BITSTRING& par_messageType,
    const OPTIONAL< ProtocolConfigOptionsTLV >& par_protocolConfigOpts,
    const OPTIONAL< MBMSProtocolConfigOptionsTLV >& par_mBMSprotocolConfigOptions,
    const OPTIONAL< NBIFOM__ContainerTLV >& par_nBIFOM__Container)
  :   field_messageType(par_messageType),
  field_protocolConfigOpts(par_protocolConfigOpts),
  field_mBMSprotocolConfigOptions(par_mBMSprotocolConfigOptions),
  field_nBIFOM__Container(par_nBIFOM__Container)
{
}

PDU__SM__DeactivatePDPContextAccept::PDU__SM__DeactivatePDPContextAccept(const PDU__SM__DeactivatePDPContextAccept& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
else field_protocolConfigOpts.clean_up();
if (other_value.mBMSprotocolConfigOptions().is_bound()) field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
else field_mBMSprotocolConfigOptions.clean_up();
if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
else field_nBIFOM__Container.clean_up();
}

void PDU__SM__DeactivatePDPContextAccept::clean_up()
{
field_messageType.clean_up();
field_protocolConfigOpts.clean_up();
field_mBMSprotocolConfigOptions.clean_up();
field_nBIFOM__Container.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__DeactivatePDPContextAccept::get_descriptor() const { return &PDU__SM__DeactivatePDPContextAccept_descr_; }
PDU__SM__DeactivatePDPContextAccept& PDU__SM__DeactivatePDPContextAccept::operator=(const PDU__SM__DeactivatePDPContextAccept& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
  else field_protocolConfigOpts.clean_up();
  if (other_value.mBMSprotocolConfigOptions().is_bound()) field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
  else field_mBMSprotocolConfigOptions.clean_up();
  if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
  else field_nBIFOM__Container.clean_up();
}
return *this;
}

boolean PDU__SM__DeactivatePDPContextAccept::operator==(const PDU__SM__DeactivatePDPContextAccept& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_protocolConfigOpts==other_value.field_protocolConfigOpts
  && field_mBMSprotocolConfigOptions==other_value.field_mBMSprotocolConfigOptions
  && field_nBIFOM__Container==other_value.field_nBIFOM__Container;
}

boolean PDU__SM__DeactivatePDPContextAccept::is_bound() const
{
return (field_messageType.is_bound())
  || (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_bound())
  || (OPTIONAL_OMIT == field_mBMSprotocolConfigOptions.get_selection() || field_mBMSprotocolConfigOptions.is_bound())
  || (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_bound());
}
boolean PDU__SM__DeactivatePDPContextAccept::is_value() const
{
return field_messageType.is_value()
  && (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_value())
  && (OPTIONAL_OMIT == field_mBMSprotocolConfigOptions.get_selection() || field_mBMSprotocolConfigOptions.is_value())
  && (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_value());
}
int PDU__SM__DeactivatePDPContextAccept::size_of() const
{
  int ret_val = 1;
  if (field_protocolConfigOpts.ispresent()) ret_val++;
  if (field_mBMSprotocolConfigOptions.ispresent()) ret_val++;
  if (field_nBIFOM__Container.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__DeactivatePDPContextAccept::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(", protocolConfigOpts := ");
field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
field_mBMSprotocolConfigOptions.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
field_nBIFOM__Container.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__DeactivatePDPContextAccept::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (!protocolConfigOpts().is_bound()) protocolConfigOpts() = OMIT_VALUE;
else protocolConfigOpts().set_implicit_omit();
if (!mBMSprotocolConfigOptions().is_bound()) mBMSprotocolConfigOptions() = OMIT_VALUE;
else mBMSprotocolConfigOptions().set_implicit_omit();
if (!nBIFOM__Container().is_bound()) nBIFOM__Container() = OMIT_VALUE;
else nBIFOM__Container().set_implicit_omit();
}

void PDU__SM__DeactivatePDPContextAccept::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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept 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) protocolConfigOpts().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) mBMSprotocolConfigOptions().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMSprotocolConfigOptions")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMSprotocolConfigOptions().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept");
  }
}

void PDU__SM__DeactivatePDPContextAccept::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_protocolConfigOpts.encode_text(text_buf);
field_mBMSprotocolConfigOptions.encode_text(text_buf);
field_nBIFOM__Container.encode_text(text_buf);
}

void PDU__SM__DeactivatePDPContextAccept::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_protocolConfigOpts.decode_text(text_buf);
field_mBMSprotocolConfigOptions.decode_text(text_buf);
field_nBIFOM__Container.decode_text(text_buf);
}

void PDU__SM__DeactivatePDPContextAccept::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__DeactivatePDPContextAccept::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__DeactivatePDPContextAccept::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_protocolConfigOpts = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_1_force_omit(1, force_omit, ProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_protocolConfigOpts().RAW_decode(ProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_1_force_omit);
  if (decoded_field_length < 1) {
  field_protocolConfigOpts = 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_protocolConfigOpts=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(2)) {
    field_mBMSprotocolConfigOptions = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, MBMSProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_mBMSprotocolConfigOptions().RAW_decode(MBMSProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_mBMSprotocolConfigOptions = 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_mBMSprotocolConfigOptions=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_nBIFOM__Container = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, NBIFOM__ContainerTLV_descr_.raw->forceomit);
  decoded_field_length = field_nBIFOM__Container().RAW_decode(NBIFOM__ContainerTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_nBIFOM__Container = 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_nBIFOM__Container=OMIT_VALUE;
  if (field_messageType !=  bs_65) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__DeactivatePDPContextAccept::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);
  if (field_protocolConfigOpts.ispresent()) {
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, ProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[1] = NULL;
  if (field_mBMSprotocolConfigOptions.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, MBMSProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_nBIFOM__Container.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, NBIFOM__ContainerTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  if (field_protocolConfigOpts.ispresent()) {
  encoded_length += field_protocolConfigOpts().RAW_encode(ProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[1]);
  }
  if (field_mBMSprotocolConfigOptions.ispresent()) {
  encoded_length += field_mBMSprotocolConfigOptions().RAW_encode(MBMSProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_nBIFOM__Container.ispresent()) {
  encoded_length += field_nBIFOM__Container().RAW_encode(NBIFOM__ContainerTLV_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_messageType !=  bs_65) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_65.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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__DeactivatePDPContextAccept_template::single_value_struct {
BITSTRING_template field_messageType;
ProtocolConfigOptionsTLV_template field_protocolConfigOpts;
MBMSProtocolConfigOptionsTLV_template field_mBMSprotocolConfigOptions;
NBIFOM__ContainerTLV_template field_nBIFOM__Container;
};

void PDU__SM__DeactivatePDPContextAccept_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_protocolConfigOpts = ANY_OR_OMIT;
single_value->field_mBMSprotocolConfigOptions = ANY_OR_OMIT;
single_value->field_nBIFOM__Container = ANY_OR_OMIT;
}
}
}

void PDU__SM__DeactivatePDPContextAccept_template::copy_value(const PDU__SM__DeactivatePDPContextAccept& 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.protocolConfigOpts().is_bound()) {
  if (other_value.protocolConfigOpts().ispresent()) single_value->field_protocolConfigOpts = other_value.protocolConfigOpts()();
  else single_value->field_protocolConfigOpts = OMIT_VALUE;
} else {
  single_value->field_protocolConfigOpts.clean_up();
}
if (other_value.mBMSprotocolConfigOptions().is_bound()) {
  if (other_value.mBMSprotocolConfigOptions().ispresent()) single_value->field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions()();
  else single_value->field_mBMSprotocolConfigOptions = OMIT_VALUE;
} else {
  single_value->field_mBMSprotocolConfigOptions.clean_up();
}
if (other_value.nBIFOM__Container().is_bound()) {
  if (other_value.nBIFOM__Container().ispresent()) single_value->field_nBIFOM__Container = other_value.nBIFOM__Container()();
  else single_value->field_nBIFOM__Container = OMIT_VALUE;
} else {
  single_value->field_nBIFOM__Container.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__DeactivatePDPContextAccept_template::copy_template(const PDU__SM__DeactivatePDPContextAccept_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.protocolConfigOpts().get_selection()) {
single_value->field_protocolConfigOpts = other_value.protocolConfigOpts();
} else {
single_value->field_protocolConfigOpts.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mBMSprotocolConfigOptions().get_selection()) {
single_value->field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
} else {
single_value->field_mBMSprotocolConfigOptions.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nBIFOM__Container().get_selection()) {
single_value->field_nBIFOM__Container = other_value.nBIFOM__Container();
} else {
single_value->field_nBIFOM__Container.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__SM__DeactivatePDPContextAccept_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__SM__DeactivatePDPContextAccept_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__DeactivatePDPContextAccept_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept.");
break;
}
set_selection(other_value);
}

PDU__SM__DeactivatePDPContextAccept_template::PDU__SM__DeactivatePDPContextAccept_template()
{
}

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

PDU__SM__DeactivatePDPContextAccept_template::PDU__SM__DeactivatePDPContextAccept_template(const PDU__SM__DeactivatePDPContextAccept& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__DeactivatePDPContextAccept_template& PDU__SM__DeactivatePDPContextAccept_template::operator=(const OPTIONAL<PDU__SM__DeactivatePDPContextAccept>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__DeactivatePDPContextAccept&)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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept.");
}
return *this;
}

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

boolean PDU__SM__DeactivatePDPContextAccept_template::match(const PDU__SM__DeactivatePDPContextAccept& 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.protocolConfigOpts().is_bound()) return FALSE;
if((other_value.protocolConfigOpts().ispresent() ? !single_value->field_protocolConfigOpts.match((const ProtocolConfigOptionsTLV&)other_value.protocolConfigOpts(), legacy) : !single_value->field_protocolConfigOpts.match_omit(legacy)))return FALSE;
if(!other_value.mBMSprotocolConfigOptions().is_bound()) return FALSE;
if((other_value.mBMSprotocolConfigOptions().ispresent() ? !single_value->field_mBMSprotocolConfigOptions.match((const MBMSProtocolConfigOptionsTLV&)other_value.mBMSprotocolConfigOptions(), legacy) : !single_value->field_mBMSprotocolConfigOptions.match_omit(legacy)))return FALSE;
if(!other_value.nBIFOM__Container().is_bound()) return FALSE;
if((other_value.nBIFOM__Container().ispresent() ? !single_value->field_nBIFOM__Container.match((const NBIFOM__ContainerTLV&)other_value.nBIFOM__Container(), legacy) : !single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept.");
}
return FALSE;
}

boolean PDU__SM__DeactivatePDPContextAccept_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_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_bound())
 || (single_value->field_mBMSprotocolConfigOptions.is_omit() || single_value->field_mBMSprotocolConfigOptions.is_bound())
 || (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_bound());
}

boolean PDU__SM__DeactivatePDPContextAccept_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_value())
 && (single_value->field_mBMSprotocolConfigOptions.is_omit() || single_value->field_mBMSprotocolConfigOptions.is_value())
 && (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_value());
}

void PDU__SM__DeactivatePDPContextAccept_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__SM__DeactivatePDPContextAccept PDU__SM__DeactivatePDPContextAccept_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept.");
PDU__SM__DeactivatePDPContextAccept ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_protocolConfigOpts.is_omit()) ret_val.protocolConfigOpts() = OMIT_VALUE;
else if (single_value->field_protocolConfigOpts.is_bound()) {
ret_val.protocolConfigOpts() = single_value->field_protocolConfigOpts.valueof();
}
if (single_value->field_mBMSprotocolConfigOptions.is_omit()) ret_val.mBMSprotocolConfigOptions() = OMIT_VALUE;
else if (single_value->field_mBMSprotocolConfigOptions.is_bound()) {
ret_val.mBMSprotocolConfigOptions() = single_value->field_mBMSprotocolConfigOptions.valueof();
}
if (single_value->field_nBIFOM__Container.is_omit()) ret_val.nBIFOM__Container() = OMIT_VALUE;
else if (single_value->field_nBIFOM__Container.is_bound()) {
ret_val.nBIFOM__Container() = single_value->field_nBIFOM__Container.valueof();
}
return ret_val;
}

void PDU__SM__DeactivatePDPContextAccept_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__DeactivatePDPContextAccept_template[list_length];
}

PDU__SM__DeactivatePDPContextAccept_template& PDU__SM__DeactivatePDPContextAccept_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept.");
return value_list.list_value[list_index];
}

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

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

ProtocolConfigOptionsTLV_template& PDU__SM__DeactivatePDPContextAccept_template::protocolConfigOpts()
{
set_specific();
return single_value->field_protocolConfigOpts;
}

const ProtocolConfigOptionsTLV_template& PDU__SM__DeactivatePDPContextAccept_template::protocolConfigOpts() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field protocolConfigOpts of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept.");
return single_value->field_protocolConfigOpts;
}

MBMSProtocolConfigOptionsTLV_template& PDU__SM__DeactivatePDPContextAccept_template::mBMSprotocolConfigOptions()
{
set_specific();
return single_value->field_mBMSprotocolConfigOptions;
}

const MBMSProtocolConfigOptionsTLV_template& PDU__SM__DeactivatePDPContextAccept_template::mBMSprotocolConfigOptions() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mBMSprotocolConfigOptions of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept.");
return single_value->field_mBMSprotocolConfigOptions;
}

NBIFOM__ContainerTLV_template& PDU__SM__DeactivatePDPContextAccept_template::nBIFOM__Container()
{
set_specific();
return single_value->field_nBIFOM__Container;
}

const NBIFOM__ContainerTLV_template& PDU__SM__DeactivatePDPContextAccept_template::nBIFOM__Container() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nBIFOM_Container of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept.");
return single_value->field_nBIFOM__Container;
}

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

void PDU__SM__DeactivatePDPContextAccept_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(", protocolConfigOpts := ");
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
single_value->field_mBMSprotocolConfigOptions.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
single_value->field_nBIFOM__Container.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__SM__DeactivatePDPContextAccept_template::log_match(const PDU__SM__DeactivatePDPContextAccept& 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.protocolConfigOpts().ispresent()){
if(!single_value->field_protocolConfigOpts.match(match_value.protocolConfigOpts(), legacy)){
TTCN_Logger::log_logmatch_info(".protocolConfigOpts");
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_protocolConfigOpts.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".protocolConfigOpts := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.mBMSprotocolConfigOptions().ispresent()){
if(!single_value->field_mBMSprotocolConfigOptions.match(match_value.mBMSprotocolConfigOptions(), legacy)){
TTCN_Logger::log_logmatch_info(".mBMSprotocolConfigOptions");
single_value->field_mBMSprotocolConfigOptions.log_match(match_value.mBMSprotocolConfigOptions(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_mBMSprotocolConfigOptions.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".mBMSprotocolConfigOptions := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_mBMSprotocolConfigOptions.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nBIFOM__Container().ispresent()){
if(!single_value->field_nBIFOM__Container.match(match_value.nBIFOM__Container(), legacy)){
TTCN_Logger::log_logmatch_info(".nBIFOM_Container");
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nBIFOM__Container.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nBIFOM_Container := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nBIFOM__Container.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(", protocolConfigOpts := ");
if (match_value.protocolConfigOpts().ispresent()) {
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_protocolConfigOpts.log();
if (single_value->field_protocolConfigOpts.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
if (match_value.mBMSprotocolConfigOptions().ispresent()) {
single_value->field_mBMSprotocolConfigOptions.log_match(match_value.mBMSprotocolConfigOptions(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_mBMSprotocolConfigOptions.log();
if (single_value->field_mBMSprotocolConfigOptions.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
if (match_value.nBIFOM__Container().ispresent()) {
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nBIFOM__Container.log();
if (single_value->field_nBIFOM__Container.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__SM__DeactivatePDPContextAccept_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_protocolConfigOpts.encode_text(text_buf);
single_value->field_mBMSprotocolConfigOptions.encode_text(text_buf);
single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept.");
}
}

void PDU__SM__DeactivatePDPContextAccept_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_protocolConfigOpts.decode_text(text_buf);
single_value->field_mBMSprotocolConfigOptions.decode_text(text_buf);
single_value->field_nBIFOM__Container.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__SM__DeactivatePDPContextAccept_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept.");
}
}

void PDU__SM__DeactivatePDPContextAccept_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__SM__DeactivatePDPContextAccept_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept 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) protocolConfigOpts().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) mBMSprotocolConfigOptions().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMSprotocolConfigOptions")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMSprotocolConfigOptions().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__DeactivatePDPContextAccept_template* precondition = new PDU__SM__DeactivatePDPContextAccept_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__DeactivatePDPContextAccept_template* implied_template = new PDU__SM__DeactivatePDPContextAccept_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__DeactivatePDPContextAccept_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__DeactivatePDPContextAccept_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept");
single_value->field_protocolConfigOpts.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept");
single_value->field_mBMSprotocolConfigOptions.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept");
single_value->field_nBIFOM__Container.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept");
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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept");
}

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

boolean PDU__SM__DeactivatePDPContextAccept_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__SM__RequestSecondaryPDPContextActivation::PDU__SM__RequestSecondaryPDPContextActivation()
{
}

PDU__SM__RequestSecondaryPDPContextActivation::PDU__SM__RequestSecondaryPDPContextActivation(const BITSTRING& par_messageType,
    const QoSLV& par_requiredQoS,
    const LinkedTILV& par_linkedTI,
    const OPTIONAL< TrafficFlowTemplateTLV >& par_tFT,
    const OPTIONAL< ProtocolConfigOptionsTLV >& par_protocolConfigOpts,
    const OPTIONAL< WLANOffloadAcceptabilityTV >& par_wLANOffloadIndication,
    const OPTIONAL< NBIFOM__ContainerTLV >& par_nBIFOM__Container)
  :   field_messageType(par_messageType),
  field_requiredQoS(par_requiredQoS),
  field_linkedTI(par_linkedTI),
  field_tFT(par_tFT),
  field_protocolConfigOpts(par_protocolConfigOpts),
  field_wLANOffloadIndication(par_wLANOffloadIndication),
  field_nBIFOM__Container(par_nBIFOM__Container)
{
}

PDU__SM__RequestSecondaryPDPContextActivation::PDU__SM__RequestSecondaryPDPContextActivation(const PDU__SM__RequestSecondaryPDPContextActivation& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.requiredQoS().is_bound()) field_requiredQoS = other_value.requiredQoS();
else field_requiredQoS.clean_up();
if (other_value.linkedTI().is_bound()) field_linkedTI = other_value.linkedTI();
else field_linkedTI.clean_up();
if (other_value.tFT().is_bound()) field_tFT = other_value.tFT();
else field_tFT.clean_up();
if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
else field_protocolConfigOpts.clean_up();
if (other_value.wLANOffloadIndication().is_bound()) field_wLANOffloadIndication = other_value.wLANOffloadIndication();
else field_wLANOffloadIndication.clean_up();
if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
else field_nBIFOM__Container.clean_up();
}

void PDU__SM__RequestSecondaryPDPContextActivation::clean_up()
{
field_messageType.clean_up();
field_requiredQoS.clean_up();
field_linkedTI.clean_up();
field_tFT.clean_up();
field_protocolConfigOpts.clean_up();
field_wLANOffloadIndication.clean_up();
field_nBIFOM__Container.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__RequestSecondaryPDPContextActivation::get_descriptor() const { return &PDU__SM__RequestSecondaryPDPContextActivation_descr_; }
PDU__SM__RequestSecondaryPDPContextActivation& PDU__SM__RequestSecondaryPDPContextActivation::operator=(const PDU__SM__RequestSecondaryPDPContextActivation& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.requiredQoS().is_bound()) field_requiredQoS = other_value.requiredQoS();
  else field_requiredQoS.clean_up();
  if (other_value.linkedTI().is_bound()) field_linkedTI = other_value.linkedTI();
  else field_linkedTI.clean_up();
  if (other_value.tFT().is_bound()) field_tFT = other_value.tFT();
  else field_tFT.clean_up();
  if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
  else field_protocolConfigOpts.clean_up();
  if (other_value.wLANOffloadIndication().is_bound()) field_wLANOffloadIndication = other_value.wLANOffloadIndication();
  else field_wLANOffloadIndication.clean_up();
  if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
  else field_nBIFOM__Container.clean_up();
}
return *this;
}

boolean PDU__SM__RequestSecondaryPDPContextActivation::operator==(const PDU__SM__RequestSecondaryPDPContextActivation& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_requiredQoS==other_value.field_requiredQoS
  && field_linkedTI==other_value.field_linkedTI
  && field_tFT==other_value.field_tFT
  && field_protocolConfigOpts==other_value.field_protocolConfigOpts
  && field_wLANOffloadIndication==other_value.field_wLANOffloadIndication
  && field_nBIFOM__Container==other_value.field_nBIFOM__Container;
}

boolean PDU__SM__RequestSecondaryPDPContextActivation::is_bound() const
{
return (field_messageType.is_bound())
  || (field_requiredQoS.is_bound())
  || (field_linkedTI.is_bound())
  || (OPTIONAL_OMIT == field_tFT.get_selection() || field_tFT.is_bound())
  || (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_bound())
  || (OPTIONAL_OMIT == field_wLANOffloadIndication.get_selection() || field_wLANOffloadIndication.is_bound())
  || (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_bound());
}
boolean PDU__SM__RequestSecondaryPDPContextActivation::is_value() const
{
return field_messageType.is_value()
  && field_requiredQoS.is_value()
  && field_linkedTI.is_value()
  && (OPTIONAL_OMIT == field_tFT.get_selection() || field_tFT.is_value())
  && (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_value())
  && (OPTIONAL_OMIT == field_wLANOffloadIndication.get_selection() || field_wLANOffloadIndication.is_value())
  && (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_value());
}
int PDU__SM__RequestSecondaryPDPContextActivation::size_of() const
{
  int ret_val = 3;
  if (field_tFT.ispresent()) ret_val++;
  if (field_protocolConfigOpts.ispresent()) ret_val++;
  if (field_wLANOffloadIndication.ispresent()) ret_val++;
  if (field_nBIFOM__Container.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__RequestSecondaryPDPContextActivation::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(", requiredQoS := ");
field_requiredQoS.log();
TTCN_Logger::log_event_str(", linkedTI := ");
field_linkedTI.log();
TTCN_Logger::log_event_str(", tFT := ");
field_tFT.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", wLANOffloadIndication := ");
field_wLANOffloadIndication.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
field_nBIFOM__Container.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__RequestSecondaryPDPContextActivation::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (requiredQoS().is_bound()) requiredQoS().set_implicit_omit();
if (linkedTI().is_bound()) linkedTI().set_implicit_omit();
if (!tFT().is_bound()) tFT() = OMIT_VALUE;
else tFT().set_implicit_omit();
if (!protocolConfigOpts().is_bound()) protocolConfigOpts() = OMIT_VALUE;
else protocolConfigOpts().set_implicit_omit();
if (!wLANOffloadIndication().is_bound()) wLANOffloadIndication() = OMIT_VALUE;
else wLANOffloadIndication().set_implicit_omit();
if (!nBIFOM__Container().is_bound()) nBIFOM__Container() = OMIT_VALUE;
else nBIFOM__Container().set_implicit_omit();
}

void PDU__SM__RequestSecondaryPDPContextActivation::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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation 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) requiredQoS().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) linkedTI().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) tFT().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) wLANOffloadIndication().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "requiredQoS")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          requiredQoS().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "linkedTI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          linkedTI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tFT")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tFT().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "wLANOffloadIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          wLANOffloadIndication().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation");
  }
}

void PDU__SM__RequestSecondaryPDPContextActivation::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_requiredQoS.encode_text(text_buf);
field_linkedTI.encode_text(text_buf);
field_tFT.encode_text(text_buf);
field_protocolConfigOpts.encode_text(text_buf);
field_wLANOffloadIndication.encode_text(text_buf);
field_nBIFOM__Container.encode_text(text_buf);
}

void PDU__SM__RequestSecondaryPDPContextActivation::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_requiredQoS.decode_text(text_buf);
field_linkedTI.decode_text(text_buf);
field_tFT.decode_text(text_buf);
field_protocolConfigOpts.decode_text(text_buf);
field_wLANOffloadIndication.decode_text(text_buf);
field_nBIFOM__Container.decode_text(text_buf);
}

void PDU__SM__RequestSecondaryPDPContextActivation::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__RequestSecondaryPDPContextActivation::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__RequestSecondaryPDPContextActivation::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, QoSLV_descr_.raw->forceomit);
  decoded_field_length = field_requiredQoS.RAW_decode(QoSLV_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, LinkedTILV_descr_.raw->forceomit);
  decoded_field_length = field_linkedTI.RAW_decode(LinkedTILV_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_tFT = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, TrafficFlowTemplateTLV_descr_.raw->forceomit);
  decoded_field_length = field_tFT().RAW_decode(TrafficFlowTemplateTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_tFT = 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_tFT=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_protocolConfigOpts = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, ProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_protocolConfigOpts().RAW_decode(ProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_protocolConfigOpts = 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_protocolConfigOpts=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(5)) {
    field_wLANOffloadIndication = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_5_force_omit(5, force_omit, WLANOffloadAcceptabilityTV_descr_.raw->forceomit);
  decoded_field_length = field_wLANOffloadIndication().RAW_decode(WLANOffloadAcceptabilityTV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 1) {
  field_wLANOffloadIndication = 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_wLANOffloadIndication=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_nBIFOM__Container = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, NBIFOM__ContainerTLV_descr_.raw->forceomit);
  decoded_field_length = field_nBIFOM__Container().RAW_decode(NBIFOM__ContainerTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_nBIFOM__Container = 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_nBIFOM__Container=OMIT_VALUE;
  if (field_messageType !=  bs_66) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__RequestSecondaryPDPContextActivation::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, QoSLV_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, LinkedTILV_descr_.raw);
  if (field_tFT.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, TrafficFlowTemplateTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_protocolConfigOpts.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, ProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  if (field_wLANOffloadIndication.ispresent()) {
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, WLANOffloadAcceptabilityTV_descr_.raw);
  }
  else myleaf.body.node.nodes[5] = NULL;
  if (field_nBIFOM__Container.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, NBIFOM__ContainerTLV_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_requiredQoS.RAW_encode(QoSLV_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_linkedTI.RAW_encode(LinkedTILV_descr_, *myleaf.body.node.nodes[2]);
  if (field_tFT.ispresent()) {
  encoded_length += field_tFT().RAW_encode(TrafficFlowTemplateTLV_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_protocolConfigOpts.ispresent()) {
  encoded_length += field_protocolConfigOpts().RAW_encode(ProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_wLANOffloadIndication.ispresent()) {
  encoded_length += field_wLANOffloadIndication().RAW_encode(WLANOffloadAcceptabilityTV_descr_, *myleaf.body.node.nodes[5]);
  }
  if (field_nBIFOM__Container.ispresent()) {
  encoded_length += field_nBIFOM__Container().RAW_encode(NBIFOM__ContainerTLV_descr_, *myleaf.body.node.nodes[6]);
  }
  if (field_messageType !=  bs_66) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_66.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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__RequestSecondaryPDPContextActivation_template::single_value_struct {
BITSTRING_template field_messageType;
QoSLV_template field_requiredQoS;
LinkedTILV_template field_linkedTI;
TrafficFlowTemplateTLV_template field_tFT;
ProtocolConfigOptionsTLV_template field_protocolConfigOpts;
WLANOffloadAcceptabilityTV_template field_wLANOffloadIndication;
NBIFOM__ContainerTLV_template field_nBIFOM__Container;
};

void PDU__SM__RequestSecondaryPDPContextActivation_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_requiredQoS = ANY_VALUE;
single_value->field_linkedTI = ANY_VALUE;
single_value->field_tFT = ANY_OR_OMIT;
single_value->field_protocolConfigOpts = ANY_OR_OMIT;
single_value->field_wLANOffloadIndication = ANY_OR_OMIT;
single_value->field_nBIFOM__Container = ANY_OR_OMIT;
}
}
}

void PDU__SM__RequestSecondaryPDPContextActivation_template::copy_value(const PDU__SM__RequestSecondaryPDPContextActivation& 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.requiredQoS().is_bound()) {
  single_value->field_requiredQoS = other_value.requiredQoS();
} else {
  single_value->field_requiredQoS.clean_up();
}
if (other_value.linkedTI().is_bound()) {
  single_value->field_linkedTI = other_value.linkedTI();
} else {
  single_value->field_linkedTI.clean_up();
}
if (other_value.tFT().is_bound()) {
  if (other_value.tFT().ispresent()) single_value->field_tFT = other_value.tFT()();
  else single_value->field_tFT = OMIT_VALUE;
} else {
  single_value->field_tFT.clean_up();
}
if (other_value.protocolConfigOpts().is_bound()) {
  if (other_value.protocolConfigOpts().ispresent()) single_value->field_protocolConfigOpts = other_value.protocolConfigOpts()();
  else single_value->field_protocolConfigOpts = OMIT_VALUE;
} else {
  single_value->field_protocolConfigOpts.clean_up();
}
if (other_value.wLANOffloadIndication().is_bound()) {
  if (other_value.wLANOffloadIndication().ispresent()) single_value->field_wLANOffloadIndication = other_value.wLANOffloadIndication()();
  else single_value->field_wLANOffloadIndication = OMIT_VALUE;
} else {
  single_value->field_wLANOffloadIndication.clean_up();
}
if (other_value.nBIFOM__Container().is_bound()) {
  if (other_value.nBIFOM__Container().ispresent()) single_value->field_nBIFOM__Container = other_value.nBIFOM__Container()();
  else single_value->field_nBIFOM__Container = OMIT_VALUE;
} else {
  single_value->field_nBIFOM__Container.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__RequestSecondaryPDPContextActivation_template::copy_template(const PDU__SM__RequestSecondaryPDPContextActivation_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.requiredQoS().get_selection()) {
single_value->field_requiredQoS = other_value.requiredQoS();
} else {
single_value->field_requiredQoS.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.linkedTI().get_selection()) {
single_value->field_linkedTI = other_value.linkedTI();
} else {
single_value->field_linkedTI.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.tFT().get_selection()) {
single_value->field_tFT = other_value.tFT();
} else {
single_value->field_tFT.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.protocolConfigOpts().get_selection()) {
single_value->field_protocolConfigOpts = other_value.protocolConfigOpts();
} else {
single_value->field_protocolConfigOpts.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.wLANOffloadIndication().get_selection()) {
single_value->field_wLANOffloadIndication = other_value.wLANOffloadIndication();
} else {
single_value->field_wLANOffloadIndication.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nBIFOM__Container().get_selection()) {
single_value->field_nBIFOM__Container = other_value.nBIFOM__Container();
} else {
single_value->field_nBIFOM__Container.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__SM__RequestSecondaryPDPContextActivation_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__SM__RequestSecondaryPDPContextActivation_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__RequestSecondaryPDPContextActivation_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
break;
}
set_selection(other_value);
}

PDU__SM__RequestSecondaryPDPContextActivation_template::PDU__SM__RequestSecondaryPDPContextActivation_template()
{
}

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

PDU__SM__RequestSecondaryPDPContextActivation_template::PDU__SM__RequestSecondaryPDPContextActivation_template(const PDU__SM__RequestSecondaryPDPContextActivation& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__RequestSecondaryPDPContextActivation_template& PDU__SM__RequestSecondaryPDPContextActivation_template::operator=(const OPTIONAL<PDU__SM__RequestSecondaryPDPContextActivation>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__RequestSecondaryPDPContextActivation&)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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
}
return *this;
}

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

boolean PDU__SM__RequestSecondaryPDPContextActivation_template::match(const PDU__SM__RequestSecondaryPDPContextActivation& 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.requiredQoS().is_bound()) return FALSE;
if(!single_value->field_requiredQoS.match(other_value.requiredQoS(), legacy))return FALSE;
if(!other_value.linkedTI().is_bound()) return FALSE;
if(!single_value->field_linkedTI.match(other_value.linkedTI(), legacy))return FALSE;
if(!other_value.tFT().is_bound()) return FALSE;
if((other_value.tFT().ispresent() ? !single_value->field_tFT.match((const TrafficFlowTemplateTLV&)other_value.tFT(), legacy) : !single_value->field_tFT.match_omit(legacy)))return FALSE;
if(!other_value.protocolConfigOpts().is_bound()) return FALSE;
if((other_value.protocolConfigOpts().ispresent() ? !single_value->field_protocolConfigOpts.match((const ProtocolConfigOptionsTLV&)other_value.protocolConfigOpts(), legacy) : !single_value->field_protocolConfigOpts.match_omit(legacy)))return FALSE;
if(!other_value.wLANOffloadIndication().is_bound()) return FALSE;
if((other_value.wLANOffloadIndication().ispresent() ? !single_value->field_wLANOffloadIndication.match((const WLANOffloadAcceptabilityTV&)other_value.wLANOffloadIndication(), legacy) : !single_value->field_wLANOffloadIndication.match_omit(legacy)))return FALSE;
if(!other_value.nBIFOM__Container().is_bound()) return FALSE;
if((other_value.nBIFOM__Container().ispresent() ? !single_value->field_nBIFOM__Container.match((const NBIFOM__ContainerTLV&)other_value.nBIFOM__Container(), legacy) : !single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
}
return FALSE;
}

boolean PDU__SM__RequestSecondaryPDPContextActivation_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_requiredQoS.is_bound()
 || single_value->field_linkedTI.is_bound()
 || (single_value->field_tFT.is_omit() || single_value->field_tFT.is_bound())
 || (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_bound())
 || (single_value->field_wLANOffloadIndication.is_omit() || single_value->field_wLANOffloadIndication.is_bound())
 || (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_bound());
}

boolean PDU__SM__RequestSecondaryPDPContextActivation_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_requiredQoS.is_value()
 && single_value->field_linkedTI.is_value()
 && (single_value->field_tFT.is_omit() || single_value->field_tFT.is_value())
 && (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_value())
 && (single_value->field_wLANOffloadIndication.is_omit() || single_value->field_wLANOffloadIndication.is_value())
 && (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_value());
}

void PDU__SM__RequestSecondaryPDPContextActivation_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__SM__RequestSecondaryPDPContextActivation PDU__SM__RequestSecondaryPDPContextActivation_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
PDU__SM__RequestSecondaryPDPContextActivation ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_requiredQoS.is_bound()) {
ret_val.requiredQoS() = single_value->field_requiredQoS.valueof();
}
if (single_value->field_linkedTI.is_bound()) {
ret_val.linkedTI() = single_value->field_linkedTI.valueof();
}
if (single_value->field_tFT.is_omit()) ret_val.tFT() = OMIT_VALUE;
else if (single_value->field_tFT.is_bound()) {
ret_val.tFT() = single_value->field_tFT.valueof();
}
if (single_value->field_protocolConfigOpts.is_omit()) ret_val.protocolConfigOpts() = OMIT_VALUE;
else if (single_value->field_protocolConfigOpts.is_bound()) {
ret_val.protocolConfigOpts() = single_value->field_protocolConfigOpts.valueof();
}
if (single_value->field_wLANOffloadIndication.is_omit()) ret_val.wLANOffloadIndication() = OMIT_VALUE;
else if (single_value->field_wLANOffloadIndication.is_bound()) {
ret_val.wLANOffloadIndication() = single_value->field_wLANOffloadIndication.valueof();
}
if (single_value->field_nBIFOM__Container.is_omit()) ret_val.nBIFOM__Container() = OMIT_VALUE;
else if (single_value->field_nBIFOM__Container.is_bound()) {
ret_val.nBIFOM__Container() = single_value->field_nBIFOM__Container.valueof();
}
return ret_val;
}

void PDU__SM__RequestSecondaryPDPContextActivation_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__RequestSecondaryPDPContextActivation_template[list_length];
}

PDU__SM__RequestSecondaryPDPContextActivation_template& PDU__SM__RequestSecondaryPDPContextActivation_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
return value_list.list_value[list_index];
}

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

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

QoSLV_template& PDU__SM__RequestSecondaryPDPContextActivation_template::requiredQoS()
{
set_specific();
return single_value->field_requiredQoS;
}

const QoSLV_template& PDU__SM__RequestSecondaryPDPContextActivation_template::requiredQoS() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field requiredQoS of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
return single_value->field_requiredQoS;
}

LinkedTILV_template& PDU__SM__RequestSecondaryPDPContextActivation_template::linkedTI()
{
set_specific();
return single_value->field_linkedTI;
}

const LinkedTILV_template& PDU__SM__RequestSecondaryPDPContextActivation_template::linkedTI() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field linkedTI of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
return single_value->field_linkedTI;
}

TrafficFlowTemplateTLV_template& PDU__SM__RequestSecondaryPDPContextActivation_template::tFT()
{
set_specific();
return single_value->field_tFT;
}

const TrafficFlowTemplateTLV_template& PDU__SM__RequestSecondaryPDPContextActivation_template::tFT() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field tFT of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
return single_value->field_tFT;
}

ProtocolConfigOptionsTLV_template& PDU__SM__RequestSecondaryPDPContextActivation_template::protocolConfigOpts()
{
set_specific();
return single_value->field_protocolConfigOpts;
}

const ProtocolConfigOptionsTLV_template& PDU__SM__RequestSecondaryPDPContextActivation_template::protocolConfigOpts() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field protocolConfigOpts of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
return single_value->field_protocolConfigOpts;
}

WLANOffloadAcceptabilityTV_template& PDU__SM__RequestSecondaryPDPContextActivation_template::wLANOffloadIndication()
{
set_specific();
return single_value->field_wLANOffloadIndication;
}

const WLANOffloadAcceptabilityTV_template& PDU__SM__RequestSecondaryPDPContextActivation_template::wLANOffloadIndication() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field wLANOffloadIndication of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
return single_value->field_wLANOffloadIndication;
}

NBIFOM__ContainerTLV_template& PDU__SM__RequestSecondaryPDPContextActivation_template::nBIFOM__Container()
{
set_specific();
return single_value->field_nBIFOM__Container;
}

const NBIFOM__ContainerTLV_template& PDU__SM__RequestSecondaryPDPContextActivation_template::nBIFOM__Container() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nBIFOM_Container of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
return single_value->field_nBIFOM__Container;
}

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

void PDU__SM__RequestSecondaryPDPContextActivation_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(", requiredQoS := ");
single_value->field_requiredQoS.log();
TTCN_Logger::log_event_str(", linkedTI := ");
single_value->field_linkedTI.log();
TTCN_Logger::log_event_str(", tFT := ");
single_value->field_tFT.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", wLANOffloadIndication := ");
single_value->field_wLANOffloadIndication.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
single_value->field_nBIFOM__Container.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__SM__RequestSecondaryPDPContextActivation_template::log_match(const PDU__SM__RequestSecondaryPDPContextActivation& 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_requiredQoS.match(match_value.requiredQoS(), legacy)){
TTCN_Logger::log_logmatch_info(".requiredQoS");
single_value->field_requiredQoS.log_match(match_value.requiredQoS(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_linkedTI.match(match_value.linkedTI(), legacy)){
TTCN_Logger::log_logmatch_info(".linkedTI");
single_value->field_linkedTI.log_match(match_value.linkedTI(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.tFT().ispresent()){
if(!single_value->field_tFT.match(match_value.tFT(), legacy)){
TTCN_Logger::log_logmatch_info(".tFT");
single_value->field_tFT.log_match(match_value.tFT(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_tFT.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".tFT := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_tFT.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.protocolConfigOpts().ispresent()){
if(!single_value->field_protocolConfigOpts.match(match_value.protocolConfigOpts(), legacy)){
TTCN_Logger::log_logmatch_info(".protocolConfigOpts");
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_protocolConfigOpts.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".protocolConfigOpts := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.wLANOffloadIndication().ispresent()){
if(!single_value->field_wLANOffloadIndication.match(match_value.wLANOffloadIndication(), legacy)){
TTCN_Logger::log_logmatch_info(".wLANOffloadIndication");
single_value->field_wLANOffloadIndication.log_match(match_value.wLANOffloadIndication(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_wLANOffloadIndication.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".wLANOffloadIndication := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_wLANOffloadIndication.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nBIFOM__Container().ispresent()){
if(!single_value->field_nBIFOM__Container.match(match_value.nBIFOM__Container(), legacy)){
TTCN_Logger::log_logmatch_info(".nBIFOM_Container");
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nBIFOM__Container.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nBIFOM_Container := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nBIFOM__Container.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(", requiredQoS := ");
single_value->field_requiredQoS.log_match(match_value.requiredQoS(), legacy);
TTCN_Logger::log_event_str(", linkedTI := ");
single_value->field_linkedTI.log_match(match_value.linkedTI(), legacy);
TTCN_Logger::log_event_str(", tFT := ");
if (match_value.tFT().ispresent()) {
single_value->field_tFT.log_match(match_value.tFT(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_tFT.log();
if (single_value->field_tFT.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
if (match_value.protocolConfigOpts().ispresent()) {
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_protocolConfigOpts.log();
if (single_value->field_protocolConfigOpts.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", wLANOffloadIndication := ");
if (match_value.wLANOffloadIndication().ispresent()) {
single_value->field_wLANOffloadIndication.log_match(match_value.wLANOffloadIndication(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_wLANOffloadIndication.log();
if (single_value->field_wLANOffloadIndication.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
if (match_value.nBIFOM__Container().ispresent()) {
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nBIFOM__Container.log();
if (single_value->field_nBIFOM__Container.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__SM__RequestSecondaryPDPContextActivation_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_requiredQoS.encode_text(text_buf);
single_value->field_linkedTI.encode_text(text_buf);
single_value->field_tFT.encode_text(text_buf);
single_value->field_protocolConfigOpts.encode_text(text_buf);
single_value->field_wLANOffloadIndication.encode_text(text_buf);
single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
}
}

void PDU__SM__RequestSecondaryPDPContextActivation_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_requiredQoS.decode_text(text_buf);
single_value->field_linkedTI.decode_text(text_buf);
single_value->field_tFT.decode_text(text_buf);
single_value->field_protocolConfigOpts.decode_text(text_buf);
single_value->field_wLANOffloadIndication.decode_text(text_buf);
single_value->field_nBIFOM__Container.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__SM__RequestSecondaryPDPContextActivation_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation.");
}
}

void PDU__SM__RequestSecondaryPDPContextActivation_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__SM__RequestSecondaryPDPContextActivation_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation 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) requiredQoS().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) linkedTI().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) tFT().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) wLANOffloadIndication().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "requiredQoS")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          requiredQoS().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "linkedTI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          linkedTI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "tFT")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          tFT().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "wLANOffloadIndication")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          wLANOffloadIndication().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__RequestSecondaryPDPContextActivation_template* precondition = new PDU__SM__RequestSecondaryPDPContextActivation_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__RequestSecondaryPDPContextActivation_template* implied_template = new PDU__SM__RequestSecondaryPDPContextActivation_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__RequestSecondaryPDPContextActivation_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__RequestSecondaryPDPContextActivation_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation");
single_value->field_requiredQoS.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation");
single_value->field_linkedTI.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation");
single_value->field_tFT.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation");
single_value->field_protocolConfigOpts.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation");
single_value->field_wLANOffloadIndication.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation");
single_value->field_nBIFOM__Container.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation");
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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation");
}

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

boolean PDU__SM__RequestSecondaryPDPContextActivation_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__SM__RequestSecondaryPDPContextActivationReject::PDU__SM__RequestSecondaryPDPContextActivationReject()
{
}

PDU__SM__RequestSecondaryPDPContextActivationReject::PDU__SM__RequestSecondaryPDPContextActivationReject(const BITSTRING& par_messageType,
    const OCTETSTRING& par_smCause,
    const OPTIONAL< ProtocolConfigOptionsTLV >& par_protocolConfigOpts,
    const OPTIONAL< NBIFOM__ContainerTLV >& par_nBIFOM__Container)
  :   field_messageType(par_messageType),
  field_smCause(par_smCause),
  field_protocolConfigOpts(par_protocolConfigOpts),
  field_nBIFOM__Container(par_nBIFOM__Container)
{
}

PDU__SM__RequestSecondaryPDPContextActivationReject::PDU__SM__RequestSecondaryPDPContextActivationReject(const PDU__SM__RequestSecondaryPDPContextActivationReject& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
else field_smCause.clean_up();
if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
else field_protocolConfigOpts.clean_up();
if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
else field_nBIFOM__Container.clean_up();
}

void PDU__SM__RequestSecondaryPDPContextActivationReject::clean_up()
{
field_messageType.clean_up();
field_smCause.clean_up();
field_protocolConfigOpts.clean_up();
field_nBIFOM__Container.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__RequestSecondaryPDPContextActivationReject::get_descriptor() const { return &PDU__SM__RequestSecondaryPDPContextActivationReject_descr_; }
PDU__SM__RequestSecondaryPDPContextActivationReject& PDU__SM__RequestSecondaryPDPContextActivationReject::operator=(const PDU__SM__RequestSecondaryPDPContextActivationReject& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
  else field_smCause.clean_up();
  if (other_value.protocolConfigOpts().is_bound()) field_protocolConfigOpts = other_value.protocolConfigOpts();
  else field_protocolConfigOpts.clean_up();
  if (other_value.nBIFOM__Container().is_bound()) field_nBIFOM__Container = other_value.nBIFOM__Container();
  else field_nBIFOM__Container.clean_up();
}
return *this;
}

boolean PDU__SM__RequestSecondaryPDPContextActivationReject::operator==(const PDU__SM__RequestSecondaryPDPContextActivationReject& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_smCause==other_value.field_smCause
  && field_protocolConfigOpts==other_value.field_protocolConfigOpts
  && field_nBIFOM__Container==other_value.field_nBIFOM__Container;
}

boolean PDU__SM__RequestSecondaryPDPContextActivationReject::is_bound() const
{
return (field_messageType.is_bound())
  || (field_smCause.is_bound())
  || (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_bound())
  || (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_bound());
}
boolean PDU__SM__RequestSecondaryPDPContextActivationReject::is_value() const
{
return field_messageType.is_value()
  && field_smCause.is_value()
  && (OPTIONAL_OMIT == field_protocolConfigOpts.get_selection() || field_protocolConfigOpts.is_value())
  && (OPTIONAL_OMIT == field_nBIFOM__Container.get_selection() || field_nBIFOM__Container.is_value());
}
int PDU__SM__RequestSecondaryPDPContextActivationReject::size_of() const
{
  int ret_val = 2;
  if (field_protocolConfigOpts.ispresent()) ret_val++;
  if (field_nBIFOM__Container.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__RequestSecondaryPDPContextActivationReject::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(", smCause := ");
field_smCause.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
field_nBIFOM__Container.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__RequestSecondaryPDPContextActivationReject::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (smCause().is_bound()) smCause().set_implicit_omit();
if (!protocolConfigOpts().is_bound()) protocolConfigOpts() = OMIT_VALUE;
else protocolConfigOpts().set_implicit_omit();
if (!nBIFOM__Container().is_bound()) nBIFOM__Container() = OMIT_VALUE;
else nBIFOM__Container().set_implicit_omit();
}

void PDU__SM__RequestSecondaryPDPContextActivationReject::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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject 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) smCause().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "smCause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          smCause().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject");
  }
}

void PDU__SM__RequestSecondaryPDPContextActivationReject::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_smCause.encode_text(text_buf);
field_protocolConfigOpts.encode_text(text_buf);
field_nBIFOM__Container.encode_text(text_buf);
}

void PDU__SM__RequestSecondaryPDPContextActivationReject::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_smCause.decode_text(text_buf);
field_protocolConfigOpts.decode_text(text_buf);
field_nBIFOM__Container.decode_text(text_buf);
}

void PDU__SM__RequestSecondaryPDPContextActivationReject::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__RequestSecondaryPDPContextActivationReject::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__RequestSecondaryPDPContextActivationReject::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, SMCauseV_descr_.raw->forceomit);
  decoded_field_length = field_smCause.RAW_decode(SMCauseV_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_protocolConfigOpts = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, ProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_protocolConfigOpts().RAW_decode(ProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_protocolConfigOpts = 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_protocolConfigOpts=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_nBIFOM__Container = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, NBIFOM__ContainerTLV_descr_.raw->forceomit);
  decoded_field_length = field_nBIFOM__Container().RAW_decode(NBIFOM__ContainerTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_nBIFOM__Container = 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_nBIFOM__Container=OMIT_VALUE;
  if (field_messageType !=  bs_67) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__RequestSecondaryPDPContextActivationReject::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, SMCauseV_descr_.raw);
  if (field_protocolConfigOpts.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, ProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_nBIFOM__Container.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, NBIFOM__ContainerTLV_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_smCause.RAW_encode(SMCauseV_descr_, *myleaf.body.node.nodes[1]);
  if (field_protocolConfigOpts.ispresent()) {
  encoded_length += field_protocolConfigOpts().RAW_encode(ProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_nBIFOM__Container.ispresent()) {
  encoded_length += field_nBIFOM__Container().RAW_encode(NBIFOM__ContainerTLV_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_messageType !=  bs_67) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_67.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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__RequestSecondaryPDPContextActivationReject_template::single_value_struct {
BITSTRING_template field_messageType;
OCTETSTRING_template field_smCause;
ProtocolConfigOptionsTLV_template field_protocolConfigOpts;
NBIFOM__ContainerTLV_template field_nBIFOM__Container;
};

void PDU__SM__RequestSecondaryPDPContextActivationReject_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_smCause = ANY_VALUE;
single_value->field_protocolConfigOpts = ANY_OR_OMIT;
single_value->field_nBIFOM__Container = ANY_OR_OMIT;
}
}
}

void PDU__SM__RequestSecondaryPDPContextActivationReject_template::copy_value(const PDU__SM__RequestSecondaryPDPContextActivationReject& 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.smCause().is_bound()) {
  single_value->field_smCause = other_value.smCause();
} else {
  single_value->field_smCause.clean_up();
}
if (other_value.protocolConfigOpts().is_bound()) {
  if (other_value.protocolConfigOpts().ispresent()) single_value->field_protocolConfigOpts = other_value.protocolConfigOpts()();
  else single_value->field_protocolConfigOpts = OMIT_VALUE;
} else {
  single_value->field_protocolConfigOpts.clean_up();
}
if (other_value.nBIFOM__Container().is_bound()) {
  if (other_value.nBIFOM__Container().ispresent()) single_value->field_nBIFOM__Container = other_value.nBIFOM__Container()();
  else single_value->field_nBIFOM__Container = OMIT_VALUE;
} else {
  single_value->field_nBIFOM__Container.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__RequestSecondaryPDPContextActivationReject_template::copy_template(const PDU__SM__RequestSecondaryPDPContextActivationReject_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.smCause().get_selection()) {
single_value->field_smCause = other_value.smCause();
} else {
single_value->field_smCause.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.protocolConfigOpts().get_selection()) {
single_value->field_protocolConfigOpts = other_value.protocolConfigOpts();
} else {
single_value->field_protocolConfigOpts.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.nBIFOM__Container().get_selection()) {
single_value->field_nBIFOM__Container = other_value.nBIFOM__Container();
} else {
single_value->field_nBIFOM__Container.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__SM__RequestSecondaryPDPContextActivationReject_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__SM__RequestSecondaryPDPContextActivationReject_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__RequestSecondaryPDPContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject.");
break;
}
set_selection(other_value);
}

PDU__SM__RequestSecondaryPDPContextActivationReject_template::PDU__SM__RequestSecondaryPDPContextActivationReject_template()
{
}

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

PDU__SM__RequestSecondaryPDPContextActivationReject_template::PDU__SM__RequestSecondaryPDPContextActivationReject_template(const PDU__SM__RequestSecondaryPDPContextActivationReject& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__RequestSecondaryPDPContextActivationReject_template& PDU__SM__RequestSecondaryPDPContextActivationReject_template::operator=(const OPTIONAL<PDU__SM__RequestSecondaryPDPContextActivationReject>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__RequestSecondaryPDPContextActivationReject&)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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject.");
}
return *this;
}

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

boolean PDU__SM__RequestSecondaryPDPContextActivationReject_template::match(const PDU__SM__RequestSecondaryPDPContextActivationReject& 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.smCause().is_bound()) return FALSE;
if(!single_value->field_smCause.match(other_value.smCause(), legacy))return FALSE;
if(!other_value.protocolConfigOpts().is_bound()) return FALSE;
if((other_value.protocolConfigOpts().ispresent() ? !single_value->field_protocolConfigOpts.match((const ProtocolConfigOptionsTLV&)other_value.protocolConfigOpts(), legacy) : !single_value->field_protocolConfigOpts.match_omit(legacy)))return FALSE;
if(!other_value.nBIFOM__Container().is_bound()) return FALSE;
if((other_value.nBIFOM__Container().ispresent() ? !single_value->field_nBIFOM__Container.match((const NBIFOM__ContainerTLV&)other_value.nBIFOM__Container(), legacy) : !single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject.");
}
return FALSE;
}

boolean PDU__SM__RequestSecondaryPDPContextActivationReject_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_smCause.is_bound()
 || (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_bound())
 || (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_bound());
}

boolean PDU__SM__RequestSecondaryPDPContextActivationReject_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_smCause.is_value()
 && (single_value->field_protocolConfigOpts.is_omit() || single_value->field_protocolConfigOpts.is_value())
 && (single_value->field_nBIFOM__Container.is_omit() || single_value->field_nBIFOM__Container.is_value());
}

void PDU__SM__RequestSecondaryPDPContextActivationReject_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__SM__RequestSecondaryPDPContextActivationReject PDU__SM__RequestSecondaryPDPContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject.");
PDU__SM__RequestSecondaryPDPContextActivationReject ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_smCause.is_bound()) {
ret_val.smCause() = single_value->field_smCause.valueof();
}
if (single_value->field_protocolConfigOpts.is_omit()) ret_val.protocolConfigOpts() = OMIT_VALUE;
else if (single_value->field_protocolConfigOpts.is_bound()) {
ret_val.protocolConfigOpts() = single_value->field_protocolConfigOpts.valueof();
}
if (single_value->field_nBIFOM__Container.is_omit()) ret_val.nBIFOM__Container() = OMIT_VALUE;
else if (single_value->field_nBIFOM__Container.is_bound()) {
ret_val.nBIFOM__Container() = single_value->field_nBIFOM__Container.valueof();
}
return ret_val;
}

void PDU__SM__RequestSecondaryPDPContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__RequestSecondaryPDPContextActivationReject_template[list_length];
}

PDU__SM__RequestSecondaryPDPContextActivationReject_template& PDU__SM__RequestSecondaryPDPContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject.");
return value_list.list_value[list_index];
}

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

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

OCTETSTRING_template& PDU__SM__RequestSecondaryPDPContextActivationReject_template::smCause()
{
set_specific();
return single_value->field_smCause;
}

const OCTETSTRING_template& PDU__SM__RequestSecondaryPDPContextActivationReject_template::smCause() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field smCause of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject.");
return single_value->field_smCause;
}

ProtocolConfigOptionsTLV_template& PDU__SM__RequestSecondaryPDPContextActivationReject_template::protocolConfigOpts()
{
set_specific();
return single_value->field_protocolConfigOpts;
}

const ProtocolConfigOptionsTLV_template& PDU__SM__RequestSecondaryPDPContextActivationReject_template::protocolConfigOpts() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field protocolConfigOpts of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject.");
return single_value->field_protocolConfigOpts;
}

NBIFOM__ContainerTLV_template& PDU__SM__RequestSecondaryPDPContextActivationReject_template::nBIFOM__Container()
{
set_specific();
return single_value->field_nBIFOM__Container;
}

const NBIFOM__ContainerTLV_template& PDU__SM__RequestSecondaryPDPContextActivationReject_template::nBIFOM__Container() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field nBIFOM_Container of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject.");
return single_value->field_nBIFOM__Container;
}

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

void PDU__SM__RequestSecondaryPDPContextActivationReject_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(", smCause := ");
single_value->field_smCause.log();
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
single_value->field_nBIFOM__Container.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__SM__RequestSecondaryPDPContextActivationReject_template::log_match(const PDU__SM__RequestSecondaryPDPContextActivationReject& 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_smCause.match(match_value.smCause(), legacy)){
TTCN_Logger::log_logmatch_info(".smCause");
single_value->field_smCause.log_match(match_value.smCause(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.protocolConfigOpts().ispresent()){
if(!single_value->field_protocolConfigOpts.match(match_value.protocolConfigOpts(), legacy)){
TTCN_Logger::log_logmatch_info(".protocolConfigOpts");
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_protocolConfigOpts.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".protocolConfigOpts := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_protocolConfigOpts.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.nBIFOM__Container().ispresent()){
if(!single_value->field_nBIFOM__Container.match(match_value.nBIFOM__Container(), legacy)){
TTCN_Logger::log_logmatch_info(".nBIFOM_Container");
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_nBIFOM__Container.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".nBIFOM_Container := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_nBIFOM__Container.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(", smCause := ");
single_value->field_smCause.log_match(match_value.smCause(), legacy);
TTCN_Logger::log_event_str(", protocolConfigOpts := ");
if (match_value.protocolConfigOpts().ispresent()) {
single_value->field_protocolConfigOpts.log_match(match_value.protocolConfigOpts(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_protocolConfigOpts.log();
if (single_value->field_protocolConfigOpts.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", nBIFOM_Container := ");
if (match_value.nBIFOM__Container().ispresent()) {
single_value->field_nBIFOM__Container.log_match(match_value.nBIFOM__Container(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_nBIFOM__Container.log();
if (single_value->field_nBIFOM__Container.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__SM__RequestSecondaryPDPContextActivationReject_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_smCause.encode_text(text_buf);
single_value->field_protocolConfigOpts.encode_text(text_buf);
single_value->field_nBIFOM__Container.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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject.");
}
}

void PDU__SM__RequestSecondaryPDPContextActivationReject_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_smCause.decode_text(text_buf);
single_value->field_protocolConfigOpts.decode_text(text_buf);
single_value->field_nBIFOM__Container.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__SM__RequestSecondaryPDPContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject.");
}
}

void PDU__SM__RequestSecondaryPDPContextActivationReject_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__SM__RequestSecondaryPDPContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject 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) smCause().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) protocolConfigOpts().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) nBIFOM__Container().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(), "smCause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          smCause().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "protocolConfigOpts")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          protocolConfigOpts().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "nBIFOM_Container")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          nBIFOM__Container().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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__RequestSecondaryPDPContextActivationReject_template* precondition = new PDU__SM__RequestSecondaryPDPContextActivationReject_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__RequestSecondaryPDPContextActivationReject_template* implied_template = new PDU__SM__RequestSecondaryPDPContextActivationReject_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__RequestSecondaryPDPContextActivationReject_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__RequestSecondaryPDPContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject");
single_value->field_smCause.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject");
single_value->field_protocolConfigOpts.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject");
single_value->field_nBIFOM__Container.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject");
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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject");
}

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

boolean PDU__SM__RequestSecondaryPDPContextActivationReject_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__SM__Notification::PDU__SM__Notification()
{
}

PDU__SM__Notification::PDU__SM__Notification(const BITSTRING& par_messageType,
    const NotificationIndicatorLV& par_notificationIndicator)
  :   field_messageType(par_messageType),
  field_notificationIndicator(par_notificationIndicator)
{
}

PDU__SM__Notification::PDU__SM__Notification(const PDU__SM__Notification& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_Notification.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.notificationIndicator().is_bound()) field_notificationIndicator = other_value.notificationIndicator();
else field_notificationIndicator.clean_up();
}

void PDU__SM__Notification::clean_up()
{
field_messageType.clean_up();
field_notificationIndicator.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__Notification::get_descriptor() const { return &PDU__SM__Notification_descr_; }
PDU__SM__Notification& PDU__SM__Notification::operator=(const PDU__SM__Notification& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_Notification.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.notificationIndicator().is_bound()) field_notificationIndicator = other_value.notificationIndicator();
  else field_notificationIndicator.clean_up();
}
return *this;
}

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

boolean PDU__SM__Notification::is_bound() const
{
return (field_messageType.is_bound())
  || (field_notificationIndicator.is_bound());
}
boolean PDU__SM__Notification::is_value() const
{
return field_messageType.is_value()
  && field_notificationIndicator.is_value();
}
void PDU__SM__Notification::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(", notificationIndicator := ");
field_notificationIndicator.log();
TTCN_Logger::log_event_str(" }");
}

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

void PDU__SM__Notification::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_GMM_SM_Types.PDU_SM_Notification 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) notificationIndicator().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(), "notificationIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          notificationIndicator().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_GMM_SM_Types.PDU_SM_Notification: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_Notification");
  }
}

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

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

void PDU__SM__Notification::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__Notification::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__Notification::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, NotificationIndicatorLV_descr_.raw->forceomit);
  decoded_field_length = field_notificationIndicator.RAW_decode(NotificationIndicatorLV_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 (field_messageType !=  bs_68) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__Notification::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, NotificationIndicatorLV_descr_.raw);
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_notificationIndicator.RAW_encode(NotificationIndicatorLV_descr_, *myleaf.body.node.nodes[1]);
  if (field_messageType !=  bs_68) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_68.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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__Notification_template::single_value_struct {
BITSTRING_template field_messageType;
NotificationIndicatorLV_template field_notificationIndicator;
};

void PDU__SM__Notification_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_notificationIndicator = ANY_VALUE;
}
}
}

void PDU__SM__Notification_template::copy_value(const PDU__SM__Notification& 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.notificationIndicator().is_bound()) {
  single_value->field_notificationIndicator = other_value.notificationIndicator();
} else {
  single_value->field_notificationIndicator.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__Notification_template::copy_template(const PDU__SM__Notification_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.notificationIndicator().get_selection()) {
single_value->field_notificationIndicator = other_value.notificationIndicator();
} else {
single_value->field_notificationIndicator.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__SM__Notification_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__SM__Notification_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__Notification_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_GMM_SM_Types.PDU_SM_Notification.");
break;
}
set_selection(other_value);
}

PDU__SM__Notification_template::PDU__SM__Notification_template()
{
}

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

PDU__SM__Notification_template::PDU__SM__Notification_template(const PDU__SM__Notification& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__Notification_template& PDU__SM__Notification_template::operator=(const OPTIONAL<PDU__SM__Notification>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__Notification&)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_GMM_SM_Types.PDU_SM_Notification.");
}
return *this;
}

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

boolean PDU__SM__Notification_template::match(const PDU__SM__Notification& 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.notificationIndicator().is_bound()) return FALSE;
if(!single_value->field_notificationIndicator.match(other_value.notificationIndicator(), 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_GMM_SM_Types.PDU_SM_Notification.");
}
return FALSE;
}

boolean PDU__SM__Notification_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_notificationIndicator.is_bound();
}

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

void PDU__SM__Notification_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__SM__Notification PDU__SM__Notification_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_GMM_SM_Types.PDU_SM_Notification.");
PDU__SM__Notification ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_notificationIndicator.is_bound()) {
ret_val.notificationIndicator() = single_value->field_notificationIndicator.valueof();
}
return ret_val;
}

void PDU__SM__Notification_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_GMM_SM_Types.PDU_SM_Notification.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__Notification_template[list_length];
}

PDU__SM__Notification_template& PDU__SM__Notification_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_GMM_SM_Types.PDU_SM_Notification.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_Notification.");
return value_list.list_value[list_index];
}

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

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

NotificationIndicatorLV_template& PDU__SM__Notification_template::notificationIndicator()
{
set_specific();
return single_value->field_notificationIndicator;
}

const NotificationIndicatorLV_template& PDU__SM__Notification_template::notificationIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field notificationIndicator of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_Notification.");
return single_value->field_notificationIndicator;
}

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

void PDU__SM__Notification_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(", notificationIndicator := ");
single_value->field_notificationIndicator.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__SM__Notification_template::log_match(const PDU__SM__Notification& 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_notificationIndicator.match(match_value.notificationIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".notificationIndicator");
single_value->field_notificationIndicator.log_match(match_value.notificationIndicator(), 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(", notificationIndicator := ");
single_value->field_notificationIndicator.log_match(match_value.notificationIndicator(), 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__SM__Notification_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_notificationIndicator.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_GMM_SM_Types.PDU_SM_Notification.");
}
}

void PDU__SM__Notification_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_notificationIndicator.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__SM__Notification_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_GMM_SM_Types.PDU_SM_Notification.");
}
}

void PDU__SM__Notification_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__SM__Notification_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_GMM_SM_Types.PDU_SM_Notification 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) notificationIndicator().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(), "notificationIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          notificationIndicator().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_GMM_SM_Types.PDU_SM_Notification: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__Notification_template* precondition = new PDU__SM__Notification_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__Notification_template* implied_template = new PDU__SM__Notification_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__Notification_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_Notification");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__Notification_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_GMM_SM_Types.PDU_SM_Notification");
single_value->field_notificationIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_Notification");
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_GMM_SM_Types.PDU_SM_Notification");
}

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

boolean PDU__SM__Notification_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__SM__SM__Status::PDU__SM__SM__Status()
{
}

PDU__SM__SM__Status::PDU__SM__SM__Status(const BITSTRING& par_messageType,
    const OCTETSTRING& par_smCause)
  :   field_messageType(par_messageType),
  field_smCause(par_smCause)
{
}

PDU__SM__SM__Status::PDU__SM__SM__Status(const PDU__SM__SM__Status& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_SM_Status.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
else field_smCause.clean_up();
}

void PDU__SM__SM__Status::clean_up()
{
field_messageType.clean_up();
field_smCause.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__SM__Status::get_descriptor() const { return &PDU__SM__SM__Status_descr_; }
PDU__SM__SM__Status& PDU__SM__SM__Status::operator=(const PDU__SM__SM__Status& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_SM_Status.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
  else field_smCause.clean_up();
}
return *this;
}

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

boolean PDU__SM__SM__Status::is_bound() const
{
return (field_messageType.is_bound())
  || (field_smCause.is_bound());
}
boolean PDU__SM__SM__Status::is_value() const
{
return field_messageType.is_value()
  && field_smCause.is_value();
}
void PDU__SM__SM__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(", smCause := ");
field_smCause.log();
TTCN_Logger::log_event_str(" }");
}

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

void PDU__SM__SM__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_GMM_SM_Types.PDU_SM_SM_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) smCause().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(), "smCause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          smCause().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_GMM_SM_Types.PDU_SM_SM_Status: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_SM_Status");
  }
}

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

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

void PDU__SM__SM__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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__SM__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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__SM__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, SMCauseV_descr_.raw->forceomit);
  decoded_field_length = field_smCause.RAW_decode(SMCauseV_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 (field_messageType !=  bs_69) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__SM__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, SMCauseV_descr_.raw);
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_smCause.RAW_encode(SMCauseV_descr_, *myleaf.body.node.nodes[1]);
  if (field_messageType !=  bs_69) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_69.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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__SM__Status_template::single_value_struct {
BITSTRING_template field_messageType;
OCTETSTRING_template field_smCause;
};

void PDU__SM__SM__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_smCause = ANY_VALUE;
}
}
}

void PDU__SM__SM__Status_template::copy_value(const PDU__SM__SM__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.smCause().is_bound()) {
  single_value->field_smCause = other_value.smCause();
} else {
  single_value->field_smCause.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__SM__Status_template::copy_template(const PDU__SM__SM__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.smCause().get_selection()) {
single_value->field_smCause = other_value.smCause();
} else {
single_value->field_smCause.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__SM__SM__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__SM__SM__Status_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__SM__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_GMM_SM_Types.PDU_SM_SM_Status.");
break;
}
set_selection(other_value);
}

PDU__SM__SM__Status_template::PDU__SM__SM__Status_template()
{
}

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

PDU__SM__SM__Status_template::PDU__SM__SM__Status_template(const PDU__SM__SM__Status& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__SM__Status_template& PDU__SM__SM__Status_template::operator=(const OPTIONAL<PDU__SM__SM__Status>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__SM__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_GMM_SM_Types.PDU_SM_SM_Status.");
}
return *this;
}

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

boolean PDU__SM__SM__Status_template::match(const PDU__SM__SM__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.smCause().is_bound()) return FALSE;
if(!single_value->field_smCause.match(other_value.smCause(), 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_GMM_SM_Types.PDU_SM_SM_Status.");
}
return FALSE;
}

boolean PDU__SM__SM__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_smCause.is_bound();
}

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

void PDU__SM__SM__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__SM__SM__Status PDU__SM__SM__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_GMM_SM_Types.PDU_SM_SM_Status.");
PDU__SM__SM__Status ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_smCause.is_bound()) {
ret_val.smCause() = single_value->field_smCause.valueof();
}
return ret_val;
}

void PDU__SM__SM__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_GMM_SM_Types.PDU_SM_SM_Status.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__SM__Status_template[list_length];
}

PDU__SM__SM__Status_template& PDU__SM__SM__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_GMM_SM_Types.PDU_SM_SM_Status.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_SM_Status.");
return value_list.list_value[list_index];
}

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

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

OCTETSTRING_template& PDU__SM__SM__Status_template::smCause()
{
set_specific();
return single_value->field_smCause;
}

const OCTETSTRING_template& PDU__SM__SM__Status_template::smCause() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field smCause of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_SM_Status.");
return single_value->field_smCause;
}

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

void PDU__SM__SM__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(", smCause := ");
single_value->field_smCause.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__SM__SM__Status_template::log_match(const PDU__SM__SM__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_smCause.match(match_value.smCause(), legacy)){
TTCN_Logger::log_logmatch_info(".smCause");
single_value->field_smCause.log_match(match_value.smCause(), 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(", smCause := ");
single_value->field_smCause.log_match(match_value.smCause(), 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__SM__SM__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_smCause.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_GMM_SM_Types.PDU_SM_SM_Status.");
}
}

void PDU__SM__SM__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_smCause.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__SM__SM__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_GMM_SM_Types.PDU_SM_SM_Status.");
}
}

void PDU__SM__SM__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__SM__SM__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_GMM_SM_Types.PDU_SM_SM_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) smCause().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(), "smCause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          smCause().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_GMM_SM_Types.PDU_SM_SM_Status: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__SM__Status_template* precondition = new PDU__SM__SM__Status_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__SM__Status_template* implied_template = new PDU__SM__SM__Status_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__SM__Status_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_SM_Status");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__SM__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_GMM_SM_Types.PDU_SM_SM_Status");
single_value->field_smCause.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_SM_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_GMM_SM_Types.PDU_SM_SM_Status");
}

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

boolean PDU__SM__SM__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__SM__ActivateMBMSContextRequest::PDU__SM__ActivateMBMSContextRequest()
{
}

PDU__SM__ActivateMBMSContextRequest::PDU__SM__ActivateMBMSContextRequest(const BITSTRING& par_messageType,
    const EnhancedNetworkSeviveAccessPointIDV& par_requestedMBMS__NSAPI,
    const LLC__SAPIV& par_requestedLLCSAPI,
    const MBMSBearerCapabilitiesLV& par_supportdMBMSBearerCapabilities,
    const PDPAddressLV& par_requestedMulticastAddress,
    const AccessPointNameLV& par_accessPointName,
    const OPTIONAL< MBMSProtocolConfigOptionsTLV >& par_mBMSprotocolConfigOptions,
    const OPTIONAL< MobileL3__CommonIE__Types::DevicePropertiesTV >& par_deviceProperties)
  :   field_messageType(par_messageType),
  field_requestedMBMS__NSAPI(par_requestedMBMS__NSAPI),
  field_requestedLLCSAPI(par_requestedLLCSAPI),
  field_supportdMBMSBearerCapabilities(par_supportdMBMSBearerCapabilities),
  field_requestedMulticastAddress(par_requestedMulticastAddress),
  field_accessPointName(par_accessPointName),
  field_mBMSprotocolConfigOptions(par_mBMSprotocolConfigOptions),
  field_deviceProperties(par_deviceProperties)
{
}

PDU__SM__ActivateMBMSContextRequest::PDU__SM__ActivateMBMSContextRequest(const PDU__SM__ActivateMBMSContextRequest& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.requestedMBMS__NSAPI().is_bound()) field_requestedMBMS__NSAPI = other_value.requestedMBMS__NSAPI();
else field_requestedMBMS__NSAPI.clean_up();
if (other_value.requestedLLCSAPI().is_bound()) field_requestedLLCSAPI = other_value.requestedLLCSAPI();
else field_requestedLLCSAPI.clean_up();
if (other_value.supportdMBMSBearerCapabilities().is_bound()) field_supportdMBMSBearerCapabilities = other_value.supportdMBMSBearerCapabilities();
else field_supportdMBMSBearerCapabilities.clean_up();
if (other_value.requestedMulticastAddress().is_bound()) field_requestedMulticastAddress = other_value.requestedMulticastAddress();
else field_requestedMulticastAddress.clean_up();
if (other_value.accessPointName().is_bound()) field_accessPointName = other_value.accessPointName();
else field_accessPointName.clean_up();
if (other_value.mBMSprotocolConfigOptions().is_bound()) field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
else field_mBMSprotocolConfigOptions.clean_up();
if (other_value.deviceProperties().is_bound()) field_deviceProperties = other_value.deviceProperties();
else field_deviceProperties.clean_up();
}

void PDU__SM__ActivateMBMSContextRequest::clean_up()
{
field_messageType.clean_up();
field_requestedMBMS__NSAPI.clean_up();
field_requestedLLCSAPI.clean_up();
field_supportdMBMSBearerCapabilities.clean_up();
field_requestedMulticastAddress.clean_up();
field_accessPointName.clean_up();
field_mBMSprotocolConfigOptions.clean_up();
field_deviceProperties.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__ActivateMBMSContextRequest::get_descriptor() const { return &PDU__SM__ActivateMBMSContextRequest_descr_; }
PDU__SM__ActivateMBMSContextRequest& PDU__SM__ActivateMBMSContextRequest::operator=(const PDU__SM__ActivateMBMSContextRequest& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.requestedMBMS__NSAPI().is_bound()) field_requestedMBMS__NSAPI = other_value.requestedMBMS__NSAPI();
  else field_requestedMBMS__NSAPI.clean_up();
  if (other_value.requestedLLCSAPI().is_bound()) field_requestedLLCSAPI = other_value.requestedLLCSAPI();
  else field_requestedLLCSAPI.clean_up();
  if (other_value.supportdMBMSBearerCapabilities().is_bound()) field_supportdMBMSBearerCapabilities = other_value.supportdMBMSBearerCapabilities();
  else field_supportdMBMSBearerCapabilities.clean_up();
  if (other_value.requestedMulticastAddress().is_bound()) field_requestedMulticastAddress = other_value.requestedMulticastAddress();
  else field_requestedMulticastAddress.clean_up();
  if (other_value.accessPointName().is_bound()) field_accessPointName = other_value.accessPointName();
  else field_accessPointName.clean_up();
  if (other_value.mBMSprotocolConfigOptions().is_bound()) field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
  else field_mBMSprotocolConfigOptions.clean_up();
  if (other_value.deviceProperties().is_bound()) field_deviceProperties = other_value.deviceProperties();
  else field_deviceProperties.clean_up();
}
return *this;
}

boolean PDU__SM__ActivateMBMSContextRequest::operator==(const PDU__SM__ActivateMBMSContextRequest& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_requestedMBMS__NSAPI==other_value.field_requestedMBMS__NSAPI
  && field_requestedLLCSAPI==other_value.field_requestedLLCSAPI
  && field_supportdMBMSBearerCapabilities==other_value.field_supportdMBMSBearerCapabilities
  && field_requestedMulticastAddress==other_value.field_requestedMulticastAddress
  && field_accessPointName==other_value.field_accessPointName
  && field_mBMSprotocolConfigOptions==other_value.field_mBMSprotocolConfigOptions
  && field_deviceProperties==other_value.field_deviceProperties;
}

boolean PDU__SM__ActivateMBMSContextRequest::is_bound() const
{
return (field_messageType.is_bound())
  || (field_requestedMBMS__NSAPI.is_bound())
  || (field_requestedLLCSAPI.is_bound())
  || (field_supportdMBMSBearerCapabilities.is_bound())
  || (field_requestedMulticastAddress.is_bound())
  || (field_accessPointName.is_bound())
  || (OPTIONAL_OMIT == field_mBMSprotocolConfigOptions.get_selection() || field_mBMSprotocolConfigOptions.is_bound())
  || (OPTIONAL_OMIT == field_deviceProperties.get_selection() || field_deviceProperties.is_bound());
}
boolean PDU__SM__ActivateMBMSContextRequest::is_value() const
{
return field_messageType.is_value()
  && field_requestedMBMS__NSAPI.is_value()
  && field_requestedLLCSAPI.is_value()
  && field_supportdMBMSBearerCapabilities.is_value()
  && field_requestedMulticastAddress.is_value()
  && field_accessPointName.is_value()
  && (OPTIONAL_OMIT == field_mBMSprotocolConfigOptions.get_selection() || field_mBMSprotocolConfigOptions.is_value())
  && (OPTIONAL_OMIT == field_deviceProperties.get_selection() || field_deviceProperties.is_value());
}
int PDU__SM__ActivateMBMSContextRequest::size_of() const
{
  int ret_val = 6;
  if (field_mBMSprotocolConfigOptions.ispresent()) ret_val++;
  if (field_deviceProperties.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__ActivateMBMSContextRequest::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(", requestedMBMS_NSAPI := ");
field_requestedMBMS__NSAPI.log();
TTCN_Logger::log_event_str(", requestedLLCSAPI := ");
field_requestedLLCSAPI.log();
TTCN_Logger::log_event_str(", supportdMBMSBearerCapabilities := ");
field_supportdMBMSBearerCapabilities.log();
TTCN_Logger::log_event_str(", requestedMulticastAddress := ");
field_requestedMulticastAddress.log();
TTCN_Logger::log_event_str(", accessPointName := ");
field_accessPointName.log();
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
field_mBMSprotocolConfigOptions.log();
TTCN_Logger::log_event_str(", deviceProperties := ");
field_deviceProperties.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__ActivateMBMSContextRequest::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (requestedMBMS__NSAPI().is_bound()) requestedMBMS__NSAPI().set_implicit_omit();
if (requestedLLCSAPI().is_bound()) requestedLLCSAPI().set_implicit_omit();
if (supportdMBMSBearerCapabilities().is_bound()) supportdMBMSBearerCapabilities().set_implicit_omit();
if (requestedMulticastAddress().is_bound()) requestedMulticastAddress().set_implicit_omit();
if (accessPointName().is_bound()) accessPointName().set_implicit_omit();
if (!mBMSprotocolConfigOptions().is_bound()) mBMSprotocolConfigOptions() = OMIT_VALUE;
else mBMSprotocolConfigOptions().set_implicit_omit();
if (!deviceProperties().is_bound()) deviceProperties() = OMIT_VALUE;
else deviceProperties().set_implicit_omit();
}

void PDU__SM__ActivateMBMSContextRequest::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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest 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) requestedMBMS__NSAPI().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) requestedLLCSAPI().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) supportdMBMSBearerCapabilities().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) requestedMulticastAddress().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) accessPointName().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) mBMSprotocolConfigOptions().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) deviceProperties().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(), "requestedMBMS_NSAPI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          requestedMBMS__NSAPI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "requestedLLCSAPI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          requestedLLCSAPI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "supportdMBMSBearerCapabilities")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          supportdMBMSBearerCapabilities().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "requestedMulticastAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          requestedMulticastAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "accessPointName")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          accessPointName().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMSprotocolConfigOptions")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMSprotocolConfigOptions().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "deviceProperties")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          deviceProperties().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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest");
  }
}

void PDU__SM__ActivateMBMSContextRequest::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_requestedMBMS__NSAPI.encode_text(text_buf);
field_requestedLLCSAPI.encode_text(text_buf);
field_supportdMBMSBearerCapabilities.encode_text(text_buf);
field_requestedMulticastAddress.encode_text(text_buf);
field_accessPointName.encode_text(text_buf);
field_mBMSprotocolConfigOptions.encode_text(text_buf);
field_deviceProperties.encode_text(text_buf);
}

void PDU__SM__ActivateMBMSContextRequest::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_requestedMBMS__NSAPI.decode_text(text_buf);
field_requestedLLCSAPI.decode_text(text_buf);
field_supportdMBMSBearerCapabilities.decode_text(text_buf);
field_requestedMulticastAddress.decode_text(text_buf);
field_accessPointName.decode_text(text_buf);
field_mBMSprotocolConfigOptions.decode_text(text_buf);
field_deviceProperties.decode_text(text_buf);
}

void PDU__SM__ActivateMBMSContextRequest::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__ActivateMBMSContextRequest::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__ActivateMBMSContextRequest::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, EnhancedNetworkSeviveAccessPointIDV_descr_.raw->forceomit);
  decoded_field_length = field_requestedMBMS__NSAPI.RAW_decode(EnhancedNetworkSeviveAccessPointIDV_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, LLC__SAPIV_descr_.raw->forceomit);
  decoded_field_length = field_requestedLLCSAPI.RAW_decode(LLC__SAPIV_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, MBMSBearerCapabilitiesLV_descr_.raw->forceomit);
  decoded_field_length = field_supportdMBMSBearerCapabilities.RAW_decode(MBMSBearerCapabilitiesLV_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, PDPAddressLV_descr_.raw->forceomit);
  decoded_field_length = field_requestedMulticastAddress.RAW_decode(PDPAddressLV_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, AccessPointNameLV_descr_.raw->forceomit);
  decoded_field_length = field_accessPointName.RAW_decode(AccessPointNameLV_descr_, p_buf, limit, local_top_order, no_err, -1, TRUE, &field_5_force_omit);
  if (decoded_field_length < 0) return decoded_field_length;
  decoded_length+=decoded_field_length;
  limit-=decoded_field_length;
  last_decoded_pos=bigger(last_decoded_pos, p_buf.get_pos_bit());
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(6)) {
    field_mBMSprotocolConfigOptions = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_6_force_omit(6, force_omit, MBMSProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_mBMSprotocolConfigOptions().RAW_decode(MBMSProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_6_force_omit);
  if (decoded_field_length < 1) {
  field_mBMSprotocolConfigOptions = 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_mBMSprotocolConfigOptions=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(7)) {
    field_deviceProperties = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_7_force_omit(7, force_omit, MobileL3__CommonIE__Types::DevicePropertiesTV_descr_.raw->forceomit);
  decoded_field_length = field_deviceProperties().RAW_decode(MobileL3__CommonIE__Types::DevicePropertiesTV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_7_force_omit);
  if (decoded_field_length < 1) {
  field_deviceProperties = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_deviceProperties.ispresent() || field_deviceProperties().elementIdentifier() !=  bs_21){
  field_deviceProperties=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_deviceProperties=OMIT_VALUE;
  if (field_messageType !=  bs_70) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__ActivateMBMSContextRequest::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, EnhancedNetworkSeviveAccessPointIDV_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, LLC__SAPIV_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, MBMSBearerCapabilitiesLV_descr_.raw);
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, PDPAddressLV_descr_.raw);
  myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 5, AccessPointNameLV_descr_.raw);
  if (field_mBMSprotocolConfigOptions.ispresent()) {
  myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 6, MBMSProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[6] = NULL;
  if (field_deviceProperties.ispresent()) {
  myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 7, MobileL3__CommonIE__Types::DevicePropertiesTV_descr_.raw);
  }
  else myleaf.body.node.nodes[7] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_requestedMBMS__NSAPI.RAW_encode(EnhancedNetworkSeviveAccessPointIDV_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_requestedLLCSAPI.RAW_encode(LLC__SAPIV_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_supportdMBMSBearerCapabilities.RAW_encode(MBMSBearerCapabilitiesLV_descr_, *myleaf.body.node.nodes[3]);
  encoded_length += field_requestedMulticastAddress.RAW_encode(PDPAddressLV_descr_, *myleaf.body.node.nodes[4]);
  encoded_length += field_accessPointName.RAW_encode(AccessPointNameLV_descr_, *myleaf.body.node.nodes[5]);
  if (field_mBMSprotocolConfigOptions.ispresent()) {
  encoded_length += field_mBMSprotocolConfigOptions().RAW_encode(MBMSProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[6]);
  }
  if (field_deviceProperties.ispresent()) {
  encoded_length += field_deviceProperties().RAW_encode(MobileL3__CommonIE__Types::DevicePropertiesTV_descr_, *myleaf.body.node.nodes[7]);
  }
  if (field_deviceProperties.ispresent() && (!field_deviceProperties.ispresent() || field_deviceProperties().elementIdentifier() !=  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,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_21.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);
  }
  }
  if (field_messageType !=  bs_70) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_70.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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__ActivateMBMSContextRequest_template::single_value_struct {
BITSTRING_template field_messageType;
EnhancedNetworkSeviveAccessPointIDV_template field_requestedMBMS__NSAPI;
LLC__SAPIV_template field_requestedLLCSAPI;
MBMSBearerCapabilitiesLV_template field_supportdMBMSBearerCapabilities;
PDPAddressLV_template field_requestedMulticastAddress;
AccessPointNameLV_template field_accessPointName;
MBMSProtocolConfigOptionsTLV_template field_mBMSprotocolConfigOptions;
MobileL3__CommonIE__Types::DevicePropertiesTV_template field_deviceProperties;
};

void PDU__SM__ActivateMBMSContextRequest_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_requestedMBMS__NSAPI = ANY_VALUE;
single_value->field_requestedLLCSAPI = ANY_VALUE;
single_value->field_supportdMBMSBearerCapabilities = ANY_VALUE;
single_value->field_requestedMulticastAddress = ANY_VALUE;
single_value->field_accessPointName = ANY_VALUE;
single_value->field_mBMSprotocolConfigOptions = ANY_OR_OMIT;
single_value->field_deviceProperties = ANY_OR_OMIT;
}
}
}

void PDU__SM__ActivateMBMSContextRequest_template::copy_value(const PDU__SM__ActivateMBMSContextRequest& 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.requestedMBMS__NSAPI().is_bound()) {
  single_value->field_requestedMBMS__NSAPI = other_value.requestedMBMS__NSAPI();
} else {
  single_value->field_requestedMBMS__NSAPI.clean_up();
}
if (other_value.requestedLLCSAPI().is_bound()) {
  single_value->field_requestedLLCSAPI = other_value.requestedLLCSAPI();
} else {
  single_value->field_requestedLLCSAPI.clean_up();
}
if (other_value.supportdMBMSBearerCapabilities().is_bound()) {
  single_value->field_supportdMBMSBearerCapabilities = other_value.supportdMBMSBearerCapabilities();
} else {
  single_value->field_supportdMBMSBearerCapabilities.clean_up();
}
if (other_value.requestedMulticastAddress().is_bound()) {
  single_value->field_requestedMulticastAddress = other_value.requestedMulticastAddress();
} else {
  single_value->field_requestedMulticastAddress.clean_up();
}
if (other_value.accessPointName().is_bound()) {
  single_value->field_accessPointName = other_value.accessPointName();
} else {
  single_value->field_accessPointName.clean_up();
}
if (other_value.mBMSprotocolConfigOptions().is_bound()) {
  if (other_value.mBMSprotocolConfigOptions().ispresent()) single_value->field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions()();
  else single_value->field_mBMSprotocolConfigOptions = OMIT_VALUE;
} else {
  single_value->field_mBMSprotocolConfigOptions.clean_up();
}
if (other_value.deviceProperties().is_bound()) {
  if (other_value.deviceProperties().ispresent()) single_value->field_deviceProperties = other_value.deviceProperties()();
  else single_value->field_deviceProperties = OMIT_VALUE;
} else {
  single_value->field_deviceProperties.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__ActivateMBMSContextRequest_template::copy_template(const PDU__SM__ActivateMBMSContextRequest_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.requestedMBMS__NSAPI().get_selection()) {
single_value->field_requestedMBMS__NSAPI = other_value.requestedMBMS__NSAPI();
} else {
single_value->field_requestedMBMS__NSAPI.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.requestedLLCSAPI().get_selection()) {
single_value->field_requestedLLCSAPI = other_value.requestedLLCSAPI();
} else {
single_value->field_requestedLLCSAPI.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.supportdMBMSBearerCapabilities().get_selection()) {
single_value->field_supportdMBMSBearerCapabilities = other_value.supportdMBMSBearerCapabilities();
} else {
single_value->field_supportdMBMSBearerCapabilities.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.requestedMulticastAddress().get_selection()) {
single_value->field_requestedMulticastAddress = other_value.requestedMulticastAddress();
} else {
single_value->field_requestedMulticastAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.accessPointName().get_selection()) {
single_value->field_accessPointName = other_value.accessPointName();
} else {
single_value->field_accessPointName.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mBMSprotocolConfigOptions().get_selection()) {
single_value->field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
} else {
single_value->field_mBMSprotocolConfigOptions.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.deviceProperties().get_selection()) {
single_value->field_deviceProperties = other_value.deviceProperties();
} else {
single_value->field_deviceProperties.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__SM__ActivateMBMSContextRequest_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__SM__ActivateMBMSContextRequest_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__ActivateMBMSContextRequest_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
break;
}
set_selection(other_value);
}

PDU__SM__ActivateMBMSContextRequest_template::PDU__SM__ActivateMBMSContextRequest_template()
{
}

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

PDU__SM__ActivateMBMSContextRequest_template::PDU__SM__ActivateMBMSContextRequest_template(const PDU__SM__ActivateMBMSContextRequest& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__ActivateMBMSContextRequest_template& PDU__SM__ActivateMBMSContextRequest_template::operator=(const OPTIONAL<PDU__SM__ActivateMBMSContextRequest>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__ActivateMBMSContextRequest&)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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
}
return *this;
}

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

boolean PDU__SM__ActivateMBMSContextRequest_template::match(const PDU__SM__ActivateMBMSContextRequest& 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.requestedMBMS__NSAPI().is_bound()) return FALSE;
if(!single_value->field_requestedMBMS__NSAPI.match(other_value.requestedMBMS__NSAPI(), legacy))return FALSE;
if(!other_value.requestedLLCSAPI().is_bound()) return FALSE;
if(!single_value->field_requestedLLCSAPI.match(other_value.requestedLLCSAPI(), legacy))return FALSE;
if(!other_value.supportdMBMSBearerCapabilities().is_bound()) return FALSE;
if(!single_value->field_supportdMBMSBearerCapabilities.match(other_value.supportdMBMSBearerCapabilities(), legacy))return FALSE;
if(!other_value.requestedMulticastAddress().is_bound()) return FALSE;
if(!single_value->field_requestedMulticastAddress.match(other_value.requestedMulticastAddress(), legacy))return FALSE;
if(!other_value.accessPointName().is_bound()) return FALSE;
if(!single_value->field_accessPointName.match(other_value.accessPointName(), legacy))return FALSE;
if(!other_value.mBMSprotocolConfigOptions().is_bound()) return FALSE;
if((other_value.mBMSprotocolConfigOptions().ispresent() ? !single_value->field_mBMSprotocolConfigOptions.match((const MBMSProtocolConfigOptionsTLV&)other_value.mBMSprotocolConfigOptions(), legacy) : !single_value->field_mBMSprotocolConfigOptions.match_omit(legacy)))return FALSE;
if(!other_value.deviceProperties().is_bound()) return FALSE;
if((other_value.deviceProperties().ispresent() ? !single_value->field_deviceProperties.match((const MobileL3__CommonIE__Types::DevicePropertiesTV&)other_value.deviceProperties(), legacy) : !single_value->field_deviceProperties.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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
}
return FALSE;
}

boolean PDU__SM__ActivateMBMSContextRequest_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_requestedMBMS__NSAPI.is_bound()
 || single_value->field_requestedLLCSAPI.is_bound()
 || single_value->field_supportdMBMSBearerCapabilities.is_bound()
 || single_value->field_requestedMulticastAddress.is_bound()
 || single_value->field_accessPointName.is_bound()
 || (single_value->field_mBMSprotocolConfigOptions.is_omit() || single_value->field_mBMSprotocolConfigOptions.is_bound())
 || (single_value->field_deviceProperties.is_omit() || single_value->field_deviceProperties.is_bound());
}

boolean PDU__SM__ActivateMBMSContextRequest_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_requestedMBMS__NSAPI.is_value()
 && single_value->field_requestedLLCSAPI.is_value()
 && single_value->field_supportdMBMSBearerCapabilities.is_value()
 && single_value->field_requestedMulticastAddress.is_value()
 && single_value->field_accessPointName.is_value()
 && (single_value->field_mBMSprotocolConfigOptions.is_omit() || single_value->field_mBMSprotocolConfigOptions.is_value())
 && (single_value->field_deviceProperties.is_omit() || single_value->field_deviceProperties.is_value());
}

void PDU__SM__ActivateMBMSContextRequest_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__SM__ActivateMBMSContextRequest PDU__SM__ActivateMBMSContextRequest_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
PDU__SM__ActivateMBMSContextRequest ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_requestedMBMS__NSAPI.is_bound()) {
ret_val.requestedMBMS__NSAPI() = single_value->field_requestedMBMS__NSAPI.valueof();
}
if (single_value->field_requestedLLCSAPI.is_bound()) {
ret_val.requestedLLCSAPI() = single_value->field_requestedLLCSAPI.valueof();
}
if (single_value->field_supportdMBMSBearerCapabilities.is_bound()) {
ret_val.supportdMBMSBearerCapabilities() = single_value->field_supportdMBMSBearerCapabilities.valueof();
}
if (single_value->field_requestedMulticastAddress.is_bound()) {
ret_val.requestedMulticastAddress() = single_value->field_requestedMulticastAddress.valueof();
}
if (single_value->field_accessPointName.is_bound()) {
ret_val.accessPointName() = single_value->field_accessPointName.valueof();
}
if (single_value->field_mBMSprotocolConfigOptions.is_omit()) ret_val.mBMSprotocolConfigOptions() = OMIT_VALUE;
else if (single_value->field_mBMSprotocolConfigOptions.is_bound()) {
ret_val.mBMSprotocolConfigOptions() = single_value->field_mBMSprotocolConfigOptions.valueof();
}
if (single_value->field_deviceProperties.is_omit()) ret_val.deviceProperties() = OMIT_VALUE;
else if (single_value->field_deviceProperties.is_bound()) {
ret_val.deviceProperties() = single_value->field_deviceProperties.valueof();
}
return ret_val;
}

void PDU__SM__ActivateMBMSContextRequest_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__ActivateMBMSContextRequest_template[list_length];
}

PDU__SM__ActivateMBMSContextRequest_template& PDU__SM__ActivateMBMSContextRequest_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
return value_list.list_value[list_index];
}

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

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

EnhancedNetworkSeviveAccessPointIDV_template& PDU__SM__ActivateMBMSContextRequest_template::requestedMBMS__NSAPI()
{
set_specific();
return single_value->field_requestedMBMS__NSAPI;
}

const EnhancedNetworkSeviveAccessPointIDV_template& PDU__SM__ActivateMBMSContextRequest_template::requestedMBMS__NSAPI() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field requestedMBMS_NSAPI of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
return single_value->field_requestedMBMS__NSAPI;
}

LLC__SAPIV_template& PDU__SM__ActivateMBMSContextRequest_template::requestedLLCSAPI()
{
set_specific();
return single_value->field_requestedLLCSAPI;
}

const LLC__SAPIV_template& PDU__SM__ActivateMBMSContextRequest_template::requestedLLCSAPI() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field requestedLLCSAPI of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
return single_value->field_requestedLLCSAPI;
}

MBMSBearerCapabilitiesLV_template& PDU__SM__ActivateMBMSContextRequest_template::supportdMBMSBearerCapabilities()
{
set_specific();
return single_value->field_supportdMBMSBearerCapabilities;
}

const MBMSBearerCapabilitiesLV_template& PDU__SM__ActivateMBMSContextRequest_template::supportdMBMSBearerCapabilities() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field supportdMBMSBearerCapabilities of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
return single_value->field_supportdMBMSBearerCapabilities;
}

PDPAddressLV_template& PDU__SM__ActivateMBMSContextRequest_template::requestedMulticastAddress()
{
set_specific();
return single_value->field_requestedMulticastAddress;
}

const PDPAddressLV_template& PDU__SM__ActivateMBMSContextRequest_template::requestedMulticastAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field requestedMulticastAddress of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
return single_value->field_requestedMulticastAddress;
}

AccessPointNameLV_template& PDU__SM__ActivateMBMSContextRequest_template::accessPointName()
{
set_specific();
return single_value->field_accessPointName;
}

const AccessPointNameLV_template& PDU__SM__ActivateMBMSContextRequest_template::accessPointName() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field accessPointName of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
return single_value->field_accessPointName;
}

MBMSProtocolConfigOptionsTLV_template& PDU__SM__ActivateMBMSContextRequest_template::mBMSprotocolConfigOptions()
{
set_specific();
return single_value->field_mBMSprotocolConfigOptions;
}

const MBMSProtocolConfigOptionsTLV_template& PDU__SM__ActivateMBMSContextRequest_template::mBMSprotocolConfigOptions() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mBMSprotocolConfigOptions of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
return single_value->field_mBMSprotocolConfigOptions;
}

MobileL3__CommonIE__Types::DevicePropertiesTV_template& PDU__SM__ActivateMBMSContextRequest_template::deviceProperties()
{
set_specific();
return single_value->field_deviceProperties;
}

const MobileL3__CommonIE__Types::DevicePropertiesTV_template& PDU__SM__ActivateMBMSContextRequest_template::deviceProperties() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field deviceProperties of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
return single_value->field_deviceProperties;
}

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

void PDU__SM__ActivateMBMSContextRequest_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(", requestedMBMS_NSAPI := ");
single_value->field_requestedMBMS__NSAPI.log();
TTCN_Logger::log_event_str(", requestedLLCSAPI := ");
single_value->field_requestedLLCSAPI.log();
TTCN_Logger::log_event_str(", supportdMBMSBearerCapabilities := ");
single_value->field_supportdMBMSBearerCapabilities.log();
TTCN_Logger::log_event_str(", requestedMulticastAddress := ");
single_value->field_requestedMulticastAddress.log();
TTCN_Logger::log_event_str(", accessPointName := ");
single_value->field_accessPointName.log();
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
single_value->field_mBMSprotocolConfigOptions.log();
TTCN_Logger::log_event_str(", deviceProperties := ");
single_value->field_deviceProperties.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__SM__ActivateMBMSContextRequest_template::log_match(const PDU__SM__ActivateMBMSContextRequest& 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_requestedMBMS__NSAPI.match(match_value.requestedMBMS__NSAPI(), legacy)){
TTCN_Logger::log_logmatch_info(".requestedMBMS_NSAPI");
single_value->field_requestedMBMS__NSAPI.log_match(match_value.requestedMBMS__NSAPI(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_requestedLLCSAPI.match(match_value.requestedLLCSAPI(), legacy)){
TTCN_Logger::log_logmatch_info(".requestedLLCSAPI");
single_value->field_requestedLLCSAPI.log_match(match_value.requestedLLCSAPI(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_supportdMBMSBearerCapabilities.match(match_value.supportdMBMSBearerCapabilities(), legacy)){
TTCN_Logger::log_logmatch_info(".supportdMBMSBearerCapabilities");
single_value->field_supportdMBMSBearerCapabilities.log_match(match_value.supportdMBMSBearerCapabilities(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_requestedMulticastAddress.match(match_value.requestedMulticastAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".requestedMulticastAddress");
single_value->field_requestedMulticastAddress.log_match(match_value.requestedMulticastAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_accessPointName.match(match_value.accessPointName(), legacy)){
TTCN_Logger::log_logmatch_info(".accessPointName");
single_value->field_accessPointName.log_match(match_value.accessPointName(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.mBMSprotocolConfigOptions().ispresent()){
if(!single_value->field_mBMSprotocolConfigOptions.match(match_value.mBMSprotocolConfigOptions(), legacy)){
TTCN_Logger::log_logmatch_info(".mBMSprotocolConfigOptions");
single_value->field_mBMSprotocolConfigOptions.log_match(match_value.mBMSprotocolConfigOptions(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_mBMSprotocolConfigOptions.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".mBMSprotocolConfigOptions := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_mBMSprotocolConfigOptions.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.deviceProperties().ispresent()){
if(!single_value->field_deviceProperties.match(match_value.deviceProperties(), legacy)){
TTCN_Logger::log_logmatch_info(".deviceProperties");
single_value->field_deviceProperties.log_match(match_value.deviceProperties(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_deviceProperties.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".deviceProperties := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_deviceProperties.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(", requestedMBMS_NSAPI := ");
single_value->field_requestedMBMS__NSAPI.log_match(match_value.requestedMBMS__NSAPI(), legacy);
TTCN_Logger::log_event_str(", requestedLLCSAPI := ");
single_value->field_requestedLLCSAPI.log_match(match_value.requestedLLCSAPI(), legacy);
TTCN_Logger::log_event_str(", supportdMBMSBearerCapabilities := ");
single_value->field_supportdMBMSBearerCapabilities.log_match(match_value.supportdMBMSBearerCapabilities(), legacy);
TTCN_Logger::log_event_str(", requestedMulticastAddress := ");
single_value->field_requestedMulticastAddress.log_match(match_value.requestedMulticastAddress(), legacy);
TTCN_Logger::log_event_str(", accessPointName := ");
single_value->field_accessPointName.log_match(match_value.accessPointName(), legacy);
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
if (match_value.mBMSprotocolConfigOptions().ispresent()) {
single_value->field_mBMSprotocolConfigOptions.log_match(match_value.mBMSprotocolConfigOptions(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_mBMSprotocolConfigOptions.log();
if (single_value->field_mBMSprotocolConfigOptions.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", deviceProperties := ");
if (match_value.deviceProperties().ispresent()) {
single_value->field_deviceProperties.log_match(match_value.deviceProperties(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_deviceProperties.log();
if (single_value->field_deviceProperties.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__SM__ActivateMBMSContextRequest_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_requestedMBMS__NSAPI.encode_text(text_buf);
single_value->field_requestedLLCSAPI.encode_text(text_buf);
single_value->field_supportdMBMSBearerCapabilities.encode_text(text_buf);
single_value->field_requestedMulticastAddress.encode_text(text_buf);
single_value->field_accessPointName.encode_text(text_buf);
single_value->field_mBMSprotocolConfigOptions.encode_text(text_buf);
single_value->field_deviceProperties.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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
}
}

void PDU__SM__ActivateMBMSContextRequest_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_requestedMBMS__NSAPI.decode_text(text_buf);
single_value->field_requestedLLCSAPI.decode_text(text_buf);
single_value->field_supportdMBMSBearerCapabilities.decode_text(text_buf);
single_value->field_requestedMulticastAddress.decode_text(text_buf);
single_value->field_accessPointName.decode_text(text_buf);
single_value->field_mBMSprotocolConfigOptions.decode_text(text_buf);
single_value->field_deviceProperties.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__SM__ActivateMBMSContextRequest_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest.");
}
}

void PDU__SM__ActivateMBMSContextRequest_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__SM__ActivateMBMSContextRequest_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest 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) requestedMBMS__NSAPI().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) requestedLLCSAPI().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) supportdMBMSBearerCapabilities().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) requestedMulticastAddress().set_param(*param.get_elem(4));
    if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) accessPointName().set_param(*param.get_elem(5));
    if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) mBMSprotocolConfigOptions().set_param(*param.get_elem(6));
    if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) deviceProperties().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(), "requestedMBMS_NSAPI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          requestedMBMS__NSAPI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "requestedLLCSAPI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          requestedLLCSAPI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "supportdMBMSBearerCapabilities")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          supportdMBMSBearerCapabilities().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "requestedMulticastAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          requestedMulticastAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "accessPointName")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          accessPointName().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMSprotocolConfigOptions")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMSprotocolConfigOptions().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "deviceProperties")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          deviceProperties().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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__ActivateMBMSContextRequest_template* precondition = new PDU__SM__ActivateMBMSContextRequest_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__ActivateMBMSContextRequest_template* implied_template = new PDU__SM__ActivateMBMSContextRequest_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__ActivateMBMSContextRequest_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__ActivateMBMSContextRequest_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest");
single_value->field_requestedMBMS__NSAPI.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest");
single_value->field_requestedLLCSAPI.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest");
single_value->field_supportdMBMSBearerCapabilities.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest");
single_value->field_requestedMulticastAddress.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest");
single_value->field_accessPointName.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest");
single_value->field_mBMSprotocolConfigOptions.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest");
single_value->field_deviceProperties.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest");
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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest");
}

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

boolean PDU__SM__ActivateMBMSContextRequest_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__SM__ActivateMBMSContextAccept::PDU__SM__ActivateMBMSContextAccept()
{
}

PDU__SM__ActivateMBMSContextAccept::PDU__SM__ActivateMBMSContextAccept(const BITSTRING& par_messageType,
    const TemporaryMobileGroupIDLV& par_temporaryMobileGroupIDLV,
    const LLC__SAPIV& par_negotiatedLLCSAPI,
    const OPTIONAL< MBMSProtocolConfigOptionsTLV >& par_mBMSprotocolConfigOptions)
  :   field_messageType(par_messageType),
  field_temporaryMobileGroupIDLV(par_temporaryMobileGroupIDLV),
  field_negotiatedLLCSAPI(par_negotiatedLLCSAPI),
  field_mBMSprotocolConfigOptions(par_mBMSprotocolConfigOptions)
{
}

PDU__SM__ActivateMBMSContextAccept::PDU__SM__ActivateMBMSContextAccept(const PDU__SM__ActivateMBMSContextAccept& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.temporaryMobileGroupIDLV().is_bound()) field_temporaryMobileGroupIDLV = other_value.temporaryMobileGroupIDLV();
else field_temporaryMobileGroupIDLV.clean_up();
if (other_value.negotiatedLLCSAPI().is_bound()) field_negotiatedLLCSAPI = other_value.negotiatedLLCSAPI();
else field_negotiatedLLCSAPI.clean_up();
if (other_value.mBMSprotocolConfigOptions().is_bound()) field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
else field_mBMSprotocolConfigOptions.clean_up();
}

void PDU__SM__ActivateMBMSContextAccept::clean_up()
{
field_messageType.clean_up();
field_temporaryMobileGroupIDLV.clean_up();
field_negotiatedLLCSAPI.clean_up();
field_mBMSprotocolConfigOptions.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__ActivateMBMSContextAccept::get_descriptor() const { return &PDU__SM__ActivateMBMSContextAccept_descr_; }
PDU__SM__ActivateMBMSContextAccept& PDU__SM__ActivateMBMSContextAccept::operator=(const PDU__SM__ActivateMBMSContextAccept& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.temporaryMobileGroupIDLV().is_bound()) field_temporaryMobileGroupIDLV = other_value.temporaryMobileGroupIDLV();
  else field_temporaryMobileGroupIDLV.clean_up();
  if (other_value.negotiatedLLCSAPI().is_bound()) field_negotiatedLLCSAPI = other_value.negotiatedLLCSAPI();
  else field_negotiatedLLCSAPI.clean_up();
  if (other_value.mBMSprotocolConfigOptions().is_bound()) field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
  else field_mBMSprotocolConfigOptions.clean_up();
}
return *this;
}

boolean PDU__SM__ActivateMBMSContextAccept::operator==(const PDU__SM__ActivateMBMSContextAccept& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_temporaryMobileGroupIDLV==other_value.field_temporaryMobileGroupIDLV
  && field_negotiatedLLCSAPI==other_value.field_negotiatedLLCSAPI
  && field_mBMSprotocolConfigOptions==other_value.field_mBMSprotocolConfigOptions;
}

boolean PDU__SM__ActivateMBMSContextAccept::is_bound() const
{
return (field_messageType.is_bound())
  || (field_temporaryMobileGroupIDLV.is_bound())
  || (field_negotiatedLLCSAPI.is_bound())
  || (OPTIONAL_OMIT == field_mBMSprotocolConfigOptions.get_selection() || field_mBMSprotocolConfigOptions.is_bound());
}
boolean PDU__SM__ActivateMBMSContextAccept::is_value() const
{
return field_messageType.is_value()
  && field_temporaryMobileGroupIDLV.is_value()
  && field_negotiatedLLCSAPI.is_value()
  && (OPTIONAL_OMIT == field_mBMSprotocolConfigOptions.get_selection() || field_mBMSprotocolConfigOptions.is_value());
}
int PDU__SM__ActivateMBMSContextAccept::size_of() const
{
  int ret_val = 3;
  if (field_mBMSprotocolConfigOptions.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__ActivateMBMSContextAccept::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(", temporaryMobileGroupIDLV := ");
field_temporaryMobileGroupIDLV.log();
TTCN_Logger::log_event_str(", negotiatedLLCSAPI := ");
field_negotiatedLLCSAPI.log();
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
field_mBMSprotocolConfigOptions.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__ActivateMBMSContextAccept::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (temporaryMobileGroupIDLV().is_bound()) temporaryMobileGroupIDLV().set_implicit_omit();
if (negotiatedLLCSAPI().is_bound()) negotiatedLLCSAPI().set_implicit_omit();
if (!mBMSprotocolConfigOptions().is_bound()) mBMSprotocolConfigOptions() = OMIT_VALUE;
else mBMSprotocolConfigOptions().set_implicit_omit();
}

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

void PDU__SM__ActivateMBMSContextAccept::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_temporaryMobileGroupIDLV.encode_text(text_buf);
field_negotiatedLLCSAPI.encode_text(text_buf);
field_mBMSprotocolConfigOptions.encode_text(text_buf);
}

void PDU__SM__ActivateMBMSContextAccept::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_temporaryMobileGroupIDLV.decode_text(text_buf);
field_negotiatedLLCSAPI.decode_text(text_buf);
field_mBMSprotocolConfigOptions.decode_text(text_buf);
}

void PDU__SM__ActivateMBMSContextAccept::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__ActivateMBMSContextAccept::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__ActivateMBMSContextAccept::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, TemporaryMobileGroupIDLV_descr_.raw->forceomit);
  decoded_field_length = field_temporaryMobileGroupIDLV.RAW_decode(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());
  RAW_Force_Omit field_2_force_omit(2, force_omit, LLC__SAPIV_descr_.raw->forceomit);
  decoded_field_length = field_negotiatedLLCSAPI.RAW_decode(LLC__SAPIV_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_mBMSprotocolConfigOptions = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_3_force_omit(3, force_omit, MBMSProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_mBMSprotocolConfigOptions().RAW_decode(MBMSProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_mBMSprotocolConfigOptions = 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_mBMSprotocolConfigOptions=OMIT_VALUE;
  if (field_messageType !=  bs_71) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__ActivateMBMSContextAccept::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, TemporaryMobileGroupIDLV_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, LLC__SAPIV_descr_.raw);
  if (field_mBMSprotocolConfigOptions.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, MBMSProtocolConfigOptionsTLV_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_temporaryMobileGroupIDLV.RAW_encode(TemporaryMobileGroupIDLV_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_negotiatedLLCSAPI.RAW_encode(LLC__SAPIV_descr_, *myleaf.body.node.nodes[2]);
  if (field_mBMSprotocolConfigOptions.ispresent()) {
  encoded_length += field_mBMSprotocolConfigOptions().RAW_encode(MBMSProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_messageType !=  bs_71) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_71.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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__ActivateMBMSContextAccept_template::single_value_struct {
BITSTRING_template field_messageType;
TemporaryMobileGroupIDLV_template field_temporaryMobileGroupIDLV;
LLC__SAPIV_template field_negotiatedLLCSAPI;
MBMSProtocolConfigOptionsTLV_template field_mBMSprotocolConfigOptions;
};

void PDU__SM__ActivateMBMSContextAccept_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_temporaryMobileGroupIDLV = ANY_VALUE;
single_value->field_negotiatedLLCSAPI = ANY_VALUE;
single_value->field_mBMSprotocolConfigOptions = ANY_OR_OMIT;
}
}
}

void PDU__SM__ActivateMBMSContextAccept_template::copy_value(const PDU__SM__ActivateMBMSContextAccept& 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.temporaryMobileGroupIDLV().is_bound()) {
  single_value->field_temporaryMobileGroupIDLV = other_value.temporaryMobileGroupIDLV();
} else {
  single_value->field_temporaryMobileGroupIDLV.clean_up();
}
if (other_value.negotiatedLLCSAPI().is_bound()) {
  single_value->field_negotiatedLLCSAPI = other_value.negotiatedLLCSAPI();
} else {
  single_value->field_negotiatedLLCSAPI.clean_up();
}
if (other_value.mBMSprotocolConfigOptions().is_bound()) {
  if (other_value.mBMSprotocolConfigOptions().ispresent()) single_value->field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions()();
  else single_value->field_mBMSprotocolConfigOptions = OMIT_VALUE;
} else {
  single_value->field_mBMSprotocolConfigOptions.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__ActivateMBMSContextAccept_template::copy_template(const PDU__SM__ActivateMBMSContextAccept_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.temporaryMobileGroupIDLV().get_selection()) {
single_value->field_temporaryMobileGroupIDLV = other_value.temporaryMobileGroupIDLV();
} else {
single_value->field_temporaryMobileGroupIDLV.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.negotiatedLLCSAPI().get_selection()) {
single_value->field_negotiatedLLCSAPI = other_value.negotiatedLLCSAPI();
} else {
single_value->field_negotiatedLLCSAPI.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mBMSprotocolConfigOptions().get_selection()) {
single_value->field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
} else {
single_value->field_mBMSprotocolConfigOptions.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__SM__ActivateMBMSContextAccept_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__SM__ActivateMBMSContextAccept_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__ActivateMBMSContextAccept_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept.");
break;
}
set_selection(other_value);
}

PDU__SM__ActivateMBMSContextAccept_template::PDU__SM__ActivateMBMSContextAccept_template()
{
}

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

PDU__SM__ActivateMBMSContextAccept_template::PDU__SM__ActivateMBMSContextAccept_template(const PDU__SM__ActivateMBMSContextAccept& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__ActivateMBMSContextAccept_template& PDU__SM__ActivateMBMSContextAccept_template::operator=(const OPTIONAL<PDU__SM__ActivateMBMSContextAccept>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__ActivateMBMSContextAccept&)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_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept.");
}
return *this;
}

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

boolean PDU__SM__ActivateMBMSContextAccept_template::match(const PDU__SM__ActivateMBMSContextAccept& 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.temporaryMobileGroupIDLV().is_bound()) return FALSE;
if(!single_value->field_temporaryMobileGroupIDLV.match(other_value.temporaryMobileGroupIDLV(), legacy))return FALSE;
if(!other_value.negotiatedLLCSAPI().is_bound()) return FALSE;
if(!single_value->field_negotiatedLLCSAPI.match(other_value.negotiatedLLCSAPI(), legacy))return FALSE;
if(!other_value.mBMSprotocolConfigOptions().is_bound()) return FALSE;
if((other_value.mBMSprotocolConfigOptions().ispresent() ? !single_value->field_mBMSprotocolConfigOptions.match((const MBMSProtocolConfigOptionsTLV&)other_value.mBMSprotocolConfigOptions(), legacy) : !single_value->field_mBMSprotocolConfigOptions.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_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept.");
}
return FALSE;
}

boolean PDU__SM__ActivateMBMSContextAccept_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_temporaryMobileGroupIDLV.is_bound()
 || single_value->field_negotiatedLLCSAPI.is_bound()
 || (single_value->field_mBMSprotocolConfigOptions.is_omit() || single_value->field_mBMSprotocolConfigOptions.is_bound());
}

boolean PDU__SM__ActivateMBMSContextAccept_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_temporaryMobileGroupIDLV.is_value()
 && single_value->field_negotiatedLLCSAPI.is_value()
 && (single_value->field_mBMSprotocolConfigOptions.is_omit() || single_value->field_mBMSprotocolConfigOptions.is_value());
}

void PDU__SM__ActivateMBMSContextAccept_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__SM__ActivateMBMSContextAccept PDU__SM__ActivateMBMSContextAccept_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept.");
PDU__SM__ActivateMBMSContextAccept ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_temporaryMobileGroupIDLV.is_bound()) {
ret_val.temporaryMobileGroupIDLV() = single_value->field_temporaryMobileGroupIDLV.valueof();
}
if (single_value->field_negotiatedLLCSAPI.is_bound()) {
ret_val.negotiatedLLCSAPI() = single_value->field_negotiatedLLCSAPI.valueof();
}
if (single_value->field_mBMSprotocolConfigOptions.is_omit()) ret_val.mBMSprotocolConfigOptions() = OMIT_VALUE;
else if (single_value->field_mBMSprotocolConfigOptions.is_bound()) {
ret_val.mBMSprotocolConfigOptions() = single_value->field_mBMSprotocolConfigOptions.valueof();
}
return ret_val;
}

void PDU__SM__ActivateMBMSContextAccept_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__ActivateMBMSContextAccept_template[list_length];
}

PDU__SM__ActivateMBMSContextAccept_template& PDU__SM__ActivateMBMSContextAccept_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept.");
return value_list.list_value[list_index];
}

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

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

TemporaryMobileGroupIDLV_template& PDU__SM__ActivateMBMSContextAccept_template::temporaryMobileGroupIDLV()
{
set_specific();
return single_value->field_temporaryMobileGroupIDLV;
}

const TemporaryMobileGroupIDLV_template& PDU__SM__ActivateMBMSContextAccept_template::temporaryMobileGroupIDLV() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field temporaryMobileGroupIDLV of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept.");
return single_value->field_temporaryMobileGroupIDLV;
}

LLC__SAPIV_template& PDU__SM__ActivateMBMSContextAccept_template::negotiatedLLCSAPI()
{
set_specific();
return single_value->field_negotiatedLLCSAPI;
}

const LLC__SAPIV_template& PDU__SM__ActivateMBMSContextAccept_template::negotiatedLLCSAPI() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field negotiatedLLCSAPI of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept.");
return single_value->field_negotiatedLLCSAPI;
}

MBMSProtocolConfigOptionsTLV_template& PDU__SM__ActivateMBMSContextAccept_template::mBMSprotocolConfigOptions()
{
set_specific();
return single_value->field_mBMSprotocolConfigOptions;
}

const MBMSProtocolConfigOptionsTLV_template& PDU__SM__ActivateMBMSContextAccept_template::mBMSprotocolConfigOptions() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mBMSprotocolConfigOptions of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept.");
return single_value->field_mBMSprotocolConfigOptions;
}

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

void PDU__SM__ActivateMBMSContextAccept_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(", temporaryMobileGroupIDLV := ");
single_value->field_temporaryMobileGroupIDLV.log();
TTCN_Logger::log_event_str(", negotiatedLLCSAPI := ");
single_value->field_negotiatedLLCSAPI.log();
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
single_value->field_mBMSprotocolConfigOptions.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__SM__ActivateMBMSContextAccept_template::log_match(const PDU__SM__ActivateMBMSContextAccept& 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_temporaryMobileGroupIDLV.match(match_value.temporaryMobileGroupIDLV(), legacy)){
TTCN_Logger::log_logmatch_info(".temporaryMobileGroupIDLV");
single_value->field_temporaryMobileGroupIDLV.log_match(match_value.temporaryMobileGroupIDLV(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_negotiatedLLCSAPI.match(match_value.negotiatedLLCSAPI(), legacy)){
TTCN_Logger::log_logmatch_info(".negotiatedLLCSAPI");
single_value->field_negotiatedLLCSAPI.log_match(match_value.negotiatedLLCSAPI(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.mBMSprotocolConfigOptions().ispresent()){
if(!single_value->field_mBMSprotocolConfigOptions.match(match_value.mBMSprotocolConfigOptions(), legacy)){
TTCN_Logger::log_logmatch_info(".mBMSprotocolConfigOptions");
single_value->field_mBMSprotocolConfigOptions.log_match(match_value.mBMSprotocolConfigOptions(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_mBMSprotocolConfigOptions.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".mBMSprotocolConfigOptions := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_mBMSprotocolConfigOptions.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(", temporaryMobileGroupIDLV := ");
single_value->field_temporaryMobileGroupIDLV.log_match(match_value.temporaryMobileGroupIDLV(), legacy);
TTCN_Logger::log_event_str(", negotiatedLLCSAPI := ");
single_value->field_negotiatedLLCSAPI.log_match(match_value.negotiatedLLCSAPI(), legacy);
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
if (match_value.mBMSprotocolConfigOptions().ispresent()) {
single_value->field_mBMSprotocolConfigOptions.log_match(match_value.mBMSprotocolConfigOptions(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_mBMSprotocolConfigOptions.log();
if (single_value->field_mBMSprotocolConfigOptions.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__SM__ActivateMBMSContextAccept_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_temporaryMobileGroupIDLV.encode_text(text_buf);
single_value->field_negotiatedLLCSAPI.encode_text(text_buf);
single_value->field_mBMSprotocolConfigOptions.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_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept.");
}
}

void PDU__SM__ActivateMBMSContextAccept_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_temporaryMobileGroupIDLV.decode_text(text_buf);
single_value->field_negotiatedLLCSAPI.decode_text(text_buf);
single_value->field_mBMSprotocolConfigOptions.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__SM__ActivateMBMSContextAccept_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept.");
}
}

void PDU__SM__ActivateMBMSContextAccept_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__SM__ActivateMBMSContextAccept_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept 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) temporaryMobileGroupIDLV().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) negotiatedLLCSAPI().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) mBMSprotocolConfigOptions().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(), "temporaryMobileGroupIDLV")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          temporaryMobileGroupIDLV().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "negotiatedLLCSAPI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          negotiatedLLCSAPI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMSprotocolConfigOptions")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMSprotocolConfigOptions().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_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__ActivateMBMSContextAccept_template* precondition = new PDU__SM__ActivateMBMSContextAccept_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__ActivateMBMSContextAccept_template* implied_template = new PDU__SM__ActivateMBMSContextAccept_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__ActivateMBMSContextAccept_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__ActivateMBMSContextAccept_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept");
single_value->field_temporaryMobileGroupIDLV.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept");
single_value->field_negotiatedLLCSAPI.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept");
single_value->field_mBMSprotocolConfigOptions.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept");
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_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept");
}

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

boolean PDU__SM__ActivateMBMSContextAccept_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__SM__ActivateMBMSContextReject::PDU__SM__ActivateMBMSContextReject()
{
}

PDU__SM__ActivateMBMSContextReject::PDU__SM__ActivateMBMSContextReject(const BITSTRING& par_messageType,
    const OCTETSTRING& par_smCause,
    const OPTIONAL< MBMSProtocolConfigOptionsTLV >& par_mBMSprotocolConfigOptions,
    const OPTIONAL< MobileL3__CommonIE__Types::GPRSTimer3TLV >& par_backOffTimer,
    const OPTIONAL< ReAttemptIndicatorTLV >& par_reAttemptIndicator)
  :   field_messageType(par_messageType),
  field_smCause(par_smCause),
  field_mBMSprotocolConfigOptions(par_mBMSprotocolConfigOptions),
  field_backOffTimer(par_backOffTimer),
  field_reAttemptIndicator(par_reAttemptIndicator)
{
}

PDU__SM__ActivateMBMSContextReject::PDU__SM__ActivateMBMSContextReject(const PDU__SM__ActivateMBMSContextReject& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
else field_smCause.clean_up();
if (other_value.mBMSprotocolConfigOptions().is_bound()) field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
else field_mBMSprotocolConfigOptions.clean_up();
if (other_value.backOffTimer().is_bound()) field_backOffTimer = other_value.backOffTimer();
else field_backOffTimer.clean_up();
if (other_value.reAttemptIndicator().is_bound()) field_reAttemptIndicator = other_value.reAttemptIndicator();
else field_reAttemptIndicator.clean_up();
}

void PDU__SM__ActivateMBMSContextReject::clean_up()
{
field_messageType.clean_up();
field_smCause.clean_up();
field_mBMSprotocolConfigOptions.clean_up();
field_backOffTimer.clean_up();
field_reAttemptIndicator.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__ActivateMBMSContextReject::get_descriptor() const { return &PDU__SM__ActivateMBMSContextReject_descr_; }
PDU__SM__ActivateMBMSContextReject& PDU__SM__ActivateMBMSContextReject::operator=(const PDU__SM__ActivateMBMSContextReject& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
  else field_smCause.clean_up();
  if (other_value.mBMSprotocolConfigOptions().is_bound()) field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
  else field_mBMSprotocolConfigOptions.clean_up();
  if (other_value.backOffTimer().is_bound()) field_backOffTimer = other_value.backOffTimer();
  else field_backOffTimer.clean_up();
  if (other_value.reAttemptIndicator().is_bound()) field_reAttemptIndicator = other_value.reAttemptIndicator();
  else field_reAttemptIndicator.clean_up();
}
return *this;
}

boolean PDU__SM__ActivateMBMSContextReject::operator==(const PDU__SM__ActivateMBMSContextReject& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_smCause==other_value.field_smCause
  && field_mBMSprotocolConfigOptions==other_value.field_mBMSprotocolConfigOptions
  && field_backOffTimer==other_value.field_backOffTimer
  && field_reAttemptIndicator==other_value.field_reAttemptIndicator;
}

boolean PDU__SM__ActivateMBMSContextReject::is_bound() const
{
return (field_messageType.is_bound())
  || (field_smCause.is_bound())
  || (OPTIONAL_OMIT == field_mBMSprotocolConfigOptions.get_selection() || field_mBMSprotocolConfigOptions.is_bound())
  || (OPTIONAL_OMIT == field_backOffTimer.get_selection() || field_backOffTimer.is_bound())
  || (OPTIONAL_OMIT == field_reAttemptIndicator.get_selection() || field_reAttemptIndicator.is_bound());
}
boolean PDU__SM__ActivateMBMSContextReject::is_value() const
{
return field_messageType.is_value()
  && field_smCause.is_value()
  && (OPTIONAL_OMIT == field_mBMSprotocolConfigOptions.get_selection() || field_mBMSprotocolConfigOptions.is_value())
  && (OPTIONAL_OMIT == field_backOffTimer.get_selection() || field_backOffTimer.is_value())
  && (OPTIONAL_OMIT == field_reAttemptIndicator.get_selection() || field_reAttemptIndicator.is_value());
}
int PDU__SM__ActivateMBMSContextReject::size_of() const
{
  int ret_val = 2;
  if (field_mBMSprotocolConfigOptions.ispresent()) ret_val++;
  if (field_backOffTimer.ispresent()) ret_val++;
  if (field_reAttemptIndicator.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__ActivateMBMSContextReject::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(", smCause := ");
field_smCause.log();
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
field_mBMSprotocolConfigOptions.log();
TTCN_Logger::log_event_str(", backOffTimer := ");
field_backOffTimer.log();
TTCN_Logger::log_event_str(", reAttemptIndicator := ");
field_reAttemptIndicator.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__ActivateMBMSContextReject::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (smCause().is_bound()) smCause().set_implicit_omit();
if (!mBMSprotocolConfigOptions().is_bound()) mBMSprotocolConfigOptions() = OMIT_VALUE;
else mBMSprotocolConfigOptions().set_implicit_omit();
if (!backOffTimer().is_bound()) backOffTimer() = OMIT_VALUE;
else backOffTimer().set_implicit_omit();
if (!reAttemptIndicator().is_bound()) reAttemptIndicator() = OMIT_VALUE;
else reAttemptIndicator().set_implicit_omit();
}

void PDU__SM__ActivateMBMSContextReject::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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject 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) smCause().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) mBMSprotocolConfigOptions().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) backOffTimer().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) reAttemptIndicator().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(), "smCause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          smCause().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMSprotocolConfigOptions")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMSprotocolConfigOptions().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "backOffTimer")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          backOffTimer().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "reAttemptIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          reAttemptIndicator().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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject");
  }
}

void PDU__SM__ActivateMBMSContextReject::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_smCause.encode_text(text_buf);
field_mBMSprotocolConfigOptions.encode_text(text_buf);
field_backOffTimer.encode_text(text_buf);
field_reAttemptIndicator.encode_text(text_buf);
}

void PDU__SM__ActivateMBMSContextReject::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_smCause.decode_text(text_buf);
field_mBMSprotocolConfigOptions.decode_text(text_buf);
field_backOffTimer.decode_text(text_buf);
field_reAttemptIndicator.decode_text(text_buf);
}

void PDU__SM__ActivateMBMSContextReject::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__ActivateMBMSContextReject::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__ActivateMBMSContextReject::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, SMCauseV_descr_.raw->forceomit);
  decoded_field_length = field_smCause.RAW_decode(SMCauseV_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_mBMSprotocolConfigOptions = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, MBMSProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_mBMSprotocolConfigOptions().RAW_decode(MBMSProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_mBMSprotocolConfigOptions = 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_mBMSprotocolConfigOptions=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(3)) {
    field_backOffTimer = 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::GPRSTimer3TLV_descr_.raw->forceomit);
  decoded_field_length = field_backOffTimer().RAW_decode(MobileL3__CommonIE__Types::GPRSTimer3TLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_3_force_omit);
  if (decoded_field_length < 1) {
  field_backOffTimer = OMIT_VALUE;
  p_buf.set_pos_bit(fl_start_pos);
  } else {
       if(!field_backOffTimer.ispresent() || field_backOffTimer().elementIdentifier() !=  os_33){
  field_backOffTimer=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_backOffTimer=OMIT_VALUE;
  if (limit > 0){
  if (force_omit != NULL && (*force_omit)(4)) {
    field_reAttemptIndicator = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, ReAttemptIndicatorTLV_descr_.raw->forceomit);
  decoded_field_length = field_reAttemptIndicator().RAW_decode(ReAttemptIndicatorTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_reAttemptIndicator = 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_reAttemptIndicator=OMIT_VALUE;
  if (field_messageType !=  bs_72) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__ActivateMBMSContextReject::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);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, SMCauseV_descr_.raw);
  if (field_mBMSprotocolConfigOptions.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, MBMSProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  if (field_backOffTimer.ispresent()) {
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, MobileL3__CommonIE__Types::GPRSTimer3TLV_descr_.raw);
  }
  else myleaf.body.node.nodes[3] = NULL;
  if (field_reAttemptIndicator.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, ReAttemptIndicatorTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_smCause.RAW_encode(SMCauseV_descr_, *myleaf.body.node.nodes[1]);
  if (field_mBMSprotocolConfigOptions.ispresent()) {
  encoded_length += field_mBMSprotocolConfigOptions().RAW_encode(MBMSProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_backOffTimer.ispresent()) {
  encoded_length += field_backOffTimer().RAW_encode(MobileL3__CommonIE__Types::GPRSTimer3TLV_descr_, *myleaf.body.node.nodes[3]);
  }
  if (field_reAttemptIndicator.ispresent()) {
  encoded_length += field_reAttemptIndicator().RAW_encode(ReAttemptIndicatorTLV_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_backOffTimer.ispresent() && (!field_backOffTimer.ispresent() || field_backOffTimer().elementIdentifier() !=  os_33)) {
  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_33.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_messageType !=  bs_72) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_72.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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__ActivateMBMSContextReject_template::single_value_struct {
BITSTRING_template field_messageType;
OCTETSTRING_template field_smCause;
MBMSProtocolConfigOptionsTLV_template field_mBMSprotocolConfigOptions;
MobileL3__CommonIE__Types::GPRSTimer3TLV_template field_backOffTimer;
ReAttemptIndicatorTLV_template field_reAttemptIndicator;
};

void PDU__SM__ActivateMBMSContextReject_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_smCause = ANY_VALUE;
single_value->field_mBMSprotocolConfigOptions = ANY_OR_OMIT;
single_value->field_backOffTimer = ANY_OR_OMIT;
single_value->field_reAttemptIndicator = ANY_OR_OMIT;
}
}
}

void PDU__SM__ActivateMBMSContextReject_template::copy_value(const PDU__SM__ActivateMBMSContextReject& 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.smCause().is_bound()) {
  single_value->field_smCause = other_value.smCause();
} else {
  single_value->field_smCause.clean_up();
}
if (other_value.mBMSprotocolConfigOptions().is_bound()) {
  if (other_value.mBMSprotocolConfigOptions().ispresent()) single_value->field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions()();
  else single_value->field_mBMSprotocolConfigOptions = OMIT_VALUE;
} else {
  single_value->field_mBMSprotocolConfigOptions.clean_up();
}
if (other_value.backOffTimer().is_bound()) {
  if (other_value.backOffTimer().ispresent()) single_value->field_backOffTimer = other_value.backOffTimer()();
  else single_value->field_backOffTimer = OMIT_VALUE;
} else {
  single_value->field_backOffTimer.clean_up();
}
if (other_value.reAttemptIndicator().is_bound()) {
  if (other_value.reAttemptIndicator().ispresent()) single_value->field_reAttemptIndicator = other_value.reAttemptIndicator()();
  else single_value->field_reAttemptIndicator = OMIT_VALUE;
} else {
  single_value->field_reAttemptIndicator.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__ActivateMBMSContextReject_template::copy_template(const PDU__SM__ActivateMBMSContextReject_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.smCause().get_selection()) {
single_value->field_smCause = other_value.smCause();
} else {
single_value->field_smCause.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mBMSprotocolConfigOptions().get_selection()) {
single_value->field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
} else {
single_value->field_mBMSprotocolConfigOptions.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.backOffTimer().get_selection()) {
single_value->field_backOffTimer = other_value.backOffTimer();
} else {
single_value->field_backOffTimer.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.reAttemptIndicator().get_selection()) {
single_value->field_reAttemptIndicator = other_value.reAttemptIndicator();
} else {
single_value->field_reAttemptIndicator.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__SM__ActivateMBMSContextReject_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__SM__ActivateMBMSContextReject_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__ActivateMBMSContextReject_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject.");
break;
}
set_selection(other_value);
}

PDU__SM__ActivateMBMSContextReject_template::PDU__SM__ActivateMBMSContextReject_template()
{
}

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

PDU__SM__ActivateMBMSContextReject_template::PDU__SM__ActivateMBMSContextReject_template(const PDU__SM__ActivateMBMSContextReject& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__ActivateMBMSContextReject_template& PDU__SM__ActivateMBMSContextReject_template::operator=(const OPTIONAL<PDU__SM__ActivateMBMSContextReject>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__ActivateMBMSContextReject&)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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject.");
}
return *this;
}

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

boolean PDU__SM__ActivateMBMSContextReject_template::match(const PDU__SM__ActivateMBMSContextReject& 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.smCause().is_bound()) return FALSE;
if(!single_value->field_smCause.match(other_value.smCause(), legacy))return FALSE;
if(!other_value.mBMSprotocolConfigOptions().is_bound()) return FALSE;
if((other_value.mBMSprotocolConfigOptions().ispresent() ? !single_value->field_mBMSprotocolConfigOptions.match((const MBMSProtocolConfigOptionsTLV&)other_value.mBMSprotocolConfigOptions(), legacy) : !single_value->field_mBMSprotocolConfigOptions.match_omit(legacy)))return FALSE;
if(!other_value.backOffTimer().is_bound()) return FALSE;
if((other_value.backOffTimer().ispresent() ? !single_value->field_backOffTimer.match((const MobileL3__CommonIE__Types::GPRSTimer3TLV&)other_value.backOffTimer(), legacy) : !single_value->field_backOffTimer.match_omit(legacy)))return FALSE;
if(!other_value.reAttemptIndicator().is_bound()) return FALSE;
if((other_value.reAttemptIndicator().ispresent() ? !single_value->field_reAttemptIndicator.match((const ReAttemptIndicatorTLV&)other_value.reAttemptIndicator(), legacy) : !single_value->field_reAttemptIndicator.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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject.");
}
return FALSE;
}

boolean PDU__SM__ActivateMBMSContextReject_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_smCause.is_bound()
 || (single_value->field_mBMSprotocolConfigOptions.is_omit() || single_value->field_mBMSprotocolConfigOptions.is_bound())
 || (single_value->field_backOffTimer.is_omit() || single_value->field_backOffTimer.is_bound())
 || (single_value->field_reAttemptIndicator.is_omit() || single_value->field_reAttemptIndicator.is_bound());
}

boolean PDU__SM__ActivateMBMSContextReject_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_smCause.is_value()
 && (single_value->field_mBMSprotocolConfigOptions.is_omit() || single_value->field_mBMSprotocolConfigOptions.is_value())
 && (single_value->field_backOffTimer.is_omit() || single_value->field_backOffTimer.is_value())
 && (single_value->field_reAttemptIndicator.is_omit() || single_value->field_reAttemptIndicator.is_value());
}

void PDU__SM__ActivateMBMSContextReject_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__SM__ActivateMBMSContextReject PDU__SM__ActivateMBMSContextReject_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject.");
PDU__SM__ActivateMBMSContextReject ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_smCause.is_bound()) {
ret_val.smCause() = single_value->field_smCause.valueof();
}
if (single_value->field_mBMSprotocolConfigOptions.is_omit()) ret_val.mBMSprotocolConfigOptions() = OMIT_VALUE;
else if (single_value->field_mBMSprotocolConfigOptions.is_bound()) {
ret_val.mBMSprotocolConfigOptions() = single_value->field_mBMSprotocolConfigOptions.valueof();
}
if (single_value->field_backOffTimer.is_omit()) ret_val.backOffTimer() = OMIT_VALUE;
else if (single_value->field_backOffTimer.is_bound()) {
ret_val.backOffTimer() = single_value->field_backOffTimer.valueof();
}
if (single_value->field_reAttemptIndicator.is_omit()) ret_val.reAttemptIndicator() = OMIT_VALUE;
else if (single_value->field_reAttemptIndicator.is_bound()) {
ret_val.reAttemptIndicator() = single_value->field_reAttemptIndicator.valueof();
}
return ret_val;
}

void PDU__SM__ActivateMBMSContextReject_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__ActivateMBMSContextReject_template[list_length];
}

PDU__SM__ActivateMBMSContextReject_template& PDU__SM__ActivateMBMSContextReject_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject.");
return value_list.list_value[list_index];
}

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

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

OCTETSTRING_template& PDU__SM__ActivateMBMSContextReject_template::smCause()
{
set_specific();
return single_value->field_smCause;
}

const OCTETSTRING_template& PDU__SM__ActivateMBMSContextReject_template::smCause() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field smCause of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject.");
return single_value->field_smCause;
}

MBMSProtocolConfigOptionsTLV_template& PDU__SM__ActivateMBMSContextReject_template::mBMSprotocolConfigOptions()
{
set_specific();
return single_value->field_mBMSprotocolConfigOptions;
}

const MBMSProtocolConfigOptionsTLV_template& PDU__SM__ActivateMBMSContextReject_template::mBMSprotocolConfigOptions() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mBMSprotocolConfigOptions of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject.");
return single_value->field_mBMSprotocolConfigOptions;
}

MobileL3__CommonIE__Types::GPRSTimer3TLV_template& PDU__SM__ActivateMBMSContextReject_template::backOffTimer()
{
set_specific();
return single_value->field_backOffTimer;
}

const MobileL3__CommonIE__Types::GPRSTimer3TLV_template& PDU__SM__ActivateMBMSContextReject_template::backOffTimer() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field backOffTimer of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject.");
return single_value->field_backOffTimer;
}

ReAttemptIndicatorTLV_template& PDU__SM__ActivateMBMSContextReject_template::reAttemptIndicator()
{
set_specific();
return single_value->field_reAttemptIndicator;
}

const ReAttemptIndicatorTLV_template& PDU__SM__ActivateMBMSContextReject_template::reAttemptIndicator() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field reAttemptIndicator of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject.");
return single_value->field_reAttemptIndicator;
}

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

void PDU__SM__ActivateMBMSContextReject_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(", smCause := ");
single_value->field_smCause.log();
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
single_value->field_mBMSprotocolConfigOptions.log();
TTCN_Logger::log_event_str(", backOffTimer := ");
single_value->field_backOffTimer.log();
TTCN_Logger::log_event_str(", reAttemptIndicator := ");
single_value->field_reAttemptIndicator.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__SM__ActivateMBMSContextReject_template::log_match(const PDU__SM__ActivateMBMSContextReject& 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_smCause.match(match_value.smCause(), legacy)){
TTCN_Logger::log_logmatch_info(".smCause");
single_value->field_smCause.log_match(match_value.smCause(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.mBMSprotocolConfigOptions().ispresent()){
if(!single_value->field_mBMSprotocolConfigOptions.match(match_value.mBMSprotocolConfigOptions(), legacy)){
TTCN_Logger::log_logmatch_info(".mBMSprotocolConfigOptions");
single_value->field_mBMSprotocolConfigOptions.log_match(match_value.mBMSprotocolConfigOptions(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_mBMSprotocolConfigOptions.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".mBMSprotocolConfigOptions := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_mBMSprotocolConfigOptions.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.backOffTimer().ispresent()){
if(!single_value->field_backOffTimer.match(match_value.backOffTimer(), legacy)){
TTCN_Logger::log_logmatch_info(".backOffTimer");
single_value->field_backOffTimer.log_match(match_value.backOffTimer(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_backOffTimer.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".backOffTimer := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_backOffTimer.log();
TTCN_Logger::log_event_str(" unmatched");
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
}
if (match_value.reAttemptIndicator().ispresent()){
if(!single_value->field_reAttemptIndicator.match(match_value.reAttemptIndicator(), legacy)){
TTCN_Logger::log_logmatch_info(".reAttemptIndicator");
single_value->field_reAttemptIndicator.log_match(match_value.reAttemptIndicator(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_reAttemptIndicator.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".reAttemptIndicator := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_reAttemptIndicator.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(", smCause := ");
single_value->field_smCause.log_match(match_value.smCause(), legacy);
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
if (match_value.mBMSprotocolConfigOptions().ispresent()) {
single_value->field_mBMSprotocolConfigOptions.log_match(match_value.mBMSprotocolConfigOptions(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_mBMSprotocolConfigOptions.log();
if (single_value->field_mBMSprotocolConfigOptions.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", backOffTimer := ");
if (match_value.backOffTimer().ispresent()) {
single_value->field_backOffTimer.log_match(match_value.backOffTimer(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_backOffTimer.log();
if (single_value->field_backOffTimer.match_omit(legacy)) TTCN_Logger::log_event_str(" matched");
else TTCN_Logger::log_event_str(" unmatched");
}
TTCN_Logger::log_event_str(", reAttemptIndicator := ");
if (match_value.reAttemptIndicator().ispresent()) {
single_value->field_reAttemptIndicator.log_match(match_value.reAttemptIndicator(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_reAttemptIndicator.log();
if (single_value->field_reAttemptIndicator.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__SM__ActivateMBMSContextReject_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_smCause.encode_text(text_buf);
single_value->field_mBMSprotocolConfigOptions.encode_text(text_buf);
single_value->field_backOffTimer.encode_text(text_buf);
single_value->field_reAttemptIndicator.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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject.");
}
}

void PDU__SM__ActivateMBMSContextReject_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_smCause.decode_text(text_buf);
single_value->field_mBMSprotocolConfigOptions.decode_text(text_buf);
single_value->field_backOffTimer.decode_text(text_buf);
single_value->field_reAttemptIndicator.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__SM__ActivateMBMSContextReject_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject.");
}
}

void PDU__SM__ActivateMBMSContextReject_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__SM__ActivateMBMSContextReject_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject 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) smCause().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) mBMSprotocolConfigOptions().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) backOffTimer().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) reAttemptIndicator().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(), "smCause")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          smCause().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMSprotocolConfigOptions")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMSprotocolConfigOptions().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "backOffTimer")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          backOffTimer().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "reAttemptIndicator")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          reAttemptIndicator().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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__ActivateMBMSContextReject_template* precondition = new PDU__SM__ActivateMBMSContextReject_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__ActivateMBMSContextReject_template* implied_template = new PDU__SM__ActivateMBMSContextReject_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__ActivateMBMSContextReject_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__ActivateMBMSContextReject_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject");
single_value->field_smCause.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject");
single_value->field_mBMSprotocolConfigOptions.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject");
single_value->field_backOffTimer.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject");
single_value->field_reAttemptIndicator.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject");
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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject");
}

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

boolean PDU__SM__ActivateMBMSContextReject_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__SM__RequestMBMSContextActivation::PDU__SM__RequestMBMSContextActivation()
{
}

PDU__SM__RequestMBMSContextActivation::PDU__SM__RequestMBMSContextActivation(const BITSTRING& par_messageType,
    const NSAPIV& par_linkedNSAPI,
    const PDPAddressLV& par_offeredMulticastAddress,
    const AccessPointNameLV& par_accessPointName,
    const OPTIONAL< MBMSProtocolConfigOptionsTLV >& par_mBMSprotocolConfigOptions)
  :   field_messageType(par_messageType),
  field_linkedNSAPI(par_linkedNSAPI),
  field_offeredMulticastAddress(par_offeredMulticastAddress),
  field_accessPointName(par_accessPointName),
  field_mBMSprotocolConfigOptions(par_mBMSprotocolConfigOptions)
{
}

PDU__SM__RequestMBMSContextActivation::PDU__SM__RequestMBMSContextActivation(const PDU__SM__RequestMBMSContextActivation& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.linkedNSAPI().is_bound()) field_linkedNSAPI = other_value.linkedNSAPI();
else field_linkedNSAPI.clean_up();
if (other_value.offeredMulticastAddress().is_bound()) field_offeredMulticastAddress = other_value.offeredMulticastAddress();
else field_offeredMulticastAddress.clean_up();
if (other_value.accessPointName().is_bound()) field_accessPointName = other_value.accessPointName();
else field_accessPointName.clean_up();
if (other_value.mBMSprotocolConfigOptions().is_bound()) field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
else field_mBMSprotocolConfigOptions.clean_up();
}

void PDU__SM__RequestMBMSContextActivation::clean_up()
{
field_messageType.clean_up();
field_linkedNSAPI.clean_up();
field_offeredMulticastAddress.clean_up();
field_accessPointName.clean_up();
field_mBMSprotocolConfigOptions.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__RequestMBMSContextActivation::get_descriptor() const { return &PDU__SM__RequestMBMSContextActivation_descr_; }
PDU__SM__RequestMBMSContextActivation& PDU__SM__RequestMBMSContextActivation::operator=(const PDU__SM__RequestMBMSContextActivation& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.linkedNSAPI().is_bound()) field_linkedNSAPI = other_value.linkedNSAPI();
  else field_linkedNSAPI.clean_up();
  if (other_value.offeredMulticastAddress().is_bound()) field_offeredMulticastAddress = other_value.offeredMulticastAddress();
  else field_offeredMulticastAddress.clean_up();
  if (other_value.accessPointName().is_bound()) field_accessPointName = other_value.accessPointName();
  else field_accessPointName.clean_up();
  if (other_value.mBMSprotocolConfigOptions().is_bound()) field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
  else field_mBMSprotocolConfigOptions.clean_up();
}
return *this;
}

boolean PDU__SM__RequestMBMSContextActivation::operator==(const PDU__SM__RequestMBMSContextActivation& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_linkedNSAPI==other_value.field_linkedNSAPI
  && field_offeredMulticastAddress==other_value.field_offeredMulticastAddress
  && field_accessPointName==other_value.field_accessPointName
  && field_mBMSprotocolConfigOptions==other_value.field_mBMSprotocolConfigOptions;
}

boolean PDU__SM__RequestMBMSContextActivation::is_bound() const
{
return (field_messageType.is_bound())
  || (field_linkedNSAPI.is_bound())
  || (field_offeredMulticastAddress.is_bound())
  || (field_accessPointName.is_bound())
  || (OPTIONAL_OMIT == field_mBMSprotocolConfigOptions.get_selection() || field_mBMSprotocolConfigOptions.is_bound());
}
boolean PDU__SM__RequestMBMSContextActivation::is_value() const
{
return field_messageType.is_value()
  && field_linkedNSAPI.is_value()
  && field_offeredMulticastAddress.is_value()
  && field_accessPointName.is_value()
  && (OPTIONAL_OMIT == field_mBMSprotocolConfigOptions.get_selection() || field_mBMSprotocolConfigOptions.is_value());
}
int PDU__SM__RequestMBMSContextActivation::size_of() const
{
  int ret_val = 4;
  if (field_mBMSprotocolConfigOptions.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__RequestMBMSContextActivation::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(", linkedNSAPI := ");
field_linkedNSAPI.log();
TTCN_Logger::log_event_str(", offeredMulticastAddress := ");
field_offeredMulticastAddress.log();
TTCN_Logger::log_event_str(", accessPointName := ");
field_accessPointName.log();
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
field_mBMSprotocolConfigOptions.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__RequestMBMSContextActivation::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (linkedNSAPI().is_bound()) linkedNSAPI().set_implicit_omit();
if (offeredMulticastAddress().is_bound()) offeredMulticastAddress().set_implicit_omit();
if (accessPointName().is_bound()) accessPointName().set_implicit_omit();
if (!mBMSprotocolConfigOptions().is_bound()) mBMSprotocolConfigOptions() = OMIT_VALUE;
else mBMSprotocolConfigOptions().set_implicit_omit();
}

void PDU__SM__RequestMBMSContextActivation::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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation 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) linkedNSAPI().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) offeredMulticastAddress().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) accessPointName().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) mBMSprotocolConfigOptions().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(), "linkedNSAPI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          linkedNSAPI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "offeredMulticastAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          offeredMulticastAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "accessPointName")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          accessPointName().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMSprotocolConfigOptions")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMSprotocolConfigOptions().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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  default:
    param.type_error("record value", "@MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation");
  }
}

void PDU__SM__RequestMBMSContextActivation::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_linkedNSAPI.encode_text(text_buf);
field_offeredMulticastAddress.encode_text(text_buf);
field_accessPointName.encode_text(text_buf);
field_mBMSprotocolConfigOptions.encode_text(text_buf);
}

void PDU__SM__RequestMBMSContextActivation::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_linkedNSAPI.decode_text(text_buf);
field_offeredMulticastAddress.decode_text(text_buf);
field_accessPointName.decode_text(text_buf);
field_mBMSprotocolConfigOptions.decode_text(text_buf);
}

void PDU__SM__RequestMBMSContextActivation::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__RequestMBMSContextActivation::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__RequestMBMSContextActivation::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, NSAPIV_descr_.raw->forceomit);
  decoded_field_length = field_linkedNSAPI.RAW_decode(NSAPIV_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, PDPAddressLV_descr_.raw->forceomit);
  decoded_field_length = field_offeredMulticastAddress.RAW_decode(PDPAddressLV_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, AccessPointNameLV_descr_.raw->forceomit);
  decoded_field_length = field_accessPointName.RAW_decode(AccessPointNameLV_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_mBMSprotocolConfigOptions = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_4_force_omit(4, force_omit, MBMSProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_mBMSprotocolConfigOptions().RAW_decode(MBMSProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_4_force_omit);
  if (decoded_field_length < 1) {
  field_mBMSprotocolConfigOptions = 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_mBMSprotocolConfigOptions=OMIT_VALUE;
  if (field_messageType !=  bs_73) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__RequestMBMSContextActivation::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);
  myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 1, NSAPIV_descr_.raw);
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, PDPAddressLV_descr_.raw);
  myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 3, AccessPointNameLV_descr_.raw);
  if (field_mBMSprotocolConfigOptions.ispresent()) {
  myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 4, MBMSProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[4] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_linkedNSAPI.RAW_encode(NSAPIV_descr_, *myleaf.body.node.nodes[1]);
  encoded_length += field_offeredMulticastAddress.RAW_encode(PDPAddressLV_descr_, *myleaf.body.node.nodes[2]);
  encoded_length += field_accessPointName.RAW_encode(AccessPointNameLV_descr_, *myleaf.body.node.nodes[3]);
  if (field_mBMSprotocolConfigOptions.ispresent()) {
  encoded_length += field_mBMSprotocolConfigOptions().RAW_encode(MBMSProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[4]);
  }
  if (field_messageType !=  bs_73) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_73.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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__RequestMBMSContextActivation_template::single_value_struct {
BITSTRING_template field_messageType;
NSAPIV_template field_linkedNSAPI;
PDPAddressLV_template field_offeredMulticastAddress;
AccessPointNameLV_template field_accessPointName;
MBMSProtocolConfigOptionsTLV_template field_mBMSprotocolConfigOptions;
};

void PDU__SM__RequestMBMSContextActivation_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_linkedNSAPI = ANY_VALUE;
single_value->field_offeredMulticastAddress = ANY_VALUE;
single_value->field_accessPointName = ANY_VALUE;
single_value->field_mBMSprotocolConfigOptions = ANY_OR_OMIT;
}
}
}

void PDU__SM__RequestMBMSContextActivation_template::copy_value(const PDU__SM__RequestMBMSContextActivation& 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.linkedNSAPI().is_bound()) {
  single_value->field_linkedNSAPI = other_value.linkedNSAPI();
} else {
  single_value->field_linkedNSAPI.clean_up();
}
if (other_value.offeredMulticastAddress().is_bound()) {
  single_value->field_offeredMulticastAddress = other_value.offeredMulticastAddress();
} else {
  single_value->field_offeredMulticastAddress.clean_up();
}
if (other_value.accessPointName().is_bound()) {
  single_value->field_accessPointName = other_value.accessPointName();
} else {
  single_value->field_accessPointName.clean_up();
}
if (other_value.mBMSprotocolConfigOptions().is_bound()) {
  if (other_value.mBMSprotocolConfigOptions().ispresent()) single_value->field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions()();
  else single_value->field_mBMSprotocolConfigOptions = OMIT_VALUE;
} else {
  single_value->field_mBMSprotocolConfigOptions.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__RequestMBMSContextActivation_template::copy_template(const PDU__SM__RequestMBMSContextActivation_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.linkedNSAPI().get_selection()) {
single_value->field_linkedNSAPI = other_value.linkedNSAPI();
} else {
single_value->field_linkedNSAPI.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.offeredMulticastAddress().get_selection()) {
single_value->field_offeredMulticastAddress = other_value.offeredMulticastAddress();
} else {
single_value->field_offeredMulticastAddress.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.accessPointName().get_selection()) {
single_value->field_accessPointName = other_value.accessPointName();
} else {
single_value->field_accessPointName.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mBMSprotocolConfigOptions().get_selection()) {
single_value->field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
} else {
single_value->field_mBMSprotocolConfigOptions.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__SM__RequestMBMSContextActivation_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__SM__RequestMBMSContextActivation_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__RequestMBMSContextActivation_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation.");
break;
}
set_selection(other_value);
}

PDU__SM__RequestMBMSContextActivation_template::PDU__SM__RequestMBMSContextActivation_template()
{
}

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

PDU__SM__RequestMBMSContextActivation_template::PDU__SM__RequestMBMSContextActivation_template(const PDU__SM__RequestMBMSContextActivation& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__RequestMBMSContextActivation_template& PDU__SM__RequestMBMSContextActivation_template::operator=(const OPTIONAL<PDU__SM__RequestMBMSContextActivation>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__RequestMBMSContextActivation&)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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation.");
}
return *this;
}

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

boolean PDU__SM__RequestMBMSContextActivation_template::match(const PDU__SM__RequestMBMSContextActivation& 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.linkedNSAPI().is_bound()) return FALSE;
if(!single_value->field_linkedNSAPI.match(other_value.linkedNSAPI(), legacy))return FALSE;
if(!other_value.offeredMulticastAddress().is_bound()) return FALSE;
if(!single_value->field_offeredMulticastAddress.match(other_value.offeredMulticastAddress(), legacy))return FALSE;
if(!other_value.accessPointName().is_bound()) return FALSE;
if(!single_value->field_accessPointName.match(other_value.accessPointName(), legacy))return FALSE;
if(!other_value.mBMSprotocolConfigOptions().is_bound()) return FALSE;
if((other_value.mBMSprotocolConfigOptions().ispresent() ? !single_value->field_mBMSprotocolConfigOptions.match((const MBMSProtocolConfigOptionsTLV&)other_value.mBMSprotocolConfigOptions(), legacy) : !single_value->field_mBMSprotocolConfigOptions.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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation.");
}
return FALSE;
}

boolean PDU__SM__RequestMBMSContextActivation_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_linkedNSAPI.is_bound()
 || single_value->field_offeredMulticastAddress.is_bound()
 || single_value->field_accessPointName.is_bound()
 || (single_value->field_mBMSprotocolConfigOptions.is_omit() || single_value->field_mBMSprotocolConfigOptions.is_bound());
}

boolean PDU__SM__RequestMBMSContextActivation_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
return single_value->field_messageType.is_value()
 && single_value->field_linkedNSAPI.is_value()
 && single_value->field_offeredMulticastAddress.is_value()
 && single_value->field_accessPointName.is_value()
 && (single_value->field_mBMSprotocolConfigOptions.is_omit() || single_value->field_mBMSprotocolConfigOptions.is_value());
}

void PDU__SM__RequestMBMSContextActivation_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__SM__RequestMBMSContextActivation PDU__SM__RequestMBMSContextActivation_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation.");
PDU__SM__RequestMBMSContextActivation ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_linkedNSAPI.is_bound()) {
ret_val.linkedNSAPI() = single_value->field_linkedNSAPI.valueof();
}
if (single_value->field_offeredMulticastAddress.is_bound()) {
ret_val.offeredMulticastAddress() = single_value->field_offeredMulticastAddress.valueof();
}
if (single_value->field_accessPointName.is_bound()) {
ret_val.accessPointName() = single_value->field_accessPointName.valueof();
}
if (single_value->field_mBMSprotocolConfigOptions.is_omit()) ret_val.mBMSprotocolConfigOptions() = OMIT_VALUE;
else if (single_value->field_mBMSprotocolConfigOptions.is_bound()) {
ret_val.mBMSprotocolConfigOptions() = single_value->field_mBMSprotocolConfigOptions.valueof();
}
return ret_val;
}

void PDU__SM__RequestMBMSContextActivation_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__RequestMBMSContextActivation_template[list_length];
}

PDU__SM__RequestMBMSContextActivation_template& PDU__SM__RequestMBMSContextActivation_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation.");
return value_list.list_value[list_index];
}

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

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

NSAPIV_template& PDU__SM__RequestMBMSContextActivation_template::linkedNSAPI()
{
set_specific();
return single_value->field_linkedNSAPI;
}

const NSAPIV_template& PDU__SM__RequestMBMSContextActivation_template::linkedNSAPI() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field linkedNSAPI of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation.");
return single_value->field_linkedNSAPI;
}

PDPAddressLV_template& PDU__SM__RequestMBMSContextActivation_template::offeredMulticastAddress()
{
set_specific();
return single_value->field_offeredMulticastAddress;
}

const PDPAddressLV_template& PDU__SM__RequestMBMSContextActivation_template::offeredMulticastAddress() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field offeredMulticastAddress of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation.");
return single_value->field_offeredMulticastAddress;
}

AccessPointNameLV_template& PDU__SM__RequestMBMSContextActivation_template::accessPointName()
{
set_specific();
return single_value->field_accessPointName;
}

const AccessPointNameLV_template& PDU__SM__RequestMBMSContextActivation_template::accessPointName() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field accessPointName of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation.");
return single_value->field_accessPointName;
}

MBMSProtocolConfigOptionsTLV_template& PDU__SM__RequestMBMSContextActivation_template::mBMSprotocolConfigOptions()
{
set_specific();
return single_value->field_mBMSprotocolConfigOptions;
}

const MBMSProtocolConfigOptionsTLV_template& PDU__SM__RequestMBMSContextActivation_template::mBMSprotocolConfigOptions() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mBMSprotocolConfigOptions of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation.");
return single_value->field_mBMSprotocolConfigOptions;
}

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

void PDU__SM__RequestMBMSContextActivation_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(", linkedNSAPI := ");
single_value->field_linkedNSAPI.log();
TTCN_Logger::log_event_str(", offeredMulticastAddress := ");
single_value->field_offeredMulticastAddress.log();
TTCN_Logger::log_event_str(", accessPointName := ");
single_value->field_accessPointName.log();
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
single_value->field_mBMSprotocolConfigOptions.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__SM__RequestMBMSContextActivation_template::log_match(const PDU__SM__RequestMBMSContextActivation& 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_linkedNSAPI.match(match_value.linkedNSAPI(), legacy)){
TTCN_Logger::log_logmatch_info(".linkedNSAPI");
single_value->field_linkedNSAPI.log_match(match_value.linkedNSAPI(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_offeredMulticastAddress.match(match_value.offeredMulticastAddress(), legacy)){
TTCN_Logger::log_logmatch_info(".offeredMulticastAddress");
single_value->field_offeredMulticastAddress.log_match(match_value.offeredMulticastAddress(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if(!single_value->field_accessPointName.match(match_value.accessPointName(), legacy)){
TTCN_Logger::log_logmatch_info(".accessPointName");
single_value->field_accessPointName.log_match(match_value.accessPointName(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.mBMSprotocolConfigOptions().ispresent()){
if(!single_value->field_mBMSprotocolConfigOptions.match(match_value.mBMSprotocolConfigOptions(), legacy)){
TTCN_Logger::log_logmatch_info(".mBMSprotocolConfigOptions");
single_value->field_mBMSprotocolConfigOptions.log_match(match_value.mBMSprotocolConfigOptions(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_mBMSprotocolConfigOptions.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".mBMSprotocolConfigOptions := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_mBMSprotocolConfigOptions.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(", linkedNSAPI := ");
single_value->field_linkedNSAPI.log_match(match_value.linkedNSAPI(), legacy);
TTCN_Logger::log_event_str(", offeredMulticastAddress := ");
single_value->field_offeredMulticastAddress.log_match(match_value.offeredMulticastAddress(), legacy);
TTCN_Logger::log_event_str(", accessPointName := ");
single_value->field_accessPointName.log_match(match_value.accessPointName(), legacy);
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
if (match_value.mBMSprotocolConfigOptions().ispresent()) {
single_value->field_mBMSprotocolConfigOptions.log_match(match_value.mBMSprotocolConfigOptions(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_mBMSprotocolConfigOptions.log();
if (single_value->field_mBMSprotocolConfigOptions.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__SM__RequestMBMSContextActivation_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_linkedNSAPI.encode_text(text_buf);
single_value->field_offeredMulticastAddress.encode_text(text_buf);
single_value->field_accessPointName.encode_text(text_buf);
single_value->field_mBMSprotocolConfigOptions.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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation.");
}
}

void PDU__SM__RequestMBMSContextActivation_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_linkedNSAPI.decode_text(text_buf);
single_value->field_offeredMulticastAddress.decode_text(text_buf);
single_value->field_accessPointName.decode_text(text_buf);
single_value->field_mBMSprotocolConfigOptions.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__SM__RequestMBMSContextActivation_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation.");
}
}

void PDU__SM__RequestMBMSContextActivation_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__SM__RequestMBMSContextActivation_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation 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) linkedNSAPI().set_param(*param.get_elem(1));
    if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) offeredMulticastAddress().set_param(*param.get_elem(2));
    if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) accessPointName().set_param(*param.get_elem(3));
    if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) mBMSprotocolConfigOptions().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(), "linkedNSAPI")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          linkedNSAPI().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "offeredMulticastAddress")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          offeredMulticastAddress().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "accessPointName")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          accessPointName().set_param(*curr_param);
        }
        value_used[val_idx]=TRUE;
      }
    }
    for (size_t val_idx=0; val_idx<param.get_size(); val_idx++) {
      Module_Param* const curr_param = param.get_elem(val_idx);
      if (!strcmp(curr_param->get_id()->get_name(), "mBMSprotocolConfigOptions")) {
        if (curr_param->get_type()!=Module_Param::MP_NotUsed) {
          mBMSprotocolConfigOptions().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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation: %s", curr_param->get_id()->get_name());
      break;
    }
  } break;
  case Module_Param::MP_Implication_Template: {
    PDU__SM__RequestMBMSContextActivation_template* precondition = new PDU__SM__RequestMBMSContextActivation_template;
    precondition->set_param(*param.get_elem(0));
    PDU__SM__RequestMBMSContextActivation_template* implied_template = new PDU__SM__RequestMBMSContextActivation_template;
    implied_template->set_param(*param.get_elem(1));
    *this = PDU__SM__RequestMBMSContextActivation_template(precondition, implied_template);
  } break;
  default:
    param.type_error("record template", "@MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation");
  }
  is_ifpresent = param.get_ifpresent();
}

void PDU__SM__RequestMBMSContextActivation_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation");
single_value->field_linkedNSAPI.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation");
single_value->field_offeredMulticastAddress.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation");
single_value->field_accessPointName.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation");
single_value->field_mBMSprotocolConfigOptions.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation");
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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation");
}

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

boolean PDU__SM__RequestMBMSContextActivation_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__SM__RequestMBMSContextActivationReject::PDU__SM__RequestMBMSContextActivationReject()
{
}

PDU__SM__RequestMBMSContextActivationReject::PDU__SM__RequestMBMSContextActivationReject(const BITSTRING& par_messageType,
    const OCTETSTRING& par_smCause,
    const OPTIONAL< MBMSProtocolConfigOptionsTLV >& par_mBMSprotocolConfigOptions)
  :   field_messageType(par_messageType),
  field_smCause(par_smCause),
  field_mBMSprotocolConfigOptions(par_mBMSprotocolConfigOptions)
{
}

PDU__SM__RequestMBMSContextActivationReject::PDU__SM__RequestMBMSContextActivationReject(const PDU__SM__RequestMBMSContextActivationReject& other_value)
{
if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject.");
if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
else field_messageType.clean_up();
if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
else field_smCause.clean_up();
if (other_value.mBMSprotocolConfigOptions().is_bound()) field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
else field_mBMSprotocolConfigOptions.clean_up();
}

void PDU__SM__RequestMBMSContextActivationReject::clean_up()
{
field_messageType.clean_up();
field_smCause.clean_up();
field_mBMSprotocolConfigOptions.clean_up();
}

const TTCN_Typedescriptor_t* PDU__SM__RequestMBMSContextActivationReject::get_descriptor() const { return &PDU__SM__RequestMBMSContextActivationReject_descr_; }
PDU__SM__RequestMBMSContextActivationReject& PDU__SM__RequestMBMSContextActivationReject::operator=(const PDU__SM__RequestMBMSContextActivationReject& other_value)
{
if (this != &other_value) {
  if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject.");
  if (other_value.messageType().is_bound()) field_messageType = other_value.messageType();
  else field_messageType.clean_up();
  if (other_value.smCause().is_bound()) field_smCause = other_value.smCause();
  else field_smCause.clean_up();
  if (other_value.mBMSprotocolConfigOptions().is_bound()) field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
  else field_mBMSprotocolConfigOptions.clean_up();
}
return *this;
}

boolean PDU__SM__RequestMBMSContextActivationReject::operator==(const PDU__SM__RequestMBMSContextActivationReject& other_value) const
{
return field_messageType==other_value.field_messageType
  && field_smCause==other_value.field_smCause
  && field_mBMSprotocolConfigOptions==other_value.field_mBMSprotocolConfigOptions;
}

boolean PDU__SM__RequestMBMSContextActivationReject::is_bound() const
{
return (field_messageType.is_bound())
  || (field_smCause.is_bound())
  || (OPTIONAL_OMIT == field_mBMSprotocolConfigOptions.get_selection() || field_mBMSprotocolConfigOptions.is_bound());
}
boolean PDU__SM__RequestMBMSContextActivationReject::is_value() const
{
return field_messageType.is_value()
  && field_smCause.is_value()
  && (OPTIONAL_OMIT == field_mBMSprotocolConfigOptions.get_selection() || field_mBMSprotocolConfigOptions.is_value());
}
int PDU__SM__RequestMBMSContextActivationReject::size_of() const
{
  int ret_val = 2;
  if (field_mBMSprotocolConfigOptions.ispresent()) ret_val++;
  return ret_val;
}

void PDU__SM__RequestMBMSContextActivationReject::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(", smCause := ");
field_smCause.log();
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
field_mBMSprotocolConfigOptions.log();
TTCN_Logger::log_event_str(" }");
}

void PDU__SM__RequestMBMSContextActivationReject::set_implicit_omit()
{
if (messageType().is_bound()) messageType().set_implicit_omit();
if (smCause().is_bound()) smCause().set_implicit_omit();
if (!mBMSprotocolConfigOptions().is_bound()) mBMSprotocolConfigOptions() = OMIT_VALUE;
else mBMSprotocolConfigOptions().set_implicit_omit();
}

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

void PDU__SM__RequestMBMSContextActivationReject::encode_text(Text_Buf& text_buf) const
{
field_messageType.encode_text(text_buf);
field_smCause.encode_text(text_buf);
field_mBMSprotocolConfigOptions.encode_text(text_buf);
}

void PDU__SM__RequestMBMSContextActivationReject::decode_text(Text_Buf& text_buf)
{
field_messageType.decode_text(text_buf);
field_smCause.decode_text(text_buf);
field_mBMSprotocolConfigOptions.decode_text(text_buf);
}

void PDU__SM__RequestMBMSContextActivationReject::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void PDU__SM__RequestMBMSContextActivationReject::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int PDU__SM__RequestMBMSContextActivationReject::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, SMCauseV_descr_.raw->forceomit);
  decoded_field_length = field_smCause.RAW_decode(SMCauseV_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_mBMSprotocolConfigOptions = OMIT_VALUE;
  }
  else {
  size_t fl_start_pos = p_buf.get_pos_bit();
  RAW_Force_Omit field_2_force_omit(2, force_omit, MBMSProtocolConfigOptionsTLV_descr_.raw->forceomit);
  decoded_field_length = field_mBMSprotocolConfigOptions().RAW_decode(MBMSProtocolConfigOptionsTLV_descr_, p_buf, limit, local_top_order, TRUE, -1, TRUE, &field_2_force_omit);
  if (decoded_field_length < 1) {
  field_mBMSprotocolConfigOptions = 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_mBMSprotocolConfigOptions=OMIT_VALUE;
  if (field_messageType !=  bs_74) return -1;
  p_buf.set_pos_bit(last_decoded_pos);
  return decoded_length+prepaddlength+p_buf.increase_pos_padd(p_td.raw->padding);
}

int PDU__SM__RequestMBMSContextActivationReject::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, SMCauseV_descr_.raw);
  if (field_mBMSprotocolConfigOptions.ispresent()) {
  myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &(myleaf.curr_pos), 2, MBMSProtocolConfigOptionsTLV_descr_.raw);
  }
  else myleaf.body.node.nodes[2] = NULL;
  encoded_length += field_messageType.RAW_encode(General__Types::BIT8_descr_, *myleaf.body.node.nodes[0]);
  encoded_length += field_smCause.RAW_encode(SMCauseV_descr_, *myleaf.body.node.nodes[1]);
  if (field_mBMSprotocolConfigOptions.ispresent()) {
  encoded_length += field_mBMSprotocolConfigOptions().RAW_encode(MBMSProtocolConfigOptionsTLV_descr_, *myleaf.body.node.nodes[2]);
  }
  if (field_messageType !=  bs_74) {
  RAW_enc_tree* temp_leaf;
  {
  RAW_enc_tr_pos pr_pos0;
  pr_pos0.level=myleaf.curr_pos.level+1;
  int new_pos0[]={0};
  pr_pos0.pos=init_new_tree_pos(myleaf.curr_pos,1,new_pos0);
  temp_leaf = myleaf.get_node(pr_pos0);
  if(temp_leaf != NULL){
   bs_74.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);
  }
  }
  return myleaf.length = encoded_length;
}

struct PDU__SM__RequestMBMSContextActivationReject_template::single_value_struct {
BITSTRING_template field_messageType;
OCTETSTRING_template field_smCause;
MBMSProtocolConfigOptionsTLV_template field_mBMSprotocolConfigOptions;
};

void PDU__SM__RequestMBMSContextActivationReject_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_smCause = ANY_VALUE;
single_value->field_mBMSprotocolConfigOptions = ANY_OR_OMIT;
}
}
}

void PDU__SM__RequestMBMSContextActivationReject_template::copy_value(const PDU__SM__RequestMBMSContextActivationReject& 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.smCause().is_bound()) {
  single_value->field_smCause = other_value.smCause();
} else {
  single_value->field_smCause.clean_up();
}
if (other_value.mBMSprotocolConfigOptions().is_bound()) {
  if (other_value.mBMSprotocolConfigOptions().ispresent()) single_value->field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions()();
  else single_value->field_mBMSprotocolConfigOptions = OMIT_VALUE;
} else {
  single_value->field_mBMSprotocolConfigOptions.clean_up();
}
set_selection(SPECIFIC_VALUE);
}

void PDU__SM__RequestMBMSContextActivationReject_template::copy_template(const PDU__SM__RequestMBMSContextActivationReject_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.smCause().get_selection()) {
single_value->field_smCause = other_value.smCause();
} else {
single_value->field_smCause.clean_up();
}
if (UNINITIALIZED_TEMPLATE != other_value.mBMSprotocolConfigOptions().get_selection()) {
single_value->field_mBMSprotocolConfigOptions = other_value.mBMSprotocolConfigOptions();
} else {
single_value->field_mBMSprotocolConfigOptions.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__SM__RequestMBMSContextActivationReject_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__SM__RequestMBMSContextActivationReject_template(*other_value.implication_.precondition);
implication_.implied_template = new PDU__SM__RequestMBMSContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject.");
break;
}
set_selection(other_value);
}

PDU__SM__RequestMBMSContextActivationReject_template::PDU__SM__RequestMBMSContextActivationReject_template()
{
}

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

PDU__SM__RequestMBMSContextActivationReject_template::PDU__SM__RequestMBMSContextActivationReject_template(const PDU__SM__RequestMBMSContextActivationReject& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

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

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

PDU__SM__RequestMBMSContextActivationReject_template& PDU__SM__RequestMBMSContextActivationReject_template::operator=(const OPTIONAL<PDU__SM__RequestMBMSContextActivationReject>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const PDU__SM__RequestMBMSContextActivationReject&)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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject.");
}
return *this;
}

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

boolean PDU__SM__RequestMBMSContextActivationReject_template::match(const PDU__SM__RequestMBMSContextActivationReject& 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.smCause().is_bound()) return FALSE;
if(!single_value->field_smCause.match(other_value.smCause(), legacy))return FALSE;
if(!other_value.mBMSprotocolConfigOptions().is_bound()) return FALSE;
if((other_value.mBMSprotocolConfigOptions().ispresent() ? !single_value->field_mBMSprotocolConfigOptions.match((const MBMSProtocolConfigOptionsTLV&)other_value.mBMSprotocolConfigOptions(), legacy) : !single_value->field_mBMSprotocolConfigOptions.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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject.");
}
return FALSE;
}

boolean PDU__SM__RequestMBMSContextActivationReject_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_smCause.is_bound()
 || (single_value->field_mBMSprotocolConfigOptions.is_omit() || single_value->field_mBMSprotocolConfigOptions.is_bound());
}

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

void PDU__SM__RequestMBMSContextActivationReject_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__SM__RequestMBMSContextActivationReject PDU__SM__RequestMBMSContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject.");
PDU__SM__RequestMBMSContextActivationReject ret_val;
if (single_value->field_messageType.is_bound()) {
ret_val.messageType() = single_value->field_messageType.valueof();
}
if (single_value->field_smCause.is_bound()) {
ret_val.smCause() = single_value->field_smCause.valueof();
}
if (single_value->field_mBMSprotocolConfigOptions.is_omit()) ret_val.mBMSprotocolConfigOptions() = OMIT_VALUE;
else if (single_value->field_mBMSprotocolConfigOptions.is_bound()) {
ret_val.mBMSprotocolConfigOptions() = single_value->field_mBMSprotocolConfigOptions.valueof();
}
return ret_val;
}

void PDU__SM__RequestMBMSContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new PDU__SM__RequestMBMSContextActivationReject_template[list_length];
}

PDU__SM__RequestMBMSContextActivationReject_template& PDU__SM__RequestMBMSContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject.");
if (list_index >= value_list.n_values)
TTCN_error("Index overflow in a value list template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject.");
return value_list.list_value[list_index];
}

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

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

OCTETSTRING_template& PDU__SM__RequestMBMSContextActivationReject_template::smCause()
{
set_specific();
return single_value->field_smCause;
}

const OCTETSTRING_template& PDU__SM__RequestMBMSContextActivationReject_template::smCause() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field smCause of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject.");
return single_value->field_smCause;
}

MBMSProtocolConfigOptionsTLV_template& PDU__SM__RequestMBMSContextActivationReject_template::mBMSprotocolConfigOptions()
{
set_specific();
return single_value->field_mBMSprotocolConfigOptions;
}

const MBMSProtocolConfigOptionsTLV_template& PDU__SM__RequestMBMSContextActivationReject_template::mBMSprotocolConfigOptions() const
{
if (template_selection != SPECIFIC_VALUE)
TTCN_error("Accessing field mBMSprotocolConfigOptions of a non-specific template of type @MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject.");
return single_value->field_mBMSprotocolConfigOptions;
}

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

void PDU__SM__RequestMBMSContextActivationReject_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(", smCause := ");
single_value->field_smCause.log();
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
single_value->field_mBMSprotocolConfigOptions.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__SM__RequestMBMSContextActivationReject_template::log_match(const PDU__SM__RequestMBMSContextActivationReject& 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_smCause.match(match_value.smCause(), legacy)){
TTCN_Logger::log_logmatch_info(".smCause");
single_value->field_smCause.log_match(match_value.smCause(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
if (match_value.mBMSprotocolConfigOptions().ispresent()){
if(!single_value->field_mBMSprotocolConfigOptions.match(match_value.mBMSprotocolConfigOptions(), legacy)){
TTCN_Logger::log_logmatch_info(".mBMSprotocolConfigOptions");
single_value->field_mBMSprotocolConfigOptions.log_match(match_value.mBMSprotocolConfigOptions(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
}
} else {
if (!single_value->field_mBMSprotocolConfigOptions.match_omit(legacy)){
 TTCN_Logger::log_logmatch_info(".mBMSprotocolConfigOptions := omit with ");
TTCN_Logger::print_logmatch_buffer();
single_value->field_mBMSprotocolConfigOptions.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(", smCause := ");
single_value->field_smCause.log_match(match_value.smCause(), legacy);
TTCN_Logger::log_event_str(", mBMSprotocolConfigOptions := ");
if (match_value.mBMSprotocolConfigOptions().ispresent()) {
single_value->field_mBMSprotocolConfigOptions.log_match(match_value.mBMSprotocolConfigOptions(), legacy);
} else {
TTCN_Logger::log_event_str("omit with ");
single_value->field_mBMSprotocolConfigOptions.log();
if (single_value->field_mBMSprotocolConfigOptions.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__SM__RequestMBMSContextActivationReject_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_smCause.encode_text(text_buf);
single_value->field_mBMSprotocolConfigOptions.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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject.");
}
}

void PDU__SM__RequestMBMSContextActivationReject_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_smCause.decode_text(text_buf);
single_value->field_mBMSprotocolConfigOptions.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__SM__RequestMBMSContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject.");
}
}

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

void PDU__SM__RequestMBMSContextActivationReject_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject");
single_value->field_smCause.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject");
single_value->field_mBMSprotocolConfigOptions.check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject");
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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject");
}

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

boolean PDU__SM__RequestMBMSContextActivationReject_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 L3__GSM__MS__SGSN::copy_value(const L3__GSM__MS__SGSN& other_value)
{
switch (other_value.union_selection) {
case ALT_activatePDPContextRequest:
field_activatePDPContextRequest = new PDU__SM__ActivatePDPContextRequest(*other_value.field_activatePDPContextRequest);
break;
case ALT_activateSecondaryPDPContextRequest:
field_activateSecondaryPDPContextRequest = new PDU__SM__ActivateSecondaryPDPContextRequest(*other_value.field_activateSecondaryPDPContextRequest);
break;
case ALT_requestPDPContextActivationReject:
field_requestPDPContextActivationReject = new PDU__SM__RequestPDPContextActivationReject(*other_value.field_requestPDPContextActivationReject);
break;
case ALT_modifyPDPContextRequest__MS__SGSN:
field_modifyPDPContextRequest__MS__SGSN = new PDU__SM__ModifyPDPContextRequest__MS__SGSN(*other_value.field_modifyPDPContextRequest__MS__SGSN);
break;
case ALT_modifyPDPContextAccept__MS__SGSN:
field_modifyPDPContextAccept__MS__SGSN = new PDU__SM__ModifyPDPContextAccept__MS__SGSN(*other_value.field_modifyPDPContextAccept__MS__SGSN);
break;
case ALT_deactivatePDPContextRequest:
field_deactivatePDPContextRequest = new PDU__SM__DeactivatePDPContextRequest(*other_value.field_deactivatePDPContextRequest);
break;
case ALT_deactivatePDPContextAccept:
field_deactivatePDPContextAccept = new PDU__SM__DeactivatePDPContextAccept(*other_value.field_deactivatePDPContextAccept);
break;
case ALT_sM__Status:
field_sM__Status = new PDU__SM__SM__Status(*other_value.field_sM__Status);
break;
case ALT_activateMBMSContextRequest:
field_activateMBMSContextRequest = new PDU__SM__ActivateMBMSContextRequest(*other_value.field_activateMBMSContextRequest);
break;
case ALT_requestMBMSContextActivationReject:
field_requestMBMSContextActivationReject = new PDU__SM__RequestMBMSContextActivationReject(*other_value.field_requestMBMSContextActivationReject);
break;
case ALT_requestSecondaryPDPContextActivationReject:
field_requestSecondaryPDPContextActivationReject = new PDU__SM__RequestSecondaryPDPContextActivationReject(*other_value.field_requestSecondaryPDPContextActivationReject);
break;
case ALT_notification:
field_notification = new PDU__SM__Notification(*other_value.field_notification);
break;
default:
TTCN_error("Assignment of an unbound union value of type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
union_selection = other_value.union_selection;
}

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

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

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

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

boolean L3__GSM__MS__SGSN::operator==(const L3__GSM__MS__SGSN& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_activatePDPContextRequest:
return *field_activatePDPContextRequest == *other_value.field_activatePDPContextRequest;
case ALT_activateSecondaryPDPContextRequest:
return *field_activateSecondaryPDPContextRequest == *other_value.field_activateSecondaryPDPContextRequest;
case ALT_requestPDPContextActivationReject:
return *field_requestPDPContextActivationReject == *other_value.field_requestPDPContextActivationReject;
case ALT_modifyPDPContextRequest__MS__SGSN:
return *field_modifyPDPContextRequest__MS__SGSN == *other_value.field_modifyPDPContextRequest__MS__SGSN;
case ALT_modifyPDPContextAccept__MS__SGSN:
return *field_modifyPDPContextAccept__MS__SGSN == *other_value.field_modifyPDPContextAccept__MS__SGSN;
case ALT_deactivatePDPContextRequest:
return *field_deactivatePDPContextRequest == *other_value.field_deactivatePDPContextRequest;
case ALT_deactivatePDPContextAccept:
return *field_deactivatePDPContextAccept == *other_value.field_deactivatePDPContextAccept;
case ALT_sM__Status:
return *field_sM__Status == *other_value.field_sM__Status;
case ALT_activateMBMSContextRequest:
return *field_activateMBMSContextRequest == *other_value.field_activateMBMSContextRequest;
case ALT_requestMBMSContextActivationReject:
return *field_requestMBMSContextActivationReject == *other_value.field_requestMBMSContextActivationReject;
case ALT_requestSecondaryPDPContextActivationReject:
return *field_requestSecondaryPDPContextActivationReject == *other_value.field_requestSecondaryPDPContextActivationReject;
case ALT_notification:
return *field_notification == *other_value.field_notification;
default:
return FALSE;
}
}

PDU__SM__ActivatePDPContextRequest& L3__GSM__MS__SGSN::activatePDPContextRequest()
{
if (union_selection != ALT_activatePDPContextRequest) {
clean_up();
field_activatePDPContextRequest = new PDU__SM__ActivatePDPContextRequest;
union_selection = ALT_activatePDPContextRequest;
}
return *field_activatePDPContextRequest;
}

const PDU__SM__ActivatePDPContextRequest& L3__GSM__MS__SGSN::activatePDPContextRequest() const
{
if (union_selection != ALT_activatePDPContextRequest) TTCN_error("Using non-selected field activatePDPContextRequest in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *field_activatePDPContextRequest;
}

PDU__SM__ActivateSecondaryPDPContextRequest& L3__GSM__MS__SGSN::activateSecondaryPDPContextRequest()
{
if (union_selection != ALT_activateSecondaryPDPContextRequest) {
clean_up();
field_activateSecondaryPDPContextRequest = new PDU__SM__ActivateSecondaryPDPContextRequest;
union_selection = ALT_activateSecondaryPDPContextRequest;
}
return *field_activateSecondaryPDPContextRequest;
}

const PDU__SM__ActivateSecondaryPDPContextRequest& L3__GSM__MS__SGSN::activateSecondaryPDPContextRequest() const
{
if (union_selection != ALT_activateSecondaryPDPContextRequest) TTCN_error("Using non-selected field activateSecondaryPDPContextRequest in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *field_activateSecondaryPDPContextRequest;
}

PDU__SM__RequestPDPContextActivationReject& L3__GSM__MS__SGSN::requestPDPContextActivationReject()
{
if (union_selection != ALT_requestPDPContextActivationReject) {
clean_up();
field_requestPDPContextActivationReject = new PDU__SM__RequestPDPContextActivationReject;
union_selection = ALT_requestPDPContextActivationReject;
}
return *field_requestPDPContextActivationReject;
}

const PDU__SM__RequestPDPContextActivationReject& L3__GSM__MS__SGSN::requestPDPContextActivationReject() const
{
if (union_selection != ALT_requestPDPContextActivationReject) TTCN_error("Using non-selected field requestPDPContextActivationReject in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *field_requestPDPContextActivationReject;
}

PDU__SM__ModifyPDPContextRequest__MS__SGSN& L3__GSM__MS__SGSN::modifyPDPContextRequest__MS__SGSN()
{
if (union_selection != ALT_modifyPDPContextRequest__MS__SGSN) {
clean_up();
field_modifyPDPContextRequest__MS__SGSN = new PDU__SM__ModifyPDPContextRequest__MS__SGSN;
union_selection = ALT_modifyPDPContextRequest__MS__SGSN;
}
return *field_modifyPDPContextRequest__MS__SGSN;
}

const PDU__SM__ModifyPDPContextRequest__MS__SGSN& L3__GSM__MS__SGSN::modifyPDPContextRequest__MS__SGSN() const
{
if (union_selection != ALT_modifyPDPContextRequest__MS__SGSN) TTCN_error("Using non-selected field modifyPDPContextRequest_MS_SGSN in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *field_modifyPDPContextRequest__MS__SGSN;
}

PDU__SM__ModifyPDPContextAccept__MS__SGSN& L3__GSM__MS__SGSN::modifyPDPContextAccept__MS__SGSN()
{
if (union_selection != ALT_modifyPDPContextAccept__MS__SGSN) {
clean_up();
field_modifyPDPContextAccept__MS__SGSN = new PDU__SM__ModifyPDPContextAccept__MS__SGSN;
union_selection = ALT_modifyPDPContextAccept__MS__SGSN;
}
return *field_modifyPDPContextAccept__MS__SGSN;
}

const PDU__SM__ModifyPDPContextAccept__MS__SGSN& L3__GSM__MS__SGSN::modifyPDPContextAccept__MS__SGSN() const
{
if (union_selection != ALT_modifyPDPContextAccept__MS__SGSN) TTCN_error("Using non-selected field modifyPDPContextAccept_MS_SGSN in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *field_modifyPDPContextAccept__MS__SGSN;
}

PDU__SM__DeactivatePDPContextRequest& L3__GSM__MS__SGSN::deactivatePDPContextRequest()
{
if (union_selection != ALT_deactivatePDPContextRequest) {
clean_up();
field_deactivatePDPContextRequest = new PDU__SM__DeactivatePDPContextRequest;
union_selection = ALT_deactivatePDPContextRequest;
}
return *field_deactivatePDPContextRequest;
}

const PDU__SM__DeactivatePDPContextRequest& L3__GSM__MS__SGSN::deactivatePDPContextRequest() const
{
if (union_selection != ALT_deactivatePDPContextRequest) TTCN_error("Using non-selected field deactivatePDPContextRequest in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *field_deactivatePDPContextRequest;
}

PDU__SM__DeactivatePDPContextAccept& L3__GSM__MS__SGSN::deactivatePDPContextAccept()
{
if (union_selection != ALT_deactivatePDPContextAccept) {
clean_up();
field_deactivatePDPContextAccept = new PDU__SM__DeactivatePDPContextAccept;
union_selection = ALT_deactivatePDPContextAccept;
}
return *field_deactivatePDPContextAccept;
}

const PDU__SM__DeactivatePDPContextAccept& L3__GSM__MS__SGSN::deactivatePDPContextAccept() const
{
if (union_selection != ALT_deactivatePDPContextAccept) TTCN_error("Using non-selected field deactivatePDPContextAccept in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *field_deactivatePDPContextAccept;
}

PDU__SM__SM__Status& L3__GSM__MS__SGSN::sM__Status()
{
if (union_selection != ALT_sM__Status) {
clean_up();
field_sM__Status = new PDU__SM__SM__Status;
union_selection = ALT_sM__Status;
}
return *field_sM__Status;
}

const PDU__SM__SM__Status& L3__GSM__MS__SGSN::sM__Status() const
{
if (union_selection != ALT_sM__Status) TTCN_error("Using non-selected field sM_Status in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *field_sM__Status;
}

PDU__SM__ActivateMBMSContextRequest& L3__GSM__MS__SGSN::activateMBMSContextRequest()
{
if (union_selection != ALT_activateMBMSContextRequest) {
clean_up();
field_activateMBMSContextRequest = new PDU__SM__ActivateMBMSContextRequest;
union_selection = ALT_activateMBMSContextRequest;
}
return *field_activateMBMSContextRequest;
}

const PDU__SM__ActivateMBMSContextRequest& L3__GSM__MS__SGSN::activateMBMSContextRequest() const
{
if (union_selection != ALT_activateMBMSContextRequest) TTCN_error("Using non-selected field activateMBMSContextRequest in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *field_activateMBMSContextRequest;
}

PDU__SM__RequestMBMSContextActivationReject& L3__GSM__MS__SGSN::requestMBMSContextActivationReject()
{
if (union_selection != ALT_requestMBMSContextActivationReject) {
clean_up();
field_requestMBMSContextActivationReject = new PDU__SM__RequestMBMSContextActivationReject;
union_selection = ALT_requestMBMSContextActivationReject;
}
return *field_requestMBMSContextActivationReject;
}

const PDU__SM__RequestMBMSContextActivationReject& L3__GSM__MS__SGSN::requestMBMSContextActivationReject() const
{
if (union_selection != ALT_requestMBMSContextActivationReject) TTCN_error("Using non-selected field requestMBMSContextActivationReject in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *field_requestMBMSContextActivationReject;
}

PDU__SM__RequestSecondaryPDPContextActivationReject& L3__GSM__MS__SGSN::requestSecondaryPDPContextActivationReject()
{
if (union_selection != ALT_requestSecondaryPDPContextActivationReject) {
clean_up();
field_requestSecondaryPDPContextActivationReject = new PDU__SM__RequestSecondaryPDPContextActivationReject;
union_selection = ALT_requestSecondaryPDPContextActivationReject;
}
return *field_requestSecondaryPDPContextActivationReject;
}

const PDU__SM__RequestSecondaryPDPContextActivationReject& L3__GSM__MS__SGSN::requestSecondaryPDPContextActivationReject() const
{
if (union_selection != ALT_requestSecondaryPDPContextActivationReject) TTCN_error("Using non-selected field requestSecondaryPDPContextActivationReject in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *field_requestSecondaryPDPContextActivationReject;
}

PDU__SM__Notification& L3__GSM__MS__SGSN::notification()
{
if (union_selection != ALT_notification) {
clean_up();
field_notification = new PDU__SM__Notification;
union_selection = ALT_notification;
}
return *field_notification;
}

const PDU__SM__Notification& L3__GSM__MS__SGSN::notification() const
{
if (union_selection != ALT_notification) TTCN_error("Using non-selected field notification in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *field_notification;
}

boolean L3__GSM__MS__SGSN::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_GMM_SM_Types.L3_GSM_MS_SGSN.");
return union_selection == checked_selection;
}

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

boolean L3__GSM__MS__SGSN::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_activatePDPContextRequest: return field_activatePDPContextRequest->is_value();
case ALT_activateSecondaryPDPContextRequest: return field_activateSecondaryPDPContextRequest->is_value();
case ALT_requestPDPContextActivationReject: return field_requestPDPContextActivationReject->is_value();
case ALT_modifyPDPContextRequest__MS__SGSN: return field_modifyPDPContextRequest__MS__SGSN->is_value();
case ALT_modifyPDPContextAccept__MS__SGSN: return field_modifyPDPContextAccept__MS__SGSN->is_value();
case ALT_deactivatePDPContextRequest: return field_deactivatePDPContextRequest->is_value();
case ALT_deactivatePDPContextAccept: return field_deactivatePDPContextAccept->is_value();
case ALT_sM__Status: return field_sM__Status->is_value();
case ALT_activateMBMSContextRequest: return field_activateMBMSContextRequest->is_value();
case ALT_requestMBMSContextActivationReject: return field_requestMBMSContextActivationReject->is_value();
case ALT_requestSecondaryPDPContextActivationReject: return field_requestSecondaryPDPContextActivationReject->is_value();
case ALT_notification: return field_notification->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void L3__GSM__MS__SGSN::clean_up()
{
switch (union_selection) {
case ALT_activatePDPContextRequest:
  delete field_activatePDPContextRequest;
  break;
case ALT_activateSecondaryPDPContextRequest:
  delete field_activateSecondaryPDPContextRequest;
  break;
case ALT_requestPDPContextActivationReject:
  delete field_requestPDPContextActivationReject;
  break;
case ALT_modifyPDPContextRequest__MS__SGSN:
  delete field_modifyPDPContextRequest__MS__SGSN;
  break;
case ALT_modifyPDPContextAccept__MS__SGSN:
  delete field_modifyPDPContextAccept__MS__SGSN;
  break;
case ALT_deactivatePDPContextRequest:
  delete field_deactivatePDPContextRequest;
  break;
case ALT_deactivatePDPContextAccept:
  delete field_deactivatePDPContextAccept;
  break;
case ALT_sM__Status:
  delete field_sM__Status;
  break;
case ALT_activateMBMSContextRequest:
  delete field_activateMBMSContextRequest;
  break;
case ALT_requestMBMSContextActivationReject:
  delete field_requestMBMSContextActivationReject;
  break;
case ALT_requestSecondaryPDPContextActivationReject:
  delete field_requestSecondaryPDPContextActivationReject;
  break;
case ALT_notification:
  delete field_notification;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void L3__GSM__MS__SGSN::log() const
{
switch (union_selection) {
case ALT_activatePDPContextRequest:
TTCN_Logger::log_event_str("{ activatePDPContextRequest := ");
field_activatePDPContextRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_activateSecondaryPDPContextRequest:
TTCN_Logger::log_event_str("{ activateSecondaryPDPContextRequest := ");
field_activateSecondaryPDPContextRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_requestPDPContextActivationReject:
TTCN_Logger::log_event_str("{ requestPDPContextActivationReject := ");
field_requestPDPContextActivationReject->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_modifyPDPContextRequest__MS__SGSN:
TTCN_Logger::log_event_str("{ modifyPDPContextRequest_MS_SGSN := ");
field_modifyPDPContextRequest__MS__SGSN->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_modifyPDPContextAccept__MS__SGSN:
TTCN_Logger::log_event_str("{ modifyPDPContextAccept_MS_SGSN := ");
field_modifyPDPContextAccept__MS__SGSN->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_deactivatePDPContextRequest:
TTCN_Logger::log_event_str("{ deactivatePDPContextRequest := ");
field_deactivatePDPContextRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_deactivatePDPContextAccept:
TTCN_Logger::log_event_str("{ deactivatePDPContextAccept := ");
field_deactivatePDPContextAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_sM__Status:
TTCN_Logger::log_event_str("{ sM_Status := ");
field_sM__Status->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_activateMBMSContextRequest:
TTCN_Logger::log_event_str("{ activateMBMSContextRequest := ");
field_activateMBMSContextRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_requestMBMSContextActivationReject:
TTCN_Logger::log_event_str("{ requestMBMSContextActivationReject := ");
field_requestMBMSContextActivationReject->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_requestSecondaryPDPContextActivationReject:
TTCN_Logger::log_event_str("{ requestSecondaryPDPContextActivationReject := ");
field_requestSecondaryPDPContextActivationReject->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_notification:
TTCN_Logger::log_event_str("{ notification := ");
field_notification->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

void L3__GSM__MS__SGSN::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, "activatePDPContextRequest")) {
    activatePDPContextRequest().set_param(*mp_last);
    if (!activatePDPContextRequest().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "activateSecondaryPDPContextRequest")) {
    activateSecondaryPDPContextRequest().set_param(*mp_last);
    if (!activateSecondaryPDPContextRequest().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "requestPDPContextActivationReject")) {
    requestPDPContextActivationReject().set_param(*mp_last);
    if (!requestPDPContextActivationReject().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "modifyPDPContextRequest_MS_SGSN")) {
    modifyPDPContextRequest__MS__SGSN().set_param(*mp_last);
    if (!modifyPDPContextRequest__MS__SGSN().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "modifyPDPContextAccept_MS_SGSN")) {
    modifyPDPContextAccept__MS__SGSN().set_param(*mp_last);
    if (!modifyPDPContextAccept__MS__SGSN().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "deactivatePDPContextRequest")) {
    deactivatePDPContextRequest().set_param(*mp_last);
    if (!deactivatePDPContextRequest().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "deactivatePDPContextAccept")) {
    deactivatePDPContextAccept().set_param(*mp_last);
    if (!deactivatePDPContextAccept().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "sM_Status")) {
    sM__Status().set_param(*mp_last);
    if (!sM__Status().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "activateMBMSContextRequest")) {
    activateMBMSContextRequest().set_param(*mp_last);
    if (!activateMBMSContextRequest().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "requestMBMSContextActivationReject")) {
    requestMBMSContextActivationReject().set_param(*mp_last);
    if (!requestMBMSContextActivationReject().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "requestSecondaryPDPContextActivationReject")) {
    requestSecondaryPDPContextActivationReject().set_param(*mp_last);
    if (!requestSecondaryPDPContextActivationReject().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "notification")) {
    notification().set_param(*mp_last);
    if (!notification().is_bound()) clean_up();
    return;
  }
  mp_last->error("Field %s does not exist in type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.", last_name);
}

void L3__GSM__MS__SGSN::set_implicit_omit()
{
switch (union_selection) {
case ALT_activatePDPContextRequest:
field_activatePDPContextRequest->set_implicit_omit(); break;
case ALT_activateSecondaryPDPContextRequest:
field_activateSecondaryPDPContextRequest->set_implicit_omit(); break;
case ALT_requestPDPContextActivationReject:
field_requestPDPContextActivationReject->set_implicit_omit(); break;
case ALT_modifyPDPContextRequest__MS__SGSN:
field_modifyPDPContextRequest__MS__SGSN->set_implicit_omit(); break;
case ALT_modifyPDPContextAccept__MS__SGSN:
field_modifyPDPContextAccept__MS__SGSN->set_implicit_omit(); break;
case ALT_deactivatePDPContextRequest:
field_deactivatePDPContextRequest->set_implicit_omit(); break;
case ALT_deactivatePDPContextAccept:
field_deactivatePDPContextAccept->set_implicit_omit(); break;
case ALT_sM__Status:
field_sM__Status->set_implicit_omit(); break;
case ALT_activateMBMSContextRequest:
field_activateMBMSContextRequest->set_implicit_omit(); break;
case ALT_requestMBMSContextActivationReject:
field_requestMBMSContextActivationReject->set_implicit_omit(); break;
case ALT_requestSecondaryPDPContextActivationReject:
field_requestSecondaryPDPContextActivationReject->set_implicit_omit(); break;
case ALT_notification:
field_notification->set_implicit_omit(); break;
default: break;
}
}

void L3__GSM__MS__SGSN::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_activatePDPContextRequest:
field_activatePDPContextRequest->encode_text(text_buf);
break;
case ALT_activateSecondaryPDPContextRequest:
field_activateSecondaryPDPContextRequest->encode_text(text_buf);
break;
case ALT_requestPDPContextActivationReject:
field_requestPDPContextActivationReject->encode_text(text_buf);
break;
case ALT_modifyPDPContextRequest__MS__SGSN:
field_modifyPDPContextRequest__MS__SGSN->encode_text(text_buf);
break;
case ALT_modifyPDPContextAccept__MS__SGSN:
field_modifyPDPContextAccept__MS__SGSN->encode_text(text_buf);
break;
case ALT_deactivatePDPContextRequest:
field_deactivatePDPContextRequest->encode_text(text_buf);
break;
case ALT_deactivatePDPContextAccept:
field_deactivatePDPContextAccept->encode_text(text_buf);
break;
case ALT_sM__Status:
field_sM__Status->encode_text(text_buf);
break;
case ALT_activateMBMSContextRequest:
field_activateMBMSContextRequest->encode_text(text_buf);
break;
case ALT_requestMBMSContextActivationReject:
field_requestMBMSContextActivationReject->encode_text(text_buf);
break;
case ALT_requestSecondaryPDPContextActivationReject:
field_requestSecondaryPDPContextActivationReject->encode_text(text_buf);
break;
case ALT_notification:
field_notification->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
}

void L3__GSM__MS__SGSN::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_activatePDPContextRequest:
activatePDPContextRequest().decode_text(text_buf);
break;
case ALT_activateSecondaryPDPContextRequest:
activateSecondaryPDPContextRequest().decode_text(text_buf);
break;
case ALT_requestPDPContextActivationReject:
requestPDPContextActivationReject().decode_text(text_buf);
break;
case ALT_modifyPDPContextRequest__MS__SGSN:
modifyPDPContextRequest__MS__SGSN().decode_text(text_buf);
break;
case ALT_modifyPDPContextAccept__MS__SGSN:
modifyPDPContextAccept__MS__SGSN().decode_text(text_buf);
break;
case ALT_deactivatePDPContextRequest:
deactivatePDPContextRequest().decode_text(text_buf);
break;
case ALT_deactivatePDPContextAccept:
deactivatePDPContextAccept().decode_text(text_buf);
break;
case ALT_sM__Status:
sM__Status().decode_text(text_buf);
break;
case ALT_activateMBMSContextRequest:
activateMBMSContextRequest().decode_text(text_buf);
break;
case ALT_requestMBMSContextActivationReject:
requestMBMSContextActivationReject().decode_text(text_buf);
break;
case ALT_requestSecondaryPDPContextActivationReject:
requestSecondaryPDPContextActivationReject().decode_text(text_buf);
break;
case ALT_notification:
notification().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
}

void L3__GSM__MS__SGSN::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void L3__GSM__MS__SGSN::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int L3__GSM__MS__SGSN::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__SM__ActivatePDPContextRequest_descr_.raw->forceomit);
      decoded_length = activatePDPContextRequest().RAW_decode(PDU__SM__ActivatePDPContextRequest_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__SM__ActivateSecondaryPDPContextRequest_descr_.raw->forceomit);
      decoded_length = activateSecondaryPDPContextRequest().RAW_decode(PDU__SM__ActivateSecondaryPDPContextRequest_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__SM__RequestPDPContextActivationReject_descr_.raw->forceomit);
      decoded_length = requestPDPContextActivationReject().RAW_decode(PDU__SM__RequestPDPContextActivationReject_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__SM__ModifyPDPContextRequest__MS__SGSN_descr_.raw->forceomit);
      decoded_length = modifyPDPContextRequest__MS__SGSN().RAW_decode(PDU__SM__ModifyPDPContextRequest__MS__SGSN_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__SM__ModifyPDPContextAccept__MS__SGSN_descr_.raw->forceomit);
      decoded_length = modifyPDPContextAccept__MS__SGSN().RAW_decode(PDU__SM__ModifyPDPContextAccept__MS__SGSN_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__SM__DeactivatePDPContextRequest_descr_.raw->forceomit);
      decoded_length = deactivatePDPContextRequest().RAW_decode(PDU__SM__DeactivatePDPContextRequest_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__SM__DeactivatePDPContextAccept_descr_.raw->forceomit);
      decoded_length = deactivatePDPContextAccept().RAW_decode(PDU__SM__DeactivatePDPContextAccept_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__SM__SM__Status_descr_.raw->forceomit);
      decoded_length = sM__Status().RAW_decode(PDU__SM__SM__Status_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__SM__ActivateMBMSContextRequest_descr_.raw->forceomit);
      decoded_length = activateMBMSContextRequest().RAW_decode(PDU__SM__ActivateMBMSContextRequest_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__SM__RequestMBMSContextActivationReject_descr_.raw->forceomit);
      decoded_length = requestMBMSContextActivationReject().RAW_decode(PDU__SM__RequestMBMSContextActivationReject_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__SM__RequestSecondaryPDPContextActivationReject_descr_.raw->forceomit);
      decoded_length = requestSecondaryPDPContextActivationReject().RAW_decode(PDU__SM__RequestSecondaryPDPContextActivationReject_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__SM__Notification_descr_.raw->forceomit);
      decoded_length = notification().RAW_decode(PDU__SM__Notification_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    default: break;
    }
    return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
  } else {
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_0_force_omit(0, force_omit, PDU__SM__ActivatePDPContextRequest_descr_.raw->forceomit);
      decoded_length = activatePDPContextRequest().RAW_decode(PDU__SM__ActivatePDPContextRequest_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_0_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_1_force_omit(1, force_omit, PDU__SM__ActivateSecondaryPDPContextRequest_descr_.raw->forceomit);
      decoded_length = activateSecondaryPDPContextRequest().RAW_decode(PDU__SM__ActivateSecondaryPDPContextRequest_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_1_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_2_force_omit(2, force_omit, PDU__SM__RequestPDPContextActivationReject_descr_.raw->forceomit);
      decoded_length = requestPDPContextActivationReject().RAW_decode(PDU__SM__RequestPDPContextActivationReject_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_2_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_3_force_omit(3, force_omit, PDU__SM__ModifyPDPContextRequest__MS__SGSN_descr_.raw->forceomit);
      decoded_length = modifyPDPContextRequest__MS__SGSN().RAW_decode(PDU__SM__ModifyPDPContextRequest__MS__SGSN_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_3_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_4_force_omit(4, force_omit, PDU__SM__ModifyPDPContextAccept__MS__SGSN_descr_.raw->forceomit);
      decoded_length = modifyPDPContextAccept__MS__SGSN().RAW_decode(PDU__SM__ModifyPDPContextAccept__MS__SGSN_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_4_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_5_force_omit(5, force_omit, PDU__SM__DeactivatePDPContextRequest_descr_.raw->forceomit);
      decoded_length = deactivatePDPContextRequest().RAW_decode(PDU__SM__DeactivatePDPContextRequest_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_5_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_6_force_omit(6, force_omit, PDU__SM__DeactivatePDPContextAccept_descr_.raw->forceomit);
      decoded_length = deactivatePDPContextAccept().RAW_decode(PDU__SM__DeactivatePDPContextAccept_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_6_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_7_force_omit(7, force_omit, PDU__SM__SM__Status_descr_.raw->forceomit);
      decoded_length = sM__Status().RAW_decode(PDU__SM__SM__Status_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_7_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_8_force_omit(8, force_omit, PDU__SM__ActivateMBMSContextRequest_descr_.raw->forceomit);
      decoded_length = activateMBMSContextRequest().RAW_decode(PDU__SM__ActivateMBMSContextRequest_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_8_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_9_force_omit(9, force_omit, PDU__SM__RequestMBMSContextActivationReject_descr_.raw->forceomit);
      decoded_length = requestMBMSContextActivationReject().RAW_decode(PDU__SM__RequestMBMSContextActivationReject_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_9_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_10_force_omit(10, force_omit, PDU__SM__RequestSecondaryPDPContextActivationReject_descr_.raw->forceomit);
      decoded_length = requestSecondaryPDPContextActivationReject().RAW_decode(PDU__SM__RequestSecondaryPDPContextActivationReject_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_10_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_11_force_omit(11, force_omit, PDU__SM__Notification_descr_.raw->forceomit);
      decoded_length = notification().RAW_decode(PDU__SM__Notification_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_11_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
 }
 clean_up();
 return -1;
}

int L3__GSM__MS__SGSN::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
{
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 12;  myleaf.body.node.nodes = init_nodes_of_enc_tree(12);
  memset(myleaf.body.node.nodes, 0, 12 * sizeof(RAW_enc_tree *));
  switch (union_selection) {
  case ALT_activatePDPContextRequest:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, PDU__SM__ActivatePDPContextRequest_descr_.raw);
    encoded_length = field_activatePDPContextRequest->RAW_encode(PDU__SM__ActivatePDPContextRequest_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &PDU__SM__ActivatePDPContextRequest_descr_;
    break;
  case ALT_activateSecondaryPDPContextRequest:
    myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, PDU__SM__ActivateSecondaryPDPContextRequest_descr_.raw);
    encoded_length = field_activateSecondaryPDPContextRequest->RAW_encode(PDU__SM__ActivateSecondaryPDPContextRequest_descr_, *myleaf.body.node.nodes[1]);
    myleaf.body.node.nodes[1]->coding_descr = &PDU__SM__ActivateSecondaryPDPContextRequest_descr_;
    break;
  case ALT_requestPDPContextActivationReject:
    myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, PDU__SM__RequestPDPContextActivationReject_descr_.raw);
    encoded_length = field_requestPDPContextActivationReject->RAW_encode(PDU__SM__RequestPDPContextActivationReject_descr_, *myleaf.body.node.nodes[2]);
    myleaf.body.node.nodes[2]->coding_descr = &PDU__SM__RequestPDPContextActivationReject_descr_;
    break;
  case ALT_modifyPDPContextRequest__MS__SGSN:
    myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 3, PDU__SM__ModifyPDPContextRequest__MS__SGSN_descr_.raw);
    encoded_length = field_modifyPDPContextRequest__MS__SGSN->RAW_encode(PDU__SM__ModifyPDPContextRequest__MS__SGSN_descr_, *myleaf.body.node.nodes[3]);
    myleaf.body.node.nodes[3]->coding_descr = &PDU__SM__ModifyPDPContextRequest__MS__SGSN_descr_;
    break;
  case ALT_modifyPDPContextAccept__MS__SGSN:
    myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 4, PDU__SM__ModifyPDPContextAccept__MS__SGSN_descr_.raw);
    encoded_length = field_modifyPDPContextAccept__MS__SGSN->RAW_encode(PDU__SM__ModifyPDPContextAccept__MS__SGSN_descr_, *myleaf.body.node.nodes[4]);
    myleaf.body.node.nodes[4]->coding_descr = &PDU__SM__ModifyPDPContextAccept__MS__SGSN_descr_;
    break;
  case ALT_deactivatePDPContextRequest:
    myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 5, PDU__SM__DeactivatePDPContextRequest_descr_.raw);
    encoded_length = field_deactivatePDPContextRequest->RAW_encode(PDU__SM__DeactivatePDPContextRequest_descr_, *myleaf.body.node.nodes[5]);
    myleaf.body.node.nodes[5]->coding_descr = &PDU__SM__DeactivatePDPContextRequest_descr_;
    break;
  case ALT_deactivatePDPContextAccept:
    myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 6, PDU__SM__DeactivatePDPContextAccept_descr_.raw);
    encoded_length = field_deactivatePDPContextAccept->RAW_encode(PDU__SM__DeactivatePDPContextAccept_descr_, *myleaf.body.node.nodes[6]);
    myleaf.body.node.nodes[6]->coding_descr = &PDU__SM__DeactivatePDPContextAccept_descr_;
    break;
  case ALT_sM__Status:
    myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 7, PDU__SM__SM__Status_descr_.raw);
    encoded_length = field_sM__Status->RAW_encode(PDU__SM__SM__Status_descr_, *myleaf.body.node.nodes[7]);
    myleaf.body.node.nodes[7]->coding_descr = &PDU__SM__SM__Status_descr_;
    break;
  case ALT_activateMBMSContextRequest:
    myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 8, PDU__SM__ActivateMBMSContextRequest_descr_.raw);
    encoded_length = field_activateMBMSContextRequest->RAW_encode(PDU__SM__ActivateMBMSContextRequest_descr_, *myleaf.body.node.nodes[8]);
    myleaf.body.node.nodes[8]->coding_descr = &PDU__SM__ActivateMBMSContextRequest_descr_;
    break;
  case ALT_requestMBMSContextActivationReject:
    myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 9, PDU__SM__RequestMBMSContextActivationReject_descr_.raw);
    encoded_length = field_requestMBMSContextActivationReject->RAW_encode(PDU__SM__RequestMBMSContextActivationReject_descr_, *myleaf.body.node.nodes[9]);
    myleaf.body.node.nodes[9]->coding_descr = &PDU__SM__RequestMBMSContextActivationReject_descr_;
    break;
  case ALT_requestSecondaryPDPContextActivationReject:
    myleaf.body.node.nodes[10] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 10, PDU__SM__RequestSecondaryPDPContextActivationReject_descr_.raw);
    encoded_length = field_requestSecondaryPDPContextActivationReject->RAW_encode(PDU__SM__RequestSecondaryPDPContextActivationReject_descr_, *myleaf.body.node.nodes[10]);
    myleaf.body.node.nodes[10]->coding_descr = &PDU__SM__RequestSecondaryPDPContextActivationReject_descr_;
    break;
  case ALT_notification:
    myleaf.body.node.nodes[11] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 11, PDU__SM__Notification_descr_.raw);
    encoded_length = field_notification->RAW_encode(PDU__SM__Notification_descr_, *myleaf.body.node.nodes[11]);
    myleaf.body.node.nodes[11]->coding_descr = &PDU__SM__Notification_descr_;
    break;
  default:
    TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  }
  return encoded_length;
}

void L3__GSM__MS__SGSN_template::copy_value(const L3__GSM__MS__SGSN& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case L3__GSM__MS__SGSN::ALT_activatePDPContextRequest:
single_value.field_activatePDPContextRequest = new PDU__SM__ActivatePDPContextRequest_template(other_value.activatePDPContextRequest());
break;
case L3__GSM__MS__SGSN::ALT_activateSecondaryPDPContextRequest:
single_value.field_activateSecondaryPDPContextRequest = new PDU__SM__ActivateSecondaryPDPContextRequest_template(other_value.activateSecondaryPDPContextRequest());
break;
case L3__GSM__MS__SGSN::ALT_requestPDPContextActivationReject:
single_value.field_requestPDPContextActivationReject = new PDU__SM__RequestPDPContextActivationReject_template(other_value.requestPDPContextActivationReject());
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextRequest__MS__SGSN:
single_value.field_modifyPDPContextRequest__MS__SGSN = new PDU__SM__ModifyPDPContextRequest__MS__SGSN_template(other_value.modifyPDPContextRequest__MS__SGSN());
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextAccept__MS__SGSN:
single_value.field_modifyPDPContextAccept__MS__SGSN = new PDU__SM__ModifyPDPContextAccept__MS__SGSN_template(other_value.modifyPDPContextAccept__MS__SGSN());
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextRequest:
single_value.field_deactivatePDPContextRequest = new PDU__SM__DeactivatePDPContextRequest_template(other_value.deactivatePDPContextRequest());
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextAccept:
single_value.field_deactivatePDPContextAccept = new PDU__SM__DeactivatePDPContextAccept_template(other_value.deactivatePDPContextAccept());
break;
case L3__GSM__MS__SGSN::ALT_sM__Status:
single_value.field_sM__Status = new PDU__SM__SM__Status_template(other_value.sM__Status());
break;
case L3__GSM__MS__SGSN::ALT_activateMBMSContextRequest:
single_value.field_activateMBMSContextRequest = new PDU__SM__ActivateMBMSContextRequest_template(other_value.activateMBMSContextRequest());
break;
case L3__GSM__MS__SGSN::ALT_requestMBMSContextActivationReject:
single_value.field_requestMBMSContextActivationReject = new PDU__SM__RequestMBMSContextActivationReject_template(other_value.requestMBMSContextActivationReject());
break;
case L3__GSM__MS__SGSN::ALT_requestSecondaryPDPContextActivationReject:
single_value.field_requestSecondaryPDPContextActivationReject = new PDU__SM__RequestSecondaryPDPContextActivationReject_template(other_value.requestSecondaryPDPContextActivationReject());
break;
case L3__GSM__MS__SGSN::ALT_notification:
single_value.field_notification = new PDU__SM__Notification_template(other_value.notification());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
set_selection(SPECIFIC_VALUE);
}

void L3__GSM__MS__SGSN_template::copy_template(const L3__GSM__MS__SGSN_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 L3__GSM__MS__SGSN::ALT_activatePDPContextRequest:
single_value.field_activatePDPContextRequest = new PDU__SM__ActivatePDPContextRequest_template(*other_value.single_value.field_activatePDPContextRequest);
break;
case L3__GSM__MS__SGSN::ALT_activateSecondaryPDPContextRequest:
single_value.field_activateSecondaryPDPContextRequest = new PDU__SM__ActivateSecondaryPDPContextRequest_template(*other_value.single_value.field_activateSecondaryPDPContextRequest);
break;
case L3__GSM__MS__SGSN::ALT_requestPDPContextActivationReject:
single_value.field_requestPDPContextActivationReject = new PDU__SM__RequestPDPContextActivationReject_template(*other_value.single_value.field_requestPDPContextActivationReject);
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextRequest__MS__SGSN:
single_value.field_modifyPDPContextRequest__MS__SGSN = new PDU__SM__ModifyPDPContextRequest__MS__SGSN_template(*other_value.single_value.field_modifyPDPContextRequest__MS__SGSN);
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextAccept__MS__SGSN:
single_value.field_modifyPDPContextAccept__MS__SGSN = new PDU__SM__ModifyPDPContextAccept__MS__SGSN_template(*other_value.single_value.field_modifyPDPContextAccept__MS__SGSN);
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextRequest:
single_value.field_deactivatePDPContextRequest = new PDU__SM__DeactivatePDPContextRequest_template(*other_value.single_value.field_deactivatePDPContextRequest);
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextAccept:
single_value.field_deactivatePDPContextAccept = new PDU__SM__DeactivatePDPContextAccept_template(*other_value.single_value.field_deactivatePDPContextAccept);
break;
case L3__GSM__MS__SGSN::ALT_sM__Status:
single_value.field_sM__Status = new PDU__SM__SM__Status_template(*other_value.single_value.field_sM__Status);
break;
case L3__GSM__MS__SGSN::ALT_activateMBMSContextRequest:
single_value.field_activateMBMSContextRequest = new PDU__SM__ActivateMBMSContextRequest_template(*other_value.single_value.field_activateMBMSContextRequest);
break;
case L3__GSM__MS__SGSN::ALT_requestMBMSContextActivationReject:
single_value.field_requestMBMSContextActivationReject = new PDU__SM__RequestMBMSContextActivationReject_template(*other_value.single_value.field_requestMBMSContextActivationReject);
break;
case L3__GSM__MS__SGSN::ALT_requestSecondaryPDPContextActivationReject:
single_value.field_requestSecondaryPDPContextActivationReject = new PDU__SM__RequestSecondaryPDPContextActivationReject_template(*other_value.single_value.field_requestSecondaryPDPContextActivationReject);
break;
case L3__GSM__MS__SGSN::ALT_notification:
single_value.field_notification = new PDU__SM__Notification_template(*other_value.single_value.field_notification);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
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 L3__GSM__MS__SGSN_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 L3__GSM__MS__SGSN_template(*other_value.implication_.precondition);
implication_.implied_template = new L3__GSM__MS__SGSN_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_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
set_selection(other_value);
}

L3__GSM__MS__SGSN_template::L3__GSM__MS__SGSN_template()
{
}

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

L3__GSM__MS__SGSN_template::L3__GSM__MS__SGSN_template(const L3__GSM__MS__SGSN& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void L3__GSM__MS__SGSN_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case L3__GSM__MS__SGSN::ALT_activatePDPContextRequest:
delete single_value.field_activatePDPContextRequest;
break;
case L3__GSM__MS__SGSN::ALT_activateSecondaryPDPContextRequest:
delete single_value.field_activateSecondaryPDPContextRequest;
break;
case L3__GSM__MS__SGSN::ALT_requestPDPContextActivationReject:
delete single_value.field_requestPDPContextActivationReject;
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextRequest__MS__SGSN:
delete single_value.field_modifyPDPContextRequest__MS__SGSN;
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextAccept__MS__SGSN:
delete single_value.field_modifyPDPContextAccept__MS__SGSN;
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextRequest:
delete single_value.field_deactivatePDPContextRequest;
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextAccept:
delete single_value.field_deactivatePDPContextAccept;
break;
case L3__GSM__MS__SGSN::ALT_sM__Status:
delete single_value.field_sM__Status;
break;
case L3__GSM__MS__SGSN::ALT_activateMBMSContextRequest:
delete single_value.field_activateMBMSContextRequest;
break;
case L3__GSM__MS__SGSN::ALT_requestMBMSContextActivationReject:
delete single_value.field_requestMBMSContextActivationReject;
break;
case L3__GSM__MS__SGSN::ALT_requestSecondaryPDPContextActivationReject:
delete single_value.field_requestSecondaryPDPContextActivationReject;
break;
case L3__GSM__MS__SGSN::ALT_notification:
delete single_value.field_notification;
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;
}

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

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

L3__GSM__MS__SGSN_template& L3__GSM__MS__SGSN_template::operator=(const OPTIONAL<L3__GSM__MS__SGSN>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const L3__GSM__MS__SGSN&)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_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
return *this;
}

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

boolean L3__GSM__MS__SGSN_template::match(const L3__GSM__MS__SGSN& 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:
{
L3__GSM__MS__SGSN::union_selection_type value_selection = other_value.get_selection();
if (value_selection == L3__GSM__MS__SGSN::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case L3__GSM__MS__SGSN::ALT_activatePDPContextRequest:
return single_value.field_activatePDPContextRequest->match(other_value.activatePDPContextRequest(), legacy);
case L3__GSM__MS__SGSN::ALT_activateSecondaryPDPContextRequest:
return single_value.field_activateSecondaryPDPContextRequest->match(other_value.activateSecondaryPDPContextRequest(), legacy);
case L3__GSM__MS__SGSN::ALT_requestPDPContextActivationReject:
return single_value.field_requestPDPContextActivationReject->match(other_value.requestPDPContextActivationReject(), legacy);
case L3__GSM__MS__SGSN::ALT_modifyPDPContextRequest__MS__SGSN:
return single_value.field_modifyPDPContextRequest__MS__SGSN->match(other_value.modifyPDPContextRequest__MS__SGSN(), legacy);
case L3__GSM__MS__SGSN::ALT_modifyPDPContextAccept__MS__SGSN:
return single_value.field_modifyPDPContextAccept__MS__SGSN->match(other_value.modifyPDPContextAccept__MS__SGSN(), legacy);
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextRequest:
return single_value.field_deactivatePDPContextRequest->match(other_value.deactivatePDPContextRequest(), legacy);
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextAccept:
return single_value.field_deactivatePDPContextAccept->match(other_value.deactivatePDPContextAccept(), legacy);
case L3__GSM__MS__SGSN::ALT_sM__Status:
return single_value.field_sM__Status->match(other_value.sM__Status(), legacy);
case L3__GSM__MS__SGSN::ALT_activateMBMSContextRequest:
return single_value.field_activateMBMSContextRequest->match(other_value.activateMBMSContextRequest(), legacy);
case L3__GSM__MS__SGSN::ALT_requestMBMSContextActivationReject:
return single_value.field_requestMBMSContextActivationReject->match(other_value.requestMBMSContextActivationReject(), legacy);
case L3__GSM__MS__SGSN::ALT_requestSecondaryPDPContextActivationReject:
return single_value.field_requestSecondaryPDPContextActivationReject->match(other_value.requestSecondaryPDPContextActivationReject(), legacy);
case L3__GSM__MS__SGSN::ALT_notification:
return single_value.field_notification->match(other_value.notification(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
}
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_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
return FALSE;
}

boolean L3__GSM__MS__SGSN_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case L3__GSM__MS__SGSN::ALT_activatePDPContextRequest:
return single_value.field_activatePDPContextRequest->is_value();
case L3__GSM__MS__SGSN::ALT_activateSecondaryPDPContextRequest:
return single_value.field_activateSecondaryPDPContextRequest->is_value();
case L3__GSM__MS__SGSN::ALT_requestPDPContextActivationReject:
return single_value.field_requestPDPContextActivationReject->is_value();
case L3__GSM__MS__SGSN::ALT_modifyPDPContextRequest__MS__SGSN:
return single_value.field_modifyPDPContextRequest__MS__SGSN->is_value();
case L3__GSM__MS__SGSN::ALT_modifyPDPContextAccept__MS__SGSN:
return single_value.field_modifyPDPContextAccept__MS__SGSN->is_value();
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextRequest:
return single_value.field_deactivatePDPContextRequest->is_value();
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextAccept:
return single_value.field_deactivatePDPContextAccept->is_value();
case L3__GSM__MS__SGSN::ALT_sM__Status:
return single_value.field_sM__Status->is_value();
case L3__GSM__MS__SGSN::ALT_activateMBMSContextRequest:
return single_value.field_activateMBMSContextRequest->is_value();
case L3__GSM__MS__SGSN::ALT_requestMBMSContextActivationReject:
return single_value.field_requestMBMSContextActivationReject->is_value();
case L3__GSM__MS__SGSN::ALT_requestSecondaryPDPContextActivationReject:
return single_value.field_requestSecondaryPDPContextActivationReject->is_value();
case L3__GSM__MS__SGSN::ALT_notification:
return single_value.field_notification->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_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
}

L3__GSM__MS__SGSN L3__GSM__MS__SGSN_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_GMM_SM_Types.L3_GSM_MS_SGSN.");
L3__GSM__MS__SGSN ret_val;
switch (single_value.union_selection) {
case L3__GSM__MS__SGSN::ALT_activatePDPContextRequest:
ret_val.activatePDPContextRequest() = single_value.field_activatePDPContextRequest->valueof();
break;
case L3__GSM__MS__SGSN::ALT_activateSecondaryPDPContextRequest:
ret_val.activateSecondaryPDPContextRequest() = single_value.field_activateSecondaryPDPContextRequest->valueof();
break;
case L3__GSM__MS__SGSN::ALT_requestPDPContextActivationReject:
ret_val.requestPDPContextActivationReject() = single_value.field_requestPDPContextActivationReject->valueof();
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextRequest__MS__SGSN:
ret_val.modifyPDPContextRequest__MS__SGSN() = single_value.field_modifyPDPContextRequest__MS__SGSN->valueof();
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextAccept__MS__SGSN:
ret_val.modifyPDPContextAccept__MS__SGSN() = single_value.field_modifyPDPContextAccept__MS__SGSN->valueof();
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextRequest:
ret_val.deactivatePDPContextRequest() = single_value.field_deactivatePDPContextRequest->valueof();
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextAccept:
ret_val.deactivatePDPContextAccept() = single_value.field_deactivatePDPContextAccept->valueof();
break;
case L3__GSM__MS__SGSN::ALT_sM__Status:
ret_val.sM__Status() = single_value.field_sM__Status->valueof();
break;
case L3__GSM__MS__SGSN::ALT_activateMBMSContextRequest:
ret_val.activateMBMSContextRequest() = single_value.field_activateMBMSContextRequest->valueof();
break;
case L3__GSM__MS__SGSN::ALT_requestMBMSContextActivationReject:
ret_val.requestMBMSContextActivationReject() = single_value.field_requestMBMSContextActivationReject->valueof();
break;
case L3__GSM__MS__SGSN::ALT_requestSecondaryPDPContextActivationReject:
ret_val.requestSecondaryPDPContextActivationReject() = single_value.field_requestSecondaryPDPContextActivationReject->valueof();
break;
case L3__GSM__MS__SGSN::ALT_notification:
ret_val.notification() = single_value.field_notification->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
return ret_val;
}

L3__GSM__MS__SGSN_template& L3__GSM__MS__SGSN_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_GMM_SM_Types.L3_GSM_MS_SGSN.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return value_list.list_value[list_index];
}
void L3__GSM__MS__SGSN_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_GMM_SM_Types.L3_GSM_MS_SGSN.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new L3__GSM__MS__SGSN_template[list_length];
}

PDU__SM__ActivatePDPContextRequest_template& L3__GSM__MS__SGSN_template::activatePDPContextRequest()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__MS__SGSN::ALT_activatePDPContextRequest) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_activatePDPContextRequest = new PDU__SM__ActivatePDPContextRequest_template(ANY_VALUE);
else single_value.field_activatePDPContextRequest = new PDU__SM__ActivatePDPContextRequest_template;
single_value.union_selection = L3__GSM__MS__SGSN::ALT_activatePDPContextRequest;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_activatePDPContextRequest;
}

const PDU__SM__ActivatePDPContextRequest_template& L3__GSM__MS__SGSN_template::activatePDPContextRequest() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field activatePDPContextRequest in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
if (single_value.union_selection != L3__GSM__MS__SGSN::ALT_activatePDPContextRequest) TTCN_error("Accessing non-selected field activatePDPContextRequest in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *single_value.field_activatePDPContextRequest;
}

PDU__SM__ActivateSecondaryPDPContextRequest_template& L3__GSM__MS__SGSN_template::activateSecondaryPDPContextRequest()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__MS__SGSN::ALT_activateSecondaryPDPContextRequest) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_activateSecondaryPDPContextRequest = new PDU__SM__ActivateSecondaryPDPContextRequest_template(ANY_VALUE);
else single_value.field_activateSecondaryPDPContextRequest = new PDU__SM__ActivateSecondaryPDPContextRequest_template;
single_value.union_selection = L3__GSM__MS__SGSN::ALT_activateSecondaryPDPContextRequest;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_activateSecondaryPDPContextRequest;
}

const PDU__SM__ActivateSecondaryPDPContextRequest_template& L3__GSM__MS__SGSN_template::activateSecondaryPDPContextRequest() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field activateSecondaryPDPContextRequest in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
if (single_value.union_selection != L3__GSM__MS__SGSN::ALT_activateSecondaryPDPContextRequest) TTCN_error("Accessing non-selected field activateSecondaryPDPContextRequest in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *single_value.field_activateSecondaryPDPContextRequest;
}

PDU__SM__RequestPDPContextActivationReject_template& L3__GSM__MS__SGSN_template::requestPDPContextActivationReject()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__MS__SGSN::ALT_requestPDPContextActivationReject) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_requestPDPContextActivationReject = new PDU__SM__RequestPDPContextActivationReject_template(ANY_VALUE);
else single_value.field_requestPDPContextActivationReject = new PDU__SM__RequestPDPContextActivationReject_template;
single_value.union_selection = L3__GSM__MS__SGSN::ALT_requestPDPContextActivationReject;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_requestPDPContextActivationReject;
}

const PDU__SM__RequestPDPContextActivationReject_template& L3__GSM__MS__SGSN_template::requestPDPContextActivationReject() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field requestPDPContextActivationReject in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
if (single_value.union_selection != L3__GSM__MS__SGSN::ALT_requestPDPContextActivationReject) TTCN_error("Accessing non-selected field requestPDPContextActivationReject in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *single_value.field_requestPDPContextActivationReject;
}

PDU__SM__ModifyPDPContextRequest__MS__SGSN_template& L3__GSM__MS__SGSN_template::modifyPDPContextRequest__MS__SGSN()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__MS__SGSN::ALT_modifyPDPContextRequest__MS__SGSN) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_modifyPDPContextRequest__MS__SGSN = new PDU__SM__ModifyPDPContextRequest__MS__SGSN_template(ANY_VALUE);
else single_value.field_modifyPDPContextRequest__MS__SGSN = new PDU__SM__ModifyPDPContextRequest__MS__SGSN_template;
single_value.union_selection = L3__GSM__MS__SGSN::ALT_modifyPDPContextRequest__MS__SGSN;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_modifyPDPContextRequest__MS__SGSN;
}

const PDU__SM__ModifyPDPContextRequest__MS__SGSN_template& L3__GSM__MS__SGSN_template::modifyPDPContextRequest__MS__SGSN() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field modifyPDPContextRequest_MS_SGSN in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
if (single_value.union_selection != L3__GSM__MS__SGSN::ALT_modifyPDPContextRequest__MS__SGSN) TTCN_error("Accessing non-selected field modifyPDPContextRequest_MS_SGSN in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *single_value.field_modifyPDPContextRequest__MS__SGSN;
}

PDU__SM__ModifyPDPContextAccept__MS__SGSN_template& L3__GSM__MS__SGSN_template::modifyPDPContextAccept__MS__SGSN()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__MS__SGSN::ALT_modifyPDPContextAccept__MS__SGSN) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_modifyPDPContextAccept__MS__SGSN = new PDU__SM__ModifyPDPContextAccept__MS__SGSN_template(ANY_VALUE);
else single_value.field_modifyPDPContextAccept__MS__SGSN = new PDU__SM__ModifyPDPContextAccept__MS__SGSN_template;
single_value.union_selection = L3__GSM__MS__SGSN::ALT_modifyPDPContextAccept__MS__SGSN;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_modifyPDPContextAccept__MS__SGSN;
}

const PDU__SM__ModifyPDPContextAccept__MS__SGSN_template& L3__GSM__MS__SGSN_template::modifyPDPContextAccept__MS__SGSN() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field modifyPDPContextAccept_MS_SGSN in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
if (single_value.union_selection != L3__GSM__MS__SGSN::ALT_modifyPDPContextAccept__MS__SGSN) TTCN_error("Accessing non-selected field modifyPDPContextAccept_MS_SGSN in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *single_value.field_modifyPDPContextAccept__MS__SGSN;
}

PDU__SM__DeactivatePDPContextRequest_template& L3__GSM__MS__SGSN_template::deactivatePDPContextRequest()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__MS__SGSN::ALT_deactivatePDPContextRequest) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_deactivatePDPContextRequest = new PDU__SM__DeactivatePDPContextRequest_template(ANY_VALUE);
else single_value.field_deactivatePDPContextRequest = new PDU__SM__DeactivatePDPContextRequest_template;
single_value.union_selection = L3__GSM__MS__SGSN::ALT_deactivatePDPContextRequest;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_deactivatePDPContextRequest;
}

const PDU__SM__DeactivatePDPContextRequest_template& L3__GSM__MS__SGSN_template::deactivatePDPContextRequest() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field deactivatePDPContextRequest in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
if (single_value.union_selection != L3__GSM__MS__SGSN::ALT_deactivatePDPContextRequest) TTCN_error("Accessing non-selected field deactivatePDPContextRequest in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *single_value.field_deactivatePDPContextRequest;
}

PDU__SM__DeactivatePDPContextAccept_template& L3__GSM__MS__SGSN_template::deactivatePDPContextAccept()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__MS__SGSN::ALT_deactivatePDPContextAccept) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_deactivatePDPContextAccept = new PDU__SM__DeactivatePDPContextAccept_template(ANY_VALUE);
else single_value.field_deactivatePDPContextAccept = new PDU__SM__DeactivatePDPContextAccept_template;
single_value.union_selection = L3__GSM__MS__SGSN::ALT_deactivatePDPContextAccept;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_deactivatePDPContextAccept;
}

const PDU__SM__DeactivatePDPContextAccept_template& L3__GSM__MS__SGSN_template::deactivatePDPContextAccept() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field deactivatePDPContextAccept in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
if (single_value.union_selection != L3__GSM__MS__SGSN::ALT_deactivatePDPContextAccept) TTCN_error("Accessing non-selected field deactivatePDPContextAccept in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *single_value.field_deactivatePDPContextAccept;
}

PDU__SM__SM__Status_template& L3__GSM__MS__SGSN_template::sM__Status()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__MS__SGSN::ALT_sM__Status) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_sM__Status = new PDU__SM__SM__Status_template(ANY_VALUE);
else single_value.field_sM__Status = new PDU__SM__SM__Status_template;
single_value.union_selection = L3__GSM__MS__SGSN::ALT_sM__Status;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_sM__Status;
}

const PDU__SM__SM__Status_template& L3__GSM__MS__SGSN_template::sM__Status() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sM_Status in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
if (single_value.union_selection != L3__GSM__MS__SGSN::ALT_sM__Status) TTCN_error("Accessing non-selected field sM_Status in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *single_value.field_sM__Status;
}

PDU__SM__ActivateMBMSContextRequest_template& L3__GSM__MS__SGSN_template::activateMBMSContextRequest()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__MS__SGSN::ALT_activateMBMSContextRequest) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_activateMBMSContextRequest = new PDU__SM__ActivateMBMSContextRequest_template(ANY_VALUE);
else single_value.field_activateMBMSContextRequest = new PDU__SM__ActivateMBMSContextRequest_template;
single_value.union_selection = L3__GSM__MS__SGSN::ALT_activateMBMSContextRequest;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_activateMBMSContextRequest;
}

const PDU__SM__ActivateMBMSContextRequest_template& L3__GSM__MS__SGSN_template::activateMBMSContextRequest() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field activateMBMSContextRequest in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
if (single_value.union_selection != L3__GSM__MS__SGSN::ALT_activateMBMSContextRequest) TTCN_error("Accessing non-selected field activateMBMSContextRequest in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *single_value.field_activateMBMSContextRequest;
}

PDU__SM__RequestMBMSContextActivationReject_template& L3__GSM__MS__SGSN_template::requestMBMSContextActivationReject()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__MS__SGSN::ALT_requestMBMSContextActivationReject) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_requestMBMSContextActivationReject = new PDU__SM__RequestMBMSContextActivationReject_template(ANY_VALUE);
else single_value.field_requestMBMSContextActivationReject = new PDU__SM__RequestMBMSContextActivationReject_template;
single_value.union_selection = L3__GSM__MS__SGSN::ALT_requestMBMSContextActivationReject;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_requestMBMSContextActivationReject;
}

const PDU__SM__RequestMBMSContextActivationReject_template& L3__GSM__MS__SGSN_template::requestMBMSContextActivationReject() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field requestMBMSContextActivationReject in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
if (single_value.union_selection != L3__GSM__MS__SGSN::ALT_requestMBMSContextActivationReject) TTCN_error("Accessing non-selected field requestMBMSContextActivationReject in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *single_value.field_requestMBMSContextActivationReject;
}

PDU__SM__RequestSecondaryPDPContextActivationReject_template& L3__GSM__MS__SGSN_template::requestSecondaryPDPContextActivationReject()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__MS__SGSN::ALT_requestSecondaryPDPContextActivationReject) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_requestSecondaryPDPContextActivationReject = new PDU__SM__RequestSecondaryPDPContextActivationReject_template(ANY_VALUE);
else single_value.field_requestSecondaryPDPContextActivationReject = new PDU__SM__RequestSecondaryPDPContextActivationReject_template;
single_value.union_selection = L3__GSM__MS__SGSN::ALT_requestSecondaryPDPContextActivationReject;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_requestSecondaryPDPContextActivationReject;
}

const PDU__SM__RequestSecondaryPDPContextActivationReject_template& L3__GSM__MS__SGSN_template::requestSecondaryPDPContextActivationReject() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field requestSecondaryPDPContextActivationReject in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
if (single_value.union_selection != L3__GSM__MS__SGSN::ALT_requestSecondaryPDPContextActivationReject) TTCN_error("Accessing non-selected field requestSecondaryPDPContextActivationReject in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *single_value.field_requestSecondaryPDPContextActivationReject;
}

PDU__SM__Notification_template& L3__GSM__MS__SGSN_template::notification()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__MS__SGSN::ALT_notification) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_notification = new PDU__SM__Notification_template(ANY_VALUE);
else single_value.field_notification = new PDU__SM__Notification_template;
single_value.union_selection = L3__GSM__MS__SGSN::ALT_notification;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_notification;
}

const PDU__SM__Notification_template& L3__GSM__MS__SGSN_template::notification() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field notification in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
if (single_value.union_selection != L3__GSM__MS__SGSN::ALT_notification) TTCN_error("Accessing non-selected field notification in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
return *single_value.field_notification;
}

boolean L3__GSM__MS__SGSN_template::ischosen(L3__GSM__MS__SGSN::union_selection_type checked_selection) const
{
if (checked_selection == L3__GSM__MS__SGSN::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.union_selection == L3__GSM__MS__SGSN::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
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_GMM_SM_Types.L3_GSM_MS_SGSN 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 L3__GSM__MS__SGSN_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case L3__GSM__MS__SGSN::ALT_activatePDPContextRequest:
TTCN_Logger::log_event_str("{ activatePDPContextRequest := ");
single_value.field_activatePDPContextRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__MS__SGSN::ALT_activateSecondaryPDPContextRequest:
TTCN_Logger::log_event_str("{ activateSecondaryPDPContextRequest := ");
single_value.field_activateSecondaryPDPContextRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__MS__SGSN::ALT_requestPDPContextActivationReject:
TTCN_Logger::log_event_str("{ requestPDPContextActivationReject := ");
single_value.field_requestPDPContextActivationReject->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextRequest__MS__SGSN:
TTCN_Logger::log_event_str("{ modifyPDPContextRequest_MS_SGSN := ");
single_value.field_modifyPDPContextRequest__MS__SGSN->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextAccept__MS__SGSN:
TTCN_Logger::log_event_str("{ modifyPDPContextAccept_MS_SGSN := ");
single_value.field_modifyPDPContextAccept__MS__SGSN->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextRequest:
TTCN_Logger::log_event_str("{ deactivatePDPContextRequest := ");
single_value.field_deactivatePDPContextRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextAccept:
TTCN_Logger::log_event_str("{ deactivatePDPContextAccept := ");
single_value.field_deactivatePDPContextAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__MS__SGSN::ALT_sM__Status:
TTCN_Logger::log_event_str("{ sM_Status := ");
single_value.field_sM__Status->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__MS__SGSN::ALT_activateMBMSContextRequest:
TTCN_Logger::log_event_str("{ activateMBMSContextRequest := ");
single_value.field_activateMBMSContextRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__MS__SGSN::ALT_requestMBMSContextActivationReject:
TTCN_Logger::log_event_str("{ requestMBMSContextActivationReject := ");
single_value.field_requestMBMSContextActivationReject->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__MS__SGSN::ALT_requestSecondaryPDPContextActivationReject:
TTCN_Logger::log_event_str("{ requestSecondaryPDPContextActivationReject := ");
single_value.field_requestSecondaryPDPContextActivationReject->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__MS__SGSN::ALT_notification:
TTCN_Logger::log_event_str("{ notification := ");
single_value.field_notification->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 L3__GSM__MS__SGSN_template::log_match(const L3__GSM__MS__SGSN& 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 L3__GSM__MS__SGSN::ALT_activatePDPContextRequest:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".activatePDPContextRequest");
single_value.field_activatePDPContextRequest->log_match(match_value.activatePDPContextRequest(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ activatePDPContextRequest := ");
single_value.field_activatePDPContextRequest->log_match(match_value.activatePDPContextRequest(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__MS__SGSN::ALT_activateSecondaryPDPContextRequest:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".activateSecondaryPDPContextRequest");
single_value.field_activateSecondaryPDPContextRequest->log_match(match_value.activateSecondaryPDPContextRequest(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ activateSecondaryPDPContextRequest := ");
single_value.field_activateSecondaryPDPContextRequest->log_match(match_value.activateSecondaryPDPContextRequest(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__MS__SGSN::ALT_requestPDPContextActivationReject:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".requestPDPContextActivationReject");
single_value.field_requestPDPContextActivationReject->log_match(match_value.requestPDPContextActivationReject(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ requestPDPContextActivationReject := ");
single_value.field_requestPDPContextActivationReject->log_match(match_value.requestPDPContextActivationReject(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextRequest__MS__SGSN:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".modifyPDPContextRequest_MS_SGSN");
single_value.field_modifyPDPContextRequest__MS__SGSN->log_match(match_value.modifyPDPContextRequest__MS__SGSN(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ modifyPDPContextRequest_MS_SGSN := ");
single_value.field_modifyPDPContextRequest__MS__SGSN->log_match(match_value.modifyPDPContextRequest__MS__SGSN(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextAccept__MS__SGSN:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".modifyPDPContextAccept_MS_SGSN");
single_value.field_modifyPDPContextAccept__MS__SGSN->log_match(match_value.modifyPDPContextAccept__MS__SGSN(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ modifyPDPContextAccept_MS_SGSN := ");
single_value.field_modifyPDPContextAccept__MS__SGSN->log_match(match_value.modifyPDPContextAccept__MS__SGSN(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextRequest:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".deactivatePDPContextRequest");
single_value.field_deactivatePDPContextRequest->log_match(match_value.deactivatePDPContextRequest(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ deactivatePDPContextRequest := ");
single_value.field_deactivatePDPContextRequest->log_match(match_value.deactivatePDPContextRequest(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextAccept:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".deactivatePDPContextAccept");
single_value.field_deactivatePDPContextAccept->log_match(match_value.deactivatePDPContextAccept(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ deactivatePDPContextAccept := ");
single_value.field_deactivatePDPContextAccept->log_match(match_value.deactivatePDPContextAccept(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__MS__SGSN::ALT_sM__Status:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".sM_Status");
single_value.field_sM__Status->log_match(match_value.sM__Status(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ sM_Status := ");
single_value.field_sM__Status->log_match(match_value.sM__Status(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__MS__SGSN::ALT_activateMBMSContextRequest:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".activateMBMSContextRequest");
single_value.field_activateMBMSContextRequest->log_match(match_value.activateMBMSContextRequest(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ activateMBMSContextRequest := ");
single_value.field_activateMBMSContextRequest->log_match(match_value.activateMBMSContextRequest(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__MS__SGSN::ALT_requestMBMSContextActivationReject:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".requestMBMSContextActivationReject");
single_value.field_requestMBMSContextActivationReject->log_match(match_value.requestMBMSContextActivationReject(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ requestMBMSContextActivationReject := ");
single_value.field_requestMBMSContextActivationReject->log_match(match_value.requestMBMSContextActivationReject(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__MS__SGSN::ALT_requestSecondaryPDPContextActivationReject:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".requestSecondaryPDPContextActivationReject");
single_value.field_requestSecondaryPDPContextActivationReject->log_match(match_value.requestSecondaryPDPContextActivationReject(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ requestSecondaryPDPContextActivationReject := ");
single_value.field_requestSecondaryPDPContextActivationReject->log_match(match_value.requestSecondaryPDPContextActivationReject(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__MS__SGSN::ALT_notification:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".notification");
single_value.field_notification->log_match(match_value.notification(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ notification := ");
single_value.field_notification->log_match(match_value.notification(), 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 L3__GSM__MS__SGSN_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 L3__GSM__MS__SGSN::ALT_activatePDPContextRequest:
single_value.field_activatePDPContextRequest->encode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_activateSecondaryPDPContextRequest:
single_value.field_activateSecondaryPDPContextRequest->encode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_requestPDPContextActivationReject:
single_value.field_requestPDPContextActivationReject->encode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextRequest__MS__SGSN:
single_value.field_modifyPDPContextRequest__MS__SGSN->encode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextAccept__MS__SGSN:
single_value.field_modifyPDPContextAccept__MS__SGSN->encode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextRequest:
single_value.field_deactivatePDPContextRequest->encode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextAccept:
single_value.field_deactivatePDPContextAccept->encode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_sM__Status:
single_value.field_sM__Status->encode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_activateMBMSContextRequest:
single_value.field_activateMBMSContextRequest->encode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_requestMBMSContextActivationReject:
single_value.field_requestMBMSContextActivationReject->encode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_requestSecondaryPDPContextActivationReject:
single_value.field_requestSecondaryPDPContextActivationReject->encode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_notification:
single_value.field_notification->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
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_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
}

void L3__GSM__MS__SGSN_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
{
single_value.union_selection = L3__GSM__MS__SGSN::UNBOUND_VALUE;
L3__GSM__MS__SGSN::union_selection_type new_selection = (L3__GSM__MS__SGSN::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case L3__GSM__MS__SGSN::ALT_activatePDPContextRequest:
single_value.field_activatePDPContextRequest = new PDU__SM__ActivatePDPContextRequest_template;
single_value.field_activatePDPContextRequest->decode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_activateSecondaryPDPContextRequest:
single_value.field_activateSecondaryPDPContextRequest = new PDU__SM__ActivateSecondaryPDPContextRequest_template;
single_value.field_activateSecondaryPDPContextRequest->decode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_requestPDPContextActivationReject:
single_value.field_requestPDPContextActivationReject = new PDU__SM__RequestPDPContextActivationReject_template;
single_value.field_requestPDPContextActivationReject->decode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextRequest__MS__SGSN:
single_value.field_modifyPDPContextRequest__MS__SGSN = new PDU__SM__ModifyPDPContextRequest__MS__SGSN_template;
single_value.field_modifyPDPContextRequest__MS__SGSN->decode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextAccept__MS__SGSN:
single_value.field_modifyPDPContextAccept__MS__SGSN = new PDU__SM__ModifyPDPContextAccept__MS__SGSN_template;
single_value.field_modifyPDPContextAccept__MS__SGSN->decode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextRequest:
single_value.field_deactivatePDPContextRequest = new PDU__SM__DeactivatePDPContextRequest_template;
single_value.field_deactivatePDPContextRequest->decode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextAccept:
single_value.field_deactivatePDPContextAccept = new PDU__SM__DeactivatePDPContextAccept_template;
single_value.field_deactivatePDPContextAccept->decode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_sM__Status:
single_value.field_sM__Status = new PDU__SM__SM__Status_template;
single_value.field_sM__Status->decode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_activateMBMSContextRequest:
single_value.field_activateMBMSContextRequest = new PDU__SM__ActivateMBMSContextRequest_template;
single_value.field_activateMBMSContextRequest->decode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_requestMBMSContextActivationReject:
single_value.field_requestMBMSContextActivationReject = new PDU__SM__RequestMBMSContextActivationReject_template;
single_value.field_requestMBMSContextActivationReject->decode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_requestSecondaryPDPContextActivationReject:
single_value.field_requestSecondaryPDPContextActivationReject = new PDU__SM__RequestSecondaryPDPContextActivationReject_template;
single_value.field_requestSecondaryPDPContextActivationReject->decode_text(text_buf);
break;
case L3__GSM__MS__SGSN::ALT_notification:
single_value.field_notification = new PDU__SM__Notification_template;
single_value.field_notification->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
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 L3__GSM__MS__SGSN_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_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
}

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

boolean L3__GSM__MS__SGSN_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 L3__GSM__MS__SGSN_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_GMM_SM_Types.L3_GSM_MS_SGSN'");
    }
    if (strcmp("activatePDPContextRequest", param_field) == 0) {
      activatePDPContextRequest().set_param(param);
      return;
    } else if (strcmp("activateSecondaryPDPContextRequest", param_field) == 0) {
      activateSecondaryPDPContextRequest().set_param(param);
      return;
    } else if (strcmp("requestPDPContextActivationReject", param_field) == 0) {
      requestPDPContextActivationReject().set_param(param);
      return;
    } else if (strcmp("modifyPDPContextRequest_MS_SGSN", param_field) == 0) {
      modifyPDPContextRequest__MS__SGSN().set_param(param);
      return;
    } else if (strcmp("modifyPDPContextAccept_MS_SGSN", param_field) == 0) {
      modifyPDPContextAccept__MS__SGSN().set_param(param);
      return;
    } else if (strcmp("deactivatePDPContextRequest", param_field) == 0) {
      deactivatePDPContextRequest().set_param(param);
      return;
    } else if (strcmp("deactivatePDPContextAccept", param_field) == 0) {
      deactivatePDPContextAccept().set_param(param);
      return;
    } else if (strcmp("sM_Status", param_field) == 0) {
      sM__Status().set_param(param);
      return;
    } else if (strcmp("activateMBMSContextRequest", param_field) == 0) {
      activateMBMSContextRequest().set_param(param);
      return;
    } else if (strcmp("requestMBMSContextActivationReject", param_field) == 0) {
      requestMBMSContextActivationReject().set_param(param);
      return;
    } else if (strcmp("requestSecondaryPDPContextActivationReject", param_field) == 0) {
      requestSecondaryPDPContextActivationReject().set_param(param);
      return;
    } else if (strcmp("notification", param_field) == 0) {
      notification().set_param(param);
      return;
    } else param.error("Field `%s' not found in union template type `@MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN'", 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: {
    L3__GSM__MS__SGSN_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_GMM_SM_Types.L3_GSM_MS_SGSN");
    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, "activatePDPContextRequest")) {
      activatePDPContextRequest().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "activateSecondaryPDPContextRequest")) {
      activateSecondaryPDPContextRequest().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "requestPDPContextActivationReject")) {
      requestPDPContextActivationReject().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "modifyPDPContextRequest_MS_SGSN")) {
      modifyPDPContextRequest__MS__SGSN().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "modifyPDPContextAccept_MS_SGSN")) {
      modifyPDPContextAccept__MS__SGSN().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "deactivatePDPContextRequest")) {
      deactivatePDPContextRequest().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "deactivatePDPContextAccept")) {
      deactivatePDPContextAccept().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "sM_Status")) {
      sM__Status().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "activateMBMSContextRequest")) {
      activateMBMSContextRequest().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "requestMBMSContextActivationReject")) {
      requestMBMSContextActivationReject().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "requestSecondaryPDPContextActivationReject")) {
      requestSecondaryPDPContextActivationReject().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "notification")) {
      notification().set_param(*mp_last);
      break;
    }
    mp_last->error("Field %s does not exist in type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.", last_name);
  } break;
  case Module_Param::MP_Implication_Template: {
    L3__GSM__MS__SGSN_template* precondition = new L3__GSM__MS__SGSN_template;
    precondition->set_param(*m_p->get_elem(0));
    L3__GSM__MS__SGSN_template* implied_template = new L3__GSM__MS__SGSN_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = L3__GSM__MS__SGSN_template(precondition, implied_template);
  } break;
  default:
    param.type_error("union template", "@MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN");
  }
  is_ifpresent = param.get_ifpresent();
}

void L3__GSM__MS__SGSN_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 L3__GSM__MS__SGSN::ALT_activatePDPContextRequest:
single_value.field_activatePDPContextRequest->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN");
return;
case L3__GSM__MS__SGSN::ALT_activateSecondaryPDPContextRequest:
single_value.field_activateSecondaryPDPContextRequest->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN");
return;
case L3__GSM__MS__SGSN::ALT_requestPDPContextActivationReject:
single_value.field_requestPDPContextActivationReject->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN");
return;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextRequest__MS__SGSN:
single_value.field_modifyPDPContextRequest__MS__SGSN->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN");
return;
case L3__GSM__MS__SGSN::ALT_modifyPDPContextAccept__MS__SGSN:
single_value.field_modifyPDPContextAccept__MS__SGSN->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN");
return;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextRequest:
single_value.field_deactivatePDPContextRequest->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN");
return;
case L3__GSM__MS__SGSN::ALT_deactivatePDPContextAccept:
single_value.field_deactivatePDPContextAccept->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN");
return;
case L3__GSM__MS__SGSN::ALT_sM__Status:
single_value.field_sM__Status->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN");
return;
case L3__GSM__MS__SGSN::ALT_activateMBMSContextRequest:
single_value.field_activateMBMSContextRequest->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN");
return;
case L3__GSM__MS__SGSN::ALT_requestMBMSContextActivationReject:
single_value.field_requestMBMSContextActivationReject->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN");
return;
case L3__GSM__MS__SGSN::ALT_requestSecondaryPDPContextActivationReject:
single_value.field_requestSecondaryPDPContextActivationReject->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN");
return;
case L3__GSM__MS__SGSN::ALT_notification:
single_value.field_notification->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN");
return;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @MobileL3_GMM_SM_Types.L3_GSM_MS_SGSN.");
}
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_GMM_SM_Types.L3_GSM_MS_SGSN");
}

void L3__GSM__SGSN__MS::copy_value(const L3__GSM__SGSN__MS& other_value)
{
switch (other_value.union_selection) {
case ALT_activatePDPContextAccept:
field_activatePDPContextAccept = new PDU__SM__ActivatePDPContextAccept(*other_value.field_activatePDPContextAccept);
break;
case ALT_activatePDPContextReject:
field_activatePDPContextReject = new PDU__SM__ActivatePDPContextReject(*other_value.field_activatePDPContextReject);
break;
case ALT_activateSecondaryPDPContextAccept:
field_activateSecondaryPDPContextAccept = new PDU__SM__ActivateSecondaryPDPContextAccept(*other_value.field_activateSecondaryPDPContextAccept);
break;
case ALT_activateSecondaryPDPContextReject:
field_activateSecondaryPDPContextReject = new PDU__SM__ActivateSecondaryPDPContextReject(*other_value.field_activateSecondaryPDPContextReject);
break;
case ALT_requestPDPContextActivation:
field_requestPDPContextActivation = new PDU__SM__RequestPDPContextActivation(*other_value.field_requestPDPContextActivation);
break;
case ALT_modifyPDPContextRequest__SGSN__MS:
field_modifyPDPContextRequest__SGSN__MS = new PDU__SM__ModifyPDPContextRequest__SGSN__MS(*other_value.field_modifyPDPContextRequest__SGSN__MS);
break;
case ALT_modifyPDPContextAccept__SGSN__MS:
field_modifyPDPContextAccept__SGSN__MS = new PDU__SM__ModifyPDPContextAccept__SGSN__MS(*other_value.field_modifyPDPContextAccept__SGSN__MS);
break;
case ALT_modifyPDPContextReject:
field_modifyPDPContextReject = new PDU__SM__ModifyPDPContextReject(*other_value.field_modifyPDPContextReject);
break;
case ALT_deactivatePDPContextRequest:
field_deactivatePDPContextRequest = new PDU__SM__DeactivatePDPContextRequest(*other_value.field_deactivatePDPContextRequest);
break;
case ALT_deactivatePDPContextAccept:
field_deactivatePDPContextAccept = new PDU__SM__DeactivatePDPContextAccept(*other_value.field_deactivatePDPContextAccept);
break;
case ALT_sM__Status:
field_sM__Status = new PDU__SM__SM__Status(*other_value.field_sM__Status);
break;
case ALT_activateMBMSContextAccept:
field_activateMBMSContextAccept = new PDU__SM__ActivateMBMSContextAccept(*other_value.field_activateMBMSContextAccept);
break;
case ALT_activateMBMSContextReject:
field_activateMBMSContextReject = new PDU__SM__ActivateMBMSContextReject(*other_value.field_activateMBMSContextReject);
break;
case ALT_requestMBMSContextActivation:
field_requestMBMSContextActivation = new PDU__SM__RequestMBMSContextActivation(*other_value.field_requestMBMSContextActivation);
break;
case ALT_requestSecondaryPDPContextActivation:
field_requestSecondaryPDPContextActivation = new PDU__SM__RequestSecondaryPDPContextActivation(*other_value.field_requestSecondaryPDPContextActivation);
break;
default:
TTCN_error("Assignment of an unbound union value of type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
}
union_selection = other_value.union_selection;
}

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

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

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

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

boolean L3__GSM__SGSN__MS::operator==(const L3__GSM__SGSN__MS& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_activatePDPContextAccept:
return *field_activatePDPContextAccept == *other_value.field_activatePDPContextAccept;
case ALT_activatePDPContextReject:
return *field_activatePDPContextReject == *other_value.field_activatePDPContextReject;
case ALT_activateSecondaryPDPContextAccept:
return *field_activateSecondaryPDPContextAccept == *other_value.field_activateSecondaryPDPContextAccept;
case ALT_activateSecondaryPDPContextReject:
return *field_activateSecondaryPDPContextReject == *other_value.field_activateSecondaryPDPContextReject;
case ALT_requestPDPContextActivation:
return *field_requestPDPContextActivation == *other_value.field_requestPDPContextActivation;
case ALT_modifyPDPContextRequest__SGSN__MS:
return *field_modifyPDPContextRequest__SGSN__MS == *other_value.field_modifyPDPContextRequest__SGSN__MS;
case ALT_modifyPDPContextAccept__SGSN__MS:
return *field_modifyPDPContextAccept__SGSN__MS == *other_value.field_modifyPDPContextAccept__SGSN__MS;
case ALT_modifyPDPContextReject:
return *field_modifyPDPContextReject == *other_value.field_modifyPDPContextReject;
case ALT_deactivatePDPContextRequest:
return *field_deactivatePDPContextRequest == *other_value.field_deactivatePDPContextRequest;
case ALT_deactivatePDPContextAccept:
return *field_deactivatePDPContextAccept == *other_value.field_deactivatePDPContextAccept;
case ALT_sM__Status:
return *field_sM__Status == *other_value.field_sM__Status;
case ALT_activateMBMSContextAccept:
return *field_activateMBMSContextAccept == *other_value.field_activateMBMSContextAccept;
case ALT_activateMBMSContextReject:
return *field_activateMBMSContextReject == *other_value.field_activateMBMSContextReject;
case ALT_requestMBMSContextActivation:
return *field_requestMBMSContextActivation == *other_value.field_requestMBMSContextActivation;
case ALT_requestSecondaryPDPContextActivation:
return *field_requestSecondaryPDPContextActivation == *other_value.field_requestSecondaryPDPContextActivation;
default:
return FALSE;
}
}

PDU__SM__ActivatePDPContextAccept& L3__GSM__SGSN__MS::activatePDPContextAccept()
{
if (union_selection != ALT_activatePDPContextAccept) {
clean_up();
field_activatePDPContextAccept = new PDU__SM__ActivatePDPContextAccept;
union_selection = ALT_activatePDPContextAccept;
}
return *field_activatePDPContextAccept;
}

const PDU__SM__ActivatePDPContextAccept& L3__GSM__SGSN__MS::activatePDPContextAccept() const
{
if (union_selection != ALT_activatePDPContextAccept) TTCN_error("Using non-selected field activatePDPContextAccept in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *field_activatePDPContextAccept;
}

PDU__SM__ActivatePDPContextReject& L3__GSM__SGSN__MS::activatePDPContextReject()
{
if (union_selection != ALT_activatePDPContextReject) {
clean_up();
field_activatePDPContextReject = new PDU__SM__ActivatePDPContextReject;
union_selection = ALT_activatePDPContextReject;
}
return *field_activatePDPContextReject;
}

const PDU__SM__ActivatePDPContextReject& L3__GSM__SGSN__MS::activatePDPContextReject() const
{
if (union_selection != ALT_activatePDPContextReject) TTCN_error("Using non-selected field activatePDPContextReject in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *field_activatePDPContextReject;
}

PDU__SM__ActivateSecondaryPDPContextAccept& L3__GSM__SGSN__MS::activateSecondaryPDPContextAccept()
{
if (union_selection != ALT_activateSecondaryPDPContextAccept) {
clean_up();
field_activateSecondaryPDPContextAccept = new PDU__SM__ActivateSecondaryPDPContextAccept;
union_selection = ALT_activateSecondaryPDPContextAccept;
}
return *field_activateSecondaryPDPContextAccept;
}

const PDU__SM__ActivateSecondaryPDPContextAccept& L3__GSM__SGSN__MS::activateSecondaryPDPContextAccept() const
{
if (union_selection != ALT_activateSecondaryPDPContextAccept) TTCN_error("Using non-selected field activateSecondaryPDPContextAccept in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *field_activateSecondaryPDPContextAccept;
}

PDU__SM__ActivateSecondaryPDPContextReject& L3__GSM__SGSN__MS::activateSecondaryPDPContextReject()
{
if (union_selection != ALT_activateSecondaryPDPContextReject) {
clean_up();
field_activateSecondaryPDPContextReject = new PDU__SM__ActivateSecondaryPDPContextReject;
union_selection = ALT_activateSecondaryPDPContextReject;
}
return *field_activateSecondaryPDPContextReject;
}

const PDU__SM__ActivateSecondaryPDPContextReject& L3__GSM__SGSN__MS::activateSecondaryPDPContextReject() const
{
if (union_selection != ALT_activateSecondaryPDPContextReject) TTCN_error("Using non-selected field activateSecondaryPDPContextReject in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *field_activateSecondaryPDPContextReject;
}

PDU__SM__RequestPDPContextActivation& L3__GSM__SGSN__MS::requestPDPContextActivation()
{
if (union_selection != ALT_requestPDPContextActivation) {
clean_up();
field_requestPDPContextActivation = new PDU__SM__RequestPDPContextActivation;
union_selection = ALT_requestPDPContextActivation;
}
return *field_requestPDPContextActivation;
}

const PDU__SM__RequestPDPContextActivation& L3__GSM__SGSN__MS::requestPDPContextActivation() const
{
if (union_selection != ALT_requestPDPContextActivation) TTCN_error("Using non-selected field requestPDPContextActivation in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *field_requestPDPContextActivation;
}

PDU__SM__ModifyPDPContextRequest__SGSN__MS& L3__GSM__SGSN__MS::modifyPDPContextRequest__SGSN__MS()
{
if (union_selection != ALT_modifyPDPContextRequest__SGSN__MS) {
clean_up();
field_modifyPDPContextRequest__SGSN__MS = new PDU__SM__ModifyPDPContextRequest__SGSN__MS;
union_selection = ALT_modifyPDPContextRequest__SGSN__MS;
}
return *field_modifyPDPContextRequest__SGSN__MS;
}

const PDU__SM__ModifyPDPContextRequest__SGSN__MS& L3__GSM__SGSN__MS::modifyPDPContextRequest__SGSN__MS() const
{
if (union_selection != ALT_modifyPDPContextRequest__SGSN__MS) TTCN_error("Using non-selected field modifyPDPContextRequest_SGSN_MS in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *field_modifyPDPContextRequest__SGSN__MS;
}

PDU__SM__ModifyPDPContextAccept__SGSN__MS& L3__GSM__SGSN__MS::modifyPDPContextAccept__SGSN__MS()
{
if (union_selection != ALT_modifyPDPContextAccept__SGSN__MS) {
clean_up();
field_modifyPDPContextAccept__SGSN__MS = new PDU__SM__ModifyPDPContextAccept__SGSN__MS;
union_selection = ALT_modifyPDPContextAccept__SGSN__MS;
}
return *field_modifyPDPContextAccept__SGSN__MS;
}

const PDU__SM__ModifyPDPContextAccept__SGSN__MS& L3__GSM__SGSN__MS::modifyPDPContextAccept__SGSN__MS() const
{
if (union_selection != ALT_modifyPDPContextAccept__SGSN__MS) TTCN_error("Using non-selected field modifyPDPContextAccept_SGSN_MS in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *field_modifyPDPContextAccept__SGSN__MS;
}

PDU__SM__ModifyPDPContextReject& L3__GSM__SGSN__MS::modifyPDPContextReject()
{
if (union_selection != ALT_modifyPDPContextReject) {
clean_up();
field_modifyPDPContextReject = new PDU__SM__ModifyPDPContextReject;
union_selection = ALT_modifyPDPContextReject;
}
return *field_modifyPDPContextReject;
}

const PDU__SM__ModifyPDPContextReject& L3__GSM__SGSN__MS::modifyPDPContextReject() const
{
if (union_selection != ALT_modifyPDPContextReject) TTCN_error("Using non-selected field modifyPDPContextReject in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *field_modifyPDPContextReject;
}

PDU__SM__DeactivatePDPContextRequest& L3__GSM__SGSN__MS::deactivatePDPContextRequest()
{
if (union_selection != ALT_deactivatePDPContextRequest) {
clean_up();
field_deactivatePDPContextRequest = new PDU__SM__DeactivatePDPContextRequest;
union_selection = ALT_deactivatePDPContextRequest;
}
return *field_deactivatePDPContextRequest;
}

const PDU__SM__DeactivatePDPContextRequest& L3__GSM__SGSN__MS::deactivatePDPContextRequest() const
{
if (union_selection != ALT_deactivatePDPContextRequest) TTCN_error("Using non-selected field deactivatePDPContextRequest in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *field_deactivatePDPContextRequest;
}

PDU__SM__DeactivatePDPContextAccept& L3__GSM__SGSN__MS::deactivatePDPContextAccept()
{
if (union_selection != ALT_deactivatePDPContextAccept) {
clean_up();
field_deactivatePDPContextAccept = new PDU__SM__DeactivatePDPContextAccept;
union_selection = ALT_deactivatePDPContextAccept;
}
return *field_deactivatePDPContextAccept;
}

const PDU__SM__DeactivatePDPContextAccept& L3__GSM__SGSN__MS::deactivatePDPContextAccept() const
{
if (union_selection != ALT_deactivatePDPContextAccept) TTCN_error("Using non-selected field deactivatePDPContextAccept in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *field_deactivatePDPContextAccept;
}

PDU__SM__SM__Status& L3__GSM__SGSN__MS::sM__Status()
{
if (union_selection != ALT_sM__Status) {
clean_up();
field_sM__Status = new PDU__SM__SM__Status;
union_selection = ALT_sM__Status;
}
return *field_sM__Status;
}

const PDU__SM__SM__Status& L3__GSM__SGSN__MS::sM__Status() const
{
if (union_selection != ALT_sM__Status) TTCN_error("Using non-selected field sM_Status in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *field_sM__Status;
}

PDU__SM__ActivateMBMSContextAccept& L3__GSM__SGSN__MS::activateMBMSContextAccept()
{
if (union_selection != ALT_activateMBMSContextAccept) {
clean_up();
field_activateMBMSContextAccept = new PDU__SM__ActivateMBMSContextAccept;
union_selection = ALT_activateMBMSContextAccept;
}
return *field_activateMBMSContextAccept;
}

const PDU__SM__ActivateMBMSContextAccept& L3__GSM__SGSN__MS::activateMBMSContextAccept() const
{
if (union_selection != ALT_activateMBMSContextAccept) TTCN_error("Using non-selected field activateMBMSContextAccept in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *field_activateMBMSContextAccept;
}

PDU__SM__ActivateMBMSContextReject& L3__GSM__SGSN__MS::activateMBMSContextReject()
{
if (union_selection != ALT_activateMBMSContextReject) {
clean_up();
field_activateMBMSContextReject = new PDU__SM__ActivateMBMSContextReject;
union_selection = ALT_activateMBMSContextReject;
}
return *field_activateMBMSContextReject;
}

const PDU__SM__ActivateMBMSContextReject& L3__GSM__SGSN__MS::activateMBMSContextReject() const
{
if (union_selection != ALT_activateMBMSContextReject) TTCN_error("Using non-selected field activateMBMSContextReject in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *field_activateMBMSContextReject;
}

PDU__SM__RequestMBMSContextActivation& L3__GSM__SGSN__MS::requestMBMSContextActivation()
{
if (union_selection != ALT_requestMBMSContextActivation) {
clean_up();
field_requestMBMSContextActivation = new PDU__SM__RequestMBMSContextActivation;
union_selection = ALT_requestMBMSContextActivation;
}
return *field_requestMBMSContextActivation;
}

const PDU__SM__RequestMBMSContextActivation& L3__GSM__SGSN__MS::requestMBMSContextActivation() const
{
if (union_selection != ALT_requestMBMSContextActivation) TTCN_error("Using non-selected field requestMBMSContextActivation in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *field_requestMBMSContextActivation;
}

PDU__SM__RequestSecondaryPDPContextActivation& L3__GSM__SGSN__MS::requestSecondaryPDPContextActivation()
{
if (union_selection != ALT_requestSecondaryPDPContextActivation) {
clean_up();
field_requestSecondaryPDPContextActivation = new PDU__SM__RequestSecondaryPDPContextActivation;
union_selection = ALT_requestSecondaryPDPContextActivation;
}
return *field_requestSecondaryPDPContextActivation;
}

const PDU__SM__RequestSecondaryPDPContextActivation& L3__GSM__SGSN__MS::requestSecondaryPDPContextActivation() const
{
if (union_selection != ALT_requestSecondaryPDPContextActivation) TTCN_error("Using non-selected field requestSecondaryPDPContextActivation in a value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *field_requestSecondaryPDPContextActivation;
}

boolean L3__GSM__SGSN__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_GMM_SM_Types.L3_GSM_SGSN_MS.");
return union_selection == checked_selection;
}

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

boolean L3__GSM__SGSN__MS::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_activatePDPContextAccept: return field_activatePDPContextAccept->is_value();
case ALT_activatePDPContextReject: return field_activatePDPContextReject->is_value();
case ALT_activateSecondaryPDPContextAccept: return field_activateSecondaryPDPContextAccept->is_value();
case ALT_activateSecondaryPDPContextReject: return field_activateSecondaryPDPContextReject->is_value();
case ALT_requestPDPContextActivation: return field_requestPDPContextActivation->is_value();
case ALT_modifyPDPContextRequest__SGSN__MS: return field_modifyPDPContextRequest__SGSN__MS->is_value();
case ALT_modifyPDPContextAccept__SGSN__MS: return field_modifyPDPContextAccept__SGSN__MS->is_value();
case ALT_modifyPDPContextReject: return field_modifyPDPContextReject->is_value();
case ALT_deactivatePDPContextRequest: return field_deactivatePDPContextRequest->is_value();
case ALT_deactivatePDPContextAccept: return field_deactivatePDPContextAccept->is_value();
case ALT_sM__Status: return field_sM__Status->is_value();
case ALT_activateMBMSContextAccept: return field_activateMBMSContextAccept->is_value();
case ALT_activateMBMSContextReject: return field_activateMBMSContextReject->is_value();
case ALT_requestMBMSContextActivation: return field_requestMBMSContextActivation->is_value();
case ALT_requestSecondaryPDPContextActivation: return field_requestSecondaryPDPContextActivation->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void L3__GSM__SGSN__MS::clean_up()
{
switch (union_selection) {
case ALT_activatePDPContextAccept:
  delete field_activatePDPContextAccept;
  break;
case ALT_activatePDPContextReject:
  delete field_activatePDPContextReject;
  break;
case ALT_activateSecondaryPDPContextAccept:
  delete field_activateSecondaryPDPContextAccept;
  break;
case ALT_activateSecondaryPDPContextReject:
  delete field_activateSecondaryPDPContextReject;
  break;
case ALT_requestPDPContextActivation:
  delete field_requestPDPContextActivation;
  break;
case ALT_modifyPDPContextRequest__SGSN__MS:
  delete field_modifyPDPContextRequest__SGSN__MS;
  break;
case ALT_modifyPDPContextAccept__SGSN__MS:
  delete field_modifyPDPContextAccept__SGSN__MS;
  break;
case ALT_modifyPDPContextReject:
  delete field_modifyPDPContextReject;
  break;
case ALT_deactivatePDPContextRequest:
  delete field_deactivatePDPContextRequest;
  break;
case ALT_deactivatePDPContextAccept:
  delete field_deactivatePDPContextAccept;
  break;
case ALT_sM__Status:
  delete field_sM__Status;
  break;
case ALT_activateMBMSContextAccept:
  delete field_activateMBMSContextAccept;
  break;
case ALT_activateMBMSContextReject:
  delete field_activateMBMSContextReject;
  break;
case ALT_requestMBMSContextActivation:
  delete field_requestMBMSContextActivation;
  break;
case ALT_requestSecondaryPDPContextActivation:
  delete field_requestSecondaryPDPContextActivation;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void L3__GSM__SGSN__MS::log() const
{
switch (union_selection) {
case ALT_activatePDPContextAccept:
TTCN_Logger::log_event_str("{ activatePDPContextAccept := ");
field_activatePDPContextAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_activatePDPContextReject:
TTCN_Logger::log_event_str("{ activatePDPContextReject := ");
field_activatePDPContextReject->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_activateSecondaryPDPContextAccept:
TTCN_Logger::log_event_str("{ activateSecondaryPDPContextAccept := ");
field_activateSecondaryPDPContextAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_activateSecondaryPDPContextReject:
TTCN_Logger::log_event_str("{ activateSecondaryPDPContextReject := ");
field_activateSecondaryPDPContextReject->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_requestPDPContextActivation:
TTCN_Logger::log_event_str("{ requestPDPContextActivation := ");
field_requestPDPContextActivation->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_modifyPDPContextRequest__SGSN__MS:
TTCN_Logger::log_event_str("{ modifyPDPContextRequest_SGSN_MS := ");
field_modifyPDPContextRequest__SGSN__MS->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_modifyPDPContextAccept__SGSN__MS:
TTCN_Logger::log_event_str("{ modifyPDPContextAccept_SGSN_MS := ");
field_modifyPDPContextAccept__SGSN__MS->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_modifyPDPContextReject:
TTCN_Logger::log_event_str("{ modifyPDPContextReject := ");
field_modifyPDPContextReject->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_deactivatePDPContextRequest:
TTCN_Logger::log_event_str("{ deactivatePDPContextRequest := ");
field_deactivatePDPContextRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_deactivatePDPContextAccept:
TTCN_Logger::log_event_str("{ deactivatePDPContextAccept := ");
field_deactivatePDPContextAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_sM__Status:
TTCN_Logger::log_event_str("{ sM_Status := ");
field_sM__Status->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_activateMBMSContextAccept:
TTCN_Logger::log_event_str("{ activateMBMSContextAccept := ");
field_activateMBMSContextAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_activateMBMSContextReject:
TTCN_Logger::log_event_str("{ activateMBMSContextReject := ");
field_activateMBMSContextReject->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_requestMBMSContextActivation:
TTCN_Logger::log_event_str("{ requestMBMSContextActivation := ");
field_requestMBMSContextActivation->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_requestSecondaryPDPContextActivation:
TTCN_Logger::log_event_str("{ requestSecondaryPDPContextActivation := ");
field_requestSecondaryPDPContextActivation->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

void L3__GSM__SGSN__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, "activatePDPContextAccept")) {
    activatePDPContextAccept().set_param(*mp_last);
    if (!activatePDPContextAccept().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "activatePDPContextReject")) {
    activatePDPContextReject().set_param(*mp_last);
    if (!activatePDPContextReject().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "activateSecondaryPDPContextAccept")) {
    activateSecondaryPDPContextAccept().set_param(*mp_last);
    if (!activateSecondaryPDPContextAccept().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "activateSecondaryPDPContextReject")) {
    activateSecondaryPDPContextReject().set_param(*mp_last);
    if (!activateSecondaryPDPContextReject().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "requestPDPContextActivation")) {
    requestPDPContextActivation().set_param(*mp_last);
    if (!requestPDPContextActivation().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "modifyPDPContextRequest_SGSN_MS")) {
    modifyPDPContextRequest__SGSN__MS().set_param(*mp_last);
    if (!modifyPDPContextRequest__SGSN__MS().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "modifyPDPContextAccept_SGSN_MS")) {
    modifyPDPContextAccept__SGSN__MS().set_param(*mp_last);
    if (!modifyPDPContextAccept__SGSN__MS().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "modifyPDPContextReject")) {
    modifyPDPContextReject().set_param(*mp_last);
    if (!modifyPDPContextReject().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "deactivatePDPContextRequest")) {
    deactivatePDPContextRequest().set_param(*mp_last);
    if (!deactivatePDPContextRequest().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "deactivatePDPContextAccept")) {
    deactivatePDPContextAccept().set_param(*mp_last);
    if (!deactivatePDPContextAccept().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "sM_Status")) {
    sM__Status().set_param(*mp_last);
    if (!sM__Status().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "activateMBMSContextAccept")) {
    activateMBMSContextAccept().set_param(*mp_last);
    if (!activateMBMSContextAccept().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "activateMBMSContextReject")) {
    activateMBMSContextReject().set_param(*mp_last);
    if (!activateMBMSContextReject().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "requestMBMSContextActivation")) {
    requestMBMSContextActivation().set_param(*mp_last);
    if (!requestMBMSContextActivation().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "requestSecondaryPDPContextActivation")) {
    requestSecondaryPDPContextActivation().set_param(*mp_last);
    if (!requestSecondaryPDPContextActivation().is_bound()) clean_up();
    return;
  }
  mp_last->error("Field %s does not exist in type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.", last_name);
}

void L3__GSM__SGSN__MS::set_implicit_omit()
{
switch (union_selection) {
case ALT_activatePDPContextAccept:
field_activatePDPContextAccept->set_implicit_omit(); break;
case ALT_activatePDPContextReject:
field_activatePDPContextReject->set_implicit_omit(); break;
case ALT_activateSecondaryPDPContextAccept:
field_activateSecondaryPDPContextAccept->set_implicit_omit(); break;
case ALT_activateSecondaryPDPContextReject:
field_activateSecondaryPDPContextReject->set_implicit_omit(); break;
case ALT_requestPDPContextActivation:
field_requestPDPContextActivation->set_implicit_omit(); break;
case ALT_modifyPDPContextRequest__SGSN__MS:
field_modifyPDPContextRequest__SGSN__MS->set_implicit_omit(); break;
case ALT_modifyPDPContextAccept__SGSN__MS:
field_modifyPDPContextAccept__SGSN__MS->set_implicit_omit(); break;
case ALT_modifyPDPContextReject:
field_modifyPDPContextReject->set_implicit_omit(); break;
case ALT_deactivatePDPContextRequest:
field_deactivatePDPContextRequest->set_implicit_omit(); break;
case ALT_deactivatePDPContextAccept:
field_deactivatePDPContextAccept->set_implicit_omit(); break;
case ALT_sM__Status:
field_sM__Status->set_implicit_omit(); break;
case ALT_activateMBMSContextAccept:
field_activateMBMSContextAccept->set_implicit_omit(); break;
case ALT_activateMBMSContextReject:
field_activateMBMSContextReject->set_implicit_omit(); break;
case ALT_requestMBMSContextActivation:
field_requestMBMSContextActivation->set_implicit_omit(); break;
case ALT_requestSecondaryPDPContextActivation:
field_requestSecondaryPDPContextActivation->set_implicit_omit(); break;
default: break;
}
}

void L3__GSM__SGSN__MS::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_activatePDPContextAccept:
field_activatePDPContextAccept->encode_text(text_buf);
break;
case ALT_activatePDPContextReject:
field_activatePDPContextReject->encode_text(text_buf);
break;
case ALT_activateSecondaryPDPContextAccept:
field_activateSecondaryPDPContextAccept->encode_text(text_buf);
break;
case ALT_activateSecondaryPDPContextReject:
field_activateSecondaryPDPContextReject->encode_text(text_buf);
break;
case ALT_requestPDPContextActivation:
field_requestPDPContextActivation->encode_text(text_buf);
break;
case ALT_modifyPDPContextRequest__SGSN__MS:
field_modifyPDPContextRequest__SGSN__MS->encode_text(text_buf);
break;
case ALT_modifyPDPContextAccept__SGSN__MS:
field_modifyPDPContextAccept__SGSN__MS->encode_text(text_buf);
break;
case ALT_modifyPDPContextReject:
field_modifyPDPContextReject->encode_text(text_buf);
break;
case ALT_deactivatePDPContextRequest:
field_deactivatePDPContextRequest->encode_text(text_buf);
break;
case ALT_deactivatePDPContextAccept:
field_deactivatePDPContextAccept->encode_text(text_buf);
break;
case ALT_sM__Status:
field_sM__Status->encode_text(text_buf);
break;
case ALT_activateMBMSContextAccept:
field_activateMBMSContextAccept->encode_text(text_buf);
break;
case ALT_activateMBMSContextReject:
field_activateMBMSContextReject->encode_text(text_buf);
break;
case ALT_requestMBMSContextActivation:
field_requestMBMSContextActivation->encode_text(text_buf);
break;
case ALT_requestSecondaryPDPContextActivation:
field_requestSecondaryPDPContextActivation->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
}
}

void L3__GSM__SGSN__MS::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_activatePDPContextAccept:
activatePDPContextAccept().decode_text(text_buf);
break;
case ALT_activatePDPContextReject:
activatePDPContextReject().decode_text(text_buf);
break;
case ALT_activateSecondaryPDPContextAccept:
activateSecondaryPDPContextAccept().decode_text(text_buf);
break;
case ALT_activateSecondaryPDPContextReject:
activateSecondaryPDPContextReject().decode_text(text_buf);
break;
case ALT_requestPDPContextActivation:
requestPDPContextActivation().decode_text(text_buf);
break;
case ALT_modifyPDPContextRequest__SGSN__MS:
modifyPDPContextRequest__SGSN__MS().decode_text(text_buf);
break;
case ALT_modifyPDPContextAccept__SGSN__MS:
modifyPDPContextAccept__SGSN__MS().decode_text(text_buf);
break;
case ALT_modifyPDPContextReject:
modifyPDPContextReject().decode_text(text_buf);
break;
case ALT_deactivatePDPContextRequest:
deactivatePDPContextRequest().decode_text(text_buf);
break;
case ALT_deactivatePDPContextAccept:
deactivatePDPContextAccept().decode_text(text_buf);
break;
case ALT_sM__Status:
sM__Status().decode_text(text_buf);
break;
case ALT_activateMBMSContextAccept:
activateMBMSContextAccept().decode_text(text_buf);
break;
case ALT_activateMBMSContextReject:
activateMBMSContextReject().decode_text(text_buf);
break;
case ALT_requestMBMSContextActivation:
requestMBMSContextActivation().decode_text(text_buf);
break;
case ALT_requestSecondaryPDPContextActivation:
requestSecondaryPDPContextActivation().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
}
}

void L3__GSM__SGSN__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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void L3__GSM__SGSN__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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int L3__GSM__SGSN__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__SM__ActivatePDPContextAccept_descr_.raw->forceomit);
      decoded_length = activatePDPContextAccept().RAW_decode(PDU__SM__ActivatePDPContextAccept_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__SM__ActivatePDPContextReject_descr_.raw->forceomit);
      decoded_length = activatePDPContextReject().RAW_decode(PDU__SM__ActivatePDPContextReject_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__SM__ActivateSecondaryPDPContextAccept_descr_.raw->forceomit);
      decoded_length = activateSecondaryPDPContextAccept().RAW_decode(PDU__SM__ActivateSecondaryPDPContextAccept_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__SM__ActivateSecondaryPDPContextReject_descr_.raw->forceomit);
      decoded_length = activateSecondaryPDPContextReject().RAW_decode(PDU__SM__ActivateSecondaryPDPContextReject_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__SM__RequestPDPContextActivation_descr_.raw->forceomit);
      decoded_length = requestPDPContextActivation().RAW_decode(PDU__SM__RequestPDPContextActivation_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__SM__ModifyPDPContextRequest__SGSN__MS_descr_.raw->forceomit);
      decoded_length = modifyPDPContextRequest__SGSN__MS().RAW_decode(PDU__SM__ModifyPDPContextRequest__SGSN__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__SM__ModifyPDPContextAccept__SGSN__MS_descr_.raw->forceomit);
      decoded_length = modifyPDPContextAccept__SGSN__MS().RAW_decode(PDU__SM__ModifyPDPContextAccept__SGSN__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__SM__ModifyPDPContextReject_descr_.raw->forceomit);
      decoded_length = modifyPDPContextReject().RAW_decode(PDU__SM__ModifyPDPContextReject_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__SM__DeactivatePDPContextRequest_descr_.raw->forceomit);
      decoded_length = deactivatePDPContextRequest().RAW_decode(PDU__SM__DeactivatePDPContextRequest_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__SM__DeactivatePDPContextAccept_descr_.raw->forceomit);
      decoded_length = deactivatePDPContextAccept().RAW_decode(PDU__SM__DeactivatePDPContextAccept_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__SM__SM__Status_descr_.raw->forceomit);
      decoded_length = sM__Status().RAW_decode(PDU__SM__SM__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__SM__ActivateMBMSContextAccept_descr_.raw->forceomit);
      decoded_length = activateMBMSContextAccept().RAW_decode(PDU__SM__ActivateMBMSContextAccept_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__SM__ActivateMBMSContextReject_descr_.raw->forceomit);
      decoded_length = activateMBMSContextReject().RAW_decode(PDU__SM__ActivateMBMSContextReject_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__SM__RequestMBMSContextActivation_descr_.raw->forceomit);
      decoded_length = requestMBMSContextActivation().RAW_decode(PDU__SM__RequestMBMSContextActivation_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__SM__RequestSecondaryPDPContextActivation_descr_.raw->forceomit);
      decoded_length = requestSecondaryPDPContextActivation().RAW_decode(PDU__SM__RequestSecondaryPDPContextActivation_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    default: break;
    }
    return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
  } else {
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_0_force_omit(0, force_omit, PDU__SM__ActivatePDPContextAccept_descr_.raw->forceomit);
      decoded_length = activatePDPContextAccept().RAW_decode(PDU__SM__ActivatePDPContextAccept_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_0_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_1_force_omit(1, force_omit, PDU__SM__ActivatePDPContextReject_descr_.raw->forceomit);
      decoded_length = activatePDPContextReject().RAW_decode(PDU__SM__ActivatePDPContextReject_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_1_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_2_force_omit(2, force_omit, PDU__SM__ActivateSecondaryPDPContextAccept_descr_.raw->forceomit);
      decoded_length = activateSecondaryPDPContextAccept().RAW_decode(PDU__SM__ActivateSecondaryPDPContextAccept_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_2_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_3_force_omit(3, force_omit, PDU__SM__ActivateSecondaryPDPContextReject_descr_.raw->forceomit);
      decoded_length = activateSecondaryPDPContextReject().RAW_decode(PDU__SM__ActivateSecondaryPDPContextReject_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_3_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_4_force_omit(4, force_omit, PDU__SM__RequestPDPContextActivation_descr_.raw->forceomit);
      decoded_length = requestPDPContextActivation().RAW_decode(PDU__SM__RequestPDPContextActivation_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_4_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_5_force_omit(5, force_omit, PDU__SM__ModifyPDPContextRequest__SGSN__MS_descr_.raw->forceomit);
      decoded_length = modifyPDPContextRequest__SGSN__MS().RAW_decode(PDU__SM__ModifyPDPContextRequest__SGSN__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_5_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_6_force_omit(6, force_omit, PDU__SM__ModifyPDPContextAccept__SGSN__MS_descr_.raw->forceomit);
      decoded_length = modifyPDPContextAccept__SGSN__MS().RAW_decode(PDU__SM__ModifyPDPContextAccept__SGSN__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_6_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_7_force_omit(7, force_omit, PDU__SM__ModifyPDPContextReject_descr_.raw->forceomit);
      decoded_length = modifyPDPContextReject().RAW_decode(PDU__SM__ModifyPDPContextReject_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_7_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_8_force_omit(8, force_omit, PDU__SM__DeactivatePDPContextRequest_descr_.raw->forceomit);
      decoded_length = deactivatePDPContextRequest().RAW_decode(PDU__SM__DeactivatePDPContextRequest_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_8_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_9_force_omit(9, force_omit, PDU__SM__DeactivatePDPContextAccept_descr_.raw->forceomit);
      decoded_length = deactivatePDPContextAccept().RAW_decode(PDU__SM__DeactivatePDPContextAccept_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_9_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_10_force_omit(10, force_omit, PDU__SM__SM__Status_descr_.raw->forceomit);
      decoded_length = sM__Status().RAW_decode(PDU__SM__SM__Status_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_10_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_11_force_omit(11, force_omit, PDU__SM__ActivateMBMSContextAccept_descr_.raw->forceomit);
      decoded_length = activateMBMSContextAccept().RAW_decode(PDU__SM__ActivateMBMSContextAccept_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_11_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_12_force_omit(12, force_omit, PDU__SM__ActivateMBMSContextReject_descr_.raw->forceomit);
      decoded_length = activateMBMSContextReject().RAW_decode(PDU__SM__ActivateMBMSContextReject_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_12_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_13_force_omit(13, force_omit, PDU__SM__RequestMBMSContextActivation_descr_.raw->forceomit);
      decoded_length = requestMBMSContextActivation().RAW_decode(PDU__SM__RequestMBMSContextActivation_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_13_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_14_force_omit(14, force_omit, PDU__SM__RequestSecondaryPDPContextActivation_descr_.raw->forceomit);
      decoded_length = requestSecondaryPDPContextActivation().RAW_decode(PDU__SM__RequestSecondaryPDPContextActivation_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_14_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
 }
 clean_up();
 return -1;
}

int L3__GSM__SGSN__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 = 15;  myleaf.body.node.nodes = init_nodes_of_enc_tree(15);
  memset(myleaf.body.node.nodes, 0, 15 * sizeof(RAW_enc_tree *));
  switch (union_selection) {
  case ALT_activatePDPContextAccept:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, PDU__SM__ActivatePDPContextAccept_descr_.raw);
    encoded_length = field_activatePDPContextAccept->RAW_encode(PDU__SM__ActivatePDPContextAccept_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &PDU__SM__ActivatePDPContextAccept_descr_;
    break;
  case ALT_activatePDPContextReject:
    myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, PDU__SM__ActivatePDPContextReject_descr_.raw);
    encoded_length = field_activatePDPContextReject->RAW_encode(PDU__SM__ActivatePDPContextReject_descr_, *myleaf.body.node.nodes[1]);
    myleaf.body.node.nodes[1]->coding_descr = &PDU__SM__ActivatePDPContextReject_descr_;
    break;
  case ALT_activateSecondaryPDPContextAccept:
    myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, PDU__SM__ActivateSecondaryPDPContextAccept_descr_.raw);
    encoded_length = field_activateSecondaryPDPContextAccept->RAW_encode(PDU__SM__ActivateSecondaryPDPContextAccept_descr_, *myleaf.body.node.nodes[2]);
    myleaf.body.node.nodes[2]->coding_descr = &PDU__SM__ActivateSecondaryPDPContextAccept_descr_;
    break;
  case ALT_activateSecondaryPDPContextReject:
    myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 3, PDU__SM__ActivateSecondaryPDPContextReject_descr_.raw);
    encoded_length = field_activateSecondaryPDPContextReject->RAW_encode(PDU__SM__ActivateSecondaryPDPContextReject_descr_, *myleaf.body.node.nodes[3]);
    myleaf.body.node.nodes[3]->coding_descr = &PDU__SM__ActivateSecondaryPDPContextReject_descr_;
    break;
  case ALT_requestPDPContextActivation:
    myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 4, PDU__SM__RequestPDPContextActivation_descr_.raw);
    encoded_length = field_requestPDPContextActivation->RAW_encode(PDU__SM__RequestPDPContextActivation_descr_, *myleaf.body.node.nodes[4]);
    myleaf.body.node.nodes[4]->coding_descr = &PDU__SM__RequestPDPContextActivation_descr_;
    break;
  case ALT_modifyPDPContextRequest__SGSN__MS:
    myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 5, PDU__SM__ModifyPDPContextRequest__SGSN__MS_descr_.raw);
    encoded_length = field_modifyPDPContextRequest__SGSN__MS->RAW_encode(PDU__SM__ModifyPDPContextRequest__SGSN__MS_descr_, *myleaf.body.node.nodes[5]);
    myleaf.body.node.nodes[5]->coding_descr = &PDU__SM__ModifyPDPContextRequest__SGSN__MS_descr_;
    break;
  case ALT_modifyPDPContextAccept__SGSN__MS:
    myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 6, PDU__SM__ModifyPDPContextAccept__SGSN__MS_descr_.raw);
    encoded_length = field_modifyPDPContextAccept__SGSN__MS->RAW_encode(PDU__SM__ModifyPDPContextAccept__SGSN__MS_descr_, *myleaf.body.node.nodes[6]);
    myleaf.body.node.nodes[6]->coding_descr = &PDU__SM__ModifyPDPContextAccept__SGSN__MS_descr_;
    break;
  case ALT_modifyPDPContextReject:
    myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 7, PDU__SM__ModifyPDPContextReject_descr_.raw);
    encoded_length = field_modifyPDPContextReject->RAW_encode(PDU__SM__ModifyPDPContextReject_descr_, *myleaf.body.node.nodes[7]);
    myleaf.body.node.nodes[7]->coding_descr = &PDU__SM__ModifyPDPContextReject_descr_;
    break;
  case ALT_deactivatePDPContextRequest:
    myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 8, PDU__SM__DeactivatePDPContextRequest_descr_.raw);
    encoded_length = field_deactivatePDPContextRequest->RAW_encode(PDU__SM__DeactivatePDPContextRequest_descr_, *myleaf.body.node.nodes[8]);
    myleaf.body.node.nodes[8]->coding_descr = &PDU__SM__DeactivatePDPContextRequest_descr_;
    break;
  case ALT_deactivatePDPContextAccept:
    myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 9, PDU__SM__DeactivatePDPContextAccept_descr_.raw);
    encoded_length = field_deactivatePDPContextAccept->RAW_encode(PDU__SM__DeactivatePDPContextAccept_descr_, *myleaf.body.node.nodes[9]);
    myleaf.body.node.nodes[9]->coding_descr = &PDU__SM__DeactivatePDPContextAccept_descr_;
    break;
  case ALT_sM__Status:
    myleaf.body.node.nodes[10] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 10, PDU__SM__SM__Status_descr_.raw);
    encoded_length = field_sM__Status->RAW_encode(PDU__SM__SM__Status_descr_, *myleaf.body.node.nodes[10]);
    myleaf.body.node.nodes[10]->coding_descr = &PDU__SM__SM__Status_descr_;
    break;
  case ALT_activateMBMSContextAccept:
    myleaf.body.node.nodes[11] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 11, PDU__SM__ActivateMBMSContextAccept_descr_.raw);
    encoded_length = field_activateMBMSContextAccept->RAW_encode(PDU__SM__ActivateMBMSContextAccept_descr_, *myleaf.body.node.nodes[11]);
    myleaf.body.node.nodes[11]->coding_descr = &PDU__SM__ActivateMBMSContextAccept_descr_;
    break;
  case ALT_activateMBMSContextReject:
    myleaf.body.node.nodes[12] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 12, PDU__SM__ActivateMBMSContextReject_descr_.raw);
    encoded_length = field_activateMBMSContextReject->RAW_encode(PDU__SM__ActivateMBMSContextReject_descr_, *myleaf.body.node.nodes[12]);
    myleaf.body.node.nodes[12]->coding_descr = &PDU__SM__ActivateMBMSContextReject_descr_;
    break;
  case ALT_requestMBMSContextActivation:
    myleaf.body.node.nodes[13] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 13, PDU__SM__RequestMBMSContextActivation_descr_.raw);
    encoded_length = field_requestMBMSContextActivation->RAW_encode(PDU__SM__RequestMBMSContextActivation_descr_, *myleaf.body.node.nodes[13]);
    myleaf.body.node.nodes[13]->coding_descr = &PDU__SM__RequestMBMSContextActivation_descr_;
    break;
  case ALT_requestSecondaryPDPContextActivation:
    myleaf.body.node.nodes[14] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 14, PDU__SM__RequestSecondaryPDPContextActivation_descr_.raw);
    encoded_length = field_requestSecondaryPDPContextActivation->RAW_encode(PDU__SM__RequestSecondaryPDPContextActivation_descr_, *myleaf.body.node.nodes[14]);
    myleaf.body.node.nodes[14]->coding_descr = &PDU__SM__RequestSecondaryPDPContextActivation_descr_;
    break;
  default:
    TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  }
  return encoded_length;
}

void L3__GSM__SGSN__MS_template::copy_value(const L3__GSM__SGSN__MS& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case L3__GSM__SGSN__MS::ALT_activatePDPContextAccept:
single_value.field_activatePDPContextAccept = new PDU__SM__ActivatePDPContextAccept_template(other_value.activatePDPContextAccept());
break;
case L3__GSM__SGSN__MS::ALT_activatePDPContextReject:
single_value.field_activatePDPContextReject = new PDU__SM__ActivatePDPContextReject_template(other_value.activatePDPContextReject());
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextAccept:
single_value.field_activateSecondaryPDPContextAccept = new PDU__SM__ActivateSecondaryPDPContextAccept_template(other_value.activateSecondaryPDPContextAccept());
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextReject:
single_value.field_activateSecondaryPDPContextReject = new PDU__SM__ActivateSecondaryPDPContextReject_template(other_value.activateSecondaryPDPContextReject());
break;
case L3__GSM__SGSN__MS::ALT_requestPDPContextActivation:
single_value.field_requestPDPContextActivation = new PDU__SM__RequestPDPContextActivation_template(other_value.requestPDPContextActivation());
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextRequest__SGSN__MS:
single_value.field_modifyPDPContextRequest__SGSN__MS = new PDU__SM__ModifyPDPContextRequest__SGSN__MS_template(other_value.modifyPDPContextRequest__SGSN__MS());
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextAccept__SGSN__MS:
single_value.field_modifyPDPContextAccept__SGSN__MS = new PDU__SM__ModifyPDPContextAccept__SGSN__MS_template(other_value.modifyPDPContextAccept__SGSN__MS());
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextReject:
single_value.field_modifyPDPContextReject = new PDU__SM__ModifyPDPContextReject_template(other_value.modifyPDPContextReject());
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextRequest:
single_value.field_deactivatePDPContextRequest = new PDU__SM__DeactivatePDPContextRequest_template(other_value.deactivatePDPContextRequest());
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextAccept:
single_value.field_deactivatePDPContextAccept = new PDU__SM__DeactivatePDPContextAccept_template(other_value.deactivatePDPContextAccept());
break;
case L3__GSM__SGSN__MS::ALT_sM__Status:
single_value.field_sM__Status = new PDU__SM__SM__Status_template(other_value.sM__Status());
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextAccept:
single_value.field_activateMBMSContextAccept = new PDU__SM__ActivateMBMSContextAccept_template(other_value.activateMBMSContextAccept());
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextReject:
single_value.field_activateMBMSContextReject = new PDU__SM__ActivateMBMSContextReject_template(other_value.activateMBMSContextReject());
break;
case L3__GSM__SGSN__MS::ALT_requestMBMSContextActivation:
single_value.field_requestMBMSContextActivation = new PDU__SM__RequestMBMSContextActivation_template(other_value.requestMBMSContextActivation());
break;
case L3__GSM__SGSN__MS::ALT_requestSecondaryPDPContextActivation:
single_value.field_requestSecondaryPDPContextActivation = new PDU__SM__RequestSecondaryPDPContextActivation_template(other_value.requestSecondaryPDPContextActivation());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
}
set_selection(SPECIFIC_VALUE);
}

void L3__GSM__SGSN__MS_template::copy_template(const L3__GSM__SGSN__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 L3__GSM__SGSN__MS::ALT_activatePDPContextAccept:
single_value.field_activatePDPContextAccept = new PDU__SM__ActivatePDPContextAccept_template(*other_value.single_value.field_activatePDPContextAccept);
break;
case L3__GSM__SGSN__MS::ALT_activatePDPContextReject:
single_value.field_activatePDPContextReject = new PDU__SM__ActivatePDPContextReject_template(*other_value.single_value.field_activatePDPContextReject);
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextAccept:
single_value.field_activateSecondaryPDPContextAccept = new PDU__SM__ActivateSecondaryPDPContextAccept_template(*other_value.single_value.field_activateSecondaryPDPContextAccept);
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextReject:
single_value.field_activateSecondaryPDPContextReject = new PDU__SM__ActivateSecondaryPDPContextReject_template(*other_value.single_value.field_activateSecondaryPDPContextReject);
break;
case L3__GSM__SGSN__MS::ALT_requestPDPContextActivation:
single_value.field_requestPDPContextActivation = new PDU__SM__RequestPDPContextActivation_template(*other_value.single_value.field_requestPDPContextActivation);
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextRequest__SGSN__MS:
single_value.field_modifyPDPContextRequest__SGSN__MS = new PDU__SM__ModifyPDPContextRequest__SGSN__MS_template(*other_value.single_value.field_modifyPDPContextRequest__SGSN__MS);
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextAccept__SGSN__MS:
single_value.field_modifyPDPContextAccept__SGSN__MS = new PDU__SM__ModifyPDPContextAccept__SGSN__MS_template(*other_value.single_value.field_modifyPDPContextAccept__SGSN__MS);
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextReject:
single_value.field_modifyPDPContextReject = new PDU__SM__ModifyPDPContextReject_template(*other_value.single_value.field_modifyPDPContextReject);
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextRequest:
single_value.field_deactivatePDPContextRequest = new PDU__SM__DeactivatePDPContextRequest_template(*other_value.single_value.field_deactivatePDPContextRequest);
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextAccept:
single_value.field_deactivatePDPContextAccept = new PDU__SM__DeactivatePDPContextAccept_template(*other_value.single_value.field_deactivatePDPContextAccept);
break;
case L3__GSM__SGSN__MS::ALT_sM__Status:
single_value.field_sM__Status = new PDU__SM__SM__Status_template(*other_value.single_value.field_sM__Status);
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextAccept:
single_value.field_activateMBMSContextAccept = new PDU__SM__ActivateMBMSContextAccept_template(*other_value.single_value.field_activateMBMSContextAccept);
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextReject:
single_value.field_activateMBMSContextReject = new PDU__SM__ActivateMBMSContextReject_template(*other_value.single_value.field_activateMBMSContextReject);
break;
case L3__GSM__SGSN__MS::ALT_requestMBMSContextActivation:
single_value.field_requestMBMSContextActivation = new PDU__SM__RequestMBMSContextActivation_template(*other_value.single_value.field_requestMBMSContextActivation);
break;
case L3__GSM__SGSN__MS::ALT_requestSecondaryPDPContextActivation:
single_value.field_requestSecondaryPDPContextActivation = new PDU__SM__RequestSecondaryPDPContextActivation_template(*other_value.single_value.field_requestSecondaryPDPContextActivation);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_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 L3__GSM__SGSN__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 L3__GSM__SGSN__MS_template(*other_value.implication_.precondition);
implication_.implied_template = new L3__GSM__SGSN__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_GMM_SM_Types.L3_GSM_SGSN_MS.");
}
set_selection(other_value);
}

L3__GSM__SGSN__MS_template::L3__GSM__SGSN__MS_template()
{
}

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

L3__GSM__SGSN__MS_template::L3__GSM__SGSN__MS_template(const L3__GSM__SGSN__MS& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void L3__GSM__SGSN__MS_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case L3__GSM__SGSN__MS::ALT_activatePDPContextAccept:
delete single_value.field_activatePDPContextAccept;
break;
case L3__GSM__SGSN__MS::ALT_activatePDPContextReject:
delete single_value.field_activatePDPContextReject;
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextAccept:
delete single_value.field_activateSecondaryPDPContextAccept;
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextReject:
delete single_value.field_activateSecondaryPDPContextReject;
break;
case L3__GSM__SGSN__MS::ALT_requestPDPContextActivation:
delete single_value.field_requestPDPContextActivation;
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextRequest__SGSN__MS:
delete single_value.field_modifyPDPContextRequest__SGSN__MS;
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextAccept__SGSN__MS:
delete single_value.field_modifyPDPContextAccept__SGSN__MS;
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextReject:
delete single_value.field_modifyPDPContextReject;
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextRequest:
delete single_value.field_deactivatePDPContextRequest;
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextAccept:
delete single_value.field_deactivatePDPContextAccept;
break;
case L3__GSM__SGSN__MS::ALT_sM__Status:
delete single_value.field_sM__Status;
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextAccept:
delete single_value.field_activateMBMSContextAccept;
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextReject:
delete single_value.field_activateMBMSContextReject;
break;
case L3__GSM__SGSN__MS::ALT_requestMBMSContextActivation:
delete single_value.field_requestMBMSContextActivation;
break;
case L3__GSM__SGSN__MS::ALT_requestSecondaryPDPContextActivation:
delete single_value.field_requestSecondaryPDPContextActivation;
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;
}

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

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

L3__GSM__SGSN__MS_template& L3__GSM__SGSN__MS_template::operator=(const OPTIONAL<L3__GSM__SGSN__MS>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const L3__GSM__SGSN__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_GMM_SM_Types.L3_GSM_SGSN_MS.");
}
return *this;
}

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

boolean L3__GSM__SGSN__MS_template::match(const L3__GSM__SGSN__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:
{
L3__GSM__SGSN__MS::union_selection_type value_selection = other_value.get_selection();
if (value_selection == L3__GSM__SGSN__MS::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case L3__GSM__SGSN__MS::ALT_activatePDPContextAccept:
return single_value.field_activatePDPContextAccept->match(other_value.activatePDPContextAccept(), legacy);
case L3__GSM__SGSN__MS::ALT_activatePDPContextReject:
return single_value.field_activatePDPContextReject->match(other_value.activatePDPContextReject(), legacy);
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextAccept:
return single_value.field_activateSecondaryPDPContextAccept->match(other_value.activateSecondaryPDPContextAccept(), legacy);
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextReject:
return single_value.field_activateSecondaryPDPContextReject->match(other_value.activateSecondaryPDPContextReject(), legacy);
case L3__GSM__SGSN__MS::ALT_requestPDPContextActivation:
return single_value.field_requestPDPContextActivation->match(other_value.requestPDPContextActivation(), legacy);
case L3__GSM__SGSN__MS::ALT_modifyPDPContextRequest__SGSN__MS:
return single_value.field_modifyPDPContextRequest__SGSN__MS->match(other_value.modifyPDPContextRequest__SGSN__MS(), legacy);
case L3__GSM__SGSN__MS::ALT_modifyPDPContextAccept__SGSN__MS:
return single_value.field_modifyPDPContextAccept__SGSN__MS->match(other_value.modifyPDPContextAccept__SGSN__MS(), legacy);
case L3__GSM__SGSN__MS::ALT_modifyPDPContextReject:
return single_value.field_modifyPDPContextReject->match(other_value.modifyPDPContextReject(), legacy);
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextRequest:
return single_value.field_deactivatePDPContextRequest->match(other_value.deactivatePDPContextRequest(), legacy);
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextAccept:
return single_value.field_deactivatePDPContextAccept->match(other_value.deactivatePDPContextAccept(), legacy);
case L3__GSM__SGSN__MS::ALT_sM__Status:
return single_value.field_sM__Status->match(other_value.sM__Status(), legacy);
case L3__GSM__SGSN__MS::ALT_activateMBMSContextAccept:
return single_value.field_activateMBMSContextAccept->match(other_value.activateMBMSContextAccept(), legacy);
case L3__GSM__SGSN__MS::ALT_activateMBMSContextReject:
return single_value.field_activateMBMSContextReject->match(other_value.activateMBMSContextReject(), legacy);
case L3__GSM__SGSN__MS::ALT_requestMBMSContextActivation:
return single_value.field_requestMBMSContextActivation->match(other_value.requestMBMSContextActivation(), legacy);
case L3__GSM__SGSN__MS::ALT_requestSecondaryPDPContextActivation:
return single_value.field_requestSecondaryPDPContextActivation->match(other_value.requestSecondaryPDPContextActivation(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_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_GMM_SM_Types.L3_GSM_SGSN_MS.");
}
return FALSE;
}

boolean L3__GSM__SGSN__MS_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case L3__GSM__SGSN__MS::ALT_activatePDPContextAccept:
return single_value.field_activatePDPContextAccept->is_value();
case L3__GSM__SGSN__MS::ALT_activatePDPContextReject:
return single_value.field_activatePDPContextReject->is_value();
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextAccept:
return single_value.field_activateSecondaryPDPContextAccept->is_value();
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextReject:
return single_value.field_activateSecondaryPDPContextReject->is_value();
case L3__GSM__SGSN__MS::ALT_requestPDPContextActivation:
return single_value.field_requestPDPContextActivation->is_value();
case L3__GSM__SGSN__MS::ALT_modifyPDPContextRequest__SGSN__MS:
return single_value.field_modifyPDPContextRequest__SGSN__MS->is_value();
case L3__GSM__SGSN__MS::ALT_modifyPDPContextAccept__SGSN__MS:
return single_value.field_modifyPDPContextAccept__SGSN__MS->is_value();
case L3__GSM__SGSN__MS::ALT_modifyPDPContextReject:
return single_value.field_modifyPDPContextReject->is_value();
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextRequest:
return single_value.field_deactivatePDPContextRequest->is_value();
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextAccept:
return single_value.field_deactivatePDPContextAccept->is_value();
case L3__GSM__SGSN__MS::ALT_sM__Status:
return single_value.field_sM__Status->is_value();
case L3__GSM__SGSN__MS::ALT_activateMBMSContextAccept:
return single_value.field_activateMBMSContextAccept->is_value();
case L3__GSM__SGSN__MS::ALT_activateMBMSContextReject:
return single_value.field_activateMBMSContextReject->is_value();
case L3__GSM__SGSN__MS::ALT_requestMBMSContextActivation:
return single_value.field_requestMBMSContextActivation->is_value();
case L3__GSM__SGSN__MS::ALT_requestSecondaryPDPContextActivation:
return single_value.field_requestSecondaryPDPContextActivation->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_GMM_SM_Types.L3_GSM_SGSN_MS.");
}
}

L3__GSM__SGSN__MS L3__GSM__SGSN__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_GMM_SM_Types.L3_GSM_SGSN_MS.");
L3__GSM__SGSN__MS ret_val;
switch (single_value.union_selection) {
case L3__GSM__SGSN__MS::ALT_activatePDPContextAccept:
ret_val.activatePDPContextAccept() = single_value.field_activatePDPContextAccept->valueof();
break;
case L3__GSM__SGSN__MS::ALT_activatePDPContextReject:
ret_val.activatePDPContextReject() = single_value.field_activatePDPContextReject->valueof();
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextAccept:
ret_val.activateSecondaryPDPContextAccept() = single_value.field_activateSecondaryPDPContextAccept->valueof();
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextReject:
ret_val.activateSecondaryPDPContextReject() = single_value.field_activateSecondaryPDPContextReject->valueof();
break;
case L3__GSM__SGSN__MS::ALT_requestPDPContextActivation:
ret_val.requestPDPContextActivation() = single_value.field_requestPDPContextActivation->valueof();
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextRequest__SGSN__MS:
ret_val.modifyPDPContextRequest__SGSN__MS() = single_value.field_modifyPDPContextRequest__SGSN__MS->valueof();
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextAccept__SGSN__MS:
ret_val.modifyPDPContextAccept__SGSN__MS() = single_value.field_modifyPDPContextAccept__SGSN__MS->valueof();
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextReject:
ret_val.modifyPDPContextReject() = single_value.field_modifyPDPContextReject->valueof();
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextRequest:
ret_val.deactivatePDPContextRequest() = single_value.field_deactivatePDPContextRequest->valueof();
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextAccept:
ret_val.deactivatePDPContextAccept() = single_value.field_deactivatePDPContextAccept->valueof();
break;
case L3__GSM__SGSN__MS::ALT_sM__Status:
ret_val.sM__Status() = single_value.field_sM__Status->valueof();
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextAccept:
ret_val.activateMBMSContextAccept() = single_value.field_activateMBMSContextAccept->valueof();
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextReject:
ret_val.activateMBMSContextReject() = single_value.field_activateMBMSContextReject->valueof();
break;
case L3__GSM__SGSN__MS::ALT_requestMBMSContextActivation:
ret_val.requestMBMSContextActivation() = single_value.field_requestMBMSContextActivation->valueof();
break;
case L3__GSM__SGSN__MS::ALT_requestSecondaryPDPContextActivation:
ret_val.requestSecondaryPDPContextActivation() = single_value.field_requestSecondaryPDPContextActivation->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
}
return ret_val;
}

L3__GSM__SGSN__MS_template& L3__GSM__SGSN__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_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return value_list.list_value[list_index];
}
void L3__GSM__SGSN__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_GMM_SM_Types.L3_GSM_SGSN_MS.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new L3__GSM__SGSN__MS_template[list_length];
}

PDU__SM__ActivatePDPContextAccept_template& L3__GSM__SGSN__MS_template::activatePDPContextAccept()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__SGSN__MS::ALT_activatePDPContextAccept) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_activatePDPContextAccept = new PDU__SM__ActivatePDPContextAccept_template(ANY_VALUE);
else single_value.field_activatePDPContextAccept = new PDU__SM__ActivatePDPContextAccept_template;
single_value.union_selection = L3__GSM__SGSN__MS::ALT_activatePDPContextAccept;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_activatePDPContextAccept;
}

const PDU__SM__ActivatePDPContextAccept_template& L3__GSM__SGSN__MS_template::activatePDPContextAccept() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field activatePDPContextAccept in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (single_value.union_selection != L3__GSM__SGSN__MS::ALT_activatePDPContextAccept) TTCN_error("Accessing non-selected field activatePDPContextAccept in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *single_value.field_activatePDPContextAccept;
}

PDU__SM__ActivatePDPContextReject_template& L3__GSM__SGSN__MS_template::activatePDPContextReject()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__SGSN__MS::ALT_activatePDPContextReject) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_activatePDPContextReject = new PDU__SM__ActivatePDPContextReject_template(ANY_VALUE);
else single_value.field_activatePDPContextReject = new PDU__SM__ActivatePDPContextReject_template;
single_value.union_selection = L3__GSM__SGSN__MS::ALT_activatePDPContextReject;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_activatePDPContextReject;
}

const PDU__SM__ActivatePDPContextReject_template& L3__GSM__SGSN__MS_template::activatePDPContextReject() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field activatePDPContextReject in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (single_value.union_selection != L3__GSM__SGSN__MS::ALT_activatePDPContextReject) TTCN_error("Accessing non-selected field activatePDPContextReject in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *single_value.field_activatePDPContextReject;
}

PDU__SM__ActivateSecondaryPDPContextAccept_template& L3__GSM__SGSN__MS_template::activateSecondaryPDPContextAccept()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextAccept) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_activateSecondaryPDPContextAccept = new PDU__SM__ActivateSecondaryPDPContextAccept_template(ANY_VALUE);
else single_value.field_activateSecondaryPDPContextAccept = new PDU__SM__ActivateSecondaryPDPContextAccept_template;
single_value.union_selection = L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextAccept;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_activateSecondaryPDPContextAccept;
}

const PDU__SM__ActivateSecondaryPDPContextAccept_template& L3__GSM__SGSN__MS_template::activateSecondaryPDPContextAccept() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field activateSecondaryPDPContextAccept in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (single_value.union_selection != L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextAccept) TTCN_error("Accessing non-selected field activateSecondaryPDPContextAccept in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *single_value.field_activateSecondaryPDPContextAccept;
}

PDU__SM__ActivateSecondaryPDPContextReject_template& L3__GSM__SGSN__MS_template::activateSecondaryPDPContextReject()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextReject) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_activateSecondaryPDPContextReject = new PDU__SM__ActivateSecondaryPDPContextReject_template(ANY_VALUE);
else single_value.field_activateSecondaryPDPContextReject = new PDU__SM__ActivateSecondaryPDPContextReject_template;
single_value.union_selection = L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextReject;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_activateSecondaryPDPContextReject;
}

const PDU__SM__ActivateSecondaryPDPContextReject_template& L3__GSM__SGSN__MS_template::activateSecondaryPDPContextReject() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field activateSecondaryPDPContextReject in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (single_value.union_selection != L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextReject) TTCN_error("Accessing non-selected field activateSecondaryPDPContextReject in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *single_value.field_activateSecondaryPDPContextReject;
}

PDU__SM__RequestPDPContextActivation_template& L3__GSM__SGSN__MS_template::requestPDPContextActivation()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__SGSN__MS::ALT_requestPDPContextActivation) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_requestPDPContextActivation = new PDU__SM__RequestPDPContextActivation_template(ANY_VALUE);
else single_value.field_requestPDPContextActivation = new PDU__SM__RequestPDPContextActivation_template;
single_value.union_selection = L3__GSM__SGSN__MS::ALT_requestPDPContextActivation;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_requestPDPContextActivation;
}

const PDU__SM__RequestPDPContextActivation_template& L3__GSM__SGSN__MS_template::requestPDPContextActivation() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field requestPDPContextActivation in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (single_value.union_selection != L3__GSM__SGSN__MS::ALT_requestPDPContextActivation) TTCN_error("Accessing non-selected field requestPDPContextActivation in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *single_value.field_requestPDPContextActivation;
}

PDU__SM__ModifyPDPContextRequest__SGSN__MS_template& L3__GSM__SGSN__MS_template::modifyPDPContextRequest__SGSN__MS()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__SGSN__MS::ALT_modifyPDPContextRequest__SGSN__MS) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_modifyPDPContextRequest__SGSN__MS = new PDU__SM__ModifyPDPContextRequest__SGSN__MS_template(ANY_VALUE);
else single_value.field_modifyPDPContextRequest__SGSN__MS = new PDU__SM__ModifyPDPContextRequest__SGSN__MS_template;
single_value.union_selection = L3__GSM__SGSN__MS::ALT_modifyPDPContextRequest__SGSN__MS;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_modifyPDPContextRequest__SGSN__MS;
}

const PDU__SM__ModifyPDPContextRequest__SGSN__MS_template& L3__GSM__SGSN__MS_template::modifyPDPContextRequest__SGSN__MS() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field modifyPDPContextRequest_SGSN_MS in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (single_value.union_selection != L3__GSM__SGSN__MS::ALT_modifyPDPContextRequest__SGSN__MS) TTCN_error("Accessing non-selected field modifyPDPContextRequest_SGSN_MS in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *single_value.field_modifyPDPContextRequest__SGSN__MS;
}

PDU__SM__ModifyPDPContextAccept__SGSN__MS_template& L3__GSM__SGSN__MS_template::modifyPDPContextAccept__SGSN__MS()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__SGSN__MS::ALT_modifyPDPContextAccept__SGSN__MS) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_modifyPDPContextAccept__SGSN__MS = new PDU__SM__ModifyPDPContextAccept__SGSN__MS_template(ANY_VALUE);
else single_value.field_modifyPDPContextAccept__SGSN__MS = new PDU__SM__ModifyPDPContextAccept__SGSN__MS_template;
single_value.union_selection = L3__GSM__SGSN__MS::ALT_modifyPDPContextAccept__SGSN__MS;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_modifyPDPContextAccept__SGSN__MS;
}

const PDU__SM__ModifyPDPContextAccept__SGSN__MS_template& L3__GSM__SGSN__MS_template::modifyPDPContextAccept__SGSN__MS() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field modifyPDPContextAccept_SGSN_MS in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (single_value.union_selection != L3__GSM__SGSN__MS::ALT_modifyPDPContextAccept__SGSN__MS) TTCN_error("Accessing non-selected field modifyPDPContextAccept_SGSN_MS in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *single_value.field_modifyPDPContextAccept__SGSN__MS;
}

PDU__SM__ModifyPDPContextReject_template& L3__GSM__SGSN__MS_template::modifyPDPContextReject()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__SGSN__MS::ALT_modifyPDPContextReject) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_modifyPDPContextReject = new PDU__SM__ModifyPDPContextReject_template(ANY_VALUE);
else single_value.field_modifyPDPContextReject = new PDU__SM__ModifyPDPContextReject_template;
single_value.union_selection = L3__GSM__SGSN__MS::ALT_modifyPDPContextReject;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_modifyPDPContextReject;
}

const PDU__SM__ModifyPDPContextReject_template& L3__GSM__SGSN__MS_template::modifyPDPContextReject() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field modifyPDPContextReject in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (single_value.union_selection != L3__GSM__SGSN__MS::ALT_modifyPDPContextReject) TTCN_error("Accessing non-selected field modifyPDPContextReject in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *single_value.field_modifyPDPContextReject;
}

PDU__SM__DeactivatePDPContextRequest_template& L3__GSM__SGSN__MS_template::deactivatePDPContextRequest()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__SGSN__MS::ALT_deactivatePDPContextRequest) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_deactivatePDPContextRequest = new PDU__SM__DeactivatePDPContextRequest_template(ANY_VALUE);
else single_value.field_deactivatePDPContextRequest = new PDU__SM__DeactivatePDPContextRequest_template;
single_value.union_selection = L3__GSM__SGSN__MS::ALT_deactivatePDPContextRequest;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_deactivatePDPContextRequest;
}

const PDU__SM__DeactivatePDPContextRequest_template& L3__GSM__SGSN__MS_template::deactivatePDPContextRequest() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field deactivatePDPContextRequest in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (single_value.union_selection != L3__GSM__SGSN__MS::ALT_deactivatePDPContextRequest) TTCN_error("Accessing non-selected field deactivatePDPContextRequest in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *single_value.field_deactivatePDPContextRequest;
}

PDU__SM__DeactivatePDPContextAccept_template& L3__GSM__SGSN__MS_template::deactivatePDPContextAccept()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__SGSN__MS::ALT_deactivatePDPContextAccept) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_deactivatePDPContextAccept = new PDU__SM__DeactivatePDPContextAccept_template(ANY_VALUE);
else single_value.field_deactivatePDPContextAccept = new PDU__SM__DeactivatePDPContextAccept_template;
single_value.union_selection = L3__GSM__SGSN__MS::ALT_deactivatePDPContextAccept;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_deactivatePDPContextAccept;
}

const PDU__SM__DeactivatePDPContextAccept_template& L3__GSM__SGSN__MS_template::deactivatePDPContextAccept() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field deactivatePDPContextAccept in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (single_value.union_selection != L3__GSM__SGSN__MS::ALT_deactivatePDPContextAccept) TTCN_error("Accessing non-selected field deactivatePDPContextAccept in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *single_value.field_deactivatePDPContextAccept;
}

PDU__SM__SM__Status_template& L3__GSM__SGSN__MS_template::sM__Status()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__SGSN__MS::ALT_sM__Status) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_sM__Status = new PDU__SM__SM__Status_template(ANY_VALUE);
else single_value.field_sM__Status = new PDU__SM__SM__Status_template;
single_value.union_selection = L3__GSM__SGSN__MS::ALT_sM__Status;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_sM__Status;
}

const PDU__SM__SM__Status_template& L3__GSM__SGSN__MS_template::sM__Status() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sM_Status in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (single_value.union_selection != L3__GSM__SGSN__MS::ALT_sM__Status) TTCN_error("Accessing non-selected field sM_Status in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *single_value.field_sM__Status;
}

PDU__SM__ActivateMBMSContextAccept_template& L3__GSM__SGSN__MS_template::activateMBMSContextAccept()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__SGSN__MS::ALT_activateMBMSContextAccept) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_activateMBMSContextAccept = new PDU__SM__ActivateMBMSContextAccept_template(ANY_VALUE);
else single_value.field_activateMBMSContextAccept = new PDU__SM__ActivateMBMSContextAccept_template;
single_value.union_selection = L3__GSM__SGSN__MS::ALT_activateMBMSContextAccept;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_activateMBMSContextAccept;
}

const PDU__SM__ActivateMBMSContextAccept_template& L3__GSM__SGSN__MS_template::activateMBMSContextAccept() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field activateMBMSContextAccept in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (single_value.union_selection != L3__GSM__SGSN__MS::ALT_activateMBMSContextAccept) TTCN_error("Accessing non-selected field activateMBMSContextAccept in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *single_value.field_activateMBMSContextAccept;
}

PDU__SM__ActivateMBMSContextReject_template& L3__GSM__SGSN__MS_template::activateMBMSContextReject()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__SGSN__MS::ALT_activateMBMSContextReject) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_activateMBMSContextReject = new PDU__SM__ActivateMBMSContextReject_template(ANY_VALUE);
else single_value.field_activateMBMSContextReject = new PDU__SM__ActivateMBMSContextReject_template;
single_value.union_selection = L3__GSM__SGSN__MS::ALT_activateMBMSContextReject;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_activateMBMSContextReject;
}

const PDU__SM__ActivateMBMSContextReject_template& L3__GSM__SGSN__MS_template::activateMBMSContextReject() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field activateMBMSContextReject in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (single_value.union_selection != L3__GSM__SGSN__MS::ALT_activateMBMSContextReject) TTCN_error("Accessing non-selected field activateMBMSContextReject in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *single_value.field_activateMBMSContextReject;
}

PDU__SM__RequestMBMSContextActivation_template& L3__GSM__SGSN__MS_template::requestMBMSContextActivation()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__SGSN__MS::ALT_requestMBMSContextActivation) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_requestMBMSContextActivation = new PDU__SM__RequestMBMSContextActivation_template(ANY_VALUE);
else single_value.field_requestMBMSContextActivation = new PDU__SM__RequestMBMSContextActivation_template;
single_value.union_selection = L3__GSM__SGSN__MS::ALT_requestMBMSContextActivation;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_requestMBMSContextActivation;
}

const PDU__SM__RequestMBMSContextActivation_template& L3__GSM__SGSN__MS_template::requestMBMSContextActivation() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field requestMBMSContextActivation in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (single_value.union_selection != L3__GSM__SGSN__MS::ALT_requestMBMSContextActivation) TTCN_error("Accessing non-selected field requestMBMSContextActivation in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *single_value.field_requestMBMSContextActivation;
}

PDU__SM__RequestSecondaryPDPContextActivation_template& L3__GSM__SGSN__MS_template::requestSecondaryPDPContextActivation()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GSM__SGSN__MS::ALT_requestSecondaryPDPContextActivation) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_requestSecondaryPDPContextActivation = new PDU__SM__RequestSecondaryPDPContextActivation_template(ANY_VALUE);
else single_value.field_requestSecondaryPDPContextActivation = new PDU__SM__RequestSecondaryPDPContextActivation_template;
single_value.union_selection = L3__GSM__SGSN__MS::ALT_requestSecondaryPDPContextActivation;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_requestSecondaryPDPContextActivation;
}

const PDU__SM__RequestSecondaryPDPContextActivation_template& L3__GSM__SGSN__MS_template::requestSecondaryPDPContextActivation() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field requestSecondaryPDPContextActivation in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
if (single_value.union_selection != L3__GSM__SGSN__MS::ALT_requestSecondaryPDPContextActivation) TTCN_error("Accessing non-selected field requestSecondaryPDPContextActivation in a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
return *single_value.field_requestSecondaryPDPContextActivation;
}

boolean L3__GSM__SGSN__MS_template::ischosen(L3__GSM__SGSN__MS::union_selection_type checked_selection) const
{
if (checked_selection == L3__GSM__SGSN__MS::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.");
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.union_selection == L3__GSM__SGSN__MS::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_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_GMM_SM_Types.L3_GSM_SGSN_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 L3__GSM__SGSN__MS_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case L3__GSM__SGSN__MS::ALT_activatePDPContextAccept:
TTCN_Logger::log_event_str("{ activatePDPContextAccept := ");
single_value.field_activatePDPContextAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__SGSN__MS::ALT_activatePDPContextReject:
TTCN_Logger::log_event_str("{ activatePDPContextReject := ");
single_value.field_activatePDPContextReject->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextAccept:
TTCN_Logger::log_event_str("{ activateSecondaryPDPContextAccept := ");
single_value.field_activateSecondaryPDPContextAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextReject:
TTCN_Logger::log_event_str("{ activateSecondaryPDPContextReject := ");
single_value.field_activateSecondaryPDPContextReject->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__SGSN__MS::ALT_requestPDPContextActivation:
TTCN_Logger::log_event_str("{ requestPDPContextActivation := ");
single_value.field_requestPDPContextActivation->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextRequest__SGSN__MS:
TTCN_Logger::log_event_str("{ modifyPDPContextRequest_SGSN_MS := ");
single_value.field_modifyPDPContextRequest__SGSN__MS->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextAccept__SGSN__MS:
TTCN_Logger::log_event_str("{ modifyPDPContextAccept_SGSN_MS := ");
single_value.field_modifyPDPContextAccept__SGSN__MS->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextReject:
TTCN_Logger::log_event_str("{ modifyPDPContextReject := ");
single_value.field_modifyPDPContextReject->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextRequest:
TTCN_Logger::log_event_str("{ deactivatePDPContextRequest := ");
single_value.field_deactivatePDPContextRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextAccept:
TTCN_Logger::log_event_str("{ deactivatePDPContextAccept := ");
single_value.field_deactivatePDPContextAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__SGSN__MS::ALT_sM__Status:
TTCN_Logger::log_event_str("{ sM_Status := ");
single_value.field_sM__Status->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextAccept:
TTCN_Logger::log_event_str("{ activateMBMSContextAccept := ");
single_value.field_activateMBMSContextAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextReject:
TTCN_Logger::log_event_str("{ activateMBMSContextReject := ");
single_value.field_activateMBMSContextReject->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__SGSN__MS::ALT_requestMBMSContextActivation:
TTCN_Logger::log_event_str("{ requestMBMSContextActivation := ");
single_value.field_requestMBMSContextActivation->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GSM__SGSN__MS::ALT_requestSecondaryPDPContextActivation:
TTCN_Logger::log_event_str("{ requestSecondaryPDPContextActivation := ");
single_value.field_requestSecondaryPDPContextActivation->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 L3__GSM__SGSN__MS_template::log_match(const L3__GSM__SGSN__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 L3__GSM__SGSN__MS::ALT_activatePDPContextAccept:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".activatePDPContextAccept");
single_value.field_activatePDPContextAccept->log_match(match_value.activatePDPContextAccept(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ activatePDPContextAccept := ");
single_value.field_activatePDPContextAccept->log_match(match_value.activatePDPContextAccept(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__SGSN__MS::ALT_activatePDPContextReject:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".activatePDPContextReject");
single_value.field_activatePDPContextReject->log_match(match_value.activatePDPContextReject(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ activatePDPContextReject := ");
single_value.field_activatePDPContextReject->log_match(match_value.activatePDPContextReject(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextAccept:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".activateSecondaryPDPContextAccept");
single_value.field_activateSecondaryPDPContextAccept->log_match(match_value.activateSecondaryPDPContextAccept(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ activateSecondaryPDPContextAccept := ");
single_value.field_activateSecondaryPDPContextAccept->log_match(match_value.activateSecondaryPDPContextAccept(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextReject:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".activateSecondaryPDPContextReject");
single_value.field_activateSecondaryPDPContextReject->log_match(match_value.activateSecondaryPDPContextReject(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ activateSecondaryPDPContextReject := ");
single_value.field_activateSecondaryPDPContextReject->log_match(match_value.activateSecondaryPDPContextReject(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__SGSN__MS::ALT_requestPDPContextActivation:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".requestPDPContextActivation");
single_value.field_requestPDPContextActivation->log_match(match_value.requestPDPContextActivation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ requestPDPContextActivation := ");
single_value.field_requestPDPContextActivation->log_match(match_value.requestPDPContextActivation(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextRequest__SGSN__MS:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".modifyPDPContextRequest_SGSN_MS");
single_value.field_modifyPDPContextRequest__SGSN__MS->log_match(match_value.modifyPDPContextRequest__SGSN__MS(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ modifyPDPContextRequest_SGSN_MS := ");
single_value.field_modifyPDPContextRequest__SGSN__MS->log_match(match_value.modifyPDPContextRequest__SGSN__MS(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextAccept__SGSN__MS:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".modifyPDPContextAccept_SGSN_MS");
single_value.field_modifyPDPContextAccept__SGSN__MS->log_match(match_value.modifyPDPContextAccept__SGSN__MS(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ modifyPDPContextAccept_SGSN_MS := ");
single_value.field_modifyPDPContextAccept__SGSN__MS->log_match(match_value.modifyPDPContextAccept__SGSN__MS(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextReject:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".modifyPDPContextReject");
single_value.field_modifyPDPContextReject->log_match(match_value.modifyPDPContextReject(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ modifyPDPContextReject := ");
single_value.field_modifyPDPContextReject->log_match(match_value.modifyPDPContextReject(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextRequest:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".deactivatePDPContextRequest");
single_value.field_deactivatePDPContextRequest->log_match(match_value.deactivatePDPContextRequest(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ deactivatePDPContextRequest := ");
single_value.field_deactivatePDPContextRequest->log_match(match_value.deactivatePDPContextRequest(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextAccept:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".deactivatePDPContextAccept");
single_value.field_deactivatePDPContextAccept->log_match(match_value.deactivatePDPContextAccept(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ deactivatePDPContextAccept := ");
single_value.field_deactivatePDPContextAccept->log_match(match_value.deactivatePDPContextAccept(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__SGSN__MS::ALT_sM__Status:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".sM_Status");
single_value.field_sM__Status->log_match(match_value.sM__Status(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ sM_Status := ");
single_value.field_sM__Status->log_match(match_value.sM__Status(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextAccept:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".activateMBMSContextAccept");
single_value.field_activateMBMSContextAccept->log_match(match_value.activateMBMSContextAccept(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ activateMBMSContextAccept := ");
single_value.field_activateMBMSContextAccept->log_match(match_value.activateMBMSContextAccept(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextReject:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".activateMBMSContextReject");
single_value.field_activateMBMSContextReject->log_match(match_value.activateMBMSContextReject(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ activateMBMSContextReject := ");
single_value.field_activateMBMSContextReject->log_match(match_value.activateMBMSContextReject(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__SGSN__MS::ALT_requestMBMSContextActivation:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".requestMBMSContextActivation");
single_value.field_requestMBMSContextActivation->log_match(match_value.requestMBMSContextActivation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ requestMBMSContextActivation := ");
single_value.field_requestMBMSContextActivation->log_match(match_value.requestMBMSContextActivation(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GSM__SGSN__MS::ALT_requestSecondaryPDPContextActivation:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".requestSecondaryPDPContextActivation");
single_value.field_requestSecondaryPDPContextActivation->log_match(match_value.requestSecondaryPDPContextActivation(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ requestSecondaryPDPContextActivation := ");
single_value.field_requestSecondaryPDPContextActivation->log_match(match_value.requestSecondaryPDPContextActivation(), 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 L3__GSM__SGSN__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 L3__GSM__SGSN__MS::ALT_activatePDPContextAccept:
single_value.field_activatePDPContextAccept->encode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_activatePDPContextReject:
single_value.field_activatePDPContextReject->encode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextAccept:
single_value.field_activateSecondaryPDPContextAccept->encode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextReject:
single_value.field_activateSecondaryPDPContextReject->encode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_requestPDPContextActivation:
single_value.field_requestPDPContextActivation->encode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextRequest__SGSN__MS:
single_value.field_modifyPDPContextRequest__SGSN__MS->encode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextAccept__SGSN__MS:
single_value.field_modifyPDPContextAccept__SGSN__MS->encode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextReject:
single_value.field_modifyPDPContextReject->encode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextRequest:
single_value.field_deactivatePDPContextRequest->encode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextAccept:
single_value.field_deactivatePDPContextAccept->encode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_sM__Status:
single_value.field_sM__Status->encode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextAccept:
single_value.field_activateMBMSContextAccept->encode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextReject:
single_value.field_activateMBMSContextReject->encode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_requestMBMSContextActivation:
single_value.field_requestMBMSContextActivation->encode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_requestSecondaryPDPContextActivation:
single_value.field_requestSecondaryPDPContextActivation->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_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_GMM_SM_Types.L3_GSM_SGSN_MS.");
}
}

void L3__GSM__SGSN__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 = L3__GSM__SGSN__MS::UNBOUND_VALUE;
L3__GSM__SGSN__MS::union_selection_type new_selection = (L3__GSM__SGSN__MS::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case L3__GSM__SGSN__MS::ALT_activatePDPContextAccept:
single_value.field_activatePDPContextAccept = new PDU__SM__ActivatePDPContextAccept_template;
single_value.field_activatePDPContextAccept->decode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_activatePDPContextReject:
single_value.field_activatePDPContextReject = new PDU__SM__ActivatePDPContextReject_template;
single_value.field_activatePDPContextReject->decode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextAccept:
single_value.field_activateSecondaryPDPContextAccept = new PDU__SM__ActivateSecondaryPDPContextAccept_template;
single_value.field_activateSecondaryPDPContextAccept->decode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextReject:
single_value.field_activateSecondaryPDPContextReject = new PDU__SM__ActivateSecondaryPDPContextReject_template;
single_value.field_activateSecondaryPDPContextReject->decode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_requestPDPContextActivation:
single_value.field_requestPDPContextActivation = new PDU__SM__RequestPDPContextActivation_template;
single_value.field_requestPDPContextActivation->decode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextRequest__SGSN__MS:
single_value.field_modifyPDPContextRequest__SGSN__MS = new PDU__SM__ModifyPDPContextRequest__SGSN__MS_template;
single_value.field_modifyPDPContextRequest__SGSN__MS->decode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextAccept__SGSN__MS:
single_value.field_modifyPDPContextAccept__SGSN__MS = new PDU__SM__ModifyPDPContextAccept__SGSN__MS_template;
single_value.field_modifyPDPContextAccept__SGSN__MS->decode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextReject:
single_value.field_modifyPDPContextReject = new PDU__SM__ModifyPDPContextReject_template;
single_value.field_modifyPDPContextReject->decode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextRequest:
single_value.field_deactivatePDPContextRequest = new PDU__SM__DeactivatePDPContextRequest_template;
single_value.field_deactivatePDPContextRequest->decode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextAccept:
single_value.field_deactivatePDPContextAccept = new PDU__SM__DeactivatePDPContextAccept_template;
single_value.field_deactivatePDPContextAccept->decode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_sM__Status:
single_value.field_sM__Status = new PDU__SM__SM__Status_template;
single_value.field_sM__Status->decode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextAccept:
single_value.field_activateMBMSContextAccept = new PDU__SM__ActivateMBMSContextAccept_template;
single_value.field_activateMBMSContextAccept->decode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextReject:
single_value.field_activateMBMSContextReject = new PDU__SM__ActivateMBMSContextReject_template;
single_value.field_activateMBMSContextReject->decode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_requestMBMSContextActivation:
single_value.field_requestMBMSContextActivation = new PDU__SM__RequestMBMSContextActivation_template;
single_value.field_requestMBMSContextActivation->decode_text(text_buf);
break;
case L3__GSM__SGSN__MS::ALT_requestSecondaryPDPContextActivation:
single_value.field_requestSecondaryPDPContextActivation = new PDU__SM__RequestSecondaryPDPContextActivation_template;
single_value.field_requestSecondaryPDPContextActivation->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_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 L3__GSM__SGSN__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_GMM_SM_Types.L3_GSM_SGSN_MS.");
}
}

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

boolean L3__GSM__SGSN__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 L3__GSM__SGSN__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_GMM_SM_Types.L3_GSM_SGSN_MS'");
    }
    if (strcmp("activatePDPContextAccept", param_field) == 0) {
      activatePDPContextAccept().set_param(param);
      return;
    } else if (strcmp("activatePDPContextReject", param_field) == 0) {
      activatePDPContextReject().set_param(param);
      return;
    } else if (strcmp("activateSecondaryPDPContextAccept", param_field) == 0) {
      activateSecondaryPDPContextAccept().set_param(param);
      return;
    } else if (strcmp("activateSecondaryPDPContextReject", param_field) == 0) {
      activateSecondaryPDPContextReject().set_param(param);
      return;
    } else if (strcmp("requestPDPContextActivation", param_field) == 0) {
      requestPDPContextActivation().set_param(param);
      return;
    } else if (strcmp("modifyPDPContextRequest_SGSN_MS", param_field) == 0) {
      modifyPDPContextRequest__SGSN__MS().set_param(param);
      return;
    } else if (strcmp("modifyPDPContextAccept_SGSN_MS", param_field) == 0) {
      modifyPDPContextAccept__SGSN__MS().set_param(param);
      return;
    } else if (strcmp("modifyPDPContextReject", param_field) == 0) {
      modifyPDPContextReject().set_param(param);
      return;
    } else if (strcmp("deactivatePDPContextRequest", param_field) == 0) {
      deactivatePDPContextRequest().set_param(param);
      return;
    } else if (strcmp("deactivatePDPContextAccept", param_field) == 0) {
      deactivatePDPContextAccept().set_param(param);
      return;
    } else if (strcmp("sM_Status", param_field) == 0) {
      sM__Status().set_param(param);
      return;
    } else if (strcmp("activateMBMSContextAccept", param_field) == 0) {
      activateMBMSContextAccept().set_param(param);
      return;
    } else if (strcmp("activateMBMSContextReject", param_field) == 0) {
      activateMBMSContextReject().set_param(param);
      return;
    } else if (strcmp("requestMBMSContextActivation", param_field) == 0) {
      requestMBMSContextActivation().set_param(param);
      return;
    } else if (strcmp("requestSecondaryPDPContextActivation", param_field) == 0) {
      requestSecondaryPDPContextActivation().set_param(param);
      return;
    } else param.error("Field `%s' not found in union template type `@MobileL3_GMM_SM_Types.L3_GSM_SGSN_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: {
    L3__GSM__SGSN__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_GMM_SM_Types.L3_GSM_SGSN_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, "activatePDPContextAccept")) {
      activatePDPContextAccept().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "activatePDPContextReject")) {
      activatePDPContextReject().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "activateSecondaryPDPContextAccept")) {
      activateSecondaryPDPContextAccept().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "activateSecondaryPDPContextReject")) {
      activateSecondaryPDPContextReject().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "requestPDPContextActivation")) {
      requestPDPContextActivation().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "modifyPDPContextRequest_SGSN_MS")) {
      modifyPDPContextRequest__SGSN__MS().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "modifyPDPContextAccept_SGSN_MS")) {
      modifyPDPContextAccept__SGSN__MS().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "modifyPDPContextReject")) {
      modifyPDPContextReject().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "deactivatePDPContextRequest")) {
      deactivatePDPContextRequest().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "deactivatePDPContextAccept")) {
      deactivatePDPContextAccept().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "sM_Status")) {
      sM__Status().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "activateMBMSContextAccept")) {
      activateMBMSContextAccept().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "activateMBMSContextReject")) {
      activateMBMSContextReject().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "requestMBMSContextActivation")) {
      requestMBMSContextActivation().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "requestSecondaryPDPContextActivation")) {
      requestSecondaryPDPContextActivation().set_param(*mp_last);
      break;
    }
    mp_last->error("Field %s does not exist in type @MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS.", last_name);
  } break;
  case Module_Param::MP_Implication_Template: {
    L3__GSM__SGSN__MS_template* precondition = new L3__GSM__SGSN__MS_template;
    precondition->set_param(*m_p->get_elem(0));
    L3__GSM__SGSN__MS_template* implied_template = new L3__GSM__SGSN__MS_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = L3__GSM__SGSN__MS_template(precondition, implied_template);
  } break;
  default:
    param.type_error("union template", "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS");
  }
  is_ifpresent = param.get_ifpresent();
}

void L3__GSM__SGSN__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 L3__GSM__SGSN__MS::ALT_activatePDPContextAccept:
single_value.field_activatePDPContextAccept->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS");
return;
case L3__GSM__SGSN__MS::ALT_activatePDPContextReject:
single_value.field_activatePDPContextReject->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS");
return;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextAccept:
single_value.field_activateSecondaryPDPContextAccept->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS");
return;
case L3__GSM__SGSN__MS::ALT_activateSecondaryPDPContextReject:
single_value.field_activateSecondaryPDPContextReject->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS");
return;
case L3__GSM__SGSN__MS::ALT_requestPDPContextActivation:
single_value.field_requestPDPContextActivation->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS");
return;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextRequest__SGSN__MS:
single_value.field_modifyPDPContextRequest__SGSN__MS->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS");
return;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextAccept__SGSN__MS:
single_value.field_modifyPDPContextAccept__SGSN__MS->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS");
return;
case L3__GSM__SGSN__MS::ALT_modifyPDPContextReject:
single_value.field_modifyPDPContextReject->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS");
return;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextRequest:
single_value.field_deactivatePDPContextRequest->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS");
return;
case L3__GSM__SGSN__MS::ALT_deactivatePDPContextAccept:
single_value.field_deactivatePDPContextAccept->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS");
return;
case L3__GSM__SGSN__MS::ALT_sM__Status:
single_value.field_sM__Status->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS");
return;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextAccept:
single_value.field_activateMBMSContextAccept->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS");
return;
case L3__GSM__SGSN__MS::ALT_activateMBMSContextReject:
single_value.field_activateMBMSContextReject->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS");
return;
case L3__GSM__SGSN__MS::ALT_requestMBMSContextActivation:
single_value.field_requestMBMSContextActivation->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_MS");
return;
case L3__GSM__SGSN__MS::ALT_requestSecondaryPDPContextActivation:
single_value.field_requestSecondaryPDPContextActivation->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GSM_SGSN_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_GMM_SM_Types.L3_GSM_SGSN_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_GMM_SM_Types.L3_GSM_SGSN_MS");
}

void L3__GMM__MS__SGSN::copy_value(const L3__GMM__MS__SGSN& other_value)
{
switch (other_value.union_selection) {
case ALT_attachRequest:
field_attachRequest = new PDU__GMM__AttachRequest(*other_value.field_attachRequest);
break;
case ALT_attachComplete:
field_attachComplete = new PDU__GMM__AttachComplete(*other_value.field_attachComplete);
break;
case ALT_detachRequest__MS__SGSN:
field_detachRequest__MS__SGSN = new PDU__GMM__DetachRequest__MS__SGSN(*other_value.field_detachRequest__MS__SGSN);
break;
case ALT_detachAccept__MS__SGSN:
field_detachAccept__MS__SGSN = new PDU__GMM__DetachAccept__MS__SGSN(*other_value.field_detachAccept__MS__SGSN);
break;
case ALT_p__TMSIReallocationComplete:
field_p__TMSIReallocationComplete = new PDU__GMM__P__TMSIReallocationComplete(*other_value.field_p__TMSIReallocationComplete);
break;
case ALT_authenticationAndCipheringResponse:
field_authenticationAndCipheringResponse = new PDU__GMM__AuthenticationAndCipheringResponse(*other_value.field_authenticationAndCipheringResponse);
break;
case ALT_authenticationAndCipheringFailure:
field_authenticationAndCipheringFailure = new PDU__GMM__AuthenticationAndCipheringFailure(*other_value.field_authenticationAndCipheringFailure);
break;
case ALT_identityResponse:
field_identityResponse = new PDU__GMM__IdentityResponse(*other_value.field_identityResponse);
break;
case ALT_routingAreaUpdateRequest:
field_routingAreaUpdateRequest = new PDU__GMM__RoutingAreaUpdateRequest(*other_value.field_routingAreaUpdateRequest);
break;
case ALT_routingAreaUpdateComplete:
field_routingAreaUpdateComplete = new PDU__GMM__RoutingAreaUpdateComplete(*other_value.field_routingAreaUpdateComplete);
break;
case ALT_gMM__Status:
field_gMM__Status = new PDU__GMM__GMM__Status(*other_value.field_gMM__Status);
break;
case ALT_serviceRequest:
field_serviceRequest = new PDU__GMM__ServiceRequest(*other_value.field_serviceRequest);
break;
default:
TTCN_error("Assignment of an unbound union value of type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
union_selection = other_value.union_selection;
}

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

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

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

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

boolean L3__GMM__MS__SGSN::operator==(const L3__GMM__MS__SGSN& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_attachRequest:
return *field_attachRequest == *other_value.field_attachRequest;
case ALT_attachComplete:
return *field_attachComplete == *other_value.field_attachComplete;
case ALT_detachRequest__MS__SGSN:
return *field_detachRequest__MS__SGSN == *other_value.field_detachRequest__MS__SGSN;
case ALT_detachAccept__MS__SGSN:
return *field_detachAccept__MS__SGSN == *other_value.field_detachAccept__MS__SGSN;
case ALT_p__TMSIReallocationComplete:
return *field_p__TMSIReallocationComplete == *other_value.field_p__TMSIReallocationComplete;
case ALT_authenticationAndCipheringResponse:
return *field_authenticationAndCipheringResponse == *other_value.field_authenticationAndCipheringResponse;
case ALT_authenticationAndCipheringFailure:
return *field_authenticationAndCipheringFailure == *other_value.field_authenticationAndCipheringFailure;
case ALT_identityResponse:
return *field_identityResponse == *other_value.field_identityResponse;
case ALT_routingAreaUpdateRequest:
return *field_routingAreaUpdateRequest == *other_value.field_routingAreaUpdateRequest;
case ALT_routingAreaUpdateComplete:
return *field_routingAreaUpdateComplete == *other_value.field_routingAreaUpdateComplete;
case ALT_gMM__Status:
return *field_gMM__Status == *other_value.field_gMM__Status;
case ALT_serviceRequest:
return *field_serviceRequest == *other_value.field_serviceRequest;
default:
return FALSE;
}
}

PDU__GMM__AttachRequest& L3__GMM__MS__SGSN::attachRequest()
{
if (union_selection != ALT_attachRequest) {
clean_up();
field_attachRequest = new PDU__GMM__AttachRequest;
union_selection = ALT_attachRequest;
}
return *field_attachRequest;
}

const PDU__GMM__AttachRequest& L3__GMM__MS__SGSN::attachRequest() const
{
if (union_selection != ALT_attachRequest) TTCN_error("Using non-selected field attachRequest in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *field_attachRequest;
}

PDU__GMM__AttachComplete& L3__GMM__MS__SGSN::attachComplete()
{
if (union_selection != ALT_attachComplete) {
clean_up();
field_attachComplete = new PDU__GMM__AttachComplete;
union_selection = ALT_attachComplete;
}
return *field_attachComplete;
}

const PDU__GMM__AttachComplete& L3__GMM__MS__SGSN::attachComplete() const
{
if (union_selection != ALT_attachComplete) TTCN_error("Using non-selected field attachComplete in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *field_attachComplete;
}

PDU__GMM__DetachRequest__MS__SGSN& L3__GMM__MS__SGSN::detachRequest__MS__SGSN()
{
if (union_selection != ALT_detachRequest__MS__SGSN) {
clean_up();
field_detachRequest__MS__SGSN = new PDU__GMM__DetachRequest__MS__SGSN;
union_selection = ALT_detachRequest__MS__SGSN;
}
return *field_detachRequest__MS__SGSN;
}

const PDU__GMM__DetachRequest__MS__SGSN& L3__GMM__MS__SGSN::detachRequest__MS__SGSN() const
{
if (union_selection != ALT_detachRequest__MS__SGSN) TTCN_error("Using non-selected field detachRequest_MS_SGSN in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *field_detachRequest__MS__SGSN;
}

PDU__GMM__DetachAccept__MS__SGSN& L3__GMM__MS__SGSN::detachAccept__MS__SGSN()
{
if (union_selection != ALT_detachAccept__MS__SGSN) {
clean_up();
field_detachAccept__MS__SGSN = new PDU__GMM__DetachAccept__MS__SGSN;
union_selection = ALT_detachAccept__MS__SGSN;
}
return *field_detachAccept__MS__SGSN;
}

const PDU__GMM__DetachAccept__MS__SGSN& L3__GMM__MS__SGSN::detachAccept__MS__SGSN() const
{
if (union_selection != ALT_detachAccept__MS__SGSN) TTCN_error("Using non-selected field detachAccept_MS_SGSN in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *field_detachAccept__MS__SGSN;
}

PDU__GMM__P__TMSIReallocationComplete& L3__GMM__MS__SGSN::p__TMSIReallocationComplete()
{
if (union_selection != ALT_p__TMSIReallocationComplete) {
clean_up();
field_p__TMSIReallocationComplete = new PDU__GMM__P__TMSIReallocationComplete;
union_selection = ALT_p__TMSIReallocationComplete;
}
return *field_p__TMSIReallocationComplete;
}

const PDU__GMM__P__TMSIReallocationComplete& L3__GMM__MS__SGSN::p__TMSIReallocationComplete() const
{
if (union_selection != ALT_p__TMSIReallocationComplete) TTCN_error("Using non-selected field p_TMSIReallocationComplete in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *field_p__TMSIReallocationComplete;
}

PDU__GMM__AuthenticationAndCipheringResponse& L3__GMM__MS__SGSN::authenticationAndCipheringResponse()
{
if (union_selection != ALT_authenticationAndCipheringResponse) {
clean_up();
field_authenticationAndCipheringResponse = new PDU__GMM__AuthenticationAndCipheringResponse;
union_selection = ALT_authenticationAndCipheringResponse;
}
return *field_authenticationAndCipheringResponse;
}

const PDU__GMM__AuthenticationAndCipheringResponse& L3__GMM__MS__SGSN::authenticationAndCipheringResponse() const
{
if (union_selection != ALT_authenticationAndCipheringResponse) TTCN_error("Using non-selected field authenticationAndCipheringResponse in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *field_authenticationAndCipheringResponse;
}

PDU__GMM__AuthenticationAndCipheringFailure& L3__GMM__MS__SGSN::authenticationAndCipheringFailure()
{
if (union_selection != ALT_authenticationAndCipheringFailure) {
clean_up();
field_authenticationAndCipheringFailure = new PDU__GMM__AuthenticationAndCipheringFailure;
union_selection = ALT_authenticationAndCipheringFailure;
}
return *field_authenticationAndCipheringFailure;
}

const PDU__GMM__AuthenticationAndCipheringFailure& L3__GMM__MS__SGSN::authenticationAndCipheringFailure() const
{
if (union_selection != ALT_authenticationAndCipheringFailure) TTCN_error("Using non-selected field authenticationAndCipheringFailure in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *field_authenticationAndCipheringFailure;
}

PDU__GMM__IdentityResponse& L3__GMM__MS__SGSN::identityResponse()
{
if (union_selection != ALT_identityResponse) {
clean_up();
field_identityResponse = new PDU__GMM__IdentityResponse;
union_selection = ALT_identityResponse;
}
return *field_identityResponse;
}

const PDU__GMM__IdentityResponse& L3__GMM__MS__SGSN::identityResponse() const
{
if (union_selection != ALT_identityResponse) TTCN_error("Using non-selected field identityResponse in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *field_identityResponse;
}

PDU__GMM__RoutingAreaUpdateRequest& L3__GMM__MS__SGSN::routingAreaUpdateRequest()
{
if (union_selection != ALT_routingAreaUpdateRequest) {
clean_up();
field_routingAreaUpdateRequest = new PDU__GMM__RoutingAreaUpdateRequest;
union_selection = ALT_routingAreaUpdateRequest;
}
return *field_routingAreaUpdateRequest;
}

const PDU__GMM__RoutingAreaUpdateRequest& L3__GMM__MS__SGSN::routingAreaUpdateRequest() const
{
if (union_selection != ALT_routingAreaUpdateRequest) TTCN_error("Using non-selected field routingAreaUpdateRequest in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *field_routingAreaUpdateRequest;
}

PDU__GMM__RoutingAreaUpdateComplete& L3__GMM__MS__SGSN::routingAreaUpdateComplete()
{
if (union_selection != ALT_routingAreaUpdateComplete) {
clean_up();
field_routingAreaUpdateComplete = new PDU__GMM__RoutingAreaUpdateComplete;
union_selection = ALT_routingAreaUpdateComplete;
}
return *field_routingAreaUpdateComplete;
}

const PDU__GMM__RoutingAreaUpdateComplete& L3__GMM__MS__SGSN::routingAreaUpdateComplete() const
{
if (union_selection != ALT_routingAreaUpdateComplete) TTCN_error("Using non-selected field routingAreaUpdateComplete in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *field_routingAreaUpdateComplete;
}

PDU__GMM__GMM__Status& L3__GMM__MS__SGSN::gMM__Status()
{
if (union_selection != ALT_gMM__Status) {
clean_up();
field_gMM__Status = new PDU__GMM__GMM__Status;
union_selection = ALT_gMM__Status;
}
return *field_gMM__Status;
}

const PDU__GMM__GMM__Status& L3__GMM__MS__SGSN::gMM__Status() const
{
if (union_selection != ALT_gMM__Status) TTCN_error("Using non-selected field gMM_Status in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *field_gMM__Status;
}

PDU__GMM__ServiceRequest& L3__GMM__MS__SGSN::serviceRequest()
{
if (union_selection != ALT_serviceRequest) {
clean_up();
field_serviceRequest = new PDU__GMM__ServiceRequest;
union_selection = ALT_serviceRequest;
}
return *field_serviceRequest;
}

const PDU__GMM__ServiceRequest& L3__GMM__MS__SGSN::serviceRequest() const
{
if (union_selection != ALT_serviceRequest) TTCN_error("Using non-selected field serviceRequest in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *field_serviceRequest;
}

boolean L3__GMM__MS__SGSN::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_GMM_SM_Types.L3_GMM_MS_SGSN.");
return union_selection == checked_selection;
}

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

boolean L3__GMM__MS__SGSN::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_attachRequest: return field_attachRequest->is_value();
case ALT_attachComplete: return field_attachComplete->is_value();
case ALT_detachRequest__MS__SGSN: return field_detachRequest__MS__SGSN->is_value();
case ALT_detachAccept__MS__SGSN: return field_detachAccept__MS__SGSN->is_value();
case ALT_p__TMSIReallocationComplete: return field_p__TMSIReallocationComplete->is_value();
case ALT_authenticationAndCipheringResponse: return field_authenticationAndCipheringResponse->is_value();
case ALT_authenticationAndCipheringFailure: return field_authenticationAndCipheringFailure->is_value();
case ALT_identityResponse: return field_identityResponse->is_value();
case ALT_routingAreaUpdateRequest: return field_routingAreaUpdateRequest->is_value();
case ALT_routingAreaUpdateComplete: return field_routingAreaUpdateComplete->is_value();
case ALT_gMM__Status: return field_gMM__Status->is_value();
case ALT_serviceRequest: return field_serviceRequest->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void L3__GMM__MS__SGSN::clean_up()
{
switch (union_selection) {
case ALT_attachRequest:
  delete field_attachRequest;
  break;
case ALT_attachComplete:
  delete field_attachComplete;
  break;
case ALT_detachRequest__MS__SGSN:
  delete field_detachRequest__MS__SGSN;
  break;
case ALT_detachAccept__MS__SGSN:
  delete field_detachAccept__MS__SGSN;
  break;
case ALT_p__TMSIReallocationComplete:
  delete field_p__TMSIReallocationComplete;
  break;
case ALT_authenticationAndCipheringResponse:
  delete field_authenticationAndCipheringResponse;
  break;
case ALT_authenticationAndCipheringFailure:
  delete field_authenticationAndCipheringFailure;
  break;
case ALT_identityResponse:
  delete field_identityResponse;
  break;
case ALT_routingAreaUpdateRequest:
  delete field_routingAreaUpdateRequest;
  break;
case ALT_routingAreaUpdateComplete:
  delete field_routingAreaUpdateComplete;
  break;
case ALT_gMM__Status:
  delete field_gMM__Status;
  break;
case ALT_serviceRequest:
  delete field_serviceRequest;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void L3__GMM__MS__SGSN::log() const
{
switch (union_selection) {
case ALT_attachRequest:
TTCN_Logger::log_event_str("{ attachRequest := ");
field_attachRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_attachComplete:
TTCN_Logger::log_event_str("{ attachComplete := ");
field_attachComplete->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_detachRequest__MS__SGSN:
TTCN_Logger::log_event_str("{ detachRequest_MS_SGSN := ");
field_detachRequest__MS__SGSN->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_detachAccept__MS__SGSN:
TTCN_Logger::log_event_str("{ detachAccept_MS_SGSN := ");
field_detachAccept__MS__SGSN->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_p__TMSIReallocationComplete:
TTCN_Logger::log_event_str("{ p_TMSIReallocationComplete := ");
field_p__TMSIReallocationComplete->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_authenticationAndCipheringResponse:
TTCN_Logger::log_event_str("{ authenticationAndCipheringResponse := ");
field_authenticationAndCipheringResponse->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_authenticationAndCipheringFailure:
TTCN_Logger::log_event_str("{ authenticationAndCipheringFailure := ");
field_authenticationAndCipheringFailure->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_identityResponse:
TTCN_Logger::log_event_str("{ identityResponse := ");
field_identityResponse->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_routingAreaUpdateRequest:
TTCN_Logger::log_event_str("{ routingAreaUpdateRequest := ");
field_routingAreaUpdateRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_routingAreaUpdateComplete:
TTCN_Logger::log_event_str("{ routingAreaUpdateComplete := ");
field_routingAreaUpdateComplete->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_gMM__Status:
TTCN_Logger::log_event_str("{ gMM_Status := ");
field_gMM__Status->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_serviceRequest:
TTCN_Logger::log_event_str("{ serviceRequest := ");
field_serviceRequest->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

void L3__GMM__MS__SGSN::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, "attachRequest")) {
    attachRequest().set_param(*mp_last);
    if (!attachRequest().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "attachComplete")) {
    attachComplete().set_param(*mp_last);
    if (!attachComplete().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "detachRequest_MS_SGSN")) {
    detachRequest__MS__SGSN().set_param(*mp_last);
    if (!detachRequest__MS__SGSN().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "detachAccept_MS_SGSN")) {
    detachAccept__MS__SGSN().set_param(*mp_last);
    if (!detachAccept__MS__SGSN().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "p_TMSIReallocationComplete")) {
    p__TMSIReallocationComplete().set_param(*mp_last);
    if (!p__TMSIReallocationComplete().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "authenticationAndCipheringResponse")) {
    authenticationAndCipheringResponse().set_param(*mp_last);
    if (!authenticationAndCipheringResponse().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "authenticationAndCipheringFailure")) {
    authenticationAndCipheringFailure().set_param(*mp_last);
    if (!authenticationAndCipheringFailure().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "identityResponse")) {
    identityResponse().set_param(*mp_last);
    if (!identityResponse().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "routingAreaUpdateRequest")) {
    routingAreaUpdateRequest().set_param(*mp_last);
    if (!routingAreaUpdateRequest().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "routingAreaUpdateComplete")) {
    routingAreaUpdateComplete().set_param(*mp_last);
    if (!routingAreaUpdateComplete().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "gMM_Status")) {
    gMM__Status().set_param(*mp_last);
    if (!gMM__Status().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "serviceRequest")) {
    serviceRequest().set_param(*mp_last);
    if (!serviceRequest().is_bound()) clean_up();
    return;
  }
  mp_last->error("Field %s does not exist in type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.", last_name);
}

void L3__GMM__MS__SGSN::set_implicit_omit()
{
switch (union_selection) {
case ALT_attachRequest:
field_attachRequest->set_implicit_omit(); break;
case ALT_attachComplete:
field_attachComplete->set_implicit_omit(); break;
case ALT_detachRequest__MS__SGSN:
field_detachRequest__MS__SGSN->set_implicit_omit(); break;
case ALT_detachAccept__MS__SGSN:
field_detachAccept__MS__SGSN->set_implicit_omit(); break;
case ALT_p__TMSIReallocationComplete:
field_p__TMSIReallocationComplete->set_implicit_omit(); break;
case ALT_authenticationAndCipheringResponse:
field_authenticationAndCipheringResponse->set_implicit_omit(); break;
case ALT_authenticationAndCipheringFailure:
field_authenticationAndCipheringFailure->set_implicit_omit(); break;
case ALT_identityResponse:
field_identityResponse->set_implicit_omit(); break;
case ALT_routingAreaUpdateRequest:
field_routingAreaUpdateRequest->set_implicit_omit(); break;
case ALT_routingAreaUpdateComplete:
field_routingAreaUpdateComplete->set_implicit_omit(); break;
case ALT_gMM__Status:
field_gMM__Status->set_implicit_omit(); break;
case ALT_serviceRequest:
field_serviceRequest->set_implicit_omit(); break;
default: break;
}
}

void L3__GMM__MS__SGSN::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_attachRequest:
field_attachRequest->encode_text(text_buf);
break;
case ALT_attachComplete:
field_attachComplete->encode_text(text_buf);
break;
case ALT_detachRequest__MS__SGSN:
field_detachRequest__MS__SGSN->encode_text(text_buf);
break;
case ALT_detachAccept__MS__SGSN:
field_detachAccept__MS__SGSN->encode_text(text_buf);
break;
case ALT_p__TMSIReallocationComplete:
field_p__TMSIReallocationComplete->encode_text(text_buf);
break;
case ALT_authenticationAndCipheringResponse:
field_authenticationAndCipheringResponse->encode_text(text_buf);
break;
case ALT_authenticationAndCipheringFailure:
field_authenticationAndCipheringFailure->encode_text(text_buf);
break;
case ALT_identityResponse:
field_identityResponse->encode_text(text_buf);
break;
case ALT_routingAreaUpdateRequest:
field_routingAreaUpdateRequest->encode_text(text_buf);
break;
case ALT_routingAreaUpdateComplete:
field_routingAreaUpdateComplete->encode_text(text_buf);
break;
case ALT_gMM__Status:
field_gMM__Status->encode_text(text_buf);
break;
case ALT_serviceRequest:
field_serviceRequest->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
}

void L3__GMM__MS__SGSN::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_attachRequest:
attachRequest().decode_text(text_buf);
break;
case ALT_attachComplete:
attachComplete().decode_text(text_buf);
break;
case ALT_detachRequest__MS__SGSN:
detachRequest__MS__SGSN().decode_text(text_buf);
break;
case ALT_detachAccept__MS__SGSN:
detachAccept__MS__SGSN().decode_text(text_buf);
break;
case ALT_p__TMSIReallocationComplete:
p__TMSIReallocationComplete().decode_text(text_buf);
break;
case ALT_authenticationAndCipheringResponse:
authenticationAndCipheringResponse().decode_text(text_buf);
break;
case ALT_authenticationAndCipheringFailure:
authenticationAndCipheringFailure().decode_text(text_buf);
break;
case ALT_identityResponse:
identityResponse().decode_text(text_buf);
break;
case ALT_routingAreaUpdateRequest:
routingAreaUpdateRequest().decode_text(text_buf);
break;
case ALT_routingAreaUpdateComplete:
routingAreaUpdateComplete().decode_text(text_buf);
break;
case ALT_gMM__Status:
gMM__Status().decode_text(text_buf);
break;
case ALT_serviceRequest:
serviceRequest().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
}

void L3__GMM__MS__SGSN::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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void L3__GMM__MS__SGSN::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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int L3__GMM__MS__SGSN::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__GMM__AttachRequest_descr_.raw->forceomit);
      decoded_length = attachRequest().RAW_decode(PDU__GMM__AttachRequest_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__GMM__AttachComplete_descr_.raw->forceomit);
      decoded_length = attachComplete().RAW_decode(PDU__GMM__AttachComplete_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__GMM__DetachRequest__MS__SGSN_descr_.raw->forceomit);
      decoded_length = detachRequest__MS__SGSN().RAW_decode(PDU__GMM__DetachRequest__MS__SGSN_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__GMM__DetachAccept__MS__SGSN_descr_.raw->forceomit);
      decoded_length = detachAccept__MS__SGSN().RAW_decode(PDU__GMM__DetachAccept__MS__SGSN_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__GMM__P__TMSIReallocationComplete_descr_.raw->forceomit);
      decoded_length = p__TMSIReallocationComplete().RAW_decode(PDU__GMM__P__TMSIReallocationComplete_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__GMM__AuthenticationAndCipheringResponse_descr_.raw->forceomit);
      decoded_length = authenticationAndCipheringResponse().RAW_decode(PDU__GMM__AuthenticationAndCipheringResponse_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__GMM__AuthenticationAndCipheringFailure_descr_.raw->forceomit);
      decoded_length = authenticationAndCipheringFailure().RAW_decode(PDU__GMM__AuthenticationAndCipheringFailure_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__GMM__IdentityResponse_descr_.raw->forceomit);
      decoded_length = identityResponse().RAW_decode(PDU__GMM__IdentityResponse_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__GMM__RoutingAreaUpdateRequest_descr_.raw->forceomit);
      decoded_length = routingAreaUpdateRequest().RAW_decode(PDU__GMM__RoutingAreaUpdateRequest_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__GMM__RoutingAreaUpdateComplete_descr_.raw->forceomit);
      decoded_length = routingAreaUpdateComplete().RAW_decode(PDU__GMM__RoutingAreaUpdateComplete_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__GMM__GMM__Status_descr_.raw->forceomit);
      decoded_length = gMM__Status().RAW_decode(PDU__GMM__GMM__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__GMM__ServiceRequest_descr_.raw->forceomit);
      decoded_length = serviceRequest().RAW_decode(PDU__GMM__ServiceRequest_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    default: break;
    }
    return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
  } else {
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_0_force_omit(0, force_omit, PDU__GMM__AttachRequest_descr_.raw->forceomit);
      decoded_length = attachRequest().RAW_decode(PDU__GMM__AttachRequest_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_0_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_1_force_omit(1, force_omit, PDU__GMM__AttachComplete_descr_.raw->forceomit);
      decoded_length = attachComplete().RAW_decode(PDU__GMM__AttachComplete_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_1_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_2_force_omit(2, force_omit, PDU__GMM__DetachRequest__MS__SGSN_descr_.raw->forceomit);
      decoded_length = detachRequest__MS__SGSN().RAW_decode(PDU__GMM__DetachRequest__MS__SGSN_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_2_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_3_force_omit(3, force_omit, PDU__GMM__DetachAccept__MS__SGSN_descr_.raw->forceomit);
      decoded_length = detachAccept__MS__SGSN().RAW_decode(PDU__GMM__DetachAccept__MS__SGSN_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_3_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_4_force_omit(4, force_omit, PDU__GMM__P__TMSIReallocationComplete_descr_.raw->forceomit);
      decoded_length = p__TMSIReallocationComplete().RAW_decode(PDU__GMM__P__TMSIReallocationComplete_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_4_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_5_force_omit(5, force_omit, PDU__GMM__AuthenticationAndCipheringResponse_descr_.raw->forceomit);
      decoded_length = authenticationAndCipheringResponse().RAW_decode(PDU__GMM__AuthenticationAndCipheringResponse_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_5_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_6_force_omit(6, force_omit, PDU__GMM__AuthenticationAndCipheringFailure_descr_.raw->forceomit);
      decoded_length = authenticationAndCipheringFailure().RAW_decode(PDU__GMM__AuthenticationAndCipheringFailure_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_6_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_7_force_omit(7, force_omit, PDU__GMM__IdentityResponse_descr_.raw->forceomit);
      decoded_length = identityResponse().RAW_decode(PDU__GMM__IdentityResponse_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_7_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_8_force_omit(8, force_omit, PDU__GMM__RoutingAreaUpdateRequest_descr_.raw->forceomit);
      decoded_length = routingAreaUpdateRequest().RAW_decode(PDU__GMM__RoutingAreaUpdateRequest_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_8_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_9_force_omit(9, force_omit, PDU__GMM__RoutingAreaUpdateComplete_descr_.raw->forceomit);
      decoded_length = routingAreaUpdateComplete().RAW_decode(PDU__GMM__RoutingAreaUpdateComplete_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_9_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_10_force_omit(10, force_omit, PDU__GMM__GMM__Status_descr_.raw->forceomit);
      decoded_length = gMM__Status().RAW_decode(PDU__GMM__GMM__Status_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_10_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_11_force_omit(11, force_omit, PDU__GMM__ServiceRequest_descr_.raw->forceomit);
      decoded_length = serviceRequest().RAW_decode(PDU__GMM__ServiceRequest_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_11_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
 }
 clean_up();
 return -1;
}

int L3__GMM__MS__SGSN::RAW_encode(const TTCN_Typedescriptor_t&, RAW_enc_tree& myleaf) const
{
  int encoded_length = 0;
  myleaf.isleaf = FALSE;
  myleaf.body.node.num_of_nodes = 12;  myleaf.body.node.nodes = init_nodes_of_enc_tree(12);
  memset(myleaf.body.node.nodes, 0, 12 * sizeof(RAW_enc_tree *));
  switch (union_selection) {
  case ALT_attachRequest:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, PDU__GMM__AttachRequest_descr_.raw);
    encoded_length = field_attachRequest->RAW_encode(PDU__GMM__AttachRequest_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &PDU__GMM__AttachRequest_descr_;
    break;
  case ALT_attachComplete:
    myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, PDU__GMM__AttachComplete_descr_.raw);
    encoded_length = field_attachComplete->RAW_encode(PDU__GMM__AttachComplete_descr_, *myleaf.body.node.nodes[1]);
    myleaf.body.node.nodes[1]->coding_descr = &PDU__GMM__AttachComplete_descr_;
    break;
  case ALT_detachRequest__MS__SGSN:
    myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, PDU__GMM__DetachRequest__MS__SGSN_descr_.raw);
    encoded_length = field_detachRequest__MS__SGSN->RAW_encode(PDU__GMM__DetachRequest__MS__SGSN_descr_, *myleaf.body.node.nodes[2]);
    myleaf.body.node.nodes[2]->coding_descr = &PDU__GMM__DetachRequest__MS__SGSN_descr_;
    break;
  case ALT_detachAccept__MS__SGSN:
    myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 3, PDU__GMM__DetachAccept__MS__SGSN_descr_.raw);
    encoded_length = field_detachAccept__MS__SGSN->RAW_encode(PDU__GMM__DetachAccept__MS__SGSN_descr_, *myleaf.body.node.nodes[3]);
    myleaf.body.node.nodes[3]->coding_descr = &PDU__GMM__DetachAccept__MS__SGSN_descr_;
    break;
  case ALT_p__TMSIReallocationComplete:
    myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 4, PDU__GMM__P__TMSIReallocationComplete_descr_.raw);
    encoded_length = field_p__TMSIReallocationComplete->RAW_encode(PDU__GMM__P__TMSIReallocationComplete_descr_, *myleaf.body.node.nodes[4]);
    myleaf.body.node.nodes[4]->coding_descr = &PDU__GMM__P__TMSIReallocationComplete_descr_;
    break;
  case ALT_authenticationAndCipheringResponse:
    myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 5, PDU__GMM__AuthenticationAndCipheringResponse_descr_.raw);
    encoded_length = field_authenticationAndCipheringResponse->RAW_encode(PDU__GMM__AuthenticationAndCipheringResponse_descr_, *myleaf.body.node.nodes[5]);
    myleaf.body.node.nodes[5]->coding_descr = &PDU__GMM__AuthenticationAndCipheringResponse_descr_;
    break;
  case ALT_authenticationAndCipheringFailure:
    myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 6, PDU__GMM__AuthenticationAndCipheringFailure_descr_.raw);
    encoded_length = field_authenticationAndCipheringFailure->RAW_encode(PDU__GMM__AuthenticationAndCipheringFailure_descr_, *myleaf.body.node.nodes[6]);
    myleaf.body.node.nodes[6]->coding_descr = &PDU__GMM__AuthenticationAndCipheringFailure_descr_;
    break;
  case ALT_identityResponse:
    myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 7, PDU__GMM__IdentityResponse_descr_.raw);
    encoded_length = field_identityResponse->RAW_encode(PDU__GMM__IdentityResponse_descr_, *myleaf.body.node.nodes[7]);
    myleaf.body.node.nodes[7]->coding_descr = &PDU__GMM__IdentityResponse_descr_;
    break;
  case ALT_routingAreaUpdateRequest:
    myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 8, PDU__GMM__RoutingAreaUpdateRequest_descr_.raw);
    encoded_length = field_routingAreaUpdateRequest->RAW_encode(PDU__GMM__RoutingAreaUpdateRequest_descr_, *myleaf.body.node.nodes[8]);
    myleaf.body.node.nodes[8]->coding_descr = &PDU__GMM__RoutingAreaUpdateRequest_descr_;
    break;
  case ALT_routingAreaUpdateComplete:
    myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 9, PDU__GMM__RoutingAreaUpdateComplete_descr_.raw);
    encoded_length = field_routingAreaUpdateComplete->RAW_encode(PDU__GMM__RoutingAreaUpdateComplete_descr_, *myleaf.body.node.nodes[9]);
    myleaf.body.node.nodes[9]->coding_descr = &PDU__GMM__RoutingAreaUpdateComplete_descr_;
    break;
  case ALT_gMM__Status:
    myleaf.body.node.nodes[10] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 10, PDU__GMM__GMM__Status_descr_.raw);
    encoded_length = field_gMM__Status->RAW_encode(PDU__GMM__GMM__Status_descr_, *myleaf.body.node.nodes[10]);
    myleaf.body.node.nodes[10]->coding_descr = &PDU__GMM__GMM__Status_descr_;
    break;
  case ALT_serviceRequest:
    myleaf.body.node.nodes[11] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 11, PDU__GMM__ServiceRequest_descr_.raw);
    encoded_length = field_serviceRequest->RAW_encode(PDU__GMM__ServiceRequest_descr_, *myleaf.body.node.nodes[11]);
    myleaf.body.node.nodes[11]->coding_descr = &PDU__GMM__ServiceRequest_descr_;
    break;
  default:
    TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  }
  return encoded_length;
}

void L3__GMM__MS__SGSN_template::copy_value(const L3__GMM__MS__SGSN& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case L3__GMM__MS__SGSN::ALT_attachRequest:
single_value.field_attachRequest = new PDU__GMM__AttachRequest_template(other_value.attachRequest());
break;
case L3__GMM__MS__SGSN::ALT_attachComplete:
single_value.field_attachComplete = new PDU__GMM__AttachComplete_template(other_value.attachComplete());
break;
case L3__GMM__MS__SGSN::ALT_detachRequest__MS__SGSN:
single_value.field_detachRequest__MS__SGSN = new PDU__GMM__DetachRequest__MS__SGSN_template(other_value.detachRequest__MS__SGSN());
break;
case L3__GMM__MS__SGSN::ALT_detachAccept__MS__SGSN:
single_value.field_detachAccept__MS__SGSN = new PDU__GMM__DetachAccept__MS__SGSN_template(other_value.detachAccept__MS__SGSN());
break;
case L3__GMM__MS__SGSN::ALT_p__TMSIReallocationComplete:
single_value.field_p__TMSIReallocationComplete = new PDU__GMM__P__TMSIReallocationComplete_template(other_value.p__TMSIReallocationComplete());
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringResponse:
single_value.field_authenticationAndCipheringResponse = new PDU__GMM__AuthenticationAndCipheringResponse_template(other_value.authenticationAndCipheringResponse());
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringFailure:
single_value.field_authenticationAndCipheringFailure = new PDU__GMM__AuthenticationAndCipheringFailure_template(other_value.authenticationAndCipheringFailure());
break;
case L3__GMM__MS__SGSN::ALT_identityResponse:
single_value.field_identityResponse = new PDU__GMM__IdentityResponse_template(other_value.identityResponse());
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateRequest:
single_value.field_routingAreaUpdateRequest = new PDU__GMM__RoutingAreaUpdateRequest_template(other_value.routingAreaUpdateRequest());
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateComplete:
single_value.field_routingAreaUpdateComplete = new PDU__GMM__RoutingAreaUpdateComplete_template(other_value.routingAreaUpdateComplete());
break;
case L3__GMM__MS__SGSN::ALT_gMM__Status:
single_value.field_gMM__Status = new PDU__GMM__GMM__Status_template(other_value.gMM__Status());
break;
case L3__GMM__MS__SGSN::ALT_serviceRequest:
single_value.field_serviceRequest = new PDU__GMM__ServiceRequest_template(other_value.serviceRequest());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
set_selection(SPECIFIC_VALUE);
}

void L3__GMM__MS__SGSN_template::copy_template(const L3__GMM__MS__SGSN_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 L3__GMM__MS__SGSN::ALT_attachRequest:
single_value.field_attachRequest = new PDU__GMM__AttachRequest_template(*other_value.single_value.field_attachRequest);
break;
case L3__GMM__MS__SGSN::ALT_attachComplete:
single_value.field_attachComplete = new PDU__GMM__AttachComplete_template(*other_value.single_value.field_attachComplete);
break;
case L3__GMM__MS__SGSN::ALT_detachRequest__MS__SGSN:
single_value.field_detachRequest__MS__SGSN = new PDU__GMM__DetachRequest__MS__SGSN_template(*other_value.single_value.field_detachRequest__MS__SGSN);
break;
case L3__GMM__MS__SGSN::ALT_detachAccept__MS__SGSN:
single_value.field_detachAccept__MS__SGSN = new PDU__GMM__DetachAccept__MS__SGSN_template(*other_value.single_value.field_detachAccept__MS__SGSN);
break;
case L3__GMM__MS__SGSN::ALT_p__TMSIReallocationComplete:
single_value.field_p__TMSIReallocationComplete = new PDU__GMM__P__TMSIReallocationComplete_template(*other_value.single_value.field_p__TMSIReallocationComplete);
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringResponse:
single_value.field_authenticationAndCipheringResponse = new PDU__GMM__AuthenticationAndCipheringResponse_template(*other_value.single_value.field_authenticationAndCipheringResponse);
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringFailure:
single_value.field_authenticationAndCipheringFailure = new PDU__GMM__AuthenticationAndCipheringFailure_template(*other_value.single_value.field_authenticationAndCipheringFailure);
break;
case L3__GMM__MS__SGSN::ALT_identityResponse:
single_value.field_identityResponse = new PDU__GMM__IdentityResponse_template(*other_value.single_value.field_identityResponse);
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateRequest:
single_value.field_routingAreaUpdateRequest = new PDU__GMM__RoutingAreaUpdateRequest_template(*other_value.single_value.field_routingAreaUpdateRequest);
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateComplete:
single_value.field_routingAreaUpdateComplete = new PDU__GMM__RoutingAreaUpdateComplete_template(*other_value.single_value.field_routingAreaUpdateComplete);
break;
case L3__GMM__MS__SGSN::ALT_gMM__Status:
single_value.field_gMM__Status = new PDU__GMM__GMM__Status_template(*other_value.single_value.field_gMM__Status);
break;
case L3__GMM__MS__SGSN::ALT_serviceRequest:
single_value.field_serviceRequest = new PDU__GMM__ServiceRequest_template(*other_value.single_value.field_serviceRequest);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
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 L3__GMM__MS__SGSN_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 L3__GMM__MS__SGSN_template(*other_value.implication_.precondition);
implication_.implied_template = new L3__GMM__MS__SGSN_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_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
set_selection(other_value);
}

L3__GMM__MS__SGSN_template::L3__GMM__MS__SGSN_template()
{
}

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

L3__GMM__MS__SGSN_template::L3__GMM__MS__SGSN_template(const L3__GMM__MS__SGSN& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void L3__GMM__MS__SGSN_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case L3__GMM__MS__SGSN::ALT_attachRequest:
delete single_value.field_attachRequest;
break;
case L3__GMM__MS__SGSN::ALT_attachComplete:
delete single_value.field_attachComplete;
break;
case L3__GMM__MS__SGSN::ALT_detachRequest__MS__SGSN:
delete single_value.field_detachRequest__MS__SGSN;
break;
case L3__GMM__MS__SGSN::ALT_detachAccept__MS__SGSN:
delete single_value.field_detachAccept__MS__SGSN;
break;
case L3__GMM__MS__SGSN::ALT_p__TMSIReallocationComplete:
delete single_value.field_p__TMSIReallocationComplete;
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringResponse:
delete single_value.field_authenticationAndCipheringResponse;
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringFailure:
delete single_value.field_authenticationAndCipheringFailure;
break;
case L3__GMM__MS__SGSN::ALT_identityResponse:
delete single_value.field_identityResponse;
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateRequest:
delete single_value.field_routingAreaUpdateRequest;
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateComplete:
delete single_value.field_routingAreaUpdateComplete;
break;
case L3__GMM__MS__SGSN::ALT_gMM__Status:
delete single_value.field_gMM__Status;
break;
case L3__GMM__MS__SGSN::ALT_serviceRequest:
delete single_value.field_serviceRequest;
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;
}

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

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

L3__GMM__MS__SGSN_template& L3__GMM__MS__SGSN_template::operator=(const OPTIONAL<L3__GMM__MS__SGSN>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const L3__GMM__MS__SGSN&)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_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
return *this;
}

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

boolean L3__GMM__MS__SGSN_template::match(const L3__GMM__MS__SGSN& 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:
{
L3__GMM__MS__SGSN::union_selection_type value_selection = other_value.get_selection();
if (value_selection == L3__GMM__MS__SGSN::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case L3__GMM__MS__SGSN::ALT_attachRequest:
return single_value.field_attachRequest->match(other_value.attachRequest(), legacy);
case L3__GMM__MS__SGSN::ALT_attachComplete:
return single_value.field_attachComplete->match(other_value.attachComplete(), legacy);
case L3__GMM__MS__SGSN::ALT_detachRequest__MS__SGSN:
return single_value.field_detachRequest__MS__SGSN->match(other_value.detachRequest__MS__SGSN(), legacy);
case L3__GMM__MS__SGSN::ALT_detachAccept__MS__SGSN:
return single_value.field_detachAccept__MS__SGSN->match(other_value.detachAccept__MS__SGSN(), legacy);
case L3__GMM__MS__SGSN::ALT_p__TMSIReallocationComplete:
return single_value.field_p__TMSIReallocationComplete->match(other_value.p__TMSIReallocationComplete(), legacy);
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringResponse:
return single_value.field_authenticationAndCipheringResponse->match(other_value.authenticationAndCipheringResponse(), legacy);
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringFailure:
return single_value.field_authenticationAndCipheringFailure->match(other_value.authenticationAndCipheringFailure(), legacy);
case L3__GMM__MS__SGSN::ALT_identityResponse:
return single_value.field_identityResponse->match(other_value.identityResponse(), legacy);
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateRequest:
return single_value.field_routingAreaUpdateRequest->match(other_value.routingAreaUpdateRequest(), legacy);
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateComplete:
return single_value.field_routingAreaUpdateComplete->match(other_value.routingAreaUpdateComplete(), legacy);
case L3__GMM__MS__SGSN::ALT_gMM__Status:
return single_value.field_gMM__Status->match(other_value.gMM__Status(), legacy);
case L3__GMM__MS__SGSN::ALT_serviceRequest:
return single_value.field_serviceRequest->match(other_value.serviceRequest(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
}
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_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
return FALSE;
}

boolean L3__GMM__MS__SGSN_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case L3__GMM__MS__SGSN::ALT_attachRequest:
return single_value.field_attachRequest->is_value();
case L3__GMM__MS__SGSN::ALT_attachComplete:
return single_value.field_attachComplete->is_value();
case L3__GMM__MS__SGSN::ALT_detachRequest__MS__SGSN:
return single_value.field_detachRequest__MS__SGSN->is_value();
case L3__GMM__MS__SGSN::ALT_detachAccept__MS__SGSN:
return single_value.field_detachAccept__MS__SGSN->is_value();
case L3__GMM__MS__SGSN::ALT_p__TMSIReallocationComplete:
return single_value.field_p__TMSIReallocationComplete->is_value();
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringResponse:
return single_value.field_authenticationAndCipheringResponse->is_value();
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringFailure:
return single_value.field_authenticationAndCipheringFailure->is_value();
case L3__GMM__MS__SGSN::ALT_identityResponse:
return single_value.field_identityResponse->is_value();
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateRequest:
return single_value.field_routingAreaUpdateRequest->is_value();
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateComplete:
return single_value.field_routingAreaUpdateComplete->is_value();
case L3__GMM__MS__SGSN::ALT_gMM__Status:
return single_value.field_gMM__Status->is_value();
case L3__GMM__MS__SGSN::ALT_serviceRequest:
return single_value.field_serviceRequest->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_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
}

L3__GMM__MS__SGSN L3__GMM__MS__SGSN_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_GMM_SM_Types.L3_GMM_MS_SGSN.");
L3__GMM__MS__SGSN ret_val;
switch (single_value.union_selection) {
case L3__GMM__MS__SGSN::ALT_attachRequest:
ret_val.attachRequest() = single_value.field_attachRequest->valueof();
break;
case L3__GMM__MS__SGSN::ALT_attachComplete:
ret_val.attachComplete() = single_value.field_attachComplete->valueof();
break;
case L3__GMM__MS__SGSN::ALT_detachRequest__MS__SGSN:
ret_val.detachRequest__MS__SGSN() = single_value.field_detachRequest__MS__SGSN->valueof();
break;
case L3__GMM__MS__SGSN::ALT_detachAccept__MS__SGSN:
ret_val.detachAccept__MS__SGSN() = single_value.field_detachAccept__MS__SGSN->valueof();
break;
case L3__GMM__MS__SGSN::ALT_p__TMSIReallocationComplete:
ret_val.p__TMSIReallocationComplete() = single_value.field_p__TMSIReallocationComplete->valueof();
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringResponse:
ret_val.authenticationAndCipheringResponse() = single_value.field_authenticationAndCipheringResponse->valueof();
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringFailure:
ret_val.authenticationAndCipheringFailure() = single_value.field_authenticationAndCipheringFailure->valueof();
break;
case L3__GMM__MS__SGSN::ALT_identityResponse:
ret_val.identityResponse() = single_value.field_identityResponse->valueof();
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateRequest:
ret_val.routingAreaUpdateRequest() = single_value.field_routingAreaUpdateRequest->valueof();
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateComplete:
ret_val.routingAreaUpdateComplete() = single_value.field_routingAreaUpdateComplete->valueof();
break;
case L3__GMM__MS__SGSN::ALT_gMM__Status:
ret_val.gMM__Status() = single_value.field_gMM__Status->valueof();
break;
case L3__GMM__MS__SGSN::ALT_serviceRequest:
ret_val.serviceRequest() = single_value.field_serviceRequest->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
return ret_val;
}

L3__GMM__MS__SGSN_template& L3__GMM__MS__SGSN_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_GMM_SM_Types.L3_GMM_MS_SGSN.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return value_list.list_value[list_index];
}
void L3__GMM__MS__SGSN_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_GMM_SM_Types.L3_GMM_MS_SGSN.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new L3__GMM__MS__SGSN_template[list_length];
}

PDU__GMM__AttachRequest_template& L3__GMM__MS__SGSN_template::attachRequest()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__MS__SGSN::ALT_attachRequest) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_attachRequest = new PDU__GMM__AttachRequest_template(ANY_VALUE);
else single_value.field_attachRequest = new PDU__GMM__AttachRequest_template;
single_value.union_selection = L3__GMM__MS__SGSN::ALT_attachRequest;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_attachRequest;
}

const PDU__GMM__AttachRequest_template& L3__GMM__MS__SGSN_template::attachRequest() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field attachRequest in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
if (single_value.union_selection != L3__GMM__MS__SGSN::ALT_attachRequest) TTCN_error("Accessing non-selected field attachRequest in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *single_value.field_attachRequest;
}

PDU__GMM__AttachComplete_template& L3__GMM__MS__SGSN_template::attachComplete()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__MS__SGSN::ALT_attachComplete) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_attachComplete = new PDU__GMM__AttachComplete_template(ANY_VALUE);
else single_value.field_attachComplete = new PDU__GMM__AttachComplete_template;
single_value.union_selection = L3__GMM__MS__SGSN::ALT_attachComplete;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_attachComplete;
}

const PDU__GMM__AttachComplete_template& L3__GMM__MS__SGSN_template::attachComplete() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field attachComplete in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
if (single_value.union_selection != L3__GMM__MS__SGSN::ALT_attachComplete) TTCN_error("Accessing non-selected field attachComplete in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *single_value.field_attachComplete;
}

PDU__GMM__DetachRequest__MS__SGSN_template& L3__GMM__MS__SGSN_template::detachRequest__MS__SGSN()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__MS__SGSN::ALT_detachRequest__MS__SGSN) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_detachRequest__MS__SGSN = new PDU__GMM__DetachRequest__MS__SGSN_template(ANY_VALUE);
else single_value.field_detachRequest__MS__SGSN = new PDU__GMM__DetachRequest__MS__SGSN_template;
single_value.union_selection = L3__GMM__MS__SGSN::ALT_detachRequest__MS__SGSN;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_detachRequest__MS__SGSN;
}

const PDU__GMM__DetachRequest__MS__SGSN_template& L3__GMM__MS__SGSN_template::detachRequest__MS__SGSN() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field detachRequest_MS_SGSN in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
if (single_value.union_selection != L3__GMM__MS__SGSN::ALT_detachRequest__MS__SGSN) TTCN_error("Accessing non-selected field detachRequest_MS_SGSN in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *single_value.field_detachRequest__MS__SGSN;
}

PDU__GMM__DetachAccept__MS__SGSN_template& L3__GMM__MS__SGSN_template::detachAccept__MS__SGSN()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__MS__SGSN::ALT_detachAccept__MS__SGSN) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_detachAccept__MS__SGSN = new PDU__GMM__DetachAccept__MS__SGSN_template(ANY_VALUE);
else single_value.field_detachAccept__MS__SGSN = new PDU__GMM__DetachAccept__MS__SGSN_template;
single_value.union_selection = L3__GMM__MS__SGSN::ALT_detachAccept__MS__SGSN;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_detachAccept__MS__SGSN;
}

const PDU__GMM__DetachAccept__MS__SGSN_template& L3__GMM__MS__SGSN_template::detachAccept__MS__SGSN() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field detachAccept_MS_SGSN in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
if (single_value.union_selection != L3__GMM__MS__SGSN::ALT_detachAccept__MS__SGSN) TTCN_error("Accessing non-selected field detachAccept_MS_SGSN in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *single_value.field_detachAccept__MS__SGSN;
}

PDU__GMM__P__TMSIReallocationComplete_template& L3__GMM__MS__SGSN_template::p__TMSIReallocationComplete()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__MS__SGSN::ALT_p__TMSIReallocationComplete) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_p__TMSIReallocationComplete = new PDU__GMM__P__TMSIReallocationComplete_template(ANY_VALUE);
else single_value.field_p__TMSIReallocationComplete = new PDU__GMM__P__TMSIReallocationComplete_template;
single_value.union_selection = L3__GMM__MS__SGSN::ALT_p__TMSIReallocationComplete;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_p__TMSIReallocationComplete;
}

const PDU__GMM__P__TMSIReallocationComplete_template& L3__GMM__MS__SGSN_template::p__TMSIReallocationComplete() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field p_TMSIReallocationComplete in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
if (single_value.union_selection != L3__GMM__MS__SGSN::ALT_p__TMSIReallocationComplete) TTCN_error("Accessing non-selected field p_TMSIReallocationComplete in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *single_value.field_p__TMSIReallocationComplete;
}

PDU__GMM__AuthenticationAndCipheringResponse_template& L3__GMM__MS__SGSN_template::authenticationAndCipheringResponse()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__MS__SGSN::ALT_authenticationAndCipheringResponse) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_authenticationAndCipheringResponse = new PDU__GMM__AuthenticationAndCipheringResponse_template(ANY_VALUE);
else single_value.field_authenticationAndCipheringResponse = new PDU__GMM__AuthenticationAndCipheringResponse_template;
single_value.union_selection = L3__GMM__MS__SGSN::ALT_authenticationAndCipheringResponse;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_authenticationAndCipheringResponse;
}

const PDU__GMM__AuthenticationAndCipheringResponse_template& L3__GMM__MS__SGSN_template::authenticationAndCipheringResponse() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field authenticationAndCipheringResponse in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
if (single_value.union_selection != L3__GMM__MS__SGSN::ALT_authenticationAndCipheringResponse) TTCN_error("Accessing non-selected field authenticationAndCipheringResponse in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *single_value.field_authenticationAndCipheringResponse;
}

PDU__GMM__AuthenticationAndCipheringFailure_template& L3__GMM__MS__SGSN_template::authenticationAndCipheringFailure()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__MS__SGSN::ALT_authenticationAndCipheringFailure) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_authenticationAndCipheringFailure = new PDU__GMM__AuthenticationAndCipheringFailure_template(ANY_VALUE);
else single_value.field_authenticationAndCipheringFailure = new PDU__GMM__AuthenticationAndCipheringFailure_template;
single_value.union_selection = L3__GMM__MS__SGSN::ALT_authenticationAndCipheringFailure;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_authenticationAndCipheringFailure;
}

const PDU__GMM__AuthenticationAndCipheringFailure_template& L3__GMM__MS__SGSN_template::authenticationAndCipheringFailure() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field authenticationAndCipheringFailure in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
if (single_value.union_selection != L3__GMM__MS__SGSN::ALT_authenticationAndCipheringFailure) TTCN_error("Accessing non-selected field authenticationAndCipheringFailure in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *single_value.field_authenticationAndCipheringFailure;
}

PDU__GMM__IdentityResponse_template& L3__GMM__MS__SGSN_template::identityResponse()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__MS__SGSN::ALT_identityResponse) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_identityResponse = new PDU__GMM__IdentityResponse_template(ANY_VALUE);
else single_value.field_identityResponse = new PDU__GMM__IdentityResponse_template;
single_value.union_selection = L3__GMM__MS__SGSN::ALT_identityResponse;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_identityResponse;
}

const PDU__GMM__IdentityResponse_template& L3__GMM__MS__SGSN_template::identityResponse() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field identityResponse in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
if (single_value.union_selection != L3__GMM__MS__SGSN::ALT_identityResponse) TTCN_error("Accessing non-selected field identityResponse in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *single_value.field_identityResponse;
}

PDU__GMM__RoutingAreaUpdateRequest_template& L3__GMM__MS__SGSN_template::routingAreaUpdateRequest()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__MS__SGSN::ALT_routingAreaUpdateRequest) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_routingAreaUpdateRequest = new PDU__GMM__RoutingAreaUpdateRequest_template(ANY_VALUE);
else single_value.field_routingAreaUpdateRequest = new PDU__GMM__RoutingAreaUpdateRequest_template;
single_value.union_selection = L3__GMM__MS__SGSN::ALT_routingAreaUpdateRequest;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_routingAreaUpdateRequest;
}

const PDU__GMM__RoutingAreaUpdateRequest_template& L3__GMM__MS__SGSN_template::routingAreaUpdateRequest() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field routingAreaUpdateRequest in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
if (single_value.union_selection != L3__GMM__MS__SGSN::ALT_routingAreaUpdateRequest) TTCN_error("Accessing non-selected field routingAreaUpdateRequest in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *single_value.field_routingAreaUpdateRequest;
}

PDU__GMM__RoutingAreaUpdateComplete_template& L3__GMM__MS__SGSN_template::routingAreaUpdateComplete()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__MS__SGSN::ALT_routingAreaUpdateComplete) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_routingAreaUpdateComplete = new PDU__GMM__RoutingAreaUpdateComplete_template(ANY_VALUE);
else single_value.field_routingAreaUpdateComplete = new PDU__GMM__RoutingAreaUpdateComplete_template;
single_value.union_selection = L3__GMM__MS__SGSN::ALT_routingAreaUpdateComplete;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_routingAreaUpdateComplete;
}

const PDU__GMM__RoutingAreaUpdateComplete_template& L3__GMM__MS__SGSN_template::routingAreaUpdateComplete() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field routingAreaUpdateComplete in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
if (single_value.union_selection != L3__GMM__MS__SGSN::ALT_routingAreaUpdateComplete) TTCN_error("Accessing non-selected field routingAreaUpdateComplete in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *single_value.field_routingAreaUpdateComplete;
}

PDU__GMM__GMM__Status_template& L3__GMM__MS__SGSN_template::gMM__Status()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__MS__SGSN::ALT_gMM__Status) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_gMM__Status = new PDU__GMM__GMM__Status_template(ANY_VALUE);
else single_value.field_gMM__Status = new PDU__GMM__GMM__Status_template;
single_value.union_selection = L3__GMM__MS__SGSN::ALT_gMM__Status;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_gMM__Status;
}

const PDU__GMM__GMM__Status_template& L3__GMM__MS__SGSN_template::gMM__Status() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field gMM_Status in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
if (single_value.union_selection != L3__GMM__MS__SGSN::ALT_gMM__Status) TTCN_error("Accessing non-selected field gMM_Status in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *single_value.field_gMM__Status;
}

PDU__GMM__ServiceRequest_template& L3__GMM__MS__SGSN_template::serviceRequest()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__MS__SGSN::ALT_serviceRequest) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_serviceRequest = new PDU__GMM__ServiceRequest_template(ANY_VALUE);
else single_value.field_serviceRequest = new PDU__GMM__ServiceRequest_template;
single_value.union_selection = L3__GMM__MS__SGSN::ALT_serviceRequest;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_serviceRequest;
}

const PDU__GMM__ServiceRequest_template& L3__GMM__MS__SGSN_template::serviceRequest() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field serviceRequest in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
if (single_value.union_selection != L3__GMM__MS__SGSN::ALT_serviceRequest) TTCN_error("Accessing non-selected field serviceRequest in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
return *single_value.field_serviceRequest;
}

boolean L3__GMM__MS__SGSN_template::ischosen(L3__GMM__MS__SGSN::union_selection_type checked_selection) const
{
if (checked_selection == L3__GMM__MS__SGSN::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.union_selection == L3__GMM__MS__SGSN::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
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_GMM_SM_Types.L3_GMM_MS_SGSN 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 L3__GMM__MS__SGSN_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case L3__GMM__MS__SGSN::ALT_attachRequest:
TTCN_Logger::log_event_str("{ attachRequest := ");
single_value.field_attachRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__MS__SGSN::ALT_attachComplete:
TTCN_Logger::log_event_str("{ attachComplete := ");
single_value.field_attachComplete->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__MS__SGSN::ALT_detachRequest__MS__SGSN:
TTCN_Logger::log_event_str("{ detachRequest_MS_SGSN := ");
single_value.field_detachRequest__MS__SGSN->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__MS__SGSN::ALT_detachAccept__MS__SGSN:
TTCN_Logger::log_event_str("{ detachAccept_MS_SGSN := ");
single_value.field_detachAccept__MS__SGSN->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__MS__SGSN::ALT_p__TMSIReallocationComplete:
TTCN_Logger::log_event_str("{ p_TMSIReallocationComplete := ");
single_value.field_p__TMSIReallocationComplete->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringResponse:
TTCN_Logger::log_event_str("{ authenticationAndCipheringResponse := ");
single_value.field_authenticationAndCipheringResponse->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringFailure:
TTCN_Logger::log_event_str("{ authenticationAndCipheringFailure := ");
single_value.field_authenticationAndCipheringFailure->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__MS__SGSN::ALT_identityResponse:
TTCN_Logger::log_event_str("{ identityResponse := ");
single_value.field_identityResponse->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateRequest:
TTCN_Logger::log_event_str("{ routingAreaUpdateRequest := ");
single_value.field_routingAreaUpdateRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateComplete:
TTCN_Logger::log_event_str("{ routingAreaUpdateComplete := ");
single_value.field_routingAreaUpdateComplete->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__MS__SGSN::ALT_gMM__Status:
TTCN_Logger::log_event_str("{ gMM_Status := ");
single_value.field_gMM__Status->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__MS__SGSN::ALT_serviceRequest:
TTCN_Logger::log_event_str("{ serviceRequest := ");
single_value.field_serviceRequest->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 L3__GMM__MS__SGSN_template::log_match(const L3__GMM__MS__SGSN& 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 L3__GMM__MS__SGSN::ALT_attachRequest:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".attachRequest");
single_value.field_attachRequest->log_match(match_value.attachRequest(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ attachRequest := ");
single_value.field_attachRequest->log_match(match_value.attachRequest(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__MS__SGSN::ALT_attachComplete:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".attachComplete");
single_value.field_attachComplete->log_match(match_value.attachComplete(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ attachComplete := ");
single_value.field_attachComplete->log_match(match_value.attachComplete(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__MS__SGSN::ALT_detachRequest__MS__SGSN:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".detachRequest_MS_SGSN");
single_value.field_detachRequest__MS__SGSN->log_match(match_value.detachRequest__MS__SGSN(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ detachRequest_MS_SGSN := ");
single_value.field_detachRequest__MS__SGSN->log_match(match_value.detachRequest__MS__SGSN(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__MS__SGSN::ALT_detachAccept__MS__SGSN:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".detachAccept_MS_SGSN");
single_value.field_detachAccept__MS__SGSN->log_match(match_value.detachAccept__MS__SGSN(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ detachAccept_MS_SGSN := ");
single_value.field_detachAccept__MS__SGSN->log_match(match_value.detachAccept__MS__SGSN(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__MS__SGSN::ALT_p__TMSIReallocationComplete:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".p_TMSIReallocationComplete");
single_value.field_p__TMSIReallocationComplete->log_match(match_value.p__TMSIReallocationComplete(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ p_TMSIReallocationComplete := ");
single_value.field_p__TMSIReallocationComplete->log_match(match_value.p__TMSIReallocationComplete(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringResponse:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".authenticationAndCipheringResponse");
single_value.field_authenticationAndCipheringResponse->log_match(match_value.authenticationAndCipheringResponse(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ authenticationAndCipheringResponse := ");
single_value.field_authenticationAndCipheringResponse->log_match(match_value.authenticationAndCipheringResponse(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringFailure:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".authenticationAndCipheringFailure");
single_value.field_authenticationAndCipheringFailure->log_match(match_value.authenticationAndCipheringFailure(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ authenticationAndCipheringFailure := ");
single_value.field_authenticationAndCipheringFailure->log_match(match_value.authenticationAndCipheringFailure(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__MS__SGSN::ALT_identityResponse:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".identityResponse");
single_value.field_identityResponse->log_match(match_value.identityResponse(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ identityResponse := ");
single_value.field_identityResponse->log_match(match_value.identityResponse(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateRequest:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".routingAreaUpdateRequest");
single_value.field_routingAreaUpdateRequest->log_match(match_value.routingAreaUpdateRequest(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ routingAreaUpdateRequest := ");
single_value.field_routingAreaUpdateRequest->log_match(match_value.routingAreaUpdateRequest(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateComplete:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".routingAreaUpdateComplete");
single_value.field_routingAreaUpdateComplete->log_match(match_value.routingAreaUpdateComplete(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ routingAreaUpdateComplete := ");
single_value.field_routingAreaUpdateComplete->log_match(match_value.routingAreaUpdateComplete(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__MS__SGSN::ALT_gMM__Status:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".gMM_Status");
single_value.field_gMM__Status->log_match(match_value.gMM__Status(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ gMM_Status := ");
single_value.field_gMM__Status->log_match(match_value.gMM__Status(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__MS__SGSN::ALT_serviceRequest:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".serviceRequest");
single_value.field_serviceRequest->log_match(match_value.serviceRequest(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ serviceRequest := ");
single_value.field_serviceRequest->log_match(match_value.serviceRequest(), 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 L3__GMM__MS__SGSN_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 L3__GMM__MS__SGSN::ALT_attachRequest:
single_value.field_attachRequest->encode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_attachComplete:
single_value.field_attachComplete->encode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_detachRequest__MS__SGSN:
single_value.field_detachRequest__MS__SGSN->encode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_detachAccept__MS__SGSN:
single_value.field_detachAccept__MS__SGSN->encode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_p__TMSIReallocationComplete:
single_value.field_p__TMSIReallocationComplete->encode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringResponse:
single_value.field_authenticationAndCipheringResponse->encode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringFailure:
single_value.field_authenticationAndCipheringFailure->encode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_identityResponse:
single_value.field_identityResponse->encode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateRequest:
single_value.field_routingAreaUpdateRequest->encode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateComplete:
single_value.field_routingAreaUpdateComplete->encode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_gMM__Status:
single_value.field_gMM__Status->encode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_serviceRequest:
single_value.field_serviceRequest->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
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_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
}

void L3__GMM__MS__SGSN_template::decode_text(Text_Buf& text_buf)
{
clean_up();
decode_text_base(text_buf);
switch (template_selection) {
case SPECIFIC_VALUE:
{
single_value.union_selection = L3__GMM__MS__SGSN::UNBOUND_VALUE;
L3__GMM__MS__SGSN::union_selection_type new_selection = (L3__GMM__MS__SGSN::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case L3__GMM__MS__SGSN::ALT_attachRequest:
single_value.field_attachRequest = new PDU__GMM__AttachRequest_template;
single_value.field_attachRequest->decode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_attachComplete:
single_value.field_attachComplete = new PDU__GMM__AttachComplete_template;
single_value.field_attachComplete->decode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_detachRequest__MS__SGSN:
single_value.field_detachRequest__MS__SGSN = new PDU__GMM__DetachRequest__MS__SGSN_template;
single_value.field_detachRequest__MS__SGSN->decode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_detachAccept__MS__SGSN:
single_value.field_detachAccept__MS__SGSN = new PDU__GMM__DetachAccept__MS__SGSN_template;
single_value.field_detachAccept__MS__SGSN->decode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_p__TMSIReallocationComplete:
single_value.field_p__TMSIReallocationComplete = new PDU__GMM__P__TMSIReallocationComplete_template;
single_value.field_p__TMSIReallocationComplete->decode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringResponse:
single_value.field_authenticationAndCipheringResponse = new PDU__GMM__AuthenticationAndCipheringResponse_template;
single_value.field_authenticationAndCipheringResponse->decode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringFailure:
single_value.field_authenticationAndCipheringFailure = new PDU__GMM__AuthenticationAndCipheringFailure_template;
single_value.field_authenticationAndCipheringFailure->decode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_identityResponse:
single_value.field_identityResponse = new PDU__GMM__IdentityResponse_template;
single_value.field_identityResponse->decode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateRequest:
single_value.field_routingAreaUpdateRequest = new PDU__GMM__RoutingAreaUpdateRequest_template;
single_value.field_routingAreaUpdateRequest->decode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateComplete:
single_value.field_routingAreaUpdateComplete = new PDU__GMM__RoutingAreaUpdateComplete_template;
single_value.field_routingAreaUpdateComplete->decode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_gMM__Status:
single_value.field_gMM__Status = new PDU__GMM__GMM__Status_template;
single_value.field_gMM__Status->decode_text(text_buf);
break;
case L3__GMM__MS__SGSN::ALT_serviceRequest:
single_value.field_serviceRequest = new PDU__GMM__ServiceRequest_template;
single_value.field_serviceRequest->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
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 L3__GMM__MS__SGSN_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_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
}

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

boolean L3__GMM__MS__SGSN_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 L3__GMM__MS__SGSN_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_GMM_SM_Types.L3_GMM_MS_SGSN'");
    }
    if (strcmp("attachRequest", param_field) == 0) {
      attachRequest().set_param(param);
      return;
    } else if (strcmp("attachComplete", param_field) == 0) {
      attachComplete().set_param(param);
      return;
    } else if (strcmp("detachRequest_MS_SGSN", param_field) == 0) {
      detachRequest__MS__SGSN().set_param(param);
      return;
    } else if (strcmp("detachAccept_MS_SGSN", param_field) == 0) {
      detachAccept__MS__SGSN().set_param(param);
      return;
    } else if (strcmp("p_TMSIReallocationComplete", param_field) == 0) {
      p__TMSIReallocationComplete().set_param(param);
      return;
    } else if (strcmp("authenticationAndCipheringResponse", param_field) == 0) {
      authenticationAndCipheringResponse().set_param(param);
      return;
    } else if (strcmp("authenticationAndCipheringFailure", param_field) == 0) {
      authenticationAndCipheringFailure().set_param(param);
      return;
    } else if (strcmp("identityResponse", param_field) == 0) {
      identityResponse().set_param(param);
      return;
    } else if (strcmp("routingAreaUpdateRequest", param_field) == 0) {
      routingAreaUpdateRequest().set_param(param);
      return;
    } else if (strcmp("routingAreaUpdateComplete", param_field) == 0) {
      routingAreaUpdateComplete().set_param(param);
      return;
    } else if (strcmp("gMM_Status", param_field) == 0) {
      gMM__Status().set_param(param);
      return;
    } else if (strcmp("serviceRequest", param_field) == 0) {
      serviceRequest().set_param(param);
      return;
    } else param.error("Field `%s' not found in union template type `@MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN'", 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: {
    L3__GMM__MS__SGSN_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_GMM_SM_Types.L3_GMM_MS_SGSN");
    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, "attachRequest")) {
      attachRequest().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "attachComplete")) {
      attachComplete().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "detachRequest_MS_SGSN")) {
      detachRequest__MS__SGSN().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "detachAccept_MS_SGSN")) {
      detachAccept__MS__SGSN().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "p_TMSIReallocationComplete")) {
      p__TMSIReallocationComplete().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "authenticationAndCipheringResponse")) {
      authenticationAndCipheringResponse().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "authenticationAndCipheringFailure")) {
      authenticationAndCipheringFailure().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "identityResponse")) {
      identityResponse().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "routingAreaUpdateRequest")) {
      routingAreaUpdateRequest().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "routingAreaUpdateComplete")) {
      routingAreaUpdateComplete().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "gMM_Status")) {
      gMM__Status().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "serviceRequest")) {
      serviceRequest().set_param(*mp_last);
      break;
    }
    mp_last->error("Field %s does not exist in type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.", last_name);
  } break;
  case Module_Param::MP_Implication_Template: {
    L3__GMM__MS__SGSN_template* precondition = new L3__GMM__MS__SGSN_template;
    precondition->set_param(*m_p->get_elem(0));
    L3__GMM__MS__SGSN_template* implied_template = new L3__GMM__MS__SGSN_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = L3__GMM__MS__SGSN_template(precondition, implied_template);
  } break;
  default:
    param.type_error("union template", "@MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN");
  }
  is_ifpresent = param.get_ifpresent();
}

void L3__GMM__MS__SGSN_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 L3__GMM__MS__SGSN::ALT_attachRequest:
single_value.field_attachRequest->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN");
return;
case L3__GMM__MS__SGSN::ALT_attachComplete:
single_value.field_attachComplete->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN");
return;
case L3__GMM__MS__SGSN::ALT_detachRequest__MS__SGSN:
single_value.field_detachRequest__MS__SGSN->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN");
return;
case L3__GMM__MS__SGSN::ALT_detachAccept__MS__SGSN:
single_value.field_detachAccept__MS__SGSN->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN");
return;
case L3__GMM__MS__SGSN::ALT_p__TMSIReallocationComplete:
single_value.field_p__TMSIReallocationComplete->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN");
return;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringResponse:
single_value.field_authenticationAndCipheringResponse->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN");
return;
case L3__GMM__MS__SGSN::ALT_authenticationAndCipheringFailure:
single_value.field_authenticationAndCipheringFailure->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN");
return;
case L3__GMM__MS__SGSN::ALT_identityResponse:
single_value.field_identityResponse->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN");
return;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateRequest:
single_value.field_routingAreaUpdateRequest->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN");
return;
case L3__GMM__MS__SGSN::ALT_routingAreaUpdateComplete:
single_value.field_routingAreaUpdateComplete->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN");
return;
case L3__GMM__MS__SGSN::ALT_gMM__Status:
single_value.field_gMM__Status->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN");
return;
case L3__GMM__MS__SGSN::ALT_serviceRequest:
single_value.field_serviceRequest->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN");
return;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @MobileL3_GMM_SM_Types.L3_GMM_MS_SGSN.");
}
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_GMM_SM_Types.L3_GMM_MS_SGSN");
}

void L3__GMM__SGSN__MS::copy_value(const L3__GMM__SGSN__MS& other_value)
{
switch (other_value.union_selection) {
case ALT_attachAccept:
field_attachAccept = new PDU__GMM__AttachAccept(*other_value.field_attachAccept);
break;
case ALT_attachReject:
field_attachReject = new PDU__GMM__AttachReject(*other_value.field_attachReject);
break;
case ALT_detachRequest__SGSN__MS:
field_detachRequest__SGSN__MS = new PDU__GMM__DetachRequest__SGSN__MS(*other_value.field_detachRequest__SGSN__MS);
break;
case ALT_detachAccept__SGSN__MS:
field_detachAccept__SGSN__MS = new PDU__GMM__DetachAccept__SGSN__MS(*other_value.field_detachAccept__SGSN__MS);
break;
case ALT_p__TMSIReallocationCommand:
field_p__TMSIReallocationCommand = new PDU__GMM__P__TMSIReallocationCommand(*other_value.field_p__TMSIReallocationCommand);
break;
case ALT_authenticationAndCipheringRequest:
field_authenticationAndCipheringRequest = new PDU__GMM__AuthenticationAndCipheringRequest(*other_value.field_authenticationAndCipheringRequest);
break;
case ALT_authenticationAndCipheringReject:
field_authenticationAndCipheringReject = new PDU__GMM__AuthenticationAndCipheringReject(*other_value.field_authenticationAndCipheringReject);
break;
case ALT_identityRequest:
field_identityRequest = new PDU__GMM__IdentityRequest(*other_value.field_identityRequest);
break;
case ALT_routingAreaUpdateAccept:
field_routingAreaUpdateAccept = new PDU__GMM__RoutingAreaUpdateAccept(*other_value.field_routingAreaUpdateAccept);
break;
case ALT_routingAreaUpdateReject:
field_routingAreaUpdateReject = new PDU__GMM__RoutingAreaUpdateReject(*other_value.field_routingAreaUpdateReject);
break;
case ALT_gMM__Status:
field_gMM__Status = new PDU__GMM__GMM__Status(*other_value.field_gMM__Status);
break;
case ALT_gMM__Information:
field_gMM__Information = new PDU__GMM__GMM__Information(*other_value.field_gMM__Information);
break;
case ALT_serviceAccept:
field_serviceAccept = new PDU__GMM__ServiceAccept(*other_value.field_serviceAccept);
break;
case ALT_serviceReject:
field_serviceReject = new PDU__GMM__ServiceReject(*other_value.field_serviceReject);
break;
default:
TTCN_error("Assignment of an unbound union value of type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
}
union_selection = other_value.union_selection;
}

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

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

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

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

boolean L3__GMM__SGSN__MS::operator==(const L3__GMM__SGSN__MS& other_value) const
{
if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (union_selection != other_value.union_selection) return FALSE;
switch (union_selection) {
case ALT_attachAccept:
return *field_attachAccept == *other_value.field_attachAccept;
case ALT_attachReject:
return *field_attachReject == *other_value.field_attachReject;
case ALT_detachRequest__SGSN__MS:
return *field_detachRequest__SGSN__MS == *other_value.field_detachRequest__SGSN__MS;
case ALT_detachAccept__SGSN__MS:
return *field_detachAccept__SGSN__MS == *other_value.field_detachAccept__SGSN__MS;
case ALT_p__TMSIReallocationCommand:
return *field_p__TMSIReallocationCommand == *other_value.field_p__TMSIReallocationCommand;
case ALT_authenticationAndCipheringRequest:
return *field_authenticationAndCipheringRequest == *other_value.field_authenticationAndCipheringRequest;
case ALT_authenticationAndCipheringReject:
return *field_authenticationAndCipheringReject == *other_value.field_authenticationAndCipheringReject;
case ALT_identityRequest:
return *field_identityRequest == *other_value.field_identityRequest;
case ALT_routingAreaUpdateAccept:
return *field_routingAreaUpdateAccept == *other_value.field_routingAreaUpdateAccept;
case ALT_routingAreaUpdateReject:
return *field_routingAreaUpdateReject == *other_value.field_routingAreaUpdateReject;
case ALT_gMM__Status:
return *field_gMM__Status == *other_value.field_gMM__Status;
case ALT_gMM__Information:
return *field_gMM__Information == *other_value.field_gMM__Information;
case ALT_serviceAccept:
return *field_serviceAccept == *other_value.field_serviceAccept;
case ALT_serviceReject:
return *field_serviceReject == *other_value.field_serviceReject;
default:
return FALSE;
}
}

PDU__GMM__AttachAccept& L3__GMM__SGSN__MS::attachAccept()
{
if (union_selection != ALT_attachAccept) {
clean_up();
field_attachAccept = new PDU__GMM__AttachAccept;
union_selection = ALT_attachAccept;
}
return *field_attachAccept;
}

const PDU__GMM__AttachAccept& L3__GMM__SGSN__MS::attachAccept() const
{
if (union_selection != ALT_attachAccept) TTCN_error("Using non-selected field attachAccept in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *field_attachAccept;
}

PDU__GMM__AttachReject& L3__GMM__SGSN__MS::attachReject()
{
if (union_selection != ALT_attachReject) {
clean_up();
field_attachReject = new PDU__GMM__AttachReject;
union_selection = ALT_attachReject;
}
return *field_attachReject;
}

const PDU__GMM__AttachReject& L3__GMM__SGSN__MS::attachReject() const
{
if (union_selection != ALT_attachReject) TTCN_error("Using non-selected field attachReject in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *field_attachReject;
}

PDU__GMM__DetachRequest__SGSN__MS& L3__GMM__SGSN__MS::detachRequest__SGSN__MS()
{
if (union_selection != ALT_detachRequest__SGSN__MS) {
clean_up();
field_detachRequest__SGSN__MS = new PDU__GMM__DetachRequest__SGSN__MS;
union_selection = ALT_detachRequest__SGSN__MS;
}
return *field_detachRequest__SGSN__MS;
}

const PDU__GMM__DetachRequest__SGSN__MS& L3__GMM__SGSN__MS::detachRequest__SGSN__MS() const
{
if (union_selection != ALT_detachRequest__SGSN__MS) TTCN_error("Using non-selected field detachRequest_SGSN_MS in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *field_detachRequest__SGSN__MS;
}

PDU__GMM__DetachAccept__SGSN__MS& L3__GMM__SGSN__MS::detachAccept__SGSN__MS()
{
if (union_selection != ALT_detachAccept__SGSN__MS) {
clean_up();
field_detachAccept__SGSN__MS = new PDU__GMM__DetachAccept__SGSN__MS;
union_selection = ALT_detachAccept__SGSN__MS;
}
return *field_detachAccept__SGSN__MS;
}

const PDU__GMM__DetachAccept__SGSN__MS& L3__GMM__SGSN__MS::detachAccept__SGSN__MS() const
{
if (union_selection != ALT_detachAccept__SGSN__MS) TTCN_error("Using non-selected field detachAccept_SGSN_MS in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *field_detachAccept__SGSN__MS;
}

PDU__GMM__P__TMSIReallocationCommand& L3__GMM__SGSN__MS::p__TMSIReallocationCommand()
{
if (union_selection != ALT_p__TMSIReallocationCommand) {
clean_up();
field_p__TMSIReallocationCommand = new PDU__GMM__P__TMSIReallocationCommand;
union_selection = ALT_p__TMSIReallocationCommand;
}
return *field_p__TMSIReallocationCommand;
}

const PDU__GMM__P__TMSIReallocationCommand& L3__GMM__SGSN__MS::p__TMSIReallocationCommand() const
{
if (union_selection != ALT_p__TMSIReallocationCommand) TTCN_error("Using non-selected field p_TMSIReallocationCommand in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *field_p__TMSIReallocationCommand;
}

PDU__GMM__AuthenticationAndCipheringRequest& L3__GMM__SGSN__MS::authenticationAndCipheringRequest()
{
if (union_selection != ALT_authenticationAndCipheringRequest) {
clean_up();
field_authenticationAndCipheringRequest = new PDU__GMM__AuthenticationAndCipheringRequest;
union_selection = ALT_authenticationAndCipheringRequest;
}
return *field_authenticationAndCipheringRequest;
}

const PDU__GMM__AuthenticationAndCipheringRequest& L3__GMM__SGSN__MS::authenticationAndCipheringRequest() const
{
if (union_selection != ALT_authenticationAndCipheringRequest) TTCN_error("Using non-selected field authenticationAndCipheringRequest in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *field_authenticationAndCipheringRequest;
}

PDU__GMM__AuthenticationAndCipheringReject& L3__GMM__SGSN__MS::authenticationAndCipheringReject()
{
if (union_selection != ALT_authenticationAndCipheringReject) {
clean_up();
field_authenticationAndCipheringReject = new PDU__GMM__AuthenticationAndCipheringReject;
union_selection = ALT_authenticationAndCipheringReject;
}
return *field_authenticationAndCipheringReject;
}

const PDU__GMM__AuthenticationAndCipheringReject& L3__GMM__SGSN__MS::authenticationAndCipheringReject() const
{
if (union_selection != ALT_authenticationAndCipheringReject) TTCN_error("Using non-selected field authenticationAndCipheringReject in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *field_authenticationAndCipheringReject;
}

PDU__GMM__IdentityRequest& L3__GMM__SGSN__MS::identityRequest()
{
if (union_selection != ALT_identityRequest) {
clean_up();
field_identityRequest = new PDU__GMM__IdentityRequest;
union_selection = ALT_identityRequest;
}
return *field_identityRequest;
}

const PDU__GMM__IdentityRequest& L3__GMM__SGSN__MS::identityRequest() const
{
if (union_selection != ALT_identityRequest) TTCN_error("Using non-selected field identityRequest in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *field_identityRequest;
}

PDU__GMM__RoutingAreaUpdateAccept& L3__GMM__SGSN__MS::routingAreaUpdateAccept()
{
if (union_selection != ALT_routingAreaUpdateAccept) {
clean_up();
field_routingAreaUpdateAccept = new PDU__GMM__RoutingAreaUpdateAccept;
union_selection = ALT_routingAreaUpdateAccept;
}
return *field_routingAreaUpdateAccept;
}

const PDU__GMM__RoutingAreaUpdateAccept& L3__GMM__SGSN__MS::routingAreaUpdateAccept() const
{
if (union_selection != ALT_routingAreaUpdateAccept) TTCN_error("Using non-selected field routingAreaUpdateAccept in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *field_routingAreaUpdateAccept;
}

PDU__GMM__RoutingAreaUpdateReject& L3__GMM__SGSN__MS::routingAreaUpdateReject()
{
if (union_selection != ALT_routingAreaUpdateReject) {
clean_up();
field_routingAreaUpdateReject = new PDU__GMM__RoutingAreaUpdateReject;
union_selection = ALT_routingAreaUpdateReject;
}
return *field_routingAreaUpdateReject;
}

const PDU__GMM__RoutingAreaUpdateReject& L3__GMM__SGSN__MS::routingAreaUpdateReject() const
{
if (union_selection != ALT_routingAreaUpdateReject) TTCN_error("Using non-selected field routingAreaUpdateReject in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *field_routingAreaUpdateReject;
}

PDU__GMM__GMM__Status& L3__GMM__SGSN__MS::gMM__Status()
{
if (union_selection != ALT_gMM__Status) {
clean_up();
field_gMM__Status = new PDU__GMM__GMM__Status;
union_selection = ALT_gMM__Status;
}
return *field_gMM__Status;
}

const PDU__GMM__GMM__Status& L3__GMM__SGSN__MS::gMM__Status() const
{
if (union_selection != ALT_gMM__Status) TTCN_error("Using non-selected field gMM_Status in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *field_gMM__Status;
}

PDU__GMM__GMM__Information& L3__GMM__SGSN__MS::gMM__Information()
{
if (union_selection != ALT_gMM__Information) {
clean_up();
field_gMM__Information = new PDU__GMM__GMM__Information;
union_selection = ALT_gMM__Information;
}
return *field_gMM__Information;
}

const PDU__GMM__GMM__Information& L3__GMM__SGSN__MS::gMM__Information() const
{
if (union_selection != ALT_gMM__Information) TTCN_error("Using non-selected field gMM_Information in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *field_gMM__Information;
}

PDU__GMM__ServiceAccept& L3__GMM__SGSN__MS::serviceAccept()
{
if (union_selection != ALT_serviceAccept) {
clean_up();
field_serviceAccept = new PDU__GMM__ServiceAccept;
union_selection = ALT_serviceAccept;
}
return *field_serviceAccept;
}

const PDU__GMM__ServiceAccept& L3__GMM__SGSN__MS::serviceAccept() const
{
if (union_selection != ALT_serviceAccept) TTCN_error("Using non-selected field serviceAccept in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *field_serviceAccept;
}

PDU__GMM__ServiceReject& L3__GMM__SGSN__MS::serviceReject()
{
if (union_selection != ALT_serviceReject) {
clean_up();
field_serviceReject = new PDU__GMM__ServiceReject;
union_selection = ALT_serviceReject;
}
return *field_serviceReject;
}

const PDU__GMM__ServiceReject& L3__GMM__SGSN__MS::serviceReject() const
{
if (union_selection != ALT_serviceReject) TTCN_error("Using non-selected field serviceReject in a value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *field_serviceReject;
}

boolean L3__GMM__SGSN__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_GMM_SM_Types.L3_GMM_SGSN_MS.");
return union_selection == checked_selection;
}

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

boolean L3__GMM__SGSN__MS::is_value() const
{
switch (union_selection) {
case UNBOUND_VALUE: return FALSE;
case ALT_attachAccept: return field_attachAccept->is_value();
case ALT_attachReject: return field_attachReject->is_value();
case ALT_detachRequest__SGSN__MS: return field_detachRequest__SGSN__MS->is_value();
case ALT_detachAccept__SGSN__MS: return field_detachAccept__SGSN__MS->is_value();
case ALT_p__TMSIReallocationCommand: return field_p__TMSIReallocationCommand->is_value();
case ALT_authenticationAndCipheringRequest: return field_authenticationAndCipheringRequest->is_value();
case ALT_authenticationAndCipheringReject: return field_authenticationAndCipheringReject->is_value();
case ALT_identityRequest: return field_identityRequest->is_value();
case ALT_routingAreaUpdateAccept: return field_routingAreaUpdateAccept->is_value();
case ALT_routingAreaUpdateReject: return field_routingAreaUpdateReject->is_value();
case ALT_gMM__Status: return field_gMM__Status->is_value();
case ALT_gMM__Information: return field_gMM__Information->is_value();
case ALT_serviceAccept: return field_serviceAccept->is_value();
case ALT_serviceReject: return field_serviceReject->is_value();
default: TTCN_error("Invalid selection in union is_bound");}
}

void L3__GMM__SGSN__MS::clean_up()
{
switch (union_selection) {
case ALT_attachAccept:
  delete field_attachAccept;
  break;
case ALT_attachReject:
  delete field_attachReject;
  break;
case ALT_detachRequest__SGSN__MS:
  delete field_detachRequest__SGSN__MS;
  break;
case ALT_detachAccept__SGSN__MS:
  delete field_detachAccept__SGSN__MS;
  break;
case ALT_p__TMSIReallocationCommand:
  delete field_p__TMSIReallocationCommand;
  break;
case ALT_authenticationAndCipheringRequest:
  delete field_authenticationAndCipheringRequest;
  break;
case ALT_authenticationAndCipheringReject:
  delete field_authenticationAndCipheringReject;
  break;
case ALT_identityRequest:
  delete field_identityRequest;
  break;
case ALT_routingAreaUpdateAccept:
  delete field_routingAreaUpdateAccept;
  break;
case ALT_routingAreaUpdateReject:
  delete field_routingAreaUpdateReject;
  break;
case ALT_gMM__Status:
  delete field_gMM__Status;
  break;
case ALT_gMM__Information:
  delete field_gMM__Information;
  break;
case ALT_serviceAccept:
  delete field_serviceAccept;
  break;
case ALT_serviceReject:
  delete field_serviceReject;
  break;
default:
  break;
}
union_selection = UNBOUND_VALUE;
}

void L3__GMM__SGSN__MS::log() const
{
switch (union_selection) {
case ALT_attachAccept:
TTCN_Logger::log_event_str("{ attachAccept := ");
field_attachAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_attachReject:
TTCN_Logger::log_event_str("{ attachReject := ");
field_attachReject->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_detachRequest__SGSN__MS:
TTCN_Logger::log_event_str("{ detachRequest_SGSN_MS := ");
field_detachRequest__SGSN__MS->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_detachAccept__SGSN__MS:
TTCN_Logger::log_event_str("{ detachAccept_SGSN_MS := ");
field_detachAccept__SGSN__MS->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_p__TMSIReallocationCommand:
TTCN_Logger::log_event_str("{ p_TMSIReallocationCommand := ");
field_p__TMSIReallocationCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_authenticationAndCipheringRequest:
TTCN_Logger::log_event_str("{ authenticationAndCipheringRequest := ");
field_authenticationAndCipheringRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_authenticationAndCipheringReject:
TTCN_Logger::log_event_str("{ authenticationAndCipheringReject := ");
field_authenticationAndCipheringReject->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_identityRequest:
TTCN_Logger::log_event_str("{ identityRequest := ");
field_identityRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_routingAreaUpdateAccept:
TTCN_Logger::log_event_str("{ routingAreaUpdateAccept := ");
field_routingAreaUpdateAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_routingAreaUpdateReject:
TTCN_Logger::log_event_str("{ routingAreaUpdateReject := ");
field_routingAreaUpdateReject->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_gMM__Status:
TTCN_Logger::log_event_str("{ gMM_Status := ");
field_gMM__Status->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_gMM__Information:
TTCN_Logger::log_event_str("{ gMM_Information := ");
field_gMM__Information->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_serviceAccept:
TTCN_Logger::log_event_str("{ serviceAccept := ");
field_serviceAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case ALT_serviceReject:
TTCN_Logger::log_event_str("{ serviceReject := ");
field_serviceReject->log();
TTCN_Logger::log_event_str(" }");
break;
default:
TTCN_Logger::log_event_unbound();
}
}

void L3__GMM__SGSN__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, "attachAccept")) {
    attachAccept().set_param(*mp_last);
    if (!attachAccept().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "attachReject")) {
    attachReject().set_param(*mp_last);
    if (!attachReject().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "detachRequest_SGSN_MS")) {
    detachRequest__SGSN__MS().set_param(*mp_last);
    if (!detachRequest__SGSN__MS().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "detachAccept_SGSN_MS")) {
    detachAccept__SGSN__MS().set_param(*mp_last);
    if (!detachAccept__SGSN__MS().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "p_TMSIReallocationCommand")) {
    p__TMSIReallocationCommand().set_param(*mp_last);
    if (!p__TMSIReallocationCommand().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "authenticationAndCipheringRequest")) {
    authenticationAndCipheringRequest().set_param(*mp_last);
    if (!authenticationAndCipheringRequest().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "authenticationAndCipheringReject")) {
    authenticationAndCipheringReject().set_param(*mp_last);
    if (!authenticationAndCipheringReject().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "identityRequest")) {
    identityRequest().set_param(*mp_last);
    if (!identityRequest().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "routingAreaUpdateAccept")) {
    routingAreaUpdateAccept().set_param(*mp_last);
    if (!routingAreaUpdateAccept().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "routingAreaUpdateReject")) {
    routingAreaUpdateReject().set_param(*mp_last);
    if (!routingAreaUpdateReject().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "gMM_Status")) {
    gMM__Status().set_param(*mp_last);
    if (!gMM__Status().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "gMM_Information")) {
    gMM__Information().set_param(*mp_last);
    if (!gMM__Information().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "serviceAccept")) {
    serviceAccept().set_param(*mp_last);
    if (!serviceAccept().is_bound()) clean_up();
    return;
  }
  if (!strcmp(last_name, "serviceReject")) {
    serviceReject().set_param(*mp_last);
    if (!serviceReject().is_bound()) clean_up();
    return;
  }
  mp_last->error("Field %s does not exist in type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.", last_name);
}

void L3__GMM__SGSN__MS::set_implicit_omit()
{
switch (union_selection) {
case ALT_attachAccept:
field_attachAccept->set_implicit_omit(); break;
case ALT_attachReject:
field_attachReject->set_implicit_omit(); break;
case ALT_detachRequest__SGSN__MS:
field_detachRequest__SGSN__MS->set_implicit_omit(); break;
case ALT_detachAccept__SGSN__MS:
field_detachAccept__SGSN__MS->set_implicit_omit(); break;
case ALT_p__TMSIReallocationCommand:
field_p__TMSIReallocationCommand->set_implicit_omit(); break;
case ALT_authenticationAndCipheringRequest:
field_authenticationAndCipheringRequest->set_implicit_omit(); break;
case ALT_authenticationAndCipheringReject:
field_authenticationAndCipheringReject->set_implicit_omit(); break;
case ALT_identityRequest:
field_identityRequest->set_implicit_omit(); break;
case ALT_routingAreaUpdateAccept:
field_routingAreaUpdateAccept->set_implicit_omit(); break;
case ALT_routingAreaUpdateReject:
field_routingAreaUpdateReject->set_implicit_omit(); break;
case ALT_gMM__Status:
field_gMM__Status->set_implicit_omit(); break;
case ALT_gMM__Information:
field_gMM__Information->set_implicit_omit(); break;
case ALT_serviceAccept:
field_serviceAccept->set_implicit_omit(); break;
case ALT_serviceReject:
field_serviceReject->set_implicit_omit(); break;
default: break;
}
}

void L3__GMM__SGSN__MS::encode_text(Text_Buf& text_buf) const
{
text_buf.push_int(union_selection);
switch (union_selection) {
case ALT_attachAccept:
field_attachAccept->encode_text(text_buf);
break;
case ALT_attachReject:
field_attachReject->encode_text(text_buf);
break;
case ALT_detachRequest__SGSN__MS:
field_detachRequest__SGSN__MS->encode_text(text_buf);
break;
case ALT_detachAccept__SGSN__MS:
field_detachAccept__SGSN__MS->encode_text(text_buf);
break;
case ALT_p__TMSIReallocationCommand:
field_p__TMSIReallocationCommand->encode_text(text_buf);
break;
case ALT_authenticationAndCipheringRequest:
field_authenticationAndCipheringRequest->encode_text(text_buf);
break;
case ALT_authenticationAndCipheringReject:
field_authenticationAndCipheringReject->encode_text(text_buf);
break;
case ALT_identityRequest:
field_identityRequest->encode_text(text_buf);
break;
case ALT_routingAreaUpdateAccept:
field_routingAreaUpdateAccept->encode_text(text_buf);
break;
case ALT_routingAreaUpdateReject:
field_routingAreaUpdateReject->encode_text(text_buf);
break;
case ALT_gMM__Status:
field_gMM__Status->encode_text(text_buf);
break;
case ALT_gMM__Information:
field_gMM__Information->encode_text(text_buf);
break;
case ALT_serviceAccept:
field_serviceAccept->encode_text(text_buf);
break;
case ALT_serviceReject:
field_serviceReject->encode_text(text_buf);
break;
default:
TTCN_error("Text encoder: Encoding an unbound value of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
}
}

void L3__GMM__SGSN__MS::decode_text(Text_Buf& text_buf)
{
switch ((union_selection_type)text_buf.pull_int().get_val()) {
case ALT_attachAccept:
attachAccept().decode_text(text_buf);
break;
case ALT_attachReject:
attachReject().decode_text(text_buf);
break;
case ALT_detachRequest__SGSN__MS:
detachRequest__SGSN__MS().decode_text(text_buf);
break;
case ALT_detachAccept__SGSN__MS:
detachAccept__SGSN__MS().decode_text(text_buf);
break;
case ALT_p__TMSIReallocationCommand:
p__TMSIReallocationCommand().decode_text(text_buf);
break;
case ALT_authenticationAndCipheringRequest:
authenticationAndCipheringRequest().decode_text(text_buf);
break;
case ALT_authenticationAndCipheringReject:
authenticationAndCipheringReject().decode_text(text_buf);
break;
case ALT_identityRequest:
identityRequest().decode_text(text_buf);
break;
case ALT_routingAreaUpdateAccept:
routingAreaUpdateAccept().decode_text(text_buf);
break;
case ALT_routingAreaUpdateReject:
routingAreaUpdateReject().decode_text(text_buf);
break;
case ALT_gMM__Status:
gMM__Status().decode_text(text_buf);
break;
case ALT_gMM__Information:
gMM__Information().decode_text(text_buf);
break;
case ALT_serviceAccept:
serviceAccept().decode_text(text_buf);
break;
case ALT_serviceReject:
serviceReject().decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
}
}

void L3__GMM__SGSN__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;}
  default:
    TTCN_error("Unknown coding method requested to encode type '%s'", p_td.name);
  }
  va_end(pvar);
}

void L3__GMM__SGSN__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;}
  default:
    TTCN_error("Unknown coding method requested to decode type '%s'", p_td.name);
  }
  va_end(pvar);
}

int L3__GMM__SGSN__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__GMM__AttachAccept_descr_.raw->forceomit);
      decoded_length = attachAccept().RAW_decode(PDU__GMM__AttachAccept_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__GMM__AttachReject_descr_.raw->forceomit);
      decoded_length = attachReject().RAW_decode(PDU__GMM__AttachReject_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__GMM__DetachRequest__SGSN__MS_descr_.raw->forceomit);
      decoded_length = detachRequest__SGSN__MS().RAW_decode(PDU__GMM__DetachRequest__SGSN__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__GMM__DetachAccept__SGSN__MS_descr_.raw->forceomit);
      decoded_length = detachAccept__SGSN__MS().RAW_decode(PDU__GMM__DetachAccept__SGSN__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__GMM__P__TMSIReallocationCommand_descr_.raw->forceomit);
      decoded_length = p__TMSIReallocationCommand().RAW_decode(PDU__GMM__P__TMSIReallocationCommand_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__GMM__AuthenticationAndCipheringRequest_descr_.raw->forceomit);
      decoded_length = authenticationAndCipheringRequest().RAW_decode(PDU__GMM__AuthenticationAndCipheringRequest_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__GMM__AuthenticationAndCipheringReject_descr_.raw->forceomit);
      decoded_length = authenticationAndCipheringReject().RAW_decode(PDU__GMM__AuthenticationAndCipheringReject_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__GMM__IdentityRequest_descr_.raw->forceomit);
      decoded_length = identityRequest().RAW_decode(PDU__GMM__IdentityRequest_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__GMM__RoutingAreaUpdateAccept_descr_.raw->forceomit);
      decoded_length = routingAreaUpdateAccept().RAW_decode(PDU__GMM__RoutingAreaUpdateAccept_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__GMM__RoutingAreaUpdateReject_descr_.raw->forceomit);
      decoded_length = routingAreaUpdateReject().RAW_decode(PDU__GMM__RoutingAreaUpdateReject_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__GMM__GMM__Status_descr_.raw->forceomit);
      decoded_length = gMM__Status().RAW_decode(PDU__GMM__GMM__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__GMM__GMM__Information_descr_.raw->forceomit);
      decoded_length = gMM__Information().RAW_decode(PDU__GMM__GMM__Information_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__GMM__ServiceAccept_descr_.raw->forceomit);
      decoded_length = serviceAccept().RAW_decode(PDU__GMM__ServiceAccept_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__GMM__ServiceReject_descr_.raw->forceomit);
      decoded_length = serviceReject().RAW_decode(PDU__GMM__ServiceReject_descr_, p_buf, limit, top_bit_ord, no_err, -1, TRUE, &field_force_omit);
      break; }
    default: break;
    }
    return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
  } else {
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_0_force_omit(0, force_omit, PDU__GMM__AttachAccept_descr_.raw->forceomit);
      decoded_length = attachAccept().RAW_decode(PDU__GMM__AttachAccept_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_0_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_1_force_omit(1, force_omit, PDU__GMM__AttachReject_descr_.raw->forceomit);
      decoded_length = attachReject().RAW_decode(PDU__GMM__AttachReject_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_1_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_2_force_omit(2, force_omit, PDU__GMM__DetachRequest__SGSN__MS_descr_.raw->forceomit);
      decoded_length = detachRequest__SGSN__MS().RAW_decode(PDU__GMM__DetachRequest__SGSN__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_2_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_3_force_omit(3, force_omit, PDU__GMM__DetachAccept__SGSN__MS_descr_.raw->forceomit);
      decoded_length = detachAccept__SGSN__MS().RAW_decode(PDU__GMM__DetachAccept__SGSN__MS_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_3_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_4_force_omit(4, force_omit, PDU__GMM__P__TMSIReallocationCommand_descr_.raw->forceomit);
      decoded_length = p__TMSIReallocationCommand().RAW_decode(PDU__GMM__P__TMSIReallocationCommand_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_4_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_5_force_omit(5, force_omit, PDU__GMM__AuthenticationAndCipheringRequest_descr_.raw->forceomit);
      decoded_length = authenticationAndCipheringRequest().RAW_decode(PDU__GMM__AuthenticationAndCipheringRequest_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_5_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_6_force_omit(6, force_omit, PDU__GMM__AuthenticationAndCipheringReject_descr_.raw->forceomit);
      decoded_length = authenticationAndCipheringReject().RAW_decode(PDU__GMM__AuthenticationAndCipheringReject_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_6_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_7_force_omit(7, force_omit, PDU__GMM__IdentityRequest_descr_.raw->forceomit);
      decoded_length = identityRequest().RAW_decode(PDU__GMM__IdentityRequest_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_7_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_8_force_omit(8, force_omit, PDU__GMM__RoutingAreaUpdateAccept_descr_.raw->forceomit);
      decoded_length = routingAreaUpdateAccept().RAW_decode(PDU__GMM__RoutingAreaUpdateAccept_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_8_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_9_force_omit(9, force_omit, PDU__GMM__RoutingAreaUpdateReject_descr_.raw->forceomit);
      decoded_length = routingAreaUpdateReject().RAW_decode(PDU__GMM__RoutingAreaUpdateReject_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_9_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_10_force_omit(10, force_omit, PDU__GMM__GMM__Status_descr_.raw->forceomit);
      decoded_length = gMM__Status().RAW_decode(PDU__GMM__GMM__Status_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_10_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_11_force_omit(11, force_omit, PDU__GMM__GMM__Information_descr_.raw->forceomit);
      decoded_length = gMM__Information().RAW_decode(PDU__GMM__GMM__Information_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_11_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_12_force_omit(12, force_omit, PDU__GMM__ServiceAccept_descr_.raw->forceomit);
      decoded_length = serviceAccept().RAW_decode(PDU__GMM__ServiceAccept_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_12_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
      p_buf.set_pos_bit(starting_pos);
      RAW_Force_Omit field_13_force_omit(13, force_omit, PDU__GMM__ServiceReject_descr_.raw->forceomit);
      decoded_length = serviceReject().RAW_decode(PDU__GMM__ServiceReject_descr_, p_buf, limit, top_bit_ord, TRUE, -1, TRUE, &field_13_force_omit);
      if (decoded_length >= 0) {
         return decoded_length + p_buf.increase_pos_padd(p_td.raw->padding) + prepaddlength;
       }
 }
 clean_up();
 return -1;
}

int L3__GMM__SGSN__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 = 14;  myleaf.body.node.nodes = init_nodes_of_enc_tree(14);
  memset(myleaf.body.node.nodes, 0, 14 * sizeof(RAW_enc_tree *));
  switch (union_selection) {
  case ALT_attachAccept:
    myleaf.body.node.nodes[0] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 0, PDU__GMM__AttachAccept_descr_.raw);
    encoded_length = field_attachAccept->RAW_encode(PDU__GMM__AttachAccept_descr_, *myleaf.body.node.nodes[0]);
    myleaf.body.node.nodes[0]->coding_descr = &PDU__GMM__AttachAccept_descr_;
    break;
  case ALT_attachReject:
    myleaf.body.node.nodes[1] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 1, PDU__GMM__AttachReject_descr_.raw);
    encoded_length = field_attachReject->RAW_encode(PDU__GMM__AttachReject_descr_, *myleaf.body.node.nodes[1]);
    myleaf.body.node.nodes[1]->coding_descr = &PDU__GMM__AttachReject_descr_;
    break;
  case ALT_detachRequest__SGSN__MS:
    myleaf.body.node.nodes[2] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 2, PDU__GMM__DetachRequest__SGSN__MS_descr_.raw);
    encoded_length = field_detachRequest__SGSN__MS->RAW_encode(PDU__GMM__DetachRequest__SGSN__MS_descr_, *myleaf.body.node.nodes[2]);
    myleaf.body.node.nodes[2]->coding_descr = &PDU__GMM__DetachRequest__SGSN__MS_descr_;
    break;
  case ALT_detachAccept__SGSN__MS:
    myleaf.body.node.nodes[3] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 3, PDU__GMM__DetachAccept__SGSN__MS_descr_.raw);
    encoded_length = field_detachAccept__SGSN__MS->RAW_encode(PDU__GMM__DetachAccept__SGSN__MS_descr_, *myleaf.body.node.nodes[3]);
    myleaf.body.node.nodes[3]->coding_descr = &PDU__GMM__DetachAccept__SGSN__MS_descr_;
    break;
  case ALT_p__TMSIReallocationCommand:
    myleaf.body.node.nodes[4] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 4, PDU__GMM__P__TMSIReallocationCommand_descr_.raw);
    encoded_length = field_p__TMSIReallocationCommand->RAW_encode(PDU__GMM__P__TMSIReallocationCommand_descr_, *myleaf.body.node.nodes[4]);
    myleaf.body.node.nodes[4]->coding_descr = &PDU__GMM__P__TMSIReallocationCommand_descr_;
    break;
  case ALT_authenticationAndCipheringRequest:
    myleaf.body.node.nodes[5] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 5, PDU__GMM__AuthenticationAndCipheringRequest_descr_.raw);
    encoded_length = field_authenticationAndCipheringRequest->RAW_encode(PDU__GMM__AuthenticationAndCipheringRequest_descr_, *myleaf.body.node.nodes[5]);
    myleaf.body.node.nodes[5]->coding_descr = &PDU__GMM__AuthenticationAndCipheringRequest_descr_;
    break;
  case ALT_authenticationAndCipheringReject:
    myleaf.body.node.nodes[6] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 6, PDU__GMM__AuthenticationAndCipheringReject_descr_.raw);
    encoded_length = field_authenticationAndCipheringReject->RAW_encode(PDU__GMM__AuthenticationAndCipheringReject_descr_, *myleaf.body.node.nodes[6]);
    myleaf.body.node.nodes[6]->coding_descr = &PDU__GMM__AuthenticationAndCipheringReject_descr_;
    break;
  case ALT_identityRequest:
    myleaf.body.node.nodes[7] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 7, PDU__GMM__IdentityRequest_descr_.raw);
    encoded_length = field_identityRequest->RAW_encode(PDU__GMM__IdentityRequest_descr_, *myleaf.body.node.nodes[7]);
    myleaf.body.node.nodes[7]->coding_descr = &PDU__GMM__IdentityRequest_descr_;
    break;
  case ALT_routingAreaUpdateAccept:
    myleaf.body.node.nodes[8] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 8, PDU__GMM__RoutingAreaUpdateAccept_descr_.raw);
    encoded_length = field_routingAreaUpdateAccept->RAW_encode(PDU__GMM__RoutingAreaUpdateAccept_descr_, *myleaf.body.node.nodes[8]);
    myleaf.body.node.nodes[8]->coding_descr = &PDU__GMM__RoutingAreaUpdateAccept_descr_;
    break;
  case ALT_routingAreaUpdateReject:
    myleaf.body.node.nodes[9] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 9, PDU__GMM__RoutingAreaUpdateReject_descr_.raw);
    encoded_length = field_routingAreaUpdateReject->RAW_encode(PDU__GMM__RoutingAreaUpdateReject_descr_, *myleaf.body.node.nodes[9]);
    myleaf.body.node.nodes[9]->coding_descr = &PDU__GMM__RoutingAreaUpdateReject_descr_;
    break;
  case ALT_gMM__Status:
    myleaf.body.node.nodes[10] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 10, PDU__GMM__GMM__Status_descr_.raw);
    encoded_length = field_gMM__Status->RAW_encode(PDU__GMM__GMM__Status_descr_, *myleaf.body.node.nodes[10]);
    myleaf.body.node.nodes[10]->coding_descr = &PDU__GMM__GMM__Status_descr_;
    break;
  case ALT_gMM__Information:
    myleaf.body.node.nodes[11] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 11, PDU__GMM__GMM__Information_descr_.raw);
    encoded_length = field_gMM__Information->RAW_encode(PDU__GMM__GMM__Information_descr_, *myleaf.body.node.nodes[11]);
    myleaf.body.node.nodes[11]->coding_descr = &PDU__GMM__GMM__Information_descr_;
    break;
  case ALT_serviceAccept:
    myleaf.body.node.nodes[12] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 12, PDU__GMM__ServiceAccept_descr_.raw);
    encoded_length = field_serviceAccept->RAW_encode(PDU__GMM__ServiceAccept_descr_, *myleaf.body.node.nodes[12]);
    myleaf.body.node.nodes[12]->coding_descr = &PDU__GMM__ServiceAccept_descr_;
    break;
  case ALT_serviceReject:
    myleaf.body.node.nodes[13] = new RAW_enc_tree(TRUE, &myleaf, &myleaf.curr_pos, 13, PDU__GMM__ServiceReject_descr_.raw);
    encoded_length = field_serviceReject->RAW_encode(PDU__GMM__ServiceReject_descr_, *myleaf.body.node.nodes[13]);
    myleaf.body.node.nodes[13]->coding_descr = &PDU__GMM__ServiceReject_descr_;
    break;
  default:
    TTCN_EncDec_ErrorContext::error(TTCN_EncDec::ET_UNBOUND, "Encoding an unbound value.");
  }
  return encoded_length;
}

void L3__GMM__SGSN__MS_template::copy_value(const L3__GMM__SGSN__MS& other_value)
{
single_value.union_selection = other_value.get_selection();
switch (single_value.union_selection) {
case L3__GMM__SGSN__MS::ALT_attachAccept:
single_value.field_attachAccept = new PDU__GMM__AttachAccept_template(other_value.attachAccept());
break;
case L3__GMM__SGSN__MS::ALT_attachReject:
single_value.field_attachReject = new PDU__GMM__AttachReject_template(other_value.attachReject());
break;
case L3__GMM__SGSN__MS::ALT_detachRequest__SGSN__MS:
single_value.field_detachRequest__SGSN__MS = new PDU__GMM__DetachRequest__SGSN__MS_template(other_value.detachRequest__SGSN__MS());
break;
case L3__GMM__SGSN__MS::ALT_detachAccept__SGSN__MS:
single_value.field_detachAccept__SGSN__MS = new PDU__GMM__DetachAccept__SGSN__MS_template(other_value.detachAccept__SGSN__MS());
break;
case L3__GMM__SGSN__MS::ALT_p__TMSIReallocationCommand:
single_value.field_p__TMSIReallocationCommand = new PDU__GMM__P__TMSIReallocationCommand_template(other_value.p__TMSIReallocationCommand());
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringRequest:
single_value.field_authenticationAndCipheringRequest = new PDU__GMM__AuthenticationAndCipheringRequest_template(other_value.authenticationAndCipheringRequest());
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringReject:
single_value.field_authenticationAndCipheringReject = new PDU__GMM__AuthenticationAndCipheringReject_template(other_value.authenticationAndCipheringReject());
break;
case L3__GMM__SGSN__MS::ALT_identityRequest:
single_value.field_identityRequest = new PDU__GMM__IdentityRequest_template(other_value.identityRequest());
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateAccept:
single_value.field_routingAreaUpdateAccept = new PDU__GMM__RoutingAreaUpdateAccept_template(other_value.routingAreaUpdateAccept());
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateReject:
single_value.field_routingAreaUpdateReject = new PDU__GMM__RoutingAreaUpdateReject_template(other_value.routingAreaUpdateReject());
break;
case L3__GMM__SGSN__MS::ALT_gMM__Status:
single_value.field_gMM__Status = new PDU__GMM__GMM__Status_template(other_value.gMM__Status());
break;
case L3__GMM__SGSN__MS::ALT_gMM__Information:
single_value.field_gMM__Information = new PDU__GMM__GMM__Information_template(other_value.gMM__Information());
break;
case L3__GMM__SGSN__MS::ALT_serviceAccept:
single_value.field_serviceAccept = new PDU__GMM__ServiceAccept_template(other_value.serviceAccept());
break;
case L3__GMM__SGSN__MS::ALT_serviceReject:
single_value.field_serviceReject = new PDU__GMM__ServiceReject_template(other_value.serviceReject());
break;
default:
TTCN_error("Initializing a template with an unbound value of type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
}
set_selection(SPECIFIC_VALUE);
}

void L3__GMM__SGSN__MS_template::copy_template(const L3__GMM__SGSN__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 L3__GMM__SGSN__MS::ALT_attachAccept:
single_value.field_attachAccept = new PDU__GMM__AttachAccept_template(*other_value.single_value.field_attachAccept);
break;
case L3__GMM__SGSN__MS::ALT_attachReject:
single_value.field_attachReject = new PDU__GMM__AttachReject_template(*other_value.single_value.field_attachReject);
break;
case L3__GMM__SGSN__MS::ALT_detachRequest__SGSN__MS:
single_value.field_detachRequest__SGSN__MS = new PDU__GMM__DetachRequest__SGSN__MS_template(*other_value.single_value.field_detachRequest__SGSN__MS);
break;
case L3__GMM__SGSN__MS::ALT_detachAccept__SGSN__MS:
single_value.field_detachAccept__SGSN__MS = new PDU__GMM__DetachAccept__SGSN__MS_template(*other_value.single_value.field_detachAccept__SGSN__MS);
break;
case L3__GMM__SGSN__MS::ALT_p__TMSIReallocationCommand:
single_value.field_p__TMSIReallocationCommand = new PDU__GMM__P__TMSIReallocationCommand_template(*other_value.single_value.field_p__TMSIReallocationCommand);
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringRequest:
single_value.field_authenticationAndCipheringRequest = new PDU__GMM__AuthenticationAndCipheringRequest_template(*other_value.single_value.field_authenticationAndCipheringRequest);
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringReject:
single_value.field_authenticationAndCipheringReject = new PDU__GMM__AuthenticationAndCipheringReject_template(*other_value.single_value.field_authenticationAndCipheringReject);
break;
case L3__GMM__SGSN__MS::ALT_identityRequest:
single_value.field_identityRequest = new PDU__GMM__IdentityRequest_template(*other_value.single_value.field_identityRequest);
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateAccept:
single_value.field_routingAreaUpdateAccept = new PDU__GMM__RoutingAreaUpdateAccept_template(*other_value.single_value.field_routingAreaUpdateAccept);
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateReject:
single_value.field_routingAreaUpdateReject = new PDU__GMM__RoutingAreaUpdateReject_template(*other_value.single_value.field_routingAreaUpdateReject);
break;
case L3__GMM__SGSN__MS::ALT_gMM__Status:
single_value.field_gMM__Status = new PDU__GMM__GMM__Status_template(*other_value.single_value.field_gMM__Status);
break;
case L3__GMM__SGSN__MS::ALT_gMM__Information:
single_value.field_gMM__Information = new PDU__GMM__GMM__Information_template(*other_value.single_value.field_gMM__Information);
break;
case L3__GMM__SGSN__MS::ALT_serviceAccept:
single_value.field_serviceAccept = new PDU__GMM__ServiceAccept_template(*other_value.single_value.field_serviceAccept);
break;
case L3__GMM__SGSN__MS::ALT_serviceReject:
single_value.field_serviceReject = new PDU__GMM__ServiceReject_template(*other_value.single_value.field_serviceReject);
break;
default:
TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_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 L3__GMM__SGSN__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 L3__GMM__SGSN__MS_template(*other_value.implication_.precondition);
implication_.implied_template = new L3__GMM__SGSN__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_GMM_SM_Types.L3_GMM_SGSN_MS.");
}
set_selection(other_value);
}

L3__GMM__SGSN__MS_template::L3__GMM__SGSN__MS_template()
{
}

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

L3__GMM__SGSN__MS_template::L3__GMM__SGSN__MS_template(const L3__GMM__SGSN__MS& other_value)
{
copy_value(other_value);
}

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

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

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

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

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

void L3__GMM__SGSN__MS_template::clean_up()
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case L3__GMM__SGSN__MS::ALT_attachAccept:
delete single_value.field_attachAccept;
break;
case L3__GMM__SGSN__MS::ALT_attachReject:
delete single_value.field_attachReject;
break;
case L3__GMM__SGSN__MS::ALT_detachRequest__SGSN__MS:
delete single_value.field_detachRequest__SGSN__MS;
break;
case L3__GMM__SGSN__MS::ALT_detachAccept__SGSN__MS:
delete single_value.field_detachAccept__SGSN__MS;
break;
case L3__GMM__SGSN__MS::ALT_p__TMSIReallocationCommand:
delete single_value.field_p__TMSIReallocationCommand;
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringRequest:
delete single_value.field_authenticationAndCipheringRequest;
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringReject:
delete single_value.field_authenticationAndCipheringReject;
break;
case L3__GMM__SGSN__MS::ALT_identityRequest:
delete single_value.field_identityRequest;
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateAccept:
delete single_value.field_routingAreaUpdateAccept;
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateReject:
delete single_value.field_routingAreaUpdateReject;
break;
case L3__GMM__SGSN__MS::ALT_gMM__Status:
delete single_value.field_gMM__Status;
break;
case L3__GMM__SGSN__MS::ALT_gMM__Information:
delete single_value.field_gMM__Information;
break;
case L3__GMM__SGSN__MS::ALT_serviceAccept:
delete single_value.field_serviceAccept;
break;
case L3__GMM__SGSN__MS::ALT_serviceReject:
delete single_value.field_serviceReject;
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;
}

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

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

L3__GMM__SGSN__MS_template& L3__GMM__SGSN__MS_template::operator=(const OPTIONAL<L3__GMM__SGSN__MS>& other_value)
{
clean_up();
switch (other_value.get_selection()) {
case OPTIONAL_PRESENT:
copy_value((const L3__GMM__SGSN__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_GMM_SM_Types.L3_GMM_SGSN_MS.");
}
return *this;
}

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

boolean L3__GMM__SGSN__MS_template::match(const L3__GMM__SGSN__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:
{
L3__GMM__SGSN__MS::union_selection_type value_selection = other_value.get_selection();
if (value_selection == L3__GMM__SGSN__MS::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case L3__GMM__SGSN__MS::ALT_attachAccept:
return single_value.field_attachAccept->match(other_value.attachAccept(), legacy);
case L3__GMM__SGSN__MS::ALT_attachReject:
return single_value.field_attachReject->match(other_value.attachReject(), legacy);
case L3__GMM__SGSN__MS::ALT_detachRequest__SGSN__MS:
return single_value.field_detachRequest__SGSN__MS->match(other_value.detachRequest__SGSN__MS(), legacy);
case L3__GMM__SGSN__MS::ALT_detachAccept__SGSN__MS:
return single_value.field_detachAccept__SGSN__MS->match(other_value.detachAccept__SGSN__MS(), legacy);
case L3__GMM__SGSN__MS::ALT_p__TMSIReallocationCommand:
return single_value.field_p__TMSIReallocationCommand->match(other_value.p__TMSIReallocationCommand(), legacy);
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringRequest:
return single_value.field_authenticationAndCipheringRequest->match(other_value.authenticationAndCipheringRequest(), legacy);
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringReject:
return single_value.field_authenticationAndCipheringReject->match(other_value.authenticationAndCipheringReject(), legacy);
case L3__GMM__SGSN__MS::ALT_identityRequest:
return single_value.field_identityRequest->match(other_value.identityRequest(), legacy);
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateAccept:
return single_value.field_routingAreaUpdateAccept->match(other_value.routingAreaUpdateAccept(), legacy);
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateReject:
return single_value.field_routingAreaUpdateReject->match(other_value.routingAreaUpdateReject(), legacy);
case L3__GMM__SGSN__MS::ALT_gMM__Status:
return single_value.field_gMM__Status->match(other_value.gMM__Status(), legacy);
case L3__GMM__SGSN__MS::ALT_gMM__Information:
return single_value.field_gMM__Information->match(other_value.gMM__Information(), legacy);
case L3__GMM__SGSN__MS::ALT_serviceAccept:
return single_value.field_serviceAccept->match(other_value.serviceAccept(), legacy);
case L3__GMM__SGSN__MS::ALT_serviceReject:
return single_value.field_serviceReject->match(other_value.serviceReject(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_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_GMM_SM_Types.L3_GMM_SGSN_MS.");
}
return FALSE;
}

boolean L3__GMM__SGSN__MS_template::is_value() const
{
if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE;
switch (single_value.union_selection) {
case L3__GMM__SGSN__MS::ALT_attachAccept:
return single_value.field_attachAccept->is_value();
case L3__GMM__SGSN__MS::ALT_attachReject:
return single_value.field_attachReject->is_value();
case L3__GMM__SGSN__MS::ALT_detachRequest__SGSN__MS:
return single_value.field_detachRequest__SGSN__MS->is_value();
case L3__GMM__SGSN__MS::ALT_detachAccept__SGSN__MS:
return single_value.field_detachAccept__SGSN__MS->is_value();
case L3__GMM__SGSN__MS::ALT_p__TMSIReallocationCommand:
return single_value.field_p__TMSIReallocationCommand->is_value();
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringRequest:
return single_value.field_authenticationAndCipheringRequest->is_value();
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringReject:
return single_value.field_authenticationAndCipheringReject->is_value();
case L3__GMM__SGSN__MS::ALT_identityRequest:
return single_value.field_identityRequest->is_value();
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateAccept:
return single_value.field_routingAreaUpdateAccept->is_value();
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateReject:
return single_value.field_routingAreaUpdateReject->is_value();
case L3__GMM__SGSN__MS::ALT_gMM__Status:
return single_value.field_gMM__Status->is_value();
case L3__GMM__SGSN__MS::ALT_gMM__Information:
return single_value.field_gMM__Information->is_value();
case L3__GMM__SGSN__MS::ALT_serviceAccept:
return single_value.field_serviceAccept->is_value();
case L3__GMM__SGSN__MS::ALT_serviceReject:
return single_value.field_serviceReject->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_GMM_SM_Types.L3_GMM_SGSN_MS.");
}
}

L3__GMM__SGSN__MS L3__GMM__SGSN__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_GMM_SM_Types.L3_GMM_SGSN_MS.");
L3__GMM__SGSN__MS ret_val;
switch (single_value.union_selection) {
case L3__GMM__SGSN__MS::ALT_attachAccept:
ret_val.attachAccept() = single_value.field_attachAccept->valueof();
break;
case L3__GMM__SGSN__MS::ALT_attachReject:
ret_val.attachReject() = single_value.field_attachReject->valueof();
break;
case L3__GMM__SGSN__MS::ALT_detachRequest__SGSN__MS:
ret_val.detachRequest__SGSN__MS() = single_value.field_detachRequest__SGSN__MS->valueof();
break;
case L3__GMM__SGSN__MS::ALT_detachAccept__SGSN__MS:
ret_val.detachAccept__SGSN__MS() = single_value.field_detachAccept__SGSN__MS->valueof();
break;
case L3__GMM__SGSN__MS::ALT_p__TMSIReallocationCommand:
ret_val.p__TMSIReallocationCommand() = single_value.field_p__TMSIReallocationCommand->valueof();
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringRequest:
ret_val.authenticationAndCipheringRequest() = single_value.field_authenticationAndCipheringRequest->valueof();
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringReject:
ret_val.authenticationAndCipheringReject() = single_value.field_authenticationAndCipheringReject->valueof();
break;
case L3__GMM__SGSN__MS::ALT_identityRequest:
ret_val.identityRequest() = single_value.field_identityRequest->valueof();
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateAccept:
ret_val.routingAreaUpdateAccept() = single_value.field_routingAreaUpdateAccept->valueof();
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateReject:
ret_val.routingAreaUpdateReject() = single_value.field_routingAreaUpdateReject->valueof();
break;
case L3__GMM__SGSN__MS::ALT_gMM__Status:
ret_val.gMM__Status() = single_value.field_gMM__Status->valueof();
break;
case L3__GMM__SGSN__MS::ALT_gMM__Information:
ret_val.gMM__Information() = single_value.field_gMM__Information->valueof();
break;
case L3__GMM__SGSN__MS::ALT_serviceAccept:
ret_val.serviceAccept() = single_value.field_serviceAccept->valueof();
break;
case L3__GMM__SGSN__MS::ALT_serviceReject:
ret_val.serviceReject() = single_value.field_serviceReject->valueof();
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
}
return ret_val;
}

L3__GMM__SGSN__MS_template& L3__GMM__SGSN__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_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return value_list.list_value[list_index];
}
void L3__GMM__SGSN__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_GMM_SM_Types.L3_GMM_SGSN_MS.");
clean_up();
set_selection(template_type);
value_list.n_values = list_length;
value_list.list_value = new L3__GMM__SGSN__MS_template[list_length];
}

PDU__GMM__AttachAccept_template& L3__GMM__SGSN__MS_template::attachAccept()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__SGSN__MS::ALT_attachAccept) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_attachAccept = new PDU__GMM__AttachAccept_template(ANY_VALUE);
else single_value.field_attachAccept = new PDU__GMM__AttachAccept_template;
single_value.union_selection = L3__GMM__SGSN__MS::ALT_attachAccept;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_attachAccept;
}

const PDU__GMM__AttachAccept_template& L3__GMM__SGSN__MS_template::attachAccept() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field attachAccept in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (single_value.union_selection != L3__GMM__SGSN__MS::ALT_attachAccept) TTCN_error("Accessing non-selected field attachAccept in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *single_value.field_attachAccept;
}

PDU__GMM__AttachReject_template& L3__GMM__SGSN__MS_template::attachReject()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__SGSN__MS::ALT_attachReject) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_attachReject = new PDU__GMM__AttachReject_template(ANY_VALUE);
else single_value.field_attachReject = new PDU__GMM__AttachReject_template;
single_value.union_selection = L3__GMM__SGSN__MS::ALT_attachReject;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_attachReject;
}

const PDU__GMM__AttachReject_template& L3__GMM__SGSN__MS_template::attachReject() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field attachReject in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (single_value.union_selection != L3__GMM__SGSN__MS::ALT_attachReject) TTCN_error("Accessing non-selected field attachReject in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *single_value.field_attachReject;
}

PDU__GMM__DetachRequest__SGSN__MS_template& L3__GMM__SGSN__MS_template::detachRequest__SGSN__MS()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__SGSN__MS::ALT_detachRequest__SGSN__MS) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_detachRequest__SGSN__MS = new PDU__GMM__DetachRequest__SGSN__MS_template(ANY_VALUE);
else single_value.field_detachRequest__SGSN__MS = new PDU__GMM__DetachRequest__SGSN__MS_template;
single_value.union_selection = L3__GMM__SGSN__MS::ALT_detachRequest__SGSN__MS;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_detachRequest__SGSN__MS;
}

const PDU__GMM__DetachRequest__SGSN__MS_template& L3__GMM__SGSN__MS_template::detachRequest__SGSN__MS() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field detachRequest_SGSN_MS in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (single_value.union_selection != L3__GMM__SGSN__MS::ALT_detachRequest__SGSN__MS) TTCN_error("Accessing non-selected field detachRequest_SGSN_MS in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *single_value.field_detachRequest__SGSN__MS;
}

PDU__GMM__DetachAccept__SGSN__MS_template& L3__GMM__SGSN__MS_template::detachAccept__SGSN__MS()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__SGSN__MS::ALT_detachAccept__SGSN__MS) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_detachAccept__SGSN__MS = new PDU__GMM__DetachAccept__SGSN__MS_template(ANY_VALUE);
else single_value.field_detachAccept__SGSN__MS = new PDU__GMM__DetachAccept__SGSN__MS_template;
single_value.union_selection = L3__GMM__SGSN__MS::ALT_detachAccept__SGSN__MS;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_detachAccept__SGSN__MS;
}

const PDU__GMM__DetachAccept__SGSN__MS_template& L3__GMM__SGSN__MS_template::detachAccept__SGSN__MS() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field detachAccept_SGSN_MS in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (single_value.union_selection != L3__GMM__SGSN__MS::ALT_detachAccept__SGSN__MS) TTCN_error("Accessing non-selected field detachAccept_SGSN_MS in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *single_value.field_detachAccept__SGSN__MS;
}

PDU__GMM__P__TMSIReallocationCommand_template& L3__GMM__SGSN__MS_template::p__TMSIReallocationCommand()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__SGSN__MS::ALT_p__TMSIReallocationCommand) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_p__TMSIReallocationCommand = new PDU__GMM__P__TMSIReallocationCommand_template(ANY_VALUE);
else single_value.field_p__TMSIReallocationCommand = new PDU__GMM__P__TMSIReallocationCommand_template;
single_value.union_selection = L3__GMM__SGSN__MS::ALT_p__TMSIReallocationCommand;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_p__TMSIReallocationCommand;
}

const PDU__GMM__P__TMSIReallocationCommand_template& L3__GMM__SGSN__MS_template::p__TMSIReallocationCommand() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field p_TMSIReallocationCommand in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (single_value.union_selection != L3__GMM__SGSN__MS::ALT_p__TMSIReallocationCommand) TTCN_error("Accessing non-selected field p_TMSIReallocationCommand in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *single_value.field_p__TMSIReallocationCommand;
}

PDU__GMM__AuthenticationAndCipheringRequest_template& L3__GMM__SGSN__MS_template::authenticationAndCipheringRequest()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__SGSN__MS::ALT_authenticationAndCipheringRequest) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_authenticationAndCipheringRequest = new PDU__GMM__AuthenticationAndCipheringRequest_template(ANY_VALUE);
else single_value.field_authenticationAndCipheringRequest = new PDU__GMM__AuthenticationAndCipheringRequest_template;
single_value.union_selection = L3__GMM__SGSN__MS::ALT_authenticationAndCipheringRequest;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_authenticationAndCipheringRequest;
}

const PDU__GMM__AuthenticationAndCipheringRequest_template& L3__GMM__SGSN__MS_template::authenticationAndCipheringRequest() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field authenticationAndCipheringRequest in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (single_value.union_selection != L3__GMM__SGSN__MS::ALT_authenticationAndCipheringRequest) TTCN_error("Accessing non-selected field authenticationAndCipheringRequest in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *single_value.field_authenticationAndCipheringRequest;
}

PDU__GMM__AuthenticationAndCipheringReject_template& L3__GMM__SGSN__MS_template::authenticationAndCipheringReject()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__SGSN__MS::ALT_authenticationAndCipheringReject) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_authenticationAndCipheringReject = new PDU__GMM__AuthenticationAndCipheringReject_template(ANY_VALUE);
else single_value.field_authenticationAndCipheringReject = new PDU__GMM__AuthenticationAndCipheringReject_template;
single_value.union_selection = L3__GMM__SGSN__MS::ALT_authenticationAndCipheringReject;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_authenticationAndCipheringReject;
}

const PDU__GMM__AuthenticationAndCipheringReject_template& L3__GMM__SGSN__MS_template::authenticationAndCipheringReject() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field authenticationAndCipheringReject in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (single_value.union_selection != L3__GMM__SGSN__MS::ALT_authenticationAndCipheringReject) TTCN_error("Accessing non-selected field authenticationAndCipheringReject in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *single_value.field_authenticationAndCipheringReject;
}

PDU__GMM__IdentityRequest_template& L3__GMM__SGSN__MS_template::identityRequest()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__SGSN__MS::ALT_identityRequest) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_identityRequest = new PDU__GMM__IdentityRequest_template(ANY_VALUE);
else single_value.field_identityRequest = new PDU__GMM__IdentityRequest_template;
single_value.union_selection = L3__GMM__SGSN__MS::ALT_identityRequest;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_identityRequest;
}

const PDU__GMM__IdentityRequest_template& L3__GMM__SGSN__MS_template::identityRequest() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field identityRequest in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (single_value.union_selection != L3__GMM__SGSN__MS::ALT_identityRequest) TTCN_error("Accessing non-selected field identityRequest in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *single_value.field_identityRequest;
}

PDU__GMM__RoutingAreaUpdateAccept_template& L3__GMM__SGSN__MS_template::routingAreaUpdateAccept()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__SGSN__MS::ALT_routingAreaUpdateAccept) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_routingAreaUpdateAccept = new PDU__GMM__RoutingAreaUpdateAccept_template(ANY_VALUE);
else single_value.field_routingAreaUpdateAccept = new PDU__GMM__RoutingAreaUpdateAccept_template;
single_value.union_selection = L3__GMM__SGSN__MS::ALT_routingAreaUpdateAccept;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_routingAreaUpdateAccept;
}

const PDU__GMM__RoutingAreaUpdateAccept_template& L3__GMM__SGSN__MS_template::routingAreaUpdateAccept() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field routingAreaUpdateAccept in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (single_value.union_selection != L3__GMM__SGSN__MS::ALT_routingAreaUpdateAccept) TTCN_error("Accessing non-selected field routingAreaUpdateAccept in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *single_value.field_routingAreaUpdateAccept;
}

PDU__GMM__RoutingAreaUpdateReject_template& L3__GMM__SGSN__MS_template::routingAreaUpdateReject()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__SGSN__MS::ALT_routingAreaUpdateReject) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_routingAreaUpdateReject = new PDU__GMM__RoutingAreaUpdateReject_template(ANY_VALUE);
else single_value.field_routingAreaUpdateReject = new PDU__GMM__RoutingAreaUpdateReject_template;
single_value.union_selection = L3__GMM__SGSN__MS::ALT_routingAreaUpdateReject;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_routingAreaUpdateReject;
}

const PDU__GMM__RoutingAreaUpdateReject_template& L3__GMM__SGSN__MS_template::routingAreaUpdateReject() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field routingAreaUpdateReject in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (single_value.union_selection != L3__GMM__SGSN__MS::ALT_routingAreaUpdateReject) TTCN_error("Accessing non-selected field routingAreaUpdateReject in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *single_value.field_routingAreaUpdateReject;
}

PDU__GMM__GMM__Status_template& L3__GMM__SGSN__MS_template::gMM__Status()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__SGSN__MS::ALT_gMM__Status) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_gMM__Status = new PDU__GMM__GMM__Status_template(ANY_VALUE);
else single_value.field_gMM__Status = new PDU__GMM__GMM__Status_template;
single_value.union_selection = L3__GMM__SGSN__MS::ALT_gMM__Status;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_gMM__Status;
}

const PDU__GMM__GMM__Status_template& L3__GMM__SGSN__MS_template::gMM__Status() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field gMM_Status in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (single_value.union_selection != L3__GMM__SGSN__MS::ALT_gMM__Status) TTCN_error("Accessing non-selected field gMM_Status in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *single_value.field_gMM__Status;
}

PDU__GMM__GMM__Information_template& L3__GMM__SGSN__MS_template::gMM__Information()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__SGSN__MS::ALT_gMM__Information) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_gMM__Information = new PDU__GMM__GMM__Information_template(ANY_VALUE);
else single_value.field_gMM__Information = new PDU__GMM__GMM__Information_template;
single_value.union_selection = L3__GMM__SGSN__MS::ALT_gMM__Information;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_gMM__Information;
}

const PDU__GMM__GMM__Information_template& L3__GMM__SGSN__MS_template::gMM__Information() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field gMM_Information in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (single_value.union_selection != L3__GMM__SGSN__MS::ALT_gMM__Information) TTCN_error("Accessing non-selected field gMM_Information in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *single_value.field_gMM__Information;
}

PDU__GMM__ServiceAccept_template& L3__GMM__SGSN__MS_template::serviceAccept()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__SGSN__MS::ALT_serviceAccept) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_serviceAccept = new PDU__GMM__ServiceAccept_template(ANY_VALUE);
else single_value.field_serviceAccept = new PDU__GMM__ServiceAccept_template;
single_value.union_selection = L3__GMM__SGSN__MS::ALT_serviceAccept;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_serviceAccept;
}

const PDU__GMM__ServiceAccept_template& L3__GMM__SGSN__MS_template::serviceAccept() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field serviceAccept in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (single_value.union_selection != L3__GMM__SGSN__MS::ALT_serviceAccept) TTCN_error("Accessing non-selected field serviceAccept in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *single_value.field_serviceAccept;
}

PDU__GMM__ServiceReject_template& L3__GMM__SGSN__MS_template::serviceReject()
{
if (template_selection != SPECIFIC_VALUE || single_value.union_selection != L3__GMM__SGSN__MS::ALT_serviceReject) {
template_sel old_selection = template_selection;
clean_up();
if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_serviceReject = new PDU__GMM__ServiceReject_template(ANY_VALUE);
else single_value.field_serviceReject = new PDU__GMM__ServiceReject_template;
single_value.union_selection = L3__GMM__SGSN__MS::ALT_serviceReject;
set_selection(SPECIFIC_VALUE);
}
return *single_value.field_serviceReject;
}

const PDU__GMM__ServiceReject_template& L3__GMM__SGSN__MS_template::serviceReject() const
{
if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field serviceReject in a non-specific template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
if (single_value.union_selection != L3__GMM__SGSN__MS::ALT_serviceReject) TTCN_error("Accessing non-selected field serviceReject in a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
return *single_value.field_serviceReject;
}

boolean L3__GMM__SGSN__MS_template::ischosen(L3__GMM__SGSN__MS::union_selection_type checked_selection) const
{
if (checked_selection == L3__GMM__SGSN__MS::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.");
switch (template_selection) {
case SPECIFIC_VALUE:
if (single_value.union_selection == L3__GMM__SGSN__MS::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_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_GMM_SM_Types.L3_GMM_SGSN_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 L3__GMM__SGSN__MS_template::log() const
{
switch (template_selection) {
case SPECIFIC_VALUE:
switch (single_value.union_selection) {
case L3__GMM__SGSN__MS::ALT_attachAccept:
TTCN_Logger::log_event_str("{ attachAccept := ");
single_value.field_attachAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__SGSN__MS::ALT_attachReject:
TTCN_Logger::log_event_str("{ attachReject := ");
single_value.field_attachReject->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__SGSN__MS::ALT_detachRequest__SGSN__MS:
TTCN_Logger::log_event_str("{ detachRequest_SGSN_MS := ");
single_value.field_detachRequest__SGSN__MS->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__SGSN__MS::ALT_detachAccept__SGSN__MS:
TTCN_Logger::log_event_str("{ detachAccept_SGSN_MS := ");
single_value.field_detachAccept__SGSN__MS->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__SGSN__MS::ALT_p__TMSIReallocationCommand:
TTCN_Logger::log_event_str("{ p_TMSIReallocationCommand := ");
single_value.field_p__TMSIReallocationCommand->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringRequest:
TTCN_Logger::log_event_str("{ authenticationAndCipheringRequest := ");
single_value.field_authenticationAndCipheringRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringReject:
TTCN_Logger::log_event_str("{ authenticationAndCipheringReject := ");
single_value.field_authenticationAndCipheringReject->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__SGSN__MS::ALT_identityRequest:
TTCN_Logger::log_event_str("{ identityRequest := ");
single_value.field_identityRequest->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateAccept:
TTCN_Logger::log_event_str("{ routingAreaUpdateAccept := ");
single_value.field_routingAreaUpdateAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateReject:
TTCN_Logger::log_event_str("{ routingAreaUpdateReject := ");
single_value.field_routingAreaUpdateReject->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__SGSN__MS::ALT_gMM__Status:
TTCN_Logger::log_event_str("{ gMM_Status := ");
single_value.field_gMM__Status->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__SGSN__MS::ALT_gMM__Information:
TTCN_Logger::log_event_str("{ gMM_Information := ");
single_value.field_gMM__Information->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__SGSN__MS::ALT_serviceAccept:
TTCN_Logger::log_event_str("{ serviceAccept := ");
single_value.field_serviceAccept->log();
TTCN_Logger::log_event_str(" }");
break;
case L3__GMM__SGSN__MS::ALT_serviceReject:
TTCN_Logger::log_event_str("{ serviceReject := ");
single_value.field_serviceReject->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 L3__GMM__SGSN__MS_template::log_match(const L3__GMM__SGSN__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 L3__GMM__SGSN__MS::ALT_attachAccept:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".attachAccept");
single_value.field_attachAccept->log_match(match_value.attachAccept(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ attachAccept := ");
single_value.field_attachAccept->log_match(match_value.attachAccept(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__SGSN__MS::ALT_attachReject:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".attachReject");
single_value.field_attachReject->log_match(match_value.attachReject(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ attachReject := ");
single_value.field_attachReject->log_match(match_value.attachReject(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__SGSN__MS::ALT_detachRequest__SGSN__MS:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".detachRequest_SGSN_MS");
single_value.field_detachRequest__SGSN__MS->log_match(match_value.detachRequest__SGSN__MS(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ detachRequest_SGSN_MS := ");
single_value.field_detachRequest__SGSN__MS->log_match(match_value.detachRequest__SGSN__MS(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__SGSN__MS::ALT_detachAccept__SGSN__MS:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".detachAccept_SGSN_MS");
single_value.field_detachAccept__SGSN__MS->log_match(match_value.detachAccept__SGSN__MS(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ detachAccept_SGSN_MS := ");
single_value.field_detachAccept__SGSN__MS->log_match(match_value.detachAccept__SGSN__MS(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__SGSN__MS::ALT_p__TMSIReallocationCommand:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".p_TMSIReallocationCommand");
single_value.field_p__TMSIReallocationCommand->log_match(match_value.p__TMSIReallocationCommand(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ p_TMSIReallocationCommand := ");
single_value.field_p__TMSIReallocationCommand->log_match(match_value.p__TMSIReallocationCommand(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringRequest:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".authenticationAndCipheringRequest");
single_value.field_authenticationAndCipheringRequest->log_match(match_value.authenticationAndCipheringRequest(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ authenticationAndCipheringRequest := ");
single_value.field_authenticationAndCipheringRequest->log_match(match_value.authenticationAndCipheringRequest(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringReject:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".authenticationAndCipheringReject");
single_value.field_authenticationAndCipheringReject->log_match(match_value.authenticationAndCipheringReject(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ authenticationAndCipheringReject := ");
single_value.field_authenticationAndCipheringReject->log_match(match_value.authenticationAndCipheringReject(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__SGSN__MS::ALT_identityRequest:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".identityRequest");
single_value.field_identityRequest->log_match(match_value.identityRequest(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ identityRequest := ");
single_value.field_identityRequest->log_match(match_value.identityRequest(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateAccept:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".routingAreaUpdateAccept");
single_value.field_routingAreaUpdateAccept->log_match(match_value.routingAreaUpdateAccept(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ routingAreaUpdateAccept := ");
single_value.field_routingAreaUpdateAccept->log_match(match_value.routingAreaUpdateAccept(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateReject:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".routingAreaUpdateReject");
single_value.field_routingAreaUpdateReject->log_match(match_value.routingAreaUpdateReject(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ routingAreaUpdateReject := ");
single_value.field_routingAreaUpdateReject->log_match(match_value.routingAreaUpdateReject(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__SGSN__MS::ALT_gMM__Status:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".gMM_Status");
single_value.field_gMM__Status->log_match(match_value.gMM__Status(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ gMM_Status := ");
single_value.field_gMM__Status->log_match(match_value.gMM__Status(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__SGSN__MS::ALT_gMM__Information:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".gMM_Information");
single_value.field_gMM__Information->log_match(match_value.gMM__Information(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ gMM_Information := ");
single_value.field_gMM__Information->log_match(match_value.gMM__Information(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__SGSN__MS::ALT_serviceAccept:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".serviceAccept");
single_value.field_serviceAccept->log_match(match_value.serviceAccept(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ serviceAccept := ");
single_value.field_serviceAccept->log_match(match_value.serviceAccept(), legacy);
TTCN_Logger::log_event_str(" }");
}
break;
case L3__GMM__SGSN__MS::ALT_serviceReject:
if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){
TTCN_Logger::log_logmatch_info(".serviceReject");
single_value.field_serviceReject->log_match(match_value.serviceReject(), legacy);
TTCN_Logger::set_logmatch_buffer_len(previous_size);
} else {
TTCN_Logger::log_event_str("{ serviceReject := ");
single_value.field_serviceReject->log_match(match_value.serviceReject(), 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 L3__GMM__SGSN__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 L3__GMM__SGSN__MS::ALT_attachAccept:
single_value.field_attachAccept->encode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_attachReject:
single_value.field_attachReject->encode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_detachRequest__SGSN__MS:
single_value.field_detachRequest__SGSN__MS->encode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_detachAccept__SGSN__MS:
single_value.field_detachAccept__SGSN__MS->encode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_p__TMSIReallocationCommand:
single_value.field_p__TMSIReallocationCommand->encode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringRequest:
single_value.field_authenticationAndCipheringRequest->encode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringReject:
single_value.field_authenticationAndCipheringReject->encode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_identityRequest:
single_value.field_identityRequest->encode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateAccept:
single_value.field_routingAreaUpdateAccept->encode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateReject:
single_value.field_routingAreaUpdateReject->encode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_gMM__Status:
single_value.field_gMM__Status->encode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_gMM__Information:
single_value.field_gMM__Information->encode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_serviceAccept:
single_value.field_serviceAccept->encode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_serviceReject:
single_value.field_serviceReject->encode_text(text_buf);
break;
default:
TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_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_GMM_SM_Types.L3_GMM_SGSN_MS.");
}
}

void L3__GMM__SGSN__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 = L3__GMM__SGSN__MS::UNBOUND_VALUE;
L3__GMM__SGSN__MS::union_selection_type new_selection = (L3__GMM__SGSN__MS::union_selection_type)text_buf.pull_int().get_val();
switch (new_selection) {
case L3__GMM__SGSN__MS::ALT_attachAccept:
single_value.field_attachAccept = new PDU__GMM__AttachAccept_template;
single_value.field_attachAccept->decode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_attachReject:
single_value.field_attachReject = new PDU__GMM__AttachReject_template;
single_value.field_attachReject->decode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_detachRequest__SGSN__MS:
single_value.field_detachRequest__SGSN__MS = new PDU__GMM__DetachRequest__SGSN__MS_template;
single_value.field_detachRequest__SGSN__MS->decode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_detachAccept__SGSN__MS:
single_value.field_detachAccept__SGSN__MS = new PDU__GMM__DetachAccept__SGSN__MS_template;
single_value.field_detachAccept__SGSN__MS->decode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_p__TMSIReallocationCommand:
single_value.field_p__TMSIReallocationCommand = new PDU__GMM__P__TMSIReallocationCommand_template;
single_value.field_p__TMSIReallocationCommand->decode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringRequest:
single_value.field_authenticationAndCipheringRequest = new PDU__GMM__AuthenticationAndCipheringRequest_template;
single_value.field_authenticationAndCipheringRequest->decode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringReject:
single_value.field_authenticationAndCipheringReject = new PDU__GMM__AuthenticationAndCipheringReject_template;
single_value.field_authenticationAndCipheringReject->decode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_identityRequest:
single_value.field_identityRequest = new PDU__GMM__IdentityRequest_template;
single_value.field_identityRequest->decode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateAccept:
single_value.field_routingAreaUpdateAccept = new PDU__GMM__RoutingAreaUpdateAccept_template;
single_value.field_routingAreaUpdateAccept->decode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateReject:
single_value.field_routingAreaUpdateReject = new PDU__GMM__RoutingAreaUpdateReject_template;
single_value.field_routingAreaUpdateReject->decode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_gMM__Status:
single_value.field_gMM__Status = new PDU__GMM__GMM__Status_template;
single_value.field_gMM__Status->decode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_gMM__Information:
single_value.field_gMM__Information = new PDU__GMM__GMM__Information_template;
single_value.field_gMM__Information->decode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_serviceAccept:
single_value.field_serviceAccept = new PDU__GMM__ServiceAccept_template;
single_value.field_serviceAccept->decode_text(text_buf);
break;
case L3__GMM__SGSN__MS::ALT_serviceReject:
single_value.field_serviceReject = new PDU__GMM__ServiceReject_template;
single_value.field_serviceReject->decode_text(text_buf);
break;
default:
TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_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 L3__GMM__SGSN__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_GMM_SM_Types.L3_GMM_SGSN_MS.");
}
}

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

boolean L3__GMM__SGSN__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 L3__GMM__SGSN__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_GMM_SM_Types.L3_GMM_SGSN_MS'");
    }
    if (strcmp("attachAccept", param_field) == 0) {
      attachAccept().set_param(param);
      return;
    } else if (strcmp("attachReject", param_field) == 0) {
      attachReject().set_param(param);
      return;
    } else if (strcmp("detachRequest_SGSN_MS", param_field) == 0) {
      detachRequest__SGSN__MS().set_param(param);
      return;
    } else if (strcmp("detachAccept_SGSN_MS", param_field) == 0) {
      detachAccept__SGSN__MS().set_param(param);
      return;
    } else if (strcmp("p_TMSIReallocationCommand", param_field) == 0) {
      p__TMSIReallocationCommand().set_param(param);
      return;
    } else if (strcmp("authenticationAndCipheringRequest", param_field) == 0) {
      authenticationAndCipheringRequest().set_param(param);
      return;
    } else if (strcmp("authenticationAndCipheringReject", param_field) == 0) {
      authenticationAndCipheringReject().set_param(param);
      return;
    } else if (strcmp("identityRequest", param_field) == 0) {
      identityRequest().set_param(param);
      return;
    } else if (strcmp("routingAreaUpdateAccept", param_field) == 0) {
      routingAreaUpdateAccept().set_param(param);
      return;
    } else if (strcmp("routingAreaUpdateReject", param_field) == 0) {
      routingAreaUpdateReject().set_param(param);
      return;
    } else if (strcmp("gMM_Status", param_field) == 0) {
      gMM__Status().set_param(param);
      return;
    } else if (strcmp("gMM_Information", param_field) == 0) {
      gMM__Information().set_param(param);
      return;
    } else if (strcmp("serviceAccept", param_field) == 0) {
      serviceAccept().set_param(param);
      return;
    } else if (strcmp("serviceReject", param_field) == 0) {
      serviceReject().set_param(param);
      return;
    } else param.error("Field `%s' not found in union template type `@MobileL3_GMM_SM_Types.L3_GMM_SGSN_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: {
    L3__GMM__SGSN__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_GMM_SM_Types.L3_GMM_SGSN_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, "attachAccept")) {
      attachAccept().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "attachReject")) {
      attachReject().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "detachRequest_SGSN_MS")) {
      detachRequest__SGSN__MS().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "detachAccept_SGSN_MS")) {
      detachAccept__SGSN__MS().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "p_TMSIReallocationCommand")) {
      p__TMSIReallocationCommand().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "authenticationAndCipheringRequest")) {
      authenticationAndCipheringRequest().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "authenticationAndCipheringReject")) {
      authenticationAndCipheringReject().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "identityRequest")) {
      identityRequest().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "routingAreaUpdateAccept")) {
      routingAreaUpdateAccept().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "routingAreaUpdateReject")) {
      routingAreaUpdateReject().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "gMM_Status")) {
      gMM__Status().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "gMM_Information")) {
      gMM__Information().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "serviceAccept")) {
      serviceAccept().set_param(*mp_last);
      break;
    }
    if (!strcmp(last_name, "serviceReject")) {
      serviceReject().set_param(*mp_last);
      break;
    }
    mp_last->error("Field %s does not exist in type @MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS.", last_name);
  } break;
  case Module_Param::MP_Implication_Template: {
    L3__GMM__SGSN__MS_template* precondition = new L3__GMM__SGSN__MS_template;
    precondition->set_param(*m_p->get_elem(0));
    L3__GMM__SGSN__MS_template* implied_template = new L3__GMM__SGSN__MS_template;
    implied_template->set_param(*m_p->get_elem(1));
    *this = L3__GMM__SGSN__MS_template(precondition, implied_template);
  } break;
  default:
    param.type_error("union template", "@MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS");
  }
  is_ifpresent = param.get_ifpresent();
}

void L3__GMM__SGSN__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 L3__GMM__SGSN__MS::ALT_attachAccept:
single_value.field_attachAccept->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS");
return;
case L3__GMM__SGSN__MS::ALT_attachReject:
single_value.field_attachReject->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS");
return;
case L3__GMM__SGSN__MS::ALT_detachRequest__SGSN__MS:
single_value.field_detachRequest__SGSN__MS->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS");
return;
case L3__GMM__SGSN__MS::ALT_detachAccept__SGSN__MS:
single_value.field_detachAccept__SGSN__MS->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS");
return;
case L3__GMM__SGSN__MS::ALT_p__TMSIReallocationCommand:
single_value.field_p__TMSIReallocationCommand->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS");
return;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringRequest:
single_value.field_authenticationAndCipheringRequest->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS");
return;
case L3__GMM__SGSN__MS::ALT_authenticationAndCipheringReject:
single_value.field_authenticationAndCipheringReject->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS");
return;
case L3__GMM__SGSN__MS::ALT_identityRequest:
single_value.field_identityRequest->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS");
return;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateAccept:
single_value.field_routingAreaUpdateAccept->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS");
return;
case L3__GMM__SGSN__MS::ALT_routingAreaUpdateReject:
single_value.field_routingAreaUpdateReject->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS");
return;
case L3__GMM__SGSN__MS::ALT_gMM__Status:
single_value.field_gMM__Status->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS");
return;
case L3__GMM__SGSN__MS::ALT_gMM__Information:
single_value.field_gMM__Information->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS");
return;
case L3__GMM__SGSN__MS::ALT_serviceAccept:
single_value.field_serviceAccept->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_SGSN_MS");
return;
case L3__GMM__SGSN__MS::ALT_serviceReject:
single_value.field_serviceReject->check_restriction(t_res, t_name ? t_name : "@MobileL3_GMM_SM_Types.L3_GMM_SGSN_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_GMM_SM_Types.L3_GMM_SGSN_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_GMM_SM_Types.L3_GMM_SGSN_MS");
}


/* Bodies of functions, altsteps and testcases */

void AdditionalUpdateTypeV_encoder(const AdditionalUpdateTypeV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalUpdateTypeV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AdditionalUpdateTypeV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AdditionalUpdateTypeV_decoder(OCTETSTRING& input_stream, AdditionalUpdateTypeV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalUpdateTypeV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AdditionalUpdateTypeV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AdditionalUpdateTypeTV_encoder(const AdditionalUpdateTypeTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalUpdateTypeTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AdditionalUpdateTypeTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AdditionalUpdateTypeTV_decoder(OCTETSTRING& input_stream, AdditionalUpdateTypeTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalUpdateTypeTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AdditionalUpdateTypeTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AttachResultV_encoder(const AttachResultV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AttachResultV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AttachResultV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AttachResultV_decoder(OCTETSTRING& input_stream, AttachResultV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AttachResultV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AttachResultV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AttachTypeV_encoder(const AttachTypeV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AttachTypeV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AttachTypeV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AttachTypeV_decoder(OCTETSTRING& input_stream, AttachTypeV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AttachTypeV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AttachTypeV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CipheringAlgorithmV_encoder(const CipheringAlgorithmV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.CipheringAlgorithmV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CipheringAlgorithmV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CipheringAlgorithmV_decoder(OCTETSTRING& input_stream, CipheringAlgorithmV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.CipheringAlgorithmV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CipheringAlgorithmV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CipheringAlgorithmTV_encoder(const CipheringAlgorithmTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.CipheringAlgorithmTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CipheringAlgorithmTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CipheringAlgorithmTV_decoder(OCTETSTRING& input_stream, CipheringAlgorithmTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.CipheringAlgorithmTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CipheringAlgorithmTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TMSIStatusV_encoder(const TMSIStatusV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TMSIStatusV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TMSIStatusV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TMSIStatusV_decoder(OCTETSTRING& input_stream, TMSIStatusV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TMSIStatusV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TMSIStatusV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TMSIStatusTV_encoder(const TMSIStatusTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TMSIStatusTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TMSIStatusTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TMSIStatusTV_decoder(OCTETSTRING& input_stream, TMSIStatusTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TMSIStatusTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TMSIStatusTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DetachTypeV_encoder(const DetachTypeV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DetachTypeV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DetachTypeV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DetachTypeV_decoder(OCTETSTRING& input_stream, DetachTypeV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DetachTypeV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DetachTypeV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DetachTypeTV_encoder(const DetachTypeTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DetachTypeTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DetachTypeTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DetachTypeTV_decoder(OCTETSTRING& input_stream, DetachTypeTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DetachTypeTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DetachTypeTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DRXParameterV_encoder(const DRXParameterV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DRXParameterV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DRXParameterV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DRXParameterV_decoder(OCTETSTRING& input_stream, DRXParameterV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DRXParameterV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DRXParameterV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DRXParameterTV_encoder(const DRXParameterTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DRXParameterTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DRXParameterTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DRXParameterTV_decoder(OCTETSTRING& input_stream, DRXParameterTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DRXParameterTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DRXParameterTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ForceToStandbyV_encoder(const ForceToStandbyV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ForceToStandbyV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ForceToStandbyV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ForceToStandbyV_decoder(OCTETSTRING& input_stream, ForceToStandbyV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ForceToStandbyV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ForceToStandbyV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ForceToStandbyTV_encoder(const ForceToStandbyTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ForceToStandbyTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ForceToStandbyTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ForceToStandbyTV_decoder(OCTETSTRING& input_stream, ForceToStandbyTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ForceToStandbyTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ForceToStandbyTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void P__TMSISignatureTV_encoder(const P__TMSISignatureTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.P_TMSISignatureTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(P__TMSISignatureTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER P__TMSISignatureTV_decoder(OCTETSTRING& input_stream, P__TMSISignatureTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.P_TMSISignatureTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(P__TMSISignatureTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void IdentityType2V_encoder(const IdentityType2V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.IdentityType2V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(IdentityType2V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER IdentityType2V_decoder(OCTETSTRING& input_stream, IdentityType2V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.IdentityType2V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(IdentityType2V_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void IdentityType2TV_encoder(const IdentityType2TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.IdentityType2TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(IdentityType2TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER IdentityType2TV_decoder(OCTETSTRING& input_stream, IdentityType2TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.IdentityType2TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(IdentityType2TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void IMEISVRequestV_encoder(const IMEISVRequestV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.IMEISVRequestV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(IMEISVRequestV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER IMEISVRequestV_decoder(OCTETSTRING& input_stream, IMEISVRequestV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.IMEISVRequestV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(IMEISVRequestV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void IMEISVRequestTV_encoder(const IMEISVRequestTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.IMEISVRequestTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(IMEISVRequestTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER IMEISVRequestTV_decoder(OCTETSTRING& input_stream, IMEISVRequestTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.IMEISVRequestTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(IMEISVRequestTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ReceiveNPDUNumbersListTLV_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(ReceiveNPDUNumbersListTLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ReceiveNPDUNumbersListTLV_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(ReceiveNPDUNumbersListTLV_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;
}
}

boolean operator==(null_type, const ReceiveNPDUNumbersListV& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @MobileL3_GMM_SM_Types.ReceiveNPDUNumbersListV.");
return other_value.val_ptr->n_elements == 0;
}

void ReceiveNPDUNumber_sapi_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(ReceiveNPDUNumber_sapi_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ReceiveNPDUNumber_sapi_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(ReceiveNPDUNumber_sapi_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ReceiveNPDUNumber_numberValue_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(ReceiveNPDUNumber_numberValue_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ReceiveNPDUNumber_numberValue_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(ReceiveNPDUNumber_numberValue_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ReceiveNPDUNumber_encoder(const ReceiveNPDUNumber& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ReceiveNPDUNumber' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ReceiveNPDUNumber_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ReceiveNPDUNumber_decoder(OCTETSTRING& input_stream, ReceiveNPDUNumber& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ReceiveNPDUNumber' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ReceiveNPDUNumber_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ReceiveNPDUNumbersListV_encoder(const ReceiveNPDUNumbersListV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ReceiveNPDUNumbersListV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ReceiveNPDUNumbersListV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ReceiveNPDUNumbersListV_decoder(OCTETSTRING& input_stream, ReceiveNPDUNumbersListV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ReceiveNPDUNumbersListV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ReceiveNPDUNumbersListV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ReceiveNPDUNumbersListTLV_numberList_encoder(const ReceiveNPDUNumbersListV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ReceiveNPDUNumbersListV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ReceiveNPDUNumbersListTLV_numberList_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ReceiveNPDUNumbersListTLV_numberList_decoder(OCTETSTRING& input_stream, ReceiveNPDUNumbersListV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ReceiveNPDUNumbersListV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ReceiveNPDUNumbersListTLV_numberList_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ReceiveNPDUNumbersListTLV_encoder(const ReceiveNPDUNumbersListTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ReceiveNPDUNumbersListTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ReceiveNPDUNumbersListTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ReceiveNPDUNumbersListTLV_decoder(OCTETSTRING& input_stream, ReceiveNPDUNumbersListTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ReceiveNPDUNumbersListTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ReceiveNPDUNumbersListTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityLV_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(MSNetworkCapabilityLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityLV_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(MSNetworkCapabilityLV_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 MSNetworkCapabilityV_gea1bit_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(MSNetworkCapabilityV_gea1bit_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_gea1bit_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(MSNetworkCapabilityV_gea1bit_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_smCapabilitiesviaDedicatedChannels_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(MSNetworkCapabilityV_smCapabilitiesviaDedicatedChannels_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_smCapabilitiesviaDedicatedChannels_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(MSNetworkCapabilityV_smCapabilitiesviaDedicatedChannels_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_smCapabilitiesviaGPRSChannels_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(MSNetworkCapabilityV_smCapabilitiesviaGPRSChannels_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_smCapabilitiesviaGPRSChannels_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(MSNetworkCapabilityV_smCapabilitiesviaGPRSChannels_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_ucs2Support_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(MSNetworkCapabilityV_ucs2Support_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_ucs2Support_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(MSNetworkCapabilityV_ucs2Support_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_ssScreeningIndicator_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(MSNetworkCapabilityV_ssScreeningIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_ssScreeningIndicator_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(MSNetworkCapabilityV_ssScreeningIndicator_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_solSACapability_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(MSNetworkCapabilityV_solSACapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_solSACapability_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(MSNetworkCapabilityV_solSACapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_revisionLevelIndicatior_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(MSNetworkCapabilityV_revisionLevelIndicatior_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_revisionLevelIndicatior_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(MSNetworkCapabilityV_revisionLevelIndicatior_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_pFCFeatureMode_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(MSNetworkCapabilityV_pFCFeatureMode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_pFCFeatureMode_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(MSNetworkCapabilityV_pFCFeatureMode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_extendedGEAbits_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(MSNetworkCapabilityV_extendedGEAbits_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_extendedGEAbits_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(MSNetworkCapabilityV_extendedGEAbits_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_lcsVAcapability_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(MSNetworkCapabilityV_lcsVAcapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_lcsVAcapability_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(MSNetworkCapabilityV_lcsVAcapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_pSInterRATHOtoUTRANIuModeCapability_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(MSNetworkCapabilityV_pSInterRATHOtoUTRANIuModeCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_pSInterRATHOtoUTRANIuModeCapability_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(MSNetworkCapabilityV_pSInterRATHOtoUTRANIuModeCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_pSInterRATHOtoEUTRANS1ModeCapability_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(MSNetworkCapabilityV_pSInterRATHOtoEUTRANS1ModeCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_pSInterRATHOtoEUTRANS1ModeCapability_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(MSNetworkCapabilityV_pSInterRATHOtoEUTRANS1ModeCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_eMMCombinedProceduresCapability_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(MSNetworkCapabilityV_eMMCombinedProceduresCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_eMMCombinedProceduresCapability_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(MSNetworkCapabilityV_eMMCombinedProceduresCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_iSRSupport_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(MSNetworkCapabilityV_iSRSupport_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_iSRSupport_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(MSNetworkCapabilityV_iSRSupport_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_sRVCCtoGERANUTRANCapability_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(MSNetworkCapabilityV_sRVCCtoGERANUTRANCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_sRVCCtoGERANUTRANCapability_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(MSNetworkCapabilityV_sRVCCtoGERANUTRANCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_ePCCapability_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(MSNetworkCapabilityV_ePCCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_ePCCapability_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(MSNetworkCapabilityV_ePCCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_nFCapability_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(MSNetworkCapabilityV_nFCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_nFCapability_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(MSNetworkCapabilityV_nFCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_gERANNertworkSharingCapability_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(MSNetworkCapabilityV_gERANNertworkSharingCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_gERANNertworkSharingCapability_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(MSNetworkCapabilityV_gERANNertworkSharingCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_spare__octets_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(MSNetworkCapabilityV_spare__octets_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_spare__octets_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(MSNetworkCapabilityV_spare__octets_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityV_encoder(const MSNetworkCapabilityV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSNetworkCapabilityV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSNetworkCapabilityV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityV_decoder(OCTETSTRING& input_stream, MSNetworkCapabilityV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSNetworkCapabilityV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSNetworkCapabilityV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityLV_msNetworkCapabilityV_encoder(const MSNetworkCapabilityV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSNetworkCapabilityV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSNetworkCapabilityLV_msNetworkCapabilityV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityLV_msNetworkCapabilityV_decoder(OCTETSTRING& input_stream, MSNetworkCapabilityV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSNetworkCapabilityV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSNetworkCapabilityLV_msNetworkCapabilityV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityLV_encoder(const MSNetworkCapabilityLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSNetworkCapabilityLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSNetworkCapabilityLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityLV_decoder(OCTETSTRING& input_stream, MSNetworkCapabilityLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSNetworkCapabilityLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSNetworkCapabilityLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSNetworkCapabilityTLV_encoder(const MSNetworkCapabilityTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSNetworkCapabilityTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSNetworkCapabilityTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSNetworkCapabilityTLV_decoder(OCTETSTRING& input_stream, MSNetworkCapabilityTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSNetworkCapabilityTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSNetworkCapabilityTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSRadioAccessCapabilityLV_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(MSRadioAccessCapabilityLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRadioAccessCapabilityLV_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(MSRadioAccessCapabilityLV_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;
}
}

boolean operator==(null_type, const MSRadioAccessCapabilityV& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @MobileL3_GMM_SM_Types.MSRadioAccessCapabilityV.");
return other_value.val_ptr->n_elements == 0;
}

void MSRACapabilityValuesExclude1111_accessTechnType_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSRACapabilityValuesExclude1111_accessTechnType_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRACapabilityValuesExclude1111_accessTechnType_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSRACapabilityValuesExclude1111_accessTechnType_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapabilitiesStruct_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(AccessCapabilitiesStruct_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapabilitiesStruct_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(AccessCapabilitiesStruct_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 AccessCapabilities_rfPowerCapability_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(AccessCapabilities_rfPowerCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapabilities_rfPowerCapability_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(AccessCapabilities_rfPowerCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapabilities_presenceBitA5_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(AccessCapabilities_presenceBitA5_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapabilities_presenceBitA5_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(AccessCapabilities_presenceBitA5_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapabilities_esind_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(AccessCapabilities_esind_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapabilities_esind_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(AccessCapabilities_esind_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapabilities_psbit_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(AccessCapabilities_psbit_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapabilities_psbit_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(AccessCapabilities_psbit_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapabilities_vgcs_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(AccessCapabilities_vgcs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapabilities_vgcs_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(AccessCapabilities_vgcs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapabilities_vbs_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(AccessCapabilities_vbs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapabilities_vbs_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(AccessCapabilities_vbs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapabilities_presenceBitMultislot_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(AccessCapabilities_presenceBitMultislot_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapabilities_presenceBitMultislot_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(AccessCapabilities_presenceBitMultislot_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void A5BITS_a51_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(A5BITS_a51_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER A5BITS_a51_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(A5BITS_a51_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void A5BITS_a52_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(A5BITS_a52_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER A5BITS_a52_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(A5BITS_a52_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void A5BITS_a53_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(A5BITS_a53_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER A5BITS_a53_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(A5BITS_a53_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void A5BITS_a54_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(A5BITS_a54_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER A5BITS_a54_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(A5BITS_a54_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void A5BITS_a55_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(A5BITS_a55_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER A5BITS_a55_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(A5BITS_a55_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void A5BITS_a56_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(A5BITS_a56_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER A5BITS_a56_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(A5BITS_a56_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void A5BITS_a57_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(A5BITS_a57_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER A5BITS_a57_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(A5BITS_a57_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void A5BITS_encoder(const A5BITS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.A5BITS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(A5BITS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER A5BITS_decoder(OCTETSTRING& input_stream, A5BITS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.A5BITS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(A5BITS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapabilities_a5bits_encoder(const A5BITS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.A5BITS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapabilities_a5bits_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapabilities_a5bits_decoder(OCTETSTRING& input_stream, A5BITS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.A5BITS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapabilities_a5bits_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap_presenceBitHscsd_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(MultislotCap_presenceBitHscsd_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap_presenceBitHscsd_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(MultislotCap_presenceBitHscsd_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap_presenceBitGprs_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(MultislotCap_presenceBitGprs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap_presenceBitGprs_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(MultislotCap_presenceBitGprs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap_presenceBitSms_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(MultislotCap_presenceBitSms_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap_presenceBitSms_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(MultislotCap_presenceBitSms_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap_hscsdmultislotclass_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(MultislotCap_hscsdmultislotclass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap_hscsdmultislotclass_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(MultislotCap_hscsdmultislotclass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap__GPRS_gprsmultislotclass_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(MultislotCap__GPRS_gprsmultislotclass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap__GPRS_gprsmultislotclass_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(MultislotCap__GPRS_gprsmultislotclass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap__GPRS_gprsextendeddynalloccap_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(MultislotCap__GPRS_gprsextendeddynalloccap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap__GPRS_gprsextendeddynalloccap_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(MultislotCap__GPRS_gprsextendeddynalloccap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap__GPRS_encoder(const MultislotCap__GPRS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_GPRS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultislotCap__GPRS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap__GPRS_decoder(OCTETSTRING& input_stream, MultislotCap__GPRS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_GPRS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultislotCap__GPRS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap_gprsmultislot_encoder(const MultislotCap__GPRS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_GPRS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultislotCap_gprsmultislot_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap_gprsmultislot_decoder(OCTETSTRING& input_stream, MultislotCap__GPRS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_GPRS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultislotCap_gprsmultislot_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap__SMS_smsValue_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(MultislotCap__SMS_smsValue_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap__SMS_smsValue_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(MultislotCap__SMS_smsValue_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap__SMS_smValue_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(MultislotCap__SMS_smValue_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap__SMS_smValue_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(MultislotCap__SMS_smValue_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap__SMS_encoder(const MultislotCap__SMS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_SMS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultislotCap__SMS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap__SMS_decoder(OCTETSTRING& input_stream, MultislotCap__SMS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_SMS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultislotCap__SMS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap_multislotCap__SMS_encoder(const MultislotCap__SMS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_SMS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultislotCap_multislotCap__SMS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap_multislotCap__SMS_decoder(OCTETSTRING& input_stream, MultislotCap__SMS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_SMS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultislotCap_multislotCap__SMS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCapAdditionsAfterRel97_presenceBitEcsdmulti_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(MultislotCapAdditionsAfterRel97_presenceBitEcsdmulti_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCapAdditionsAfterRel97_presenceBitEcsdmulti_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(MultislotCapAdditionsAfterRel97_presenceBitEcsdmulti_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCapAdditionsAfterRel97_presenceBitEgprsmulti_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(MultislotCapAdditionsAfterRel97_presenceBitEgprsmulti_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCapAdditionsAfterRel97_presenceBitEgprsmulti_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(MultislotCapAdditionsAfterRel97_presenceBitEgprsmulti_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCapAdditionsAfterRel97_presenceBitDtmGprsmulti_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(MultislotCapAdditionsAfterRel97_presenceBitDtmGprsmulti_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCapAdditionsAfterRel97_presenceBitDtmGprsmulti_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(MultislotCapAdditionsAfterRel97_presenceBitDtmGprsmulti_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCapAdditionsAfterRel97_ecsdmultislotclass_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(MultislotCapAdditionsAfterRel97_ecsdmultislotclass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCapAdditionsAfterRel97_ecsdmultislotclass_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(MultislotCapAdditionsAfterRel97_ecsdmultislotclass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap__EGPRS_egprsmultislotclass_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(MultislotCap__EGPRS_egprsmultislotclass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap__EGPRS_egprsmultislotclass_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(MultislotCap__EGPRS_egprsmultislotclass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap__EGPRS_egprsextendeddynalloccap_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(MultislotCap__EGPRS_egprsextendeddynalloccap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap__EGPRS_egprsextendeddynalloccap_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(MultislotCap__EGPRS_egprsextendeddynalloccap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap__EGPRS_encoder(const MultislotCap__EGPRS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_EGPRS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultislotCap__EGPRS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap__EGPRS_decoder(OCTETSTRING& input_stream, MultislotCap__EGPRS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_EGPRS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultislotCap__EGPRS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCapAdditionsAfterRel97_multislotCap__EGPRS_encoder(const MultislotCap__EGPRS& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_EGPRS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultislotCapAdditionsAfterRel97_multislotCap__EGPRS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCapAdditionsAfterRel97_multislotCap__EGPRS_decoder(OCTETSTRING& input_stream, MultislotCap__EGPRS& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_EGPRS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultislotCapAdditionsAfterRel97_multislotCap__EGPRS_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap__dtmgprsmultislotsubclass_dtmgprsmultislotsubclass_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(MultislotCap__dtmgprsmultislotsubclass_dtmgprsmultislotsubclass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap__dtmgprsmultislotsubclass_dtmgprsmultislotsubclass_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(MultislotCap__dtmgprsmultislotsubclass_dtmgprsmultislotsubclass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap__dtmgprsmultislotsubclass_singleSlotDTM_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(MultislotCap__dtmgprsmultislotsubclass_singleSlotDTM_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap__dtmgprsmultislotsubclass_singleSlotDTM_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(MultislotCap__dtmgprsmultislotsubclass_singleSlotDTM_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap__dtmgprsmultislotsubclass_presenceBitDTM__EGPRSMultiSlot_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(MultislotCap__dtmgprsmultislotsubclass_presenceBitDTM__EGPRSMultiSlot_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap__dtmgprsmultislotsubclass_presenceBitDTM__EGPRSMultiSlot_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(MultislotCap__dtmgprsmultislotsubclass_presenceBitDTM__EGPRSMultiSlot_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap__dtmgprsmultislotsubclass_dTM__EGPRSMultiSlot_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(MultislotCap__dtmgprsmultislotsubclass_dTM__EGPRSMultiSlot_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap__dtmgprsmultislotsubclass_dTM__EGPRSMultiSlot_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(MultislotCap__dtmgprsmultislotsubclass_dTM__EGPRSMultiSlot_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap__dtmgprsmultislotsubclass_encoder(const MultislotCap__dtmgprsmultislotsubclass& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_dtmgprsmultislotsubclass' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultislotCap__dtmgprsmultislotsubclass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap__dtmgprsmultislotsubclass_decoder(OCTETSTRING& input_stream, MultislotCap__dtmgprsmultislotsubclass& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_dtmgprsmultislotsubclass' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultislotCap__dtmgprsmultislotsubclass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCapAdditionsAfterRel97_multislotCapdtmgprsmultislotsubclass_encoder(const MultislotCap__dtmgprsmultislotsubclass& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_dtmgprsmultislotsubclass' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultislotCapAdditionsAfterRel97_multislotCapdtmgprsmultislotsubclass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCapAdditionsAfterRel97_multislotCapdtmgprsmultislotsubclass_decoder(OCTETSTRING& input_stream, MultislotCap__dtmgprsmultislotsubclass& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap_dtmgprsmultislotsubclass' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultislotCapAdditionsAfterRel97_multislotCapdtmgprsmultislotsubclass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCapAdditionsAfterRel97_encoder(const MultislotCapAdditionsAfterRel97& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCapAdditionsAfterRel97' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultislotCapAdditionsAfterRel97_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCapAdditionsAfterRel97_decoder(OCTETSTRING& input_stream, MultislotCapAdditionsAfterRel97& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCapAdditionsAfterRel97' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultislotCapAdditionsAfterRel97_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap_multislotCapAdditionsAfterRel97_encoder(const MultislotCapAdditionsAfterRel97& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCapAdditionsAfterRel97' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultislotCap_multislotCapAdditionsAfterRel97_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap_multislotCapAdditionsAfterRel97_decoder(OCTETSTRING& input_stream, MultislotCapAdditionsAfterRel97& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCapAdditionsAfterRel97' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultislotCap_multislotCapAdditionsAfterRel97_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MultislotCap_encoder(const MultislotCap& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MultislotCap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MultislotCap_decoder(OCTETSTRING& input_stream, MultislotCap& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MultislotCap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapabilities_multislotcap_encoder(const MultislotCap& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapabilities_multislotcap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapabilities_multislotcap_decoder(OCTETSTRING& input_stream, MultislotCap& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MultislotCap' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapabilities_multislotcap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel99_presenceBitPskpow_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(AccessCapAdditionsRel99_presenceBitPskpow_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel99_presenceBitPskpow_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(AccessCapAdditionsRel99_presenceBitPskpow_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel99_compactIntMeasurCap_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(AccessCapAdditionsRel99_compactIntMeasurCap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel99_compactIntMeasurCap_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(AccessCapAdditionsRel99_compactIntMeasurCap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel99_revisionLevelInd_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(AccessCapAdditionsRel99_revisionLevelInd_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel99_revisionLevelInd_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(AccessCapAdditionsRel99_revisionLevelInd_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel99_umtsfddRadAccTechCap_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(AccessCapAdditionsRel99_umtsfddRadAccTechCap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel99_umtsfddRadAccTechCap_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(AccessCapAdditionsRel99_umtsfddRadAccTechCap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel99_umtstddRadAccTechCap_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(AccessCapAdditionsRel99_umtstddRadAccTechCap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel99_umtstddRadAccTechCap_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(AccessCapAdditionsRel99_umtstddRadAccTechCap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel99_cdma2kRadAccTechCap_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(AccessCapAdditionsRel99_cdma2kRadAccTechCap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel99_cdma2kRadAccTechCap_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(AccessCapAdditionsRel99_cdma2kRadAccTechCap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel99_pskpowercap_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(AccessCapAdditionsRel99_pskpowercap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel99_pskpowercap_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(AccessCapAdditionsRel99_pskpowercap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel99_encoder(const AccessCapAdditionsRel99& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel99' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsRel99_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel99_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel99& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel99' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsRel99_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel97_accessCapAdditionsRel99_encoder(const AccessCapAdditionsRel99& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel99' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel97_accessCapAdditionsRel99_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel97_accessCapAdditionsRel99_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel99& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel99' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel97_accessCapAdditionsRel99_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel4_umts128RadAccTechCap_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(AccessCapAdditionsRel4_umts128RadAccTechCap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel4_umts128RadAccTechCap_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(AccessCapAdditionsRel4_umts128RadAccTechCap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel4_geranFeaturePackage_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(AccessCapAdditionsRel4_geranFeaturePackage_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel4_geranFeaturePackage_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(AccessCapAdditionsRel4_geranFeaturePackage_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel4_presenceBitExtendedDTM_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(AccessCapAdditionsRel4_presenceBitExtendedDTM_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel4_presenceBitExtendedDTM_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(AccessCapAdditionsRel4_presenceBitExtendedDTM_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel4_modulationBasedMultislotClass_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(AccessCapAdditionsRel4_modulationBasedMultislotClass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel4_modulationBasedMultislotClass_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(AccessCapAdditionsRel4_modulationBasedMultislotClass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ExtendedDTM_ExtendedDTM__GPRSMultislot_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(ExtendedDTM_ExtendedDTM__GPRSMultislot_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ExtendedDTM_ExtendedDTM__GPRSMultislot_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(ExtendedDTM_ExtendedDTM__GPRSMultislot_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ExtendedDTM_ExtendedDTM__EGPRSMultislot_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(ExtendedDTM_ExtendedDTM__EGPRSMultislot_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ExtendedDTM_ExtendedDTM__EGPRSMultislot_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(ExtendedDTM_ExtendedDTM__EGPRSMultislot_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ExtendedDTM_encoder(const ExtendedDTM& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ExtendedDTM' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ExtendedDTM_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ExtendedDTM_decoder(OCTETSTRING& input_stream, ExtendedDTM& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ExtendedDTM' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ExtendedDTM_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel4_extendedDTM_encoder(const ExtendedDTM& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ExtendedDTM' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsRel4_extendedDTM_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel4_extendedDTM_decoder(OCTETSTRING& input_stream, ExtendedDTM& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ExtendedDTM' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsRel4_extendedDTM_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel4_encoder(const AccessCapAdditionsRel4& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel4' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsRel4_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel4_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel4& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel4' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsRel4_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel99_accessCapAdditionsRel4_encoder(const AccessCapAdditionsRel4& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel4' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel99_accessCapAdditionsRel4_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel99_accessCapAdditionsRel4_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel4& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel4' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel99_accessCapAdditionsRel4_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel5_presenceBitHighMultislotCapability_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(AccessCapAdditionsRel5_presenceBitHighMultislotCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel5_presenceBitHighMultislotCapability_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(AccessCapAdditionsRel5_presenceBitHighMultislotCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel5_presenceBitGeranIuModeCapability_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(AccessCapAdditionsRel5_presenceBitGeranIuModeCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel5_presenceBitGeranIuModeCapability_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(AccessCapAdditionsRel5_presenceBitGeranIuModeCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel5_gMSKMultislotPowerProfile_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(AccessCapAdditionsRel5_gMSKMultislotPowerProfile_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel5_gMSKMultislotPowerProfile_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(AccessCapAdditionsRel5_gMSKMultislotPowerProfile_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel5_eightPSKMultislotPowerProfile_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(AccessCapAdditionsRel5_eightPSKMultislotPowerProfile_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel5_eightPSKMultislotPowerProfile_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(AccessCapAdditionsRel5_eightPSKMultislotPowerProfile_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel5_highMultislotCapability_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(AccessCapAdditionsRel5_highMultislotCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel5_highMultislotCapability_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(AccessCapAdditionsRel5_highMultislotCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel5_encoder(const AccessCapAdditionsRel5& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel5' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsRel5_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel5_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel5& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel5' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsRel5_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel4_accessCapAdditionsRel5_encoder(const AccessCapAdditionsRel5& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel5' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel4_accessCapAdditionsRel5_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel4_accessCapAdditionsRel5_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel5& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel5' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel4_accessCapAdditionsRel5_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel6_multipleTBFCapability_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(AccessCapAdditionsRel6_multipleTBFCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel6_multipleTBFCapability_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(AccessCapAdditionsRel6_multipleTBFCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel6_downlinkAdvancedReceiverPerformance_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(AccessCapAdditionsRel6_downlinkAdvancedReceiverPerformance_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel6_downlinkAdvancedReceiverPerformance_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(AccessCapAdditionsRel6_downlinkAdvancedReceiverPerformance_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel6_extendedRLCMACCtrlMsgSegmentationCap_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(AccessCapAdditionsRel6_extendedRLCMACCtrlMsgSegmentationCap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel6_extendedRLCMACCtrlMsgSegmentationCap_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(AccessCapAdditionsRel6_extendedRLCMACCtrlMsgSegmentationCap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel6_dTMEnhancementsCapability_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(AccessCapAdditionsRel6_dTMEnhancementsCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel6_dTMEnhancementsCapability_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(AccessCapAdditionsRel6_dTMEnhancementsCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel6_presenceBitDTMGPRSHighMultiSlotClass_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(AccessCapAdditionsRel6_presenceBitDTMGPRSHighMultiSlotClass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel6_presenceBitDTMGPRSHighMultiSlotClass_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(AccessCapAdditionsRel6_presenceBitDTMGPRSHighMultiSlotClass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel6_pSHandoverCapability_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(AccessCapAdditionsRel6_pSHandoverCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel6_pSHandoverCapability_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(AccessCapAdditionsRel6_pSHandoverCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DTMGPRSHighMultiSlotClass_dTMGPRSHighMultiSlotClassValue_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(DTMGPRSHighMultiSlotClass_dTMGPRSHighMultiSlotClassValue_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DTMGPRSHighMultiSlotClass_dTMGPRSHighMultiSlotClassValue_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(DTMGPRSHighMultiSlotClass_dTMGPRSHighMultiSlotClassValue_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DTMGPRSHighMultiSlotClass_presenceBitDTMEGPRSHighMultiSlotClass_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(DTMGPRSHighMultiSlotClass_presenceBitDTMEGPRSHighMultiSlotClass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DTMGPRSHighMultiSlotClass_presenceBitDTMEGPRSHighMultiSlotClass_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(DTMGPRSHighMultiSlotClass_presenceBitDTMEGPRSHighMultiSlotClass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DTMGPRSHighMultiSlotClass_dTMEGPRSHighMultiSlotClassValue_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(DTMGPRSHighMultiSlotClass_dTMEGPRSHighMultiSlotClassValue_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DTMGPRSHighMultiSlotClass_dTMEGPRSHighMultiSlotClassValue_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(DTMGPRSHighMultiSlotClass_dTMEGPRSHighMultiSlotClassValue_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DTMGPRSHighMultiSlotClass_encoder(const DTMGPRSHighMultiSlotClass& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DTMGPRSHighMultiSlotClass' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DTMGPRSHighMultiSlotClass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DTMGPRSHighMultiSlotClass_decoder(OCTETSTRING& input_stream, DTMGPRSHighMultiSlotClass& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DTMGPRSHighMultiSlotClass' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DTMGPRSHighMultiSlotClass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel6_dTMGPRSHighMultiSlotClass_encoder(const DTMGPRSHighMultiSlotClass& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DTMGPRSHighMultiSlotClass' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsRel6_dTMGPRSHighMultiSlotClass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel6_dTMGPRSHighMultiSlotClass_decoder(OCTETSTRING& input_stream, DTMGPRSHighMultiSlotClass& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DTMGPRSHighMultiSlotClass' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsRel6_dTMGPRSHighMultiSlotClass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel6_encoder(const AccessCapAdditionsRel6& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel6' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsRel6_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel6_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel6& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel6' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsRel6_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel5_accessCapAdditionsRel6_encoder(const AccessCapAdditionsRel6& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel6' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel5_accessCapAdditionsRel6_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel5_accessCapAdditionsRel6_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel6& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel6' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel5_accessCapAdditionsRel6_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel7_dTMHandoverCapability_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(AccessCapAdditionsRel7_dTMHandoverCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel7_dTMHandoverCapability_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(AccessCapAdditionsRel7_dTMHandoverCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel7_presenceBitDownlinkDualCarrier_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(AccessCapAdditionsRel7_presenceBitDownlinkDualCarrier_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel7_presenceBitDownlinkDualCarrier_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(AccessCapAdditionsRel7_presenceBitDownlinkDualCarrier_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel7_flexibleTimeslotAssignment_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(AccessCapAdditionsRel7_flexibleTimeslotAssignment_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel7_flexibleTimeslotAssignment_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(AccessCapAdditionsRel7_flexibleTimeslotAssignment_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel7_gANPSHandoverCapability_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(AccessCapAdditionsRel7_gANPSHandoverCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel7_gANPSHandoverCapability_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(AccessCapAdditionsRel7_gANPSHandoverCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel7_rLCNonPersistentMode_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(AccessCapAdditionsRel7_rLCNonPersistentMode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel7_rLCNonPersistentMode_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(AccessCapAdditionsRel7_rLCNonPersistentMode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel7_reducedLatencyCapability_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(AccessCapAdditionsRel7_reducedLatencyCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel7_reducedLatencyCapability_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(AccessCapAdditionsRel7_reducedLatencyCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel7_uplinkEGPRS2_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(AccessCapAdditionsRel7_uplinkEGPRS2_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel7_uplinkEGPRS2_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(AccessCapAdditionsRel7_uplinkEGPRS2_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel7_downlinkEGPRS2_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(AccessCapAdditionsRel7_downlinkEGPRS2_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel7_downlinkEGPRS2_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(AccessCapAdditionsRel7_downlinkEGPRS2_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DownlinkDualCarrier_multislotCapReductionforDownLinkDualCarrier_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(DownlinkDualCarrier_multislotCapReductionforDownLinkDualCarrier_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DownlinkDualCarrier_multislotCapReductionforDownLinkDualCarrier_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(DownlinkDualCarrier_multislotCapReductionforDownLinkDualCarrier_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DownlinkDualCarrier_downlinkDualCarrierforDTMCapability_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(DownlinkDualCarrier_downlinkDualCarrierforDTMCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DownlinkDualCarrier_downlinkDualCarrierforDTMCapability_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(DownlinkDualCarrier_downlinkDualCarrierforDTMCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DownlinkDualCarrier_encoder(const DownlinkDualCarrier& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DownlinkDualCarrier' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DownlinkDualCarrier_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DownlinkDualCarrier_decoder(OCTETSTRING& input_stream, DownlinkDualCarrier& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DownlinkDualCarrier' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DownlinkDualCarrier_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel7_downlinkDualCarrier_encoder(const DownlinkDualCarrier& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DownlinkDualCarrier' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsRel7_downlinkDualCarrier_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel7_downlinkDualCarrier_decoder(OCTETSTRING& input_stream, DownlinkDualCarrier& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DownlinkDualCarrier' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsRel7_downlinkDualCarrier_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel7_encoder(const AccessCapAdditionsRel7& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel7' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsRel7_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel7_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel7& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel7' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsRel7_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel6_accessCapAdditionsRel7_encoder(const AccessCapAdditionsRel7& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel7' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel6_accessCapAdditionsRel7_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel6_accessCapAdditionsRel7_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel7& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel7' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel6_accessCapAdditionsRel7_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel8_eUTRAFDDsupport_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(AccessCapAdditionsRel8_eUTRAFDDsupport_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel8_eUTRAFDDsupport_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(AccessCapAdditionsRel8_eUTRAFDDsupport_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel8_eUTRATDDsupport_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(AccessCapAdditionsRel8_eUTRATDDsupport_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel8_eUTRATDDsupport_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(AccessCapAdditionsRel8_eUTRATDDsupport_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel8_gERANToEUTRASupportInGERANPacketTransferMode_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(AccessCapAdditionsRel8_gERANToEUTRASupportInGERANPacketTransferMode_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel8_gERANToEUTRASupportInGERANPacketTransferMode_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(AccessCapAdditionsRel8_gERANToEUTRASupportInGERANPacketTransferMode_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel8_priorityBasedReselectionSupport_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(AccessCapAdditionsRel8_priorityBasedReselectionSupport_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel8_priorityBasedReselectionSupport_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(AccessCapAdditionsRel8_priorityBasedReselectionSupport_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel8_encoder(const AccessCapAdditionsRel8& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel8' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsRel8_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel8_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel8& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel8' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsRel8_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void EnhancedFlexTimeslotAssignment_presenceBitalternativeEFTAMultislotClass_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(EnhancedFlexTimeslotAssignment_presenceBitalternativeEFTAMultislotClass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER EnhancedFlexTimeslotAssignment_presenceBitalternativeEFTAMultislotClass_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(EnhancedFlexTimeslotAssignment_presenceBitalternativeEFTAMultislotClass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void EnhancedFlexTimeslotAssignment_alternativeEFTAMultislotClass_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(EnhancedFlexTimeslotAssignment_alternativeEFTAMultislotClass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER EnhancedFlexTimeslotAssignment_alternativeEFTAMultislotClass_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(EnhancedFlexTimeslotAssignment_alternativeEFTAMultislotClass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void EnhancedFlexTimeslotAssignment_eFTAMultislotCapabilityReductionforDownlinkDualCarrier_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(EnhancedFlexTimeslotAssignment_eFTAMultislotCapabilityReductionforDownlinkDualCarrier_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER EnhancedFlexTimeslotAssignment_eFTAMultislotCapabilityReductionforDownlinkDualCarrier_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(EnhancedFlexTimeslotAssignment_eFTAMultislotCapabilityReductionforDownlinkDualCarrier_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void EnhancedFlexTimeslotAssignment_encoder(const EnhancedFlexTimeslotAssignment& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.EnhancedFlexTimeslotAssignment' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(EnhancedFlexTimeslotAssignment_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER EnhancedFlexTimeslotAssignment_decoder(OCTETSTRING& input_stream, EnhancedFlexTimeslotAssignment& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.EnhancedFlexTimeslotAssignment' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(EnhancedFlexTimeslotAssignment_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel9_enhancedFlexTimeslotAssignment_encoder(const EnhancedFlexTimeslotAssignment& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.EnhancedFlexTimeslotAssignment' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsRel9_enhancedFlexTimeslotAssignment_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel9_enhancedFlexTimeslotAssignment_decoder(OCTETSTRING& input_stream, EnhancedFlexTimeslotAssignment& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.EnhancedFlexTimeslotAssignment' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsRel9_enhancedFlexTimeslotAssignment_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel9_indicationofUpperLayerPDUStartCapabilityforRLCUM_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(AccessCapAdditionsRel9_indicationofUpperLayerPDUStartCapabilityforRLCUM_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel9_indicationofUpperLayerPDUStartCapabilityforRLCUM_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(AccessCapAdditionsRel9_indicationofUpperLayerPDUStartCapabilityforRLCUM_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel9_eMSTCapability_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(AccessCapAdditionsRel9_eMSTCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel9_eMSTCapability_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(AccessCapAdditionsRel9_eMSTCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel9_mTTICapability_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(AccessCapAdditionsRel9_mTTICapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel9_mTTICapability_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(AccessCapAdditionsRel9_mTTICapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel9_uTRACSGCellsReporting_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(AccessCapAdditionsRel9_uTRACSGCellsReporting_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel9_uTRACSGCellsReporting_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(AccessCapAdditionsRel9_uTRACSGCellsReporting_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel9_eUTRACSGCellsReporting_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(AccessCapAdditionsRel9_eUTRACSGCellsReporting_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel9_eUTRACSGCellsReporting_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(AccessCapAdditionsRel9_eUTRACSGCellsReporting_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel9_encoder(const AccessCapAdditionsRel9& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel9' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsRel9_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel9_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel9& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel9' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsRel9_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel10_dTRCapability_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(AccessCapAdditionsRel10_dTRCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel10_dTRCapability_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(AccessCapAdditionsRel10_dTRCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel10_eMSRCapability_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(AccessCapAdditionsRel10_eMSRCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel10_eMSRCapability_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(AccessCapAdditionsRel10_eMSRCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel10_fastDownlinkFrequencySwitchingCapability_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(AccessCapAdditionsRel10_fastDownlinkFrequencySwitchingCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel10_fastDownlinkFrequencySwitchingCapability_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(AccessCapAdditionsRel10_fastDownlinkFrequencySwitchingCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel10_tIGHTER__Capability_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(AccessCapAdditionsRel10_tIGHTER__Capability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel10_tIGHTER__Capability_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(AccessCapAdditionsRel10_tIGHTER__Capability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel10_encoder(const AccessCapAdditionsRel10& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel10' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsRel10_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel10_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel10& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel10' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsRel10_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel11_fANRCapability_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(AccessCapAdditionsRel11_fANRCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel11_fANRCapability_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(AccessCapAdditionsRel11_fANRCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel11_iPACapability_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(AccessCapAdditionsRel11_iPACapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel11_iPACapability_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(AccessCapAdditionsRel11_iPACapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel11_gERANNetworkSharingSupport_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(AccessCapAdditionsRel11_gERANNetworkSharingSupport_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel11_gERANNetworkSharingSupport_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(AccessCapAdditionsRel11_gERANNetworkSharingSupport_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel11_eUTRAWidebandRSRQMeasurementsSupport_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(AccessCapAdditionsRel11_eUTRAWidebandRSRQMeasurementsSupport_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel11_eUTRAWidebandRSRQMeasurementsSupport_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(AccessCapAdditionsRel11_eUTRAWidebandRSRQMeasurementsSupport_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel11_encoder(const AccessCapAdditionsRel11& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel11' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsRel11_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel11_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel11& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel11' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsRel11_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel10_accessCapAdditionsRel11_encoder(const AccessCapAdditionsRel11& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel11' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel10_accessCapAdditionsRel11_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel10_accessCapAdditionsRel11_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel11& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel11' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel10_accessCapAdditionsRel11_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel12_uTRAMultipleFrequencyBandIndicatorsSupport_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(AccessCapAdditionsRel12_uTRAMultipleFrequencyBandIndicatorsSupport_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel12_uTRAMultipleFrequencyBandIndicatorsSupport_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(AccessCapAdditionsRel12_uTRAMultipleFrequencyBandIndicatorsSupport_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel12_eUTRAMultipleFrequencyBandIndicatorsSupport_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(AccessCapAdditionsRel12_eUTRAMultipleFrequencyBandIndicatorsSupport_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel12_eUTRAMultipleFrequencyBandIndicatorsSupport_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(AccessCapAdditionsRel12_eUTRAMultipleFrequencyBandIndicatorsSupport_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel12_presenceBitDLMCCapability_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(AccessCapAdditionsRel12_presenceBitDLMCCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel12_presenceBitDLMCCapability_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(AccessCapAdditionsRel12_presenceBitDLMCCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel12_extendedTSCSetCapabilitySupport_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(AccessCapAdditionsRel12_extendedTSCSetCapabilitySupport_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel12_extendedTSCSetCapabilitySupport_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(AccessCapAdditionsRel12_extendedTSCSetCapabilitySupport_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DLMCCapability_presenceDLMC_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(DLMCCapability_presenceDLMC_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DLMCCapability_presenceDLMC_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(DLMCCapability_presenceDLMC_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DLMCCapability_dLMCMaxBandwidth_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(DLMCCapability_dLMCMaxBandwidth_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DLMCCapability_dLMCMaxBandwidth_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(DLMCCapability_dLMCMaxBandwidth_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DLMCCapability_dLMCMaxNumOfDownlinkTimeslots_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(DLMCCapability_dLMCMaxNumOfDownlinkTimeslots_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DLMCCapability_dLMCMaxNumOfDownlinkTimeslots_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(DLMCCapability_dLMCMaxNumOfDownlinkTimeslots_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DLMCCapability_dLMCMaxNumOfDownlinkCarriers_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(DLMCCapability_dLMCMaxNumOfDownlinkCarriers_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DLMCCapability_dLMCMaxNumOfDownlinkCarriers_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(DLMCCapability_dLMCMaxNumOfDownlinkCarriers_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DLMCBandReception_dLMCNonContiguousIntraBandReception_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(DLMCBandReception_dLMCNonContiguousIntraBandReception_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DLMCBandReception_dLMCNonContiguousIntraBandReception_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(DLMCBandReception_dLMCNonContiguousIntraBandReception_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DLMCBandReception_dLMCInterBandReception_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(DLMCBandReception_dLMCInterBandReception_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DLMCBandReception_dLMCInterBandReception_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(DLMCBandReception_dLMCInterBandReception_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DLMCBandReception_encoder(const DLMCBandReception& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DLMCBandReception' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DLMCBandReception_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DLMCBandReception_decoder(OCTETSTRING& input_stream, DLMCBandReception& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DLMCBandReception' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DLMCBandReception_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DLMCCapability_dLMCBandReception_encoder(const DLMCBandReception& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DLMCBandReception' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DLMCCapability_dLMCBandReception_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DLMCCapability_dLMCBandReception_decoder(OCTETSTRING& input_stream, DLMCBandReception& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DLMCBandReception' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DLMCCapability_dLMCBandReception_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void DLMCCapability_encoder(const DLMCCapability& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DLMCCapability' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(DLMCCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER DLMCCapability_decoder(OCTETSTRING& input_stream, DLMCCapability& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DLMCCapability' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(DLMCCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel12_dLMCCapability_encoder(const DLMCCapability& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DLMCCapability' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsRel12_dLMCCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel12_dLMCCapability_decoder(OCTETSTRING& input_stream, DLMCCapability& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.DLMCCapability' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsRel12_dLMCCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsRel12_encoder(const AccessCapAdditionsRel12& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel12' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsRel12_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsRel12_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel12& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel12' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsRel12_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel11_accessCapAdditionsRel12_encoder(const AccessCapAdditionsRel12& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel12' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel11_accessCapAdditionsRel12_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel11_accessCapAdditionsRel12_decoder(OCTETSTRING& input_stream, AccessCapAdditionsRel12& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsRel12' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel11_accessCapAdditionsRel12_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapLateAdditionsRel11_encoder(const AccessCapLateAdditionsRel11& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapLateAdditionsRel11' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapLateAdditionsRel11_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapLateAdditionsRel11_decoder(OCTETSTRING& input_stream, AccessCapLateAdditionsRel11& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapLateAdditionsRel11' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapLateAdditionsRel11_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel12_accessCapLateAdditionsRel11_encoder(const AccessCapLateAdditionsRel11& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapLateAdditionsRel11' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel12_accessCapLateAdditionsRel11_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel12_accessCapLateAdditionsRel11_decoder(OCTETSTRING& input_stream, AccessCapLateAdditionsRel11& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapLateAdditionsRel11' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel12_accessCapLateAdditionsRel11_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel12_accessCapLateAdditionsAfterRel11_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(AccessCapAdditionsAfterRel12_accessCapLateAdditionsAfterRel11_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel12_accessCapLateAdditionsAfterRel11_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(AccessCapAdditionsAfterRel12_accessCapLateAdditionsAfterRel11_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel12_encoder(const AccessCapAdditionsAfterRel12& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel12' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel12_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel12_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel12& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel12' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel12_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel11_accessCapAdditionsAfterRel12_encoder(const AccessCapAdditionsAfterRel12& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel12' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel11_accessCapAdditionsAfterRel12_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel11_accessCapAdditionsAfterRel12_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel12& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel12' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel11_accessCapAdditionsAfterRel12_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel11_encoder(const AccessCapAdditionsAfterRel11& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel11' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel11_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel11_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel11& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel11' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel11_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel10_accessCapAdditionsAfterRel11_encoder(const AccessCapAdditionsAfterRel11& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel11' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel10_accessCapAdditionsAfterRel11_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel10_accessCapAdditionsAfterRel11_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel11& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel11' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel10_accessCapAdditionsAfterRel11_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel10_encoder(const AccessCapAdditionsAfterRel10& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel10' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel10_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel10_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel10& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel10' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel10_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel9_encoder(const AccessCapAdditionsAfterRel9& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel9' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel9_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel9_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel9& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel9' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel9_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel8_encoder(const AccessCapAdditionsAfterRel8& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel8' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel8_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel8_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel8& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel8' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel8_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel7_encoder(const AccessCapAdditionsAfterRel7& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel7' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel7_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel7_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel7& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel7' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel7_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel6_accessCapAdditionsAfterRel7_encoder(const AccessCapAdditionsAfterRel7& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel7' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel6_accessCapAdditionsAfterRel7_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel6_accessCapAdditionsAfterRel7_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel7& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel7' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel6_accessCapAdditionsAfterRel7_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel6_encoder(const AccessCapAdditionsAfterRel6& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel6' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel6_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel6_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel6& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel6' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel6_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel5_accessCapAdditionsAfterRel6_encoder(const AccessCapAdditionsAfterRel6& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel6' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel5_accessCapAdditionsAfterRel6_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel5_accessCapAdditionsAfterRel6_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel6& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel6' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel5_accessCapAdditionsAfterRel6_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel5_encoder(const AccessCapAdditionsAfterRel5& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel5' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel5_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel5_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel5& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel5' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel5_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel4_accessCapAdditionsAfterRel5_encoder(const AccessCapAdditionsAfterRel5& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel5' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel4_accessCapAdditionsAfterRel5_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel4_accessCapAdditionsAfterRel5_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel5& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel5' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel4_accessCapAdditionsAfterRel5_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel4_encoder(const AccessCapAdditionsAfterRel4& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel4' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel4_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel4_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel4& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel4' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel4_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel99_accessCapAdditionsAfterRel4_encoder(const AccessCapAdditionsAfterRel4& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel4' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel99_accessCapAdditionsAfterRel4_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel99_accessCapAdditionsAfterRel4_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel4& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel4' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel99_accessCapAdditionsAfterRel4_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel99_encoder(const AccessCapAdditionsAfterRel99& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel99' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel99_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel99_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel99& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel99' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel99_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel97_accessCapAdditionsAfterRel99_encoder(const AccessCapAdditionsAfterRel99& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel99' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel97_accessCapAdditionsAfterRel99_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel97_accessCapAdditionsAfterRel99_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel99& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel99' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel97_accessCapAdditionsAfterRel99_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapAdditionsAfterRel97_encoder(const AccessCapAdditionsAfterRel97& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel97' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapAdditionsAfterRel97_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapAdditionsAfterRel97_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel97& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel97' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapAdditionsAfterRel97_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapabilities_accessCapAdditionsAfterRel97_encoder(const AccessCapAdditionsAfterRel97& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel97' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapabilities_accessCapAdditionsAfterRel97_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapabilities_accessCapAdditionsAfterRel97_decoder(OCTETSTRING& input_stream, AccessCapAdditionsAfterRel97& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapAdditionsAfterRel97' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapabilities_accessCapAdditionsAfterRel97_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapabilities_encoder(const AccessCapabilities& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapabilities' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapabilities_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapabilities_decoder(OCTETSTRING& input_stream, AccessCapabilities& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapabilities' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapabilities_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapabilitiesStruct_accessCapabilities_encoder(const AccessCapabilities& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapabilities' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapabilitiesStruct_accessCapabilities_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapabilitiesStruct_accessCapabilities_decoder(OCTETSTRING& input_stream, AccessCapabilities& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapabilities' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapabilitiesStruct_accessCapabilities_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapabilitiesStruct_spare__bits_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapabilitiesStruct_spare__bits_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapabilitiesStruct_spare__bits_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapabilitiesStruct_spare__bits_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessCapabilitiesStruct_encoder(const AccessCapabilitiesStruct& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapabilitiesStruct' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessCapabilitiesStruct_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessCapabilitiesStruct_decoder(OCTETSTRING& input_stream, AccessCapabilitiesStruct& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapabilitiesStruct' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessCapabilitiesStruct_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSRACapabilityValuesExclude1111_accessCapabilities_encoder(const AccessCapabilitiesStruct& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapabilitiesStruct' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSRACapabilityValuesExclude1111_accessCapabilities_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRACapabilityValuesExclude1111_accessCapabilities_decoder(OCTETSTRING& input_stream, AccessCapabilitiesStruct& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessCapabilitiesStruct' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSRACapabilityValuesExclude1111_accessCapabilities_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSRACapabilityValuesExclude1111_encoder(const MSRACapabilityValuesExclude1111& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRACapabilityValuesExclude1111' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSRACapabilityValuesExclude1111_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRACapabilityValuesExclude1111_decoder(OCTETSTRING& input_stream, MSRACapabilityValuesExclude1111& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRACapabilityValuesExclude1111' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSRACapabilityValuesExclude1111_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSRACapabilityValues1111_accessTechnType_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSRACapabilityValues1111_accessTechnType_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRACapabilityValues1111_accessTechnType_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSRACapabilityValues1111_accessTechnType_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSRACapabilityValues1111_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(MSRACapabilityValues1111_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRACapabilityValues1111_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(MSRACapabilityValues1111_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 MSRACapabilityValues1111_presenceIndicator__AdditionalAccessTechnologiesRepetition_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(MSRACapabilityValues1111_presenceIndicator__AdditionalAccessTechnologiesRepetition_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRACapabilityValues1111_presenceIndicator__AdditionalAccessTechnologiesRepetition_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(MSRACapabilityValues1111_presenceIndicator__AdditionalAccessTechnologiesRepetition_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSRACapabilityValues1111_spare__bits_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSRACapabilityValues1111_spare__bits_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRACapabilityValues1111_spare__bits_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSRACapabilityValues1111_spare__bits_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

boolean operator==(null_type, const AdditionalAccessTechnologiesRepetition& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @MobileL3_GMM_SM_Types.AdditionalAccessTechnologiesRepetition.");
return other_value.val_ptr->n_elements == 0;
}

void AdditionalAccessTechnologies_accessTechnType_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AdditionalAccessTechnologies_accessTechnType_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AdditionalAccessTechnologies_accessTechnType_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AdditionalAccessTechnologies_accessTechnType_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AdditionalAccessTechnologies_gMSKPowerClass_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(AdditionalAccessTechnologies_gMSKPowerClass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AdditionalAccessTechnologies_gMSKPowerClass_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(AdditionalAccessTechnologies_gMSKPowerClass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AdditionalAccessTechnologies_psk8PowerClass_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(AdditionalAccessTechnologies_psk8PowerClass_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AdditionalAccessTechnologies_psk8PowerClass_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(AdditionalAccessTechnologies_psk8PowerClass_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AdditionalAccessTechnologies_encoder(const AdditionalAccessTechnologies& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalAccessTechnologies' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AdditionalAccessTechnologies_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AdditionalAccessTechnologies_decoder(OCTETSTRING& input_stream, AdditionalAccessTechnologies& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalAccessTechnologies' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AdditionalAccessTechnologies_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AdditionalAccessTechnologiesRecord_additionalAccessTechnologies_encoder(const AdditionalAccessTechnologies& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalAccessTechnologies' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AdditionalAccessTechnologiesRecord_additionalAccessTechnologies_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AdditionalAccessTechnologiesRecord_additionalAccessTechnologies_decoder(OCTETSTRING& input_stream, AdditionalAccessTechnologies& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalAccessTechnologies' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AdditionalAccessTechnologiesRecord_additionalAccessTechnologies_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AdditionalAccessTechnologiesRecord_extensionBit_encoder(const BITSTRING& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, TRUE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AdditionalAccessTechnologiesRecord_extensionBit_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AdditionalAccessTechnologiesRecord_extensionBit_decoder(OCTETSTRING& input_stream, BITSTRING& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_name, &coding_type, &extra_options, FALSE);
if (coding_type != TTCN_EncDec::CT_RAW) {
TTCN_Logger::begin_event_log2str();
coding_name.log();
TTCN_error("Type `bitstring' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AdditionalAccessTechnologiesRecord_extensionBit_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AdditionalAccessTechnologiesRecord_encoder(const AdditionalAccessTechnologiesRecord& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalAccessTechnologiesRecord' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AdditionalAccessTechnologiesRecord_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AdditionalAccessTechnologiesRecord_decoder(OCTETSTRING& input_stream, AdditionalAccessTechnologiesRecord& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalAccessTechnologiesRecord' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AdditionalAccessTechnologiesRecord_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AdditionalAccessTechnologiesRepetition_encoder(const AdditionalAccessTechnologiesRepetition& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalAccessTechnologiesRepetition' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AdditionalAccessTechnologiesRepetition_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AdditionalAccessTechnologiesRepetition_decoder(OCTETSTRING& input_stream, AdditionalAccessTechnologiesRepetition& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalAccessTechnologiesRepetition' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AdditionalAccessTechnologiesRepetition_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSRACapabilityValues1111_additionalAccessTechnologiesRepetition_encoder(const AdditionalAccessTechnologiesRepetition& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalAccessTechnologiesRepetition' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSRACapabilityValues1111_additionalAccessTechnologiesRepetition_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRACapabilityValues1111_additionalAccessTechnologiesRepetition_decoder(OCTETSTRING& input_stream, AdditionalAccessTechnologiesRepetition& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalAccessTechnologiesRepetition' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSRACapabilityValues1111_additionalAccessTechnologiesRepetition_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSRACapabilityValues1111_encoder(const MSRACapabilityValues1111& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRACapabilityValues1111' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSRACapabilityValues1111_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRACapabilityValues1111_decoder(OCTETSTRING& input_stream, MSRACapabilityValues1111& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRACapabilityValues1111' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSRACapabilityValues1111_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSRACapabilityValues_encoder(const MSRACapabilityValues& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRACapabilityValues' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSRACapabilityValues_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRACapabilityValues_decoder(OCTETSTRING& input_stream, MSRACapabilityValues& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRACapabilityValues' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSRACapabilityValues_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSRACapabilityValuesRecord_mSRACapabilityValues_encoder(const MSRACapabilityValues& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRACapabilityValues' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSRACapabilityValuesRecord_mSRACapabilityValues_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRACapabilityValuesRecord_mSRACapabilityValues_decoder(OCTETSTRING& input_stream, MSRACapabilityValues& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRACapabilityValues' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSRACapabilityValuesRecord_mSRACapabilityValues_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSRACapabilityValuesRecord_presenceBitMSRACap_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(MSRACapabilityValuesRecord_presenceBitMSRACap_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRACapabilityValuesRecord_presenceBitMSRACap_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(MSRACapabilityValuesRecord_presenceBitMSRACap_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSRACapabilityValuesRecord_encoder(const MSRACapabilityValuesRecord& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRACapabilityValuesRecord' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSRACapabilityValuesRecord_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRACapabilityValuesRecord_decoder(OCTETSTRING& input_stream, MSRACapabilityValuesRecord& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRACapabilityValuesRecord' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSRACapabilityValuesRecord_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSRadioAccessCapabilityV_encoder(const MSRadioAccessCapabilityV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRadioAccessCapabilityV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSRadioAccessCapabilityV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRadioAccessCapabilityV_decoder(OCTETSTRING& input_stream, MSRadioAccessCapabilityV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRadioAccessCapabilityV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSRadioAccessCapabilityV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSRadioAccessCapabilityLV_msRadioAccessCapabilityV_encoder(const MSRadioAccessCapabilityV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRadioAccessCapabilityV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSRadioAccessCapabilityLV_msRadioAccessCapabilityV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRadioAccessCapabilityLV_msRadioAccessCapabilityV_decoder(OCTETSTRING& input_stream, MSRadioAccessCapabilityV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRadioAccessCapabilityV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSRadioAccessCapabilityLV_msRadioAccessCapabilityV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MSRadioAccessCapabilityLV_encoder(const MSRadioAccessCapabilityLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRadioAccessCapabilityLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MSRadioAccessCapabilityLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MSRadioAccessCapabilityLV_decoder(OCTETSTRING& input_stream, MSRadioAccessCapabilityLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MSRadioAccessCapabilityLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MSRadioAccessCapabilityLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GMM__CauseV_encoder(const GMM__CauseV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.GMM_CauseV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GMM__CauseV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GMM__CauseV_decoder(OCTETSTRING& input_stream, GMM__CauseV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.GMM_CauseV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GMM__CauseV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GMM__CauseTV_encoder(const GMM__CauseTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.GMM_CauseTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GMM__CauseTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GMM__CauseTV_decoder(OCTETSTRING& input_stream, GMM__CauseTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.GMM_CauseTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GMM__CauseTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingAreaIdentificationV_encoder(const RoutingAreaIdentificationV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RoutingAreaIdentificationV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RoutingAreaIdentificationV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingAreaIdentificationV_decoder(OCTETSTRING& input_stream, RoutingAreaIdentificationV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RoutingAreaIdentificationV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RoutingAreaIdentificationV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UpdateResultV_encoder(const UpdateResultV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UpdateResultV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UpdateResultV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UpdateResultV_decoder(OCTETSTRING& input_stream, UpdateResultV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UpdateResultV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UpdateResultV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UpdateResultTV_encoder(const UpdateResultTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UpdateResultTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UpdateResultTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UpdateResultTV_decoder(OCTETSTRING& input_stream, UpdateResultTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UpdateResultTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UpdateResultTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UpdateTypeV_encoder(const UpdateTypeV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UpdateTypeV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UpdateTypeV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UpdateTypeV_decoder(OCTETSTRING& input_stream, UpdateTypeV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UpdateTypeV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UpdateTypeV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UpdateTypeTV_encoder(const UpdateTypeTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UpdateTypeTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UpdateTypeTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UpdateTypeTV_decoder(OCTETSTRING& input_stream, UpdateTypeTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UpdateTypeTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UpdateTypeTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ACReferenceNumberV_encoder(const ACReferenceNumberV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ACReferenceNumberV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ACReferenceNumberV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ACReferenceNumberV_decoder(OCTETSTRING& input_stream, ACReferenceNumberV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ACReferenceNumberV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ACReferenceNumberV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ACReferenceNumberTV_encoder(const ACReferenceNumberTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ACReferenceNumberTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ACReferenceNumberTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ACReferenceNumberTV_decoder(OCTETSTRING& input_stream, ACReferenceNumberTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ACReferenceNumberTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ACReferenceNumberTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ServiceTypeV_encoder(const ServiceTypeV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ServiceTypeV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ServiceTypeV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ServiceTypeV_decoder(OCTETSTRING& input_stream, ServiceTypeV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ServiceTypeV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ServiceTypeV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void CellNotificationT_encoder(const CellNotificationT& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.CellNotificationT' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(CellNotificationT_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER CellNotificationT_decoder(OCTETSTRING& input_stream, CellNotificationT& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.CellNotificationT' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(CellNotificationT_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PC__LCSCapabilityLV_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(PC__LCSCapabilityLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PC__LCSCapabilityLV_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(PC__LCSCapabilityLV_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 PC__LCSCapabilityV_encoder(const PC__LCSCapabilityV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PC_LCSCapabilityV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PC__LCSCapabilityV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PC__LCSCapabilityV_decoder(OCTETSTRING& input_stream, PC__LCSCapabilityV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PC_LCSCapabilityV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PC__LCSCapabilityV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PC__LCSCapabilityLV_encoder(const PC__LCSCapabilityLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PC_LCSCapabilityLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PC__LCSCapabilityLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PC__LCSCapabilityLV_decoder(OCTETSTRING& input_stream, PC__LCSCapabilityLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PC_LCSCapabilityLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PC__LCSCapabilityLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PC__LCSCapability_encoder(const PC__LCSCapability& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PC_LCSCapability' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PC__LCSCapability_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PC__LCSCapability_decoder(OCTETSTRING& input_stream, PC__LCSCapability& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PC_LCSCapability' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PC__LCSCapability_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NetworkFeatureSupportV_encoder(const NetworkFeatureSupportV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NetworkFeatureSupportV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NetworkFeatureSupportV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NetworkFeatureSupportV_decoder(OCTETSTRING& input_stream, NetworkFeatureSupportV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NetworkFeatureSupportV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NetworkFeatureSupportV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NetworkFeatureSupportTV_encoder(const NetworkFeatureSupportTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NetworkFeatureSupportTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NetworkFeatureSupportTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NetworkFeatureSupportTV_decoder(OCTETSTRING& input_stream, NetworkFeatureSupportTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NetworkFeatureSupportTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NetworkFeatureSupportTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AdditionalNetworkFeatureSupportTLV_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(AdditionalNetworkFeatureSupportTLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AdditionalNetworkFeatureSupportTLV_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(AdditionalNetworkFeatureSupportTLV_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 AdditionalNetworkFeatureSupportV_encoder(const AdditionalNetworkFeatureSupportV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalNetworkFeatureSupportV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AdditionalNetworkFeatureSupportV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AdditionalNetworkFeatureSupportV_decoder(OCTETSTRING& input_stream, AdditionalNetworkFeatureSupportV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalNetworkFeatureSupportV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AdditionalNetworkFeatureSupportV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AdditionalNetworkFeatureSupportTLV_encoder(const AdditionalNetworkFeatureSupportTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalNetworkFeatureSupportTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AdditionalNetworkFeatureSupportTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AdditionalNetworkFeatureSupportTLV_decoder(OCTETSTRING& input_stream, AdditionalNetworkFeatureSupportTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AdditionalNetworkFeatureSupportTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AdditionalNetworkFeatureSupportTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void InterRATInformationContainerTLV_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(InterRATInformationContainerTLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER InterRATInformationContainerTLV_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(InterRATInformationContainerTLV_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 InterRATInformationContainerTLV_interRATInformationContainerV_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 InterRATInformationContainerTLV_interRATInformationContainerV_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 InterRATInformationContainerTLV_encoder(const InterRATInformationContainerTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.InterRATInformationContainerTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(InterRATInformationContainerTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER InterRATInformationContainerTLV_decoder(OCTETSTRING& input_stream, InterRATInformationContainerTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.InterRATInformationContainerTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(InterRATInformationContainerTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RequestedMSInformationTV_encoder(const RequestedMSInformationTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RequestedMSInformationTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RequestedMSInformationTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RequestedMSInformationTV_decoder(OCTETSTRING& input_stream, RequestedMSInformationTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RequestedMSInformationTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RequestedMSInformationTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UENetworkCapabilityLV_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(UENetworkCapabilityLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UENetworkCapabilityLV_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(UENetworkCapabilityLV_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 UENetworkCapabilityV_spare4_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 UENetworkCapabilityV_spare4_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 UENetworkCapabilityV_encoder(const UENetworkCapabilityV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UENetworkCapabilityV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UENetworkCapabilityV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UENetworkCapabilityV_decoder(OCTETSTRING& input_stream, UENetworkCapabilityV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UENetworkCapabilityV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UENetworkCapabilityV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UENetworkCapabilityLV_encoder(const UENetworkCapabilityLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UENetworkCapabilityLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UENetworkCapabilityLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UENetworkCapabilityLV_decoder(OCTETSTRING& input_stream, UENetworkCapabilityLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UENetworkCapabilityLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UENetworkCapabilityLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UENetworkCapabilityTLV_encoder(const UENetworkCapabilityTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UENetworkCapabilityTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UENetworkCapabilityTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UENetworkCapabilityTLV_decoder(OCTETSTRING& input_stream, UENetworkCapabilityTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UENetworkCapabilityTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UENetworkCapabilityTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void EUTRANinterRATInformationContainerTLV_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(EUTRANinterRATInformationContainerTLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER EUTRANinterRATInformationContainerTLV_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(EUTRANinterRATInformationContainerTLV_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 EUTRANinterRATInformationContainerTLV_eUTRANinterRATInformationContainerV_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 EUTRANinterRATInformationContainerTLV_eUTRANinterRATInformationContainerV_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 EUTRANinterRATInformationContainerTLV_encoder(const EUTRANinterRATInformationContainerTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.EUTRANinterRATInformationContainerTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(EUTRANinterRATInformationContainerTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER EUTRANinterRATInformationContainerTLV_decoder(OCTETSTRING& input_stream, EUTRANinterRATInformationContainerTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.EUTRANinterRATInformationContainerTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(EUTRANinterRATInformationContainerTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void VoiceDomainPreferenceandUEsUsageSettingTLV_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(VoiceDomainPreferenceandUEsUsageSettingTLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER VoiceDomainPreferenceandUEsUsageSettingTLV_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(VoiceDomainPreferenceandUEsUsageSettingTLV_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 VDPaUEsUS__V_encoder(const VDPaUEsUS__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_GMM_SM_Types.VDPaUEsUS_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(VDPaUEsUS__V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER VDPaUEsUS__V_decoder(OCTETSTRING& input_stream, VDPaUEsUS__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_GMM_SM_Types.VDPaUEsUS_V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(VDPaUEsUS__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 VoiceDomainPreferenceandUEsUsageSettingTLV_encoder(const VoiceDomainPreferenceandUEsUsageSettingTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.VoiceDomainPreferenceandUEsUsageSettingTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(VoiceDomainPreferenceandUEsUsageSettingTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER VoiceDomainPreferenceandUEsUsageSettingTLV_decoder(OCTETSTRING& input_stream, VoiceDomainPreferenceandUEsUsageSettingTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.VoiceDomainPreferenceandUEsUsageSettingTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(VoiceDomainPreferenceandUEsUsageSettingTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void LocationAreaIdentification2__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(LocationAreaIdentification2__TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER LocationAreaIdentification2__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(LocationAreaIdentification2__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 LocationAreaIdentification2__TLV_encoder(const LocationAreaIdentification2__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_GMM_SM_Types.LocationAreaIdentification2_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(LocationAreaIdentification2__TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER LocationAreaIdentification2__TLV_decoder(OCTETSTRING& input_stream, LocationAreaIdentification2__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_GMM_SM_Types.LocationAreaIdentification2_TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(LocationAreaIdentification2__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 NetworkResourceIdentifierContainerLV_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(NetworkResourceIdentifierContainerLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NetworkResourceIdentifierContainerLV_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(NetworkResourceIdentifierContainerLV_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 NetworkResourceIdentifierContainerV_nRIContainerValue_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(NetworkResourceIdentifierContainerV_nRIContainerValue_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NetworkResourceIdentifierContainerV_nRIContainerValue_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(NetworkResourceIdentifierContainerV_nRIContainerValue_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NetworkResourceIdentifierContainerV_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(NetworkResourceIdentifierContainerV_spare_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NetworkResourceIdentifierContainerV_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(NetworkResourceIdentifierContainerV_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 NetworkResourceIdentifierContainerV_encoder(const NetworkResourceIdentifierContainerV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NetworkResourceIdentifierContainerV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NetworkResourceIdentifierContainerV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NetworkResourceIdentifierContainerV_decoder(OCTETSTRING& input_stream, NetworkResourceIdentifierContainerV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NetworkResourceIdentifierContainerV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NetworkResourceIdentifierContainerV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NetworkResourceIdentifierContainerLV_encoder(const NetworkResourceIdentifierContainerLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NetworkResourceIdentifierContainerLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NetworkResourceIdentifierContainerLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NetworkResourceIdentifierContainerLV_decoder(OCTETSTRING& input_stream, NetworkResourceIdentifierContainerLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NetworkResourceIdentifierContainerLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NetworkResourceIdentifierContainerLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NetworkResourceIdentifierContainerTLV_encoder(const NetworkResourceIdentifierContainerTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NetworkResourceIdentifierContainerTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NetworkResourceIdentifierContainerTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NetworkResourceIdentifierContainerTLV_decoder(OCTETSTRING& input_stream, NetworkResourceIdentifierContainerTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NetworkResourceIdentifierContainerTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NetworkResourceIdentifierContainerTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ExtendedDRXParametersTLV_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(ExtendedDRXParametersTLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ExtendedDRXParametersTLV_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(ExtendedDRXParametersTLV_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 ExtendedDRXParametersTLV_encoder(const ExtendedDRXParametersTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ExtendedDRXParametersTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ExtendedDRXParametersTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ExtendedDRXParametersTLV_decoder(OCTETSTRING& input_stream, ExtendedDRXParametersTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ExtendedDRXParametersTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ExtendedDRXParametersTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessPointNameTLV_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(AccessPointNameTLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessPointNameTLV_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(AccessPointNameTLV_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 AccessPointNameV_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 AccessPointNameV_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 AccessPointNameTLV_encoder(const AccessPointNameTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessPointNameTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessPointNameTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessPointNameTLV_decoder(OCTETSTRING& input_stream, AccessPointNameTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessPointNameTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessPointNameTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void AccessPointNameLV_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(AccessPointNameLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessPointNameLV_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(AccessPointNameLV_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 AccessPointNameLV_encoder(const AccessPointNameLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessPointNameLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(AccessPointNameLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER AccessPointNameLV_decoder(OCTETSTRING& input_stream, AccessPointNameLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.AccessPointNameLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(AccessPointNameLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NSAPIV_encoder(const NSAPIV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NSAPIV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NSAPIV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NSAPIV_decoder(OCTETSTRING& input_stream, NSAPIV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NSAPIV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NSAPIV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NSAPITV_encoder(const NSAPITV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NSAPITV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NSAPITV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NSAPITV_decoder(OCTETSTRING& input_stream, NSAPITV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NSAPITV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NSAPITV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ProtocolConfigOptionsTLV_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(ProtocolConfigOptionsTLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ProtocolConfigOptionsTLV_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(ProtocolConfigOptionsTLV_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;
}
}

boolean operator==(null_type, const ProtocolIDs__and__ContainerIDs& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @MobileL3_GMM_SM_Types.ProtocolIDs_and_ContainerIDs.");
return other_value.val_ptr->n_elements == 0;
}

void ProtocolID__or__ContainerID_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(ProtocolID__or__ContainerID_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ProtocolID__or__ContainerID_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(ProtocolID__or__ContainerID_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 ProtocolID__or__ContainerID_protID__orContID__Contents_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 ProtocolID__or__ContainerID_protID__orContID__Contents_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 ProtocolID__or__ContainerID_encoder(const ProtocolID__or__ContainerID& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ProtocolID_or_ContainerID' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ProtocolID__or__ContainerID_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ProtocolID__or__ContainerID_decoder(OCTETSTRING& input_stream, ProtocolID__or__ContainerID& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ProtocolID_or_ContainerID' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ProtocolID__or__ContainerID_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ProtocolIDs__and__ContainerIDs_encoder(const ProtocolIDs__and__ContainerIDs& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ProtocolIDs_and_ContainerIDs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ProtocolIDs__and__ContainerIDs_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ProtocolIDs__and__ContainerIDs_decoder(OCTETSTRING& input_stream, ProtocolIDs__and__ContainerIDs& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ProtocolIDs_and_ContainerIDs' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ProtocolIDs__and__ContainerIDs_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ProtocolConfigOptionsV_encoder(const ProtocolConfigOptionsV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ProtocolConfigOptionsV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ProtocolConfigOptionsV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ProtocolConfigOptionsV_decoder(OCTETSTRING& input_stream, ProtocolConfigOptionsV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ProtocolConfigOptionsV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ProtocolConfigOptionsV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ProtocolConfigOptionsTLV_encoder(const ProtocolConfigOptionsTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ProtocolConfigOptionsTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ProtocolConfigOptionsTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ProtocolConfigOptionsTLV_decoder(OCTETSTRING& input_stream, ProtocolConfigOptionsTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ProtocolConfigOptionsTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ProtocolConfigOptionsTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDPAddressLV_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(PDPAddressLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDPAddressLV_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(PDPAddressLV_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 PDPAddressV_addressInfo_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 PDPAddressV_addressInfo_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 PDPAddressV_encoder(const PDPAddressV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDPAddressV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDPAddressV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDPAddressV_decoder(OCTETSTRING& input_stream, PDPAddressV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDPAddressV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDPAddressV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDPAddressLV_encoder(const PDPAddressLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDPAddressLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDPAddressLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDPAddressLV_decoder(OCTETSTRING& input_stream, PDPAddressLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDPAddressLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDPAddressLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDPAddressTLV_encoder(const PDPAddressTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDPAddressTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDPAddressTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDPAddressTLV_decoder(OCTETSTRING& input_stream, PDPAddressTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDPAddressTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDPAddressTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void QoSLV_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(QoSLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER QoSLV_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(QoSLV_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 QoSV_encoder(const QoSV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.QoSV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(QoSV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER QoSV_decoder(OCTETSTRING& input_stream, QoSV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.QoSV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(QoSV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void QoSLV_encoder(const QoSLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.QoSLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(QoSLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER QoSLV_decoder(OCTETSTRING& input_stream, QoSLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.QoSLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(QoSLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void QoSTLV_encoder(const QoSTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.QoSTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(QoSTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER QoSTLV_decoder(OCTETSTRING& input_stream, QoSTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.QoSTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(QoSTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ReAttemptIndicatorLV_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(ReAttemptIndicatorLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ReAttemptIndicatorLV_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(ReAttemptIndicatorLV_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 ReAttemptIndicatorV_encoder(const ReAttemptIndicatorV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ReAttemptIndicatorV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ReAttemptIndicatorV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ReAttemptIndicatorV_decoder(OCTETSTRING& input_stream, ReAttemptIndicatorV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ReAttemptIndicatorV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ReAttemptIndicatorV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ReAttemptIndicatorLV_encoder(const ReAttemptIndicatorLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ReAttemptIndicatorLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ReAttemptIndicatorLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ReAttemptIndicatorLV_decoder(OCTETSTRING& input_stream, ReAttemptIndicatorLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ReAttemptIndicatorLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ReAttemptIndicatorLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ReAttemptIndicatorTLV_encoder(const ReAttemptIndicatorTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ReAttemptIndicatorTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ReAttemptIndicatorTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ReAttemptIndicatorTLV_decoder(OCTETSTRING& input_stream, ReAttemptIndicatorTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ReAttemptIndicatorTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ReAttemptIndicatorTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void SMCause2LV_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(SMCause2LV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER SMCause2LV_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(SMCause2LV_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 SMCause2LV_encoder(const SMCause2LV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.SMCause2LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(SMCause2LV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER SMCause2LV_decoder(OCTETSTRING& input_stream, SMCause2LV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.SMCause2LV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(SMCause2LV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void SMCause2TLV_encoder(const SMCause2TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.SMCause2TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(SMCause2TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER SMCause2TLV_decoder(OCTETSTRING& input_stream, SMCause2TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.SMCause2TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(SMCause2TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void LinkedTILV_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(LinkedTILV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER LinkedTILV_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(LinkedTILV_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 TI__Extension_encoder(const TI__Extension& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TI_Extension' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TI__Extension_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TI__Extension_decoder(OCTETSTRING& input_stream, TI__Extension& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TI_Extension' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TI__Extension_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void LinkedTIV_tIExtension_encoder(const TI__Extension& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TI_Extension' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(LinkedTIV_tIExtension_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER LinkedTIV_tIExtension_decoder(OCTETSTRING& input_stream, TI__Extension& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TI_Extension' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(LinkedTIV_tIExtension_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void LinkedTIV_encoder(const LinkedTIV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.LinkedTIV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(LinkedTIV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER LinkedTIV_decoder(OCTETSTRING& input_stream, LinkedTIV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.LinkedTIV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(LinkedTIV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void LinkedTILV_encoder(const LinkedTILV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.LinkedTILV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(LinkedTILV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER LinkedTILV_decoder(OCTETSTRING& input_stream, LinkedTILV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.LinkedTILV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(LinkedTILV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void LinkedTITLV_encoder(const LinkedTITLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.LinkedTITLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(LinkedTITLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER LinkedTITLV_decoder(OCTETSTRING& input_stream, LinkedTITLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.LinkedTITLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(LinkedTITLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void LLC__SAPIV_encoder(const LLC__SAPIV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.LLC_SAPIV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(LLC__SAPIV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER LLC__SAPIV_decoder(OCTETSTRING& input_stream, LLC__SAPIV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.LLC_SAPIV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(LLC__SAPIV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void LLC__SAPITV_encoder(const LLC__SAPITV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.LLC_SAPITV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(LLC__SAPITV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER LLC__SAPITV_decoder(OCTETSTRING& input_stream, LLC__SAPITV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.LLC_SAPITV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(LLC__SAPITV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TearDownIndicatorV_encoder(const TearDownIndicatorV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TearDownIndicatorV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TearDownIndicatorV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TearDownIndicatorV_decoder(OCTETSTRING& input_stream, TearDownIndicatorV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TearDownIndicatorV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TearDownIndicatorV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TearDownIndicatorTV_encoder(const TearDownIndicatorTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TearDownIndicatorTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TearDownIndicatorTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TearDownIndicatorTV_decoder(OCTETSTRING& input_stream, TearDownIndicatorTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TearDownIndicatorTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TearDownIndicatorTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketFlowIDTLV_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(PacketFlowIDTLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketFlowIDTLV_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(PacketFlowIDTLV_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 PacketFlowIDV_encoder(const PacketFlowIDV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PacketFlowIDV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketFlowIDV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketFlowIDV_decoder(OCTETSTRING& input_stream, PacketFlowIDV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PacketFlowIDV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketFlowIDV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketFlowIDTLV_encoder(const PacketFlowIDTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PacketFlowIDTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketFlowIDTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketFlowIDTLV_decoder(OCTETSTRING& input_stream, PacketFlowIDTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PacketFlowIDTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketFlowIDTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TrafficFlowTemplateLV_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(TrafficFlowTemplateLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TrafficFlowTemplateLV_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(TrafficFlowTemplateLV_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 TrafficFlowTemplateV__CreateAddReplaceTFT_numberOfPacketFilters_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(TrafficFlowTemplateV__CreateAddReplaceTFT_numberOfPacketFilters_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TrafficFlowTemplateV__CreateAddReplaceTFT_numberOfPacketFilters_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(TrafficFlowTemplateV__CreateAddReplaceTFT_numberOfPacketFilters_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

boolean operator==(null_type, const PacketFilterList__CreateAddReplaceTFT& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @MobileL3_GMM_SM_Types.PacketFilterList_CreateAddReplaceTFT.");
return other_value.val_ptr->n_elements == 0;
}

void PacketFilterIdentifier__CreateAddReplaceTFT_encoder(const PacketFilterIdentifier__CreateAddReplaceTFT& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PacketFilterIdentifier_CreateAddReplaceTFT' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketFilterIdentifier__CreateAddReplaceTFT_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketFilterIdentifier__CreateAddReplaceTFT_decoder(OCTETSTRING& input_stream, PacketFilterIdentifier__CreateAddReplaceTFT& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PacketFilterIdentifier_CreateAddReplaceTFT' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketFilterIdentifier__CreateAddReplaceTFT_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketFilter_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(PacketFilter_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketFilter_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(PacketFilter_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 PacketFilter_contents_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 PacketFilter_contents_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 PacketFilter_encoder(const PacketFilter& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PacketFilter' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketFilter_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketFilter_decoder(OCTETSTRING& input_stream, PacketFilter& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PacketFilter' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketFilter_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketFilterList__CreateAddReplaceTFT_encoder(const PacketFilterList__CreateAddReplaceTFT& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PacketFilterList_CreateAddReplaceTFT' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketFilterList__CreateAddReplaceTFT_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketFilterList__CreateAddReplaceTFT_decoder(OCTETSTRING& input_stream, PacketFilterList__CreateAddReplaceTFT& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PacketFilterList_CreateAddReplaceTFT' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketFilterList__CreateAddReplaceTFT_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

boolean operator==(null_type, const ParametersList& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @MobileL3_GMM_SM_Types.ParametersList.");
return other_value.val_ptr->n_elements == 0;
}

void Parameter_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(Parameter_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER Parameter_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(Parameter_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 Parameter_contents_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 Parameter_contents_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 Parameter_encoder(const Parameter& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.Parameter' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(Parameter_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER Parameter_decoder(OCTETSTRING& input_stream, Parameter& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.Parameter' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(Parameter_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ParametersList_encoder(const ParametersList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ParametersList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ParametersList_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ParametersList_decoder(OCTETSTRING& input_stream, ParametersList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ParametersList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ParametersList_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TrafficFlowTemplateV__CreateAddReplaceTFT_parametersList_encoder(const ParametersList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ParametersList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TrafficFlowTemplateV__CreateAddReplaceTFT_parametersList_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TrafficFlowTemplateV__CreateAddReplaceTFT_parametersList_decoder(OCTETSTRING& input_stream, ParametersList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ParametersList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TrafficFlowTemplateV__CreateAddReplaceTFT_parametersList_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TrafficFlowTemplateV__CreateAddReplaceTFT_encoder(const TrafficFlowTemplateV__CreateAddReplaceTFT& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TrafficFlowTemplateV_CreateAddReplaceTFT' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TrafficFlowTemplateV__CreateAddReplaceTFT_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TrafficFlowTemplateV__CreateAddReplaceTFT_decoder(OCTETSTRING& input_stream, TrafficFlowTemplateV__CreateAddReplaceTFT& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TrafficFlowTemplateV_CreateAddReplaceTFT' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TrafficFlowTemplateV__CreateAddReplaceTFT_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TrafficFlowTemplateV__DeletePacketFilter_numberOfPacketFilters_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(TrafficFlowTemplateV__DeletePacketFilter_numberOfPacketFilters_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TrafficFlowTemplateV__DeletePacketFilter_numberOfPacketFilters_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(TrafficFlowTemplateV__DeletePacketFilter_numberOfPacketFilters_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

boolean operator==(null_type, const PacketFilterList__DeletePacketFilter& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @MobileL3_GMM_SM_Types.PacketFilterList_DeletePacketFilter.");
return other_value.val_ptr->n_elements == 0;
}

void PacketFilterIdentifier_encoder(const PacketFilterIdentifier& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PacketFilterIdentifier' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketFilterIdentifier_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketFilterIdentifier_decoder(OCTETSTRING& input_stream, PacketFilterIdentifier& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PacketFilterIdentifier' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketFilterIdentifier_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PacketFilterList__DeletePacketFilter_encoder(const PacketFilterList__DeletePacketFilter& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PacketFilterList_DeletePacketFilter' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PacketFilterList__DeletePacketFilter_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PacketFilterList__DeletePacketFilter_decoder(OCTETSTRING& input_stream, PacketFilterList__DeletePacketFilter& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PacketFilterList_DeletePacketFilter' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PacketFilterList__DeletePacketFilter_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TrafficFlowTemplateV__DeletePacketFilter_parametersList_encoder(const ParametersList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ParametersList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TrafficFlowTemplateV__DeletePacketFilter_parametersList_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TrafficFlowTemplateV__DeletePacketFilter_parametersList_decoder(OCTETSTRING& input_stream, ParametersList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ParametersList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TrafficFlowTemplateV__DeletePacketFilter_parametersList_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TrafficFlowTemplateV__DeletePacketFilter_encoder(const TrafficFlowTemplateV__DeletePacketFilter& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TrafficFlowTemplateV_DeletePacketFilter' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TrafficFlowTemplateV__DeletePacketFilter_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TrafficFlowTemplateV__DeletePacketFilter_decoder(OCTETSTRING& input_stream, TrafficFlowTemplateV__DeletePacketFilter& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TrafficFlowTemplateV_DeletePacketFilter' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TrafficFlowTemplateV__DeletePacketFilter_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TrafficFlowTemplateV__Delete__Existing__TFT__or__No__TFT__Operation_parametersList_encoder(const ParametersList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ParametersList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TrafficFlowTemplateV__Delete__Existing__TFT__or__No__TFT__Operation_parametersList_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TrafficFlowTemplateV__Delete__Existing__TFT__or__No__TFT__Operation_parametersList_decoder(OCTETSTRING& input_stream, ParametersList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ParametersList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TrafficFlowTemplateV__Delete__Existing__TFT__or__No__TFT__Operation_parametersList_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TrafficFlowTemplateV__Delete__Existing__TFT__or__No__TFT__Operation_encoder(const TrafficFlowTemplateV__Delete__Existing__TFT__or__No__TFT__Operation& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TrafficFlowTemplateV_Delete_Existing_TFT_or_No_TFT_Operation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TrafficFlowTemplateV__Delete__Existing__TFT__or__No__TFT__Operation_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TrafficFlowTemplateV__Delete__Existing__TFT__or__No__TFT__Operation_decoder(OCTETSTRING& input_stream, TrafficFlowTemplateV__Delete__Existing__TFT__or__No__TFT__Operation& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TrafficFlowTemplateV_Delete_Existing_TFT_or_No_TFT_Operation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TrafficFlowTemplateV__Delete__Existing__TFT__or__No__TFT__Operation_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TrafficFlowTemplateV_encoder(const TrafficFlowTemplateV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TrafficFlowTemplateV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TrafficFlowTemplateV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TrafficFlowTemplateV_decoder(OCTETSTRING& input_stream, TrafficFlowTemplateV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TrafficFlowTemplateV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TrafficFlowTemplateV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TrafficFlowTemplateLV_encoder(const TrafficFlowTemplateLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TrafficFlowTemplateLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TrafficFlowTemplateLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TrafficFlowTemplateLV_decoder(OCTETSTRING& input_stream, TrafficFlowTemplateLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TrafficFlowTemplateLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TrafficFlowTemplateLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TrafficFlowTemplateTLV_encoder(const TrafficFlowTemplateTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TrafficFlowTemplateTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TrafficFlowTemplateTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TrafficFlowTemplateTLV_decoder(OCTETSTRING& input_stream, TrafficFlowTemplateTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TrafficFlowTemplateTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TrafficFlowTemplateTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void TemporaryMobileGroupIDLV_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(TemporaryMobileGroupIDLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TemporaryMobileGroupIDLV_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(TemporaryMobileGroupIDLV_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 TemporaryMobileGroupIDLV_encoder(const TemporaryMobileGroupIDLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TemporaryMobileGroupIDLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(TemporaryMobileGroupIDLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER TemporaryMobileGroupIDLV_decoder(OCTETSTRING& input_stream, TemporaryMobileGroupIDLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.TemporaryMobileGroupIDLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(TemporaryMobileGroupIDLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MBMSBearerCapabilitiesLV_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(MBMSBearerCapabilitiesLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MBMSBearerCapabilitiesLV_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(MBMSBearerCapabilitiesLV_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 MBMSBearerCapabilitiesLV_encoder(const MBMSBearerCapabilitiesLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MBMSBearerCapabilitiesLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MBMSBearerCapabilitiesLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MBMSBearerCapabilitiesLV_decoder(OCTETSTRING& input_stream, MBMSBearerCapabilitiesLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MBMSBearerCapabilitiesLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MBMSBearerCapabilitiesLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void MBMSProtocolConfigOptionsTLV_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(MBMSProtocolConfigOptionsTLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MBMSProtocolConfigOptionsTLV_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(MBMSProtocolConfigOptionsTLV_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 MBMSProtocolConfigOptionsTLV_valueField_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 MBMSProtocolConfigOptionsTLV_valueField_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 MBMSProtocolConfigOptionsTLV_encoder(const MBMSProtocolConfigOptionsTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MBMSProtocolConfigOptionsTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MBMSProtocolConfigOptionsTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MBMSProtocolConfigOptionsTLV_decoder(OCTETSTRING& input_stream, MBMSProtocolConfigOptionsTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MBMSProtocolConfigOptionsTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MBMSProtocolConfigOptionsTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void EnhancedNetworkSeviveAccessPointIDV_encoder(const EnhancedNetworkSeviveAccessPointIDV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.EnhancedNetworkSeviveAccessPointIDV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(EnhancedNetworkSeviveAccessPointIDV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER EnhancedNetworkSeviveAccessPointIDV_decoder(OCTETSTRING& input_stream, EnhancedNetworkSeviveAccessPointIDV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.EnhancedNetworkSeviveAccessPointIDV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(EnhancedNetworkSeviveAccessPointIDV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RequestTypeTV_encoder(const RequestTypeTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RequestTypeTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RequestTypeTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RequestTypeTV_decoder(OCTETSTRING& input_stream, RequestTypeTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RequestTypeTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RequestTypeTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NotificationIndicatorLV_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(NotificationIndicatorLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NotificationIndicatorLV_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(NotificationIndicatorLV_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 NotificationIndicatorLV_encoder(const NotificationIndicatorLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NotificationIndicatorLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NotificationIndicatorLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NotificationIndicatorLV_decoder(OCTETSTRING& input_stream, NotificationIndicatorLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NotificationIndicatorLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NotificationIndicatorLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void ConnectivityTypeTV_encoder(const ConnectivityTypeTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ConnectivityTypeTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(ConnectivityTypeTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER ConnectivityTypeTV_decoder(OCTETSTRING& input_stream, ConnectivityTypeTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.ConnectivityTypeTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(ConnectivityTypeTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void WLANOffloadAcceptabilityTV_encoder(const WLANOffloadAcceptabilityTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.WLANOffloadAcceptabilityTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(WLANOffloadAcceptabilityTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER WLANOffloadAcceptabilityTV_decoder(OCTETSTRING& input_stream, WLANOffloadAcceptabilityTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.WLANOffloadAcceptabilityTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(WLANOffloadAcceptabilityTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NBIFOM__ContainerTLV_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(NBIFOM__ContainerTLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NBIFOM__ContainerTLV_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(NBIFOM__ContainerTLV_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;
}
}

boolean operator==(null_type, const NBIFOM__ParameterList& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @MobileL3_GMM_SM_Types.NBIFOM_ParameterList.");
return other_value.val_ptr->n_elements == 0;
}

void NBIFOM__Parameter_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(NBIFOM__Parameter_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NBIFOM__Parameter_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(NBIFOM__Parameter_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;
}
}

boolean operator==(null_type, const NBIFOM__RoutingRules& other_value)
{
if (other_value.val_ptr == NULL)
TTCN_error("The right operand of comparison is an unbound value of type @MobileL3_GMM_SM_Types.NBIFOM_RoutingRules.");
return other_value.val_ptr->n_elements == 0;
}

void NBIFOM__RoutingRule_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(NBIFOM__RoutingRule_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NBIFOM__RoutingRule_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(NBIFOM__RoutingRule_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 RoutingFilter_flagsZ_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(RoutingFilter_flagsZ_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_flagsZ_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(RoutingFilter_flagsZ_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingFilter_sourceIPv4Address_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(RoutingFilter_sourceIPv4Address_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_sourceIPv4Address_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(RoutingFilter_sourceIPv4Address_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingFilter_destinationIPv4Address_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(RoutingFilter_destinationIPv4Address_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_destinationIPv4Address_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(RoutingFilter_destinationIPv4Address_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingFilter_sourceIPv6Address_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(RoutingFilter_sourceIPv6Address_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_sourceIPv6Address_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(RoutingFilter_sourceIPv6Address_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingFilter_destinationIPv6Address_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(RoutingFilter_destinationIPv6Address_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_destinationIPv6Address_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(RoutingFilter_destinationIPv6Address_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingFilter_sourceAddressPrefixLength_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(RoutingFilter_sourceAddressPrefixLength_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_sourceAddressPrefixLength_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(RoutingFilter_sourceAddressPrefixLength_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingFilter_destinationAddressPrefixLength_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(RoutingFilter_destinationAddressPrefixLength_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_destinationAddressPrefixLength_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(RoutingFilter_destinationAddressPrefixLength_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingFilter_iPSecSecurityParameterIndex_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(RoutingFilter_iPSecSecurityParameterIndex_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_iPSecSecurityParameterIndex_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(RoutingFilter_iPSecSecurityParameterIndex_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingFilter_protocolTypeNextHeader_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(RoutingFilter_protocolTypeNextHeader_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_protocolTypeNextHeader_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(RoutingFilter_protocolTypeNextHeader_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingFilter_startSourcePortRange_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(RoutingFilter_startSourcePortRange_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_startSourcePortRange_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(RoutingFilter_startSourcePortRange_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingFilter_endSourcePortRange_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(RoutingFilter_endSourcePortRange_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_endSourcePortRange_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(RoutingFilter_endSourcePortRange_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingFilter_startDestinationPortRange_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(RoutingFilter_startDestinationPortRange_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_startDestinationPortRange_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(RoutingFilter_startDestinationPortRange_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingFilter_endDestinationPortRange_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(RoutingFilter_endDestinationPortRange_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_endDestinationPortRange_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(RoutingFilter_endDestinationPortRange_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingFilter_typeOfService_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(RoutingFilter_typeOfService_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_typeOfService_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(RoutingFilter_typeOfService_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingFilter_flowLabel_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(RoutingFilter_flowLabel_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_flowLabel_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(RoutingFilter_flowLabel_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RoutingFilter_encoder(const RoutingFilter& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RoutingFilter' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RoutingFilter_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RoutingFilter_decoder(OCTETSTRING& input_stream, RoutingFilter& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RoutingFilter' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RoutingFilter_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NBIFOM__RoutingRule_encoder(const NBIFOM__RoutingRule& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_RoutingRule' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NBIFOM__RoutingRule_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NBIFOM__RoutingRule_decoder(OCTETSTRING& input_stream, NBIFOM__RoutingRule& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_RoutingRule' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NBIFOM__RoutingRule_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NBIFOM__RoutingRules_encoder(const NBIFOM__RoutingRules& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_RoutingRules' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NBIFOM__RoutingRules_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NBIFOM__RoutingRules_decoder(OCTETSTRING& input_stream, NBIFOM__RoutingRules& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_RoutingRules' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NBIFOM__RoutingRules_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NBIFOM__AccessUsabilityIndication_encoder(const NBIFOM__AccessUsabilityIndication& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_AccessUsabilityIndication' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NBIFOM__AccessUsabilityIndication_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NBIFOM__AccessUsabilityIndication_decoder(OCTETSTRING& input_stream, NBIFOM__AccessUsabilityIndication& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_AccessUsabilityIndication' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NBIFOM__AccessUsabilityIndication_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NBIFOM__ParameterContents_unknownParameter_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 NBIFOM__ParameterContents_unknownParameter_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 NBIFOM__ParameterContents_encoder(const NBIFOM__ParameterContents& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_ParameterContents' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NBIFOM__ParameterContents_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NBIFOM__ParameterContents_decoder(OCTETSTRING& input_stream, NBIFOM__ParameterContents& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_ParameterContents' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NBIFOM__ParameterContents_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NBIFOM__Parameter_parameterContents_encoder(const NBIFOM__ParameterContents& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_ParameterContents' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NBIFOM__Parameter_parameterContents_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NBIFOM__Parameter_parameterContents_decoder(OCTETSTRING& input_stream, NBIFOM__ParameterContents& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_ParameterContents' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NBIFOM__Parameter_parameterContents_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NBIFOM__Parameter_encoder(const NBIFOM__Parameter& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_Parameter' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NBIFOM__Parameter_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NBIFOM__Parameter_decoder(OCTETSTRING& input_stream, NBIFOM__Parameter& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_Parameter' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NBIFOM__Parameter_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NBIFOM__ParameterList_encoder(const NBIFOM__ParameterList& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_ParameterList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NBIFOM__ParameterList_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NBIFOM__ParameterList_decoder(OCTETSTRING& input_stream, NBIFOM__ParameterList& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_ParameterList' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NBIFOM__ParameterList_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void NBIFOM__ContainerTLV_encoder(const NBIFOM__ContainerTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_ContainerTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(NBIFOM__ContainerTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER NBIFOM__ContainerTLV_decoder(OCTETSTRING& input_stream, NBIFOM__ContainerTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.NBIFOM_ContainerTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(NBIFOM__ContainerTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void PDPContextStatusTLV_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(PDPContextStatusTLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDPContextStatusTLV_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(PDPContextStatusTLV_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 PDPContextStatusTLV_encoder(const PDPContextStatusTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDPContextStatusTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDPContextStatusTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDPContextStatusTLV_decoder(OCTETSTRING& input_stream, PDPContextStatusTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDPContextStatusTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDPContextStatusTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RadioPriorityV_encoder(const RadioPriorityV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RadioPriorityV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RadioPriorityV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RadioPriorityV_decoder(OCTETSTRING& input_stream, RadioPriorityV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RadioPriorityV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RadioPriorityV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RadioPriorityTV_encoder(const RadioPriorityTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RadioPriorityTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RadioPriorityTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RadioPriorityTV_decoder(OCTETSTRING& input_stream, RadioPriorityTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RadioPriorityTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RadioPriorityTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GPRSTimerV_encoder(const GPRSTimerV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.GPRSTimerV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GPRSTimerV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GPRSTimerV_decoder(OCTETSTRING& input_stream, GPRSTimerV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.GPRSTimerV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GPRSTimerV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GPRSTimerTV_encoder(const GPRSTimerTV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.GPRSTimerTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GPRSTimerTV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GPRSTimerTV_decoder(OCTETSTRING& input_stream, GPRSTimerTV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.GPRSTimerTV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GPRSTimerTV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void GPRSTimer2TLV_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(GPRSTimer2TLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GPRSTimer2TLV_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(GPRSTimer2TLV_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 GPRSTimer2TLV_encoder(const GPRSTimer2TLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.GPRSTimer2TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(GPRSTimer2TLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER GPRSTimer2TLV_decoder(OCTETSTRING& input_stream, GPRSTimer2TLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.GPRSTimer2TLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(GPRSTimer2TLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RadioPriority2V_encoder(const RadioPriority2V& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RadioPriority2V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RadioPriority2V_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RadioPriority2V_decoder(OCTETSTRING& input_stream, RadioPriority2V& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RadioPriority2V' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RadioPriority2V_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void RadioPriority2TV_encoder(const RadioPriority2TV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RadioPriority2TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(RadioPriority2TV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER RadioPriority2TV_decoder(OCTETSTRING& input_stream, RadioPriority2TV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.RadioPriority2TV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(RadioPriority2TV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__ContextStatusTLV_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__ContextStatusTLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MBMS__ContextStatusTLV_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__ContextStatusTLV_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__ContextStatusTLV_mBMSContextStatusInformation_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__ContextStatusTLV_mBMSContextStatusInformation_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__ContextStatusTLV_encoder(const MBMS__ContextStatusTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MBMS_ContextStatusTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(MBMS__ContextStatusTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER MBMS__ContextStatusTLV_decoder(OCTETSTRING& input_stream, MBMS__ContextStatusTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.MBMS_ContextStatusTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(MBMS__ContextStatusTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UplinkDataStatusTLV_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(UplinkDataStatusTLV_lengthIndicator_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UplinkDataStatusTLV_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(UplinkDataStatusTLV_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 UplinkDataStatusV_encoder(const UplinkDataStatusV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UplinkDataStatusV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UplinkDataStatusV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UplinkDataStatusV_decoder(OCTETSTRING& input_stream, UplinkDataStatusV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UplinkDataStatusV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UplinkDataStatusV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void UplinkDataStatusTLV_encoder(const UplinkDataStatusTLV& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UplinkDataStatusTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(UplinkDataStatusTLV_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER UplinkDataStatusTLV_decoder(OCTETSTRING& input_stream, UplinkDataStatusTLV& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.UplinkDataStatusTLV' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(UplinkDataStatusTLV_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__AttachRequest_encoder(const PDU__GMM__AttachRequest& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AttachRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__AttachRequest_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__AttachRequest_decoder(OCTETSTRING& input_stream, PDU__GMM__AttachRequest& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AttachRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__AttachRequest_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__AttachAccept_encoder(const PDU__GMM__AttachAccept& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AttachAccept' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__AttachAccept_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__AttachAccept_decoder(OCTETSTRING& input_stream, PDU__GMM__AttachAccept& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AttachAccept' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__AttachAccept_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__AttachComplete_encoder(const PDU__GMM__AttachComplete& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AttachComplete' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__AttachComplete_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__AttachComplete_decoder(OCTETSTRING& input_stream, PDU__GMM__AttachComplete& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AttachComplete' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__AttachComplete_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__AttachReject_encoder(const PDU__GMM__AttachReject& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AttachReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__AttachReject_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__AttachReject_decoder(OCTETSTRING& input_stream, PDU__GMM__AttachReject& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AttachReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__AttachReject_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__DetachRequest__SGSN__MS_encoder(const PDU__GMM__DetachRequest__SGSN__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_GMM_SM_Types.PDU_GMM_DetachRequest_SGSN_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__DetachRequest__SGSN__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__DetachRequest__SGSN__MS_decoder(OCTETSTRING& input_stream, PDU__GMM__DetachRequest__SGSN__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_GMM_SM_Types.PDU_GMM_DetachRequest_SGSN_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__DetachRequest__SGSN__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__GMM__DetachRequest__MS__SGSN_encoder(const PDU__GMM__DetachRequest__MS__SGSN& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_DetachRequest_MS_SGSN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__DetachRequest__MS__SGSN_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__DetachRequest__MS__SGSN_decoder(OCTETSTRING& input_stream, PDU__GMM__DetachRequest__MS__SGSN& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_DetachRequest_MS_SGSN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__DetachRequest__MS__SGSN_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__DetachAccept__MS__SGSN_encoder(const PDU__GMM__DetachAccept__MS__SGSN& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_DetachAccept_MS_SGSN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__DetachAccept__MS__SGSN_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__DetachAccept__MS__SGSN_decoder(OCTETSTRING& input_stream, PDU__GMM__DetachAccept__MS__SGSN& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_DetachAccept_MS_SGSN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__DetachAccept__MS__SGSN_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__DetachAccept__SGSN__MS_encoder(const PDU__GMM__DetachAccept__SGSN__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_GMM_SM_Types.PDU_GMM_DetachAccept_SGSN_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__DetachAccept__SGSN__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__DetachAccept__SGSN__MS_decoder(OCTETSTRING& input_stream, PDU__GMM__DetachAccept__SGSN__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_GMM_SM_Types.PDU_GMM_DetachAccept_SGSN_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__DetachAccept__SGSN__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__GMM__P__TMSIReallocationCommand_encoder(const PDU__GMM__P__TMSIReallocationCommand& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_P_TMSIReallocationCommand' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__P__TMSIReallocationCommand_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__P__TMSIReallocationCommand_decoder(OCTETSTRING& input_stream, PDU__GMM__P__TMSIReallocationCommand& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_P_TMSIReallocationCommand' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__P__TMSIReallocationCommand_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__P__TMSIReallocationComplete_encoder(const PDU__GMM__P__TMSIReallocationComplete& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_P_TMSIReallocationComplete' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__P__TMSIReallocationComplete_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__P__TMSIReallocationComplete_decoder(OCTETSTRING& input_stream, PDU__GMM__P__TMSIReallocationComplete& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_P_TMSIReallocationComplete' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__P__TMSIReallocationComplete_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__AuthenticationAndCipheringRequest_encoder(const PDU__GMM__AuthenticationAndCipheringRequest& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AuthenticationAndCipheringRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__AuthenticationAndCipheringRequest_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__AuthenticationAndCipheringRequest_decoder(OCTETSTRING& input_stream, PDU__GMM__AuthenticationAndCipheringRequest& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AuthenticationAndCipheringRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__AuthenticationAndCipheringRequest_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__AuthenticationAndCipheringResponse_encoder(const PDU__GMM__AuthenticationAndCipheringResponse& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AuthenticationAndCipheringResponse' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__AuthenticationAndCipheringResponse_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__AuthenticationAndCipheringResponse_decoder(OCTETSTRING& input_stream, PDU__GMM__AuthenticationAndCipheringResponse& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AuthenticationAndCipheringResponse' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__AuthenticationAndCipheringResponse_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__AuthenticationAndCipheringFailure_encoder(const PDU__GMM__AuthenticationAndCipheringFailure& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AuthenticationAndCipheringFailure' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__AuthenticationAndCipheringFailure_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__AuthenticationAndCipheringFailure_decoder(OCTETSTRING& input_stream, PDU__GMM__AuthenticationAndCipheringFailure& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AuthenticationAndCipheringFailure' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__AuthenticationAndCipheringFailure_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__AuthenticationAndCipheringReject_encoder(const PDU__GMM__AuthenticationAndCipheringReject& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AuthenticationAndCipheringReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__AuthenticationAndCipheringReject_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__AuthenticationAndCipheringReject_decoder(OCTETSTRING& input_stream, PDU__GMM__AuthenticationAndCipheringReject& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_AuthenticationAndCipheringReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__AuthenticationAndCipheringReject_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__IdentityRequest_encoder(const PDU__GMM__IdentityRequest& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_IdentityRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__IdentityRequest_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__IdentityRequest_decoder(OCTETSTRING& input_stream, PDU__GMM__IdentityRequest& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_IdentityRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__IdentityRequest_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__IdentityResponse_encoder(const PDU__GMM__IdentityResponse& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_IdentityResponse' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__IdentityResponse_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__IdentityResponse_decoder(OCTETSTRING& input_stream, PDU__GMM__IdentityResponse& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_IdentityResponse' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__IdentityResponse_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__RoutingAreaUpdateRequest_encoder(const PDU__GMM__RoutingAreaUpdateRequest& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_RoutingAreaUpdateRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__RoutingAreaUpdateRequest_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__RoutingAreaUpdateRequest_decoder(OCTETSTRING& input_stream, PDU__GMM__RoutingAreaUpdateRequest& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_RoutingAreaUpdateRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__RoutingAreaUpdateRequest_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__RoutingAreaUpdateAccept_encoder(const PDU__GMM__RoutingAreaUpdateAccept& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_RoutingAreaUpdateAccept' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__RoutingAreaUpdateAccept_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__RoutingAreaUpdateAccept_decoder(OCTETSTRING& input_stream, PDU__GMM__RoutingAreaUpdateAccept& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_RoutingAreaUpdateAccept' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__RoutingAreaUpdateAccept_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__RoutingAreaUpdateComplete_encoder(const PDU__GMM__RoutingAreaUpdateComplete& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_RoutingAreaUpdateComplete' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__RoutingAreaUpdateComplete_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__RoutingAreaUpdateComplete_decoder(OCTETSTRING& input_stream, PDU__GMM__RoutingAreaUpdateComplete& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_RoutingAreaUpdateComplete' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__RoutingAreaUpdateComplete_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__RoutingAreaUpdateReject_encoder(const PDU__GMM__RoutingAreaUpdateReject& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_RoutingAreaUpdateReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__RoutingAreaUpdateReject_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__RoutingAreaUpdateReject_decoder(OCTETSTRING& input_stream, PDU__GMM__RoutingAreaUpdateReject& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_RoutingAreaUpdateReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__RoutingAreaUpdateReject_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__GMM__Status_encoder(const PDU__GMM__GMM__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_GMM_SM_Types.PDU_GMM_GMM_Status' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__GMM__Status_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__GMM__Status_decoder(OCTETSTRING& input_stream, PDU__GMM__GMM__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_GMM_SM_Types.PDU_GMM_GMM_Status' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__GMM__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__GMM__GMM__Information_encoder(const PDU__GMM__GMM__Information& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_GMM_Information' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__GMM__Information_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__GMM__Information_decoder(OCTETSTRING& input_stream, PDU__GMM__GMM__Information& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_GMM_Information' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__GMM__Information_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__ServiceRequest_encoder(const PDU__GMM__ServiceRequest& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_ServiceRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__ServiceRequest_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__ServiceRequest_decoder(OCTETSTRING& input_stream, PDU__GMM__ServiceRequest& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_ServiceRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__ServiceRequest_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__ServiceAccept_encoder(const PDU__GMM__ServiceAccept& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_ServiceAccept' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__ServiceAccept_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__ServiceAccept_decoder(OCTETSTRING& input_stream, PDU__GMM__ServiceAccept& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_ServiceAccept' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__ServiceAccept_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__GMM__ServiceReject_encoder(const PDU__GMM__ServiceReject& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_ServiceReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__GMM__ServiceReject_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__GMM__ServiceReject_decoder(OCTETSTRING& input_stream, PDU__GMM__ServiceReject& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_GMM_ServiceReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__GMM__ServiceReject_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__ActivatePDPContextRequest_encoder(const PDU__SM__ActivatePDPContextRequest& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivatePDPContextRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__ActivatePDPContextRequest_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__ActivatePDPContextRequest_decoder(OCTETSTRING& input_stream, PDU__SM__ActivatePDPContextRequest& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivatePDPContextRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__ActivatePDPContextRequest_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__ActivatePDPContextAccept_encoder(const PDU__SM__ActivatePDPContextAccept& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivatePDPContextAccept' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__ActivatePDPContextAccept_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__ActivatePDPContextAccept_decoder(OCTETSTRING& input_stream, PDU__SM__ActivatePDPContextAccept& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivatePDPContextAccept' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__ActivatePDPContextAccept_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__ActivatePDPContextReject_encoder(const PDU__SM__ActivatePDPContextReject& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivatePDPContextReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__ActivatePDPContextReject_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__ActivatePDPContextReject_decoder(OCTETSTRING& input_stream, PDU__SM__ActivatePDPContextReject& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivatePDPContextReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__ActivatePDPContextReject_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__ActivateSecondaryPDPContextRequest_encoder(const PDU__SM__ActivateSecondaryPDPContextRequest& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__ActivateSecondaryPDPContextRequest_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__ActivateSecondaryPDPContextRequest_decoder(OCTETSTRING& input_stream, PDU__SM__ActivateSecondaryPDPContextRequest& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__ActivateSecondaryPDPContextRequest_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__ActivateSecondaryPDPContextAccept_encoder(const PDU__SM__ActivateSecondaryPDPContextAccept& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__ActivateSecondaryPDPContextAccept_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__ActivateSecondaryPDPContextAccept_decoder(OCTETSTRING& input_stream, PDU__SM__ActivateSecondaryPDPContextAccept& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextAccept' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__ActivateSecondaryPDPContextAccept_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__ActivateSecondaryPDPContextReject_encoder(const PDU__SM__ActivateSecondaryPDPContextReject& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__ActivateSecondaryPDPContextReject_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__ActivateSecondaryPDPContextReject_decoder(OCTETSTRING& input_stream, PDU__SM__ActivateSecondaryPDPContextReject& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivateSecondaryPDPContextReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__ActivateSecondaryPDPContextReject_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__RequestPDPContextActivation_encoder(const PDU__SM__RequestPDPContextActivation& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__RequestPDPContextActivation_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__RequestPDPContextActivation_decoder(OCTETSTRING& input_stream, PDU__SM__RequestPDPContextActivation& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__RequestPDPContextActivation_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__RequestPDPContextActivationReject_encoder(const PDU__SM__RequestPDPContextActivationReject& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__RequestPDPContextActivationReject_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__RequestPDPContextActivationReject_decoder(OCTETSTRING& input_stream, PDU__SM__RequestPDPContextActivationReject& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_RequestPDPContextActivationReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__RequestPDPContextActivationReject_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__ModifyPDPContextRequest__SGSN__MS_encoder(const PDU__SM__ModifyPDPContextRequest__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__ModifyPDPContextRequest__SGSN__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__ModifyPDPContextRequest__SGSN__MS_decoder(OCTETSTRING& input_stream, PDU__SM__ModifyPDPContextRequest__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_SGSN_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__ModifyPDPContextRequest__SGSN__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__SM__ModifyPDPContextRequest__MS__SGSN_encoder(const PDU__SM__ModifyPDPContextRequest__MS__SGSN& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__ModifyPDPContextRequest__MS__SGSN_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__ModifyPDPContextRequest__MS__SGSN_decoder(OCTETSTRING& input_stream, PDU__SM__ModifyPDPContextRequest__MS__SGSN& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ModifyPDPContextRequest_MS_SGSN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__ModifyPDPContextRequest__MS__SGSN_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__ModifyPDPContextAccept__MS__SGSN_encoder(const PDU__SM__ModifyPDPContextAccept__MS__SGSN& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__ModifyPDPContextAccept__MS__SGSN_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__ModifyPDPContextAccept__MS__SGSN_decoder(OCTETSTRING& input_stream, PDU__SM__ModifyPDPContextAccept__MS__SGSN& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_MS_SGSN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__ModifyPDPContextAccept__MS__SGSN_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__ModifyPDPContextAccept__SGSN__MS_encoder(const PDU__SM__ModifyPDPContextAccept__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__ModifyPDPContextAccept__SGSN__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__ModifyPDPContextAccept__SGSN__MS_decoder(OCTETSTRING& input_stream, PDU__SM__ModifyPDPContextAccept__SGSN__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_GMM_SM_Types.PDU_SM_ModifyPDPContextAccept_SGSN_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__ModifyPDPContextAccept__SGSN__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__SM__ModifyPDPContextReject_encoder(const PDU__SM__ModifyPDPContextReject& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__ModifyPDPContextReject_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__ModifyPDPContextReject_decoder(OCTETSTRING& input_stream, PDU__SM__ModifyPDPContextReject& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ModifyPDPContextReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__ModifyPDPContextReject_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__DeactivatePDPContextRequest_encoder(const PDU__SM__DeactivatePDPContextRequest& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__DeactivatePDPContextRequest_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__DeactivatePDPContextRequest_decoder(OCTETSTRING& input_stream, PDU__SM__DeactivatePDPContextRequest& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__DeactivatePDPContextRequest_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__DeactivatePDPContextAccept_encoder(const PDU__SM__DeactivatePDPContextAccept& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__DeactivatePDPContextAccept_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__DeactivatePDPContextAccept_decoder(OCTETSTRING& input_stream, PDU__SM__DeactivatePDPContextAccept& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_DeactivatePDPContextAccept' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__DeactivatePDPContextAccept_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__RequestSecondaryPDPContextActivation_encoder(const PDU__SM__RequestSecondaryPDPContextActivation& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__RequestSecondaryPDPContextActivation_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__RequestSecondaryPDPContextActivation_decoder(OCTETSTRING& input_stream, PDU__SM__RequestSecondaryPDPContextActivation& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__RequestSecondaryPDPContextActivation_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__RequestSecondaryPDPContextActivationReject_encoder(const PDU__SM__RequestSecondaryPDPContextActivationReject& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__RequestSecondaryPDPContextActivationReject_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__RequestSecondaryPDPContextActivationReject_decoder(OCTETSTRING& input_stream, PDU__SM__RequestSecondaryPDPContextActivationReject& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_RequestSecondaryPDPContextActivationReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__RequestSecondaryPDPContextActivationReject_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__Notification_encoder(const PDU__SM__Notification& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_Notification' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__Notification_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__Notification_decoder(OCTETSTRING& input_stream, PDU__SM__Notification& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_Notification' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__Notification_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__SM__Status_encoder(const PDU__SM__SM__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_GMM_SM_Types.PDU_SM_SM_Status' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__SM__Status_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__SM__Status_decoder(OCTETSTRING& input_stream, PDU__SM__SM__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_GMM_SM_Types.PDU_SM_SM_Status' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__SM__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__SM__ActivateMBMSContextRequest_encoder(const PDU__SM__ActivateMBMSContextRequest& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__ActivateMBMSContextRequest_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__ActivateMBMSContextRequest_decoder(OCTETSTRING& input_stream, PDU__SM__ActivateMBMSContextRequest& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextRequest' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__ActivateMBMSContextRequest_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__ActivateMBMSContextAccept_encoder(const PDU__SM__ActivateMBMSContextAccept& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__ActivateMBMSContextAccept_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__ActivateMBMSContextAccept_decoder(OCTETSTRING& input_stream, PDU__SM__ActivateMBMSContextAccept& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextAccept' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__ActivateMBMSContextAccept_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__ActivateMBMSContextReject_encoder(const PDU__SM__ActivateMBMSContextReject& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__ActivateMBMSContextReject_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__ActivateMBMSContextReject_decoder(OCTETSTRING& input_stream, PDU__SM__ActivateMBMSContextReject& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_ActivateMBMSContextReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__ActivateMBMSContextReject_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__RequestMBMSContextActivation_encoder(const PDU__SM__RequestMBMSContextActivation& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__RequestMBMSContextActivation_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__RequestMBMSContextActivation_decoder(OCTETSTRING& input_stream, PDU__SM__RequestMBMSContextActivation& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivation' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__RequestMBMSContextActivation_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.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__SM__RequestMBMSContextActivationReject_encoder(const PDU__SM__RequestMBMSContextActivationReject& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(PDU__SM__RequestMBMSContextActivationReject_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER PDU__SM__RequestMBMSContextActivationReject_decoder(OCTETSTRING& input_stream, PDU__SM__RequestMBMSContextActivationReject& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.PDU_SM_RequestMBMSContextActivationReject' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(PDU__SM__RequestMBMSContextActivationReject_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void L3__GSM__MS__SGSN_encoder(const L3__GSM__MS__SGSN& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.L3_GSM_MS_SGSN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(L3__GSM__MS__SGSN_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER L3__GSM__MS__SGSN_decoder(OCTETSTRING& input_stream, L3__GSM__MS__SGSN& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.L3_GSM_MS_SGSN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(L3__GSM__MS__SGSN_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void L3__GSM__SGSN__MS_encoder(const L3__GSM__SGSN__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_GMM_SM_Types.L3_GSM_SGSN_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(L3__GSM__SGSN__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER L3__GSM__SGSN__MS_decoder(OCTETSTRING& input_stream, L3__GSM__SGSN__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_GMM_SM_Types.L3_GSM_SGSN_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(L3__GSM__SGSN__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 L3__GMM__MS__SGSN_encoder(const L3__GMM__MS__SGSN& input_value, OCTETSTRING& output_stream, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.L3_GMM_MS_SGSN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(L3__GMM__MS__SGSN_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER L3__GMM__MS__SGSN_decoder(OCTETSTRING& input_stream, L3__GMM__MS__SGSN& output_value, const UNIVERSAL_CHARSTRING& coding_name)
{
TTCN_EncDec::coding_t coding_type;
unsigned int extra_options = 0;
TTCN_EncDec::get_coding_from_str(coding_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_GMM_SM_Types.L3_GMM_MS_SGSN' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(L3__GMM__MS__SGSN_descr_, ttcn_buf, coding_type, extra_options);
switch (TTCN_EncDec::get_last_error_type()) {
case TTCN_EncDec::ET_NONE:
ttcn_buf.cut();
ttcn_buf.get_string(input_stream);
return 0;
case TTCN_EncDec::ET_INCOMPL_MSG:
case TTCN_EncDec::ET_LEN_ERR:
return 2;
default:
return 1;
}
}

void L3__GMM__SGSN__MS_encoder(const L3__GMM__SGSN__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_GMM_SM_Types.L3_GMM_SGSN_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf;
input_value.encode(L3__GMM__SGSN__MS_descr_, ttcn_buf, coding_type, extra_options);
ttcn_buf.get_string(output_stream);
}

INTEGER L3__GMM__SGSN__MS_decoder(OCTETSTRING& input_stream, L3__GMM__SGSN__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_GMM_SM_Types.L3_GMM_SGSN_MS' does not support %s encoding", (const char*) TTCN_Logger::end_event_log2str());
}
TTCN_Buffer ttcn_buf(input_stream);
output_value.decode(L3__GMM__SGSN__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_GMM_SM_Types.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "MobileL3_GMM_SM_Types");
MobileL3__MM__Types::module_object.pre_init_module();
}

void post_init_module()
{
TTCN_Location current_location("MobileL3_GMM_SM_Types.ttcn", 0, TTCN_Location::LOCATION_UNKNOWN, "MobileL3_GMM_SM_Types");
MobileL3__MM__Types::module_object.post_init_module();
}


} /* end of namespace */
