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

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

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

#ifndef Osmocom__CTRL__Functions_HH
#define Osmocom__CTRL__Functions_HH

#ifdef TITAN_RUNTIME_2
#error Generated code does not match with used runtime.\
 Code was generated without -R option but -DTITAN_RUNTIME_2 was used.
#endif

/* Header file includes */

#include <TTCN3.hh>
#include "IPA_Emulation.hh"

#if TTCN3_VERSION != 110100
#error Version mismatch detected.\
 Please check the version of the TTCN-3 compiler and the base library.\
 Run make clean and rebuild the project if the version of the compiler changed recently.
#endif

#ifndef LINUX
#error This file should be compiled on LINUX
#endif

#undef Osmocom__CTRL__Functions_HH
#endif

namespace Osmocom__CTRL__Functions {

/* Forward declarations of classes */

typedef PreGenRecordOf::PREGEN__RECORD__OF__CHARSTRING charstring__list;
typedef PreGenRecordOf::PREGEN__RECORD__OF__CHARSTRING_template charstring__list_template;
class CounterNameVal;
class CounterNameVal_template;
class CounterNameVals;
class CounterNameVals_template;
class CounterNameValsList;
class CounterNameValsList_template;

} /* end of namespace */

#ifndef Osmocom__CTRL__Functions_HH
#define Osmocom__CTRL__Functions_HH

namespace Osmocom__CTRL__Functions {

/* Class definitions */

class CounterNameVal {
  CHARSTRING field_name;
  INTEGER field_val;
public:
  CounterNameVal();
  CounterNameVal(const CHARSTRING& par_name,
    const INTEGER& par_val);
  CounterNameVal(const CounterNameVal& other_value);
  inline boolean is_component() { return FALSE; }
  void clean_up();
const TTCN_Typedescriptor_t* get_descriptor() const;
  CounterNameVal& operator=(const CounterNameVal& other_value);
  boolean operator==(const CounterNameVal& other_value) const;
  inline boolean operator!=(const CounterNameVal& other_value) const
    { return !(*this == other_value); }

  boolean is_bound() const;

inline boolean is_present() const { return is_bound(); }
  boolean is_value() const;

  inline CHARSTRING& name()
    {return field_name;}
  inline const CHARSTRING& name() const
    {return field_name;}
  inline INTEGER& val()
    {return field_val;}
  inline const INTEGER& val() const
    {return field_val;}
  inline int size_of() const
    {return 2;}
  void log() const;
  void set_implicit_omit();
  void set_param(Module_Param& param);
  void encode_text(Text_Buf& text_buf) const;
  void decode_text(Text_Buf& text_buf);
};

class CounterNameVal_template : public Base_Template {
struct single_value_struct;
union {
single_value_struct *single_value;
struct {
unsigned int n_values;
CounterNameVal_template *list_value;
} value_list;
struct {
CounterNameVal_template* precondition;
CounterNameVal_template* implied_template;
} implication_;
dynmatch_struct<CounterNameVal>* dyn_match;
};

void set_specific();
void copy_value(const CounterNameVal& other_value);
void copy_template(const CounterNameVal_template& other_value);

public:
CounterNameVal_template();
CounterNameVal_template(template_sel other_value);
CounterNameVal_template(const CounterNameVal& other_value);
CounterNameVal_template(const OPTIONAL<CounterNameVal>& other_value);
CounterNameVal_template(CounterNameVal_template* p_precondition, CounterNameVal_template* p_implied_template);
CounterNameVal_template(Dynamic_Match_Interface<CounterNameVal>* p_dyn_match);
CounterNameVal_template(const CounterNameVal_template& other_value);
~CounterNameVal_template();
CounterNameVal_template& operator=(template_sel other_value);
CounterNameVal_template& operator=(const CounterNameVal& other_value);
CounterNameVal_template& operator=(const OPTIONAL<CounterNameVal>& other_value);
CounterNameVal_template& operator=(const CounterNameVal_template& other_value);
boolean match(const CounterNameVal& other_value, boolean legacy = FALSE) const;
boolean is_bound() const;
boolean is_value() const;
void clean_up();
CounterNameVal valueof() const;
void set_type(template_sel template_type, unsigned int list_length);
CounterNameVal_template& list_item(unsigned int list_index) const;
CHARSTRING_template& name();
const CHARSTRING_template& name() const;
INTEGER_template& val();
const INTEGER_template& val() const;
int size_of() const;
void log() const;
void log_match(const CounterNameVal& match_value, boolean legacy = FALSE) const;
  void set_implicit_omit();
void encode_text(Text_Buf& text_buf) const;
void decode_text(Text_Buf& text_buf);
void set_param(Module_Param& param);
void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
boolean is_present(boolean legacy = FALSE) const;
boolean match_omit(boolean legacy = FALSE) const;
};

class CounterNameVals : public Base_Type {
struct recordof_setof_struct {
int ref_count;
int n_elements;
CounterNameVal **value_elements;
} *val_ptr;

static const CounterNameVal UNBOUND_ELEM;
private:
friend boolean operator==(null_type null_value, const CounterNameVals& other_value);

public:
  typedef CounterNameVal of_type;
CounterNameVals();
CounterNameVals(null_type other_value);
CounterNameVals(const CounterNameVals& other_value);
~CounterNameVals();

void clean_up();
CounterNameVals& operator=(null_type other_value);
CounterNameVals& operator=(const CounterNameVals& other_value);

boolean operator==(null_type other_value) const;
boolean operator==(const CounterNameVals& other_value) const;
inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
inline boolean operator!=(const CounterNameVals& other_value) const { return !(*this == other_value); }

CounterNameVal& operator[](int index_value);
CounterNameVal& operator[](const INTEGER& index_value);
const CounterNameVal& operator[](int index_value) const;
const CounterNameVal& operator[](const INTEGER& index_value) const;

CounterNameVals operator<<=(int rotate_count) const;
CounterNameVals operator<<=(const INTEGER& rotate_count) const;
CounterNameVals operator>>=(int rotate_count) const;
CounterNameVals operator>>=(const INTEGER& rotate_count) const;

CounterNameVals operator+(const CounterNameVals& other_value) const;

CounterNameVals substr(int index, int returncount) const;

CounterNameVals replace(int index, int len, const CounterNameVals& repl) const;

CounterNameVals replace(int index, int len, const CounterNameVals_template& repl) const;

void set_size(int new_size);
inline boolean is_bound() const {return val_ptr != NULL; }
inline boolean is_present() const { return is_bound(); }
boolean is_value() const;
int size_of() const;
int n_elem() const { return size_of(); }
int lengthof() const;
void log() const;
  void set_implicit_omit();
void set_param(Module_Param& param);
void encode_text(Text_Buf& text_buf) const;
void decode_text(Text_Buf& text_buf);
};

class CounterNameVals_template : public Base_Record_Of_Template {
union {
struct {
int n_elements;
CounterNameVal_template **value_elements;
} single_value;
struct {
unsigned int n_values;
CounterNameVals_template *list_value;
} value_list;
struct {
CounterNameVals_template* precondition;
CounterNameVals_template* implied_template;
} implication_;
dynmatch_struct<CounterNameVals>* dyn_match;
};
void copy_value(const CounterNameVals& other_value);
void copy_template(const CounterNameVals_template& other_value);
static boolean match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);

public:
CounterNameVals_template();
CounterNameVals_template(template_sel other_value);
CounterNameVals_template(null_type other_value);
CounterNameVals_template(const CounterNameVals& other_value);
CounterNameVals_template(const OPTIONAL<CounterNameVals>& other_value);
CounterNameVals_template(CounterNameVals_template* p_precondition, CounterNameVals_template* p_implied_template);
CounterNameVals_template(Dynamic_Match_Interface<CounterNameVals>* p_dyn_match);
CounterNameVals_template(const CounterNameVals_template& other_value);
~CounterNameVals_template();

void clean_up();
CounterNameVals_template& operator=(template_sel other_value);
CounterNameVals_template& operator=(null_type other_value);
CounterNameVals_template& operator=(const CounterNameVals& other_value);
CounterNameVals_template& operator=(const OPTIONAL<CounterNameVals>& other_value);
CounterNameVals_template& operator=(const CounterNameVals_template& other_value);

CounterNameVal_template& operator[](int index_value);
CounterNameVal_template& operator[](const INTEGER& index_value);
const CounterNameVal_template& operator[](int index_value) const;
const CounterNameVal_template& operator[](const INTEGER& index_value) const;

void set_size(int new_size);
int n_elem() const;
int size_of(boolean is_size) const;
inline int size_of() const { return size_of(TRUE); }
inline int lengthof() const { return size_of(FALSE); }
boolean match(const CounterNameVals& other_value, boolean legacy = FALSE) const;
inline boolean is_bound() const 
  {return template_selection != UNINITIALIZED_TEMPLATE; }
boolean is_value() const;
CounterNameVals valueof() const;
CounterNameVals substr(int index, int returncount) const;

CounterNameVals replace(int index, int len, const CounterNameVals_template& repl) const;

CounterNameVals replace(int index, int len, const CounterNameVals& repl) const;

void set_type(template_sel template_type, unsigned int list_length);
CounterNameVals_template& list_item(unsigned int list_index);
void log() const;
void log_match(const CounterNameVals& match_value, boolean legacy = FALSE) const;
void encode_text(Text_Buf& text_buf) const;
void decode_text(Text_Buf& text_buf);
boolean is_present(boolean legacy = FALSE) const;
boolean match_omit(boolean legacy = FALSE) const;
  void set_implicit_omit();
void set_param(Module_Param& param);
void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
boolean get_istemplate_kind(const char* type) const;
};

class CounterNameValsList : public Base_Type {
struct recordof_setof_struct {
int ref_count;
int n_elements;
CounterNameVals **value_elements;
} *val_ptr;

static const CounterNameVals UNBOUND_ELEM;
private:
friend boolean operator==(null_type null_value, const CounterNameValsList& other_value);

public:
  typedef CounterNameVals of_type;
CounterNameValsList();
CounterNameValsList(null_type other_value);
CounterNameValsList(const CounterNameValsList& other_value);
~CounterNameValsList();

void clean_up();
CounterNameValsList& operator=(null_type other_value);
CounterNameValsList& operator=(const CounterNameValsList& other_value);

boolean operator==(null_type other_value) const;
boolean operator==(const CounterNameValsList& other_value) const;
inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
inline boolean operator!=(const CounterNameValsList& other_value) const { return !(*this == other_value); }

CounterNameVals& operator[](int index_value);
CounterNameVals& operator[](const INTEGER& index_value);
const CounterNameVals& operator[](int index_value) const;
const CounterNameVals& operator[](const INTEGER& index_value) const;

CounterNameValsList operator<<=(int rotate_count) const;
CounterNameValsList operator<<=(const INTEGER& rotate_count) const;
CounterNameValsList operator>>=(int rotate_count) const;
CounterNameValsList operator>>=(const INTEGER& rotate_count) const;

CounterNameValsList operator+(const CounterNameValsList& other_value) const;

CounterNameValsList substr(int index, int returncount) const;

CounterNameValsList replace(int index, int len, const CounterNameValsList& repl) const;

CounterNameValsList replace(int index, int len, const CounterNameValsList_template& repl) const;

void set_size(int new_size);
inline boolean is_bound() const {return val_ptr != NULL; }
inline boolean is_present() const { return is_bound(); }
boolean is_value() const;
int size_of() const;
int n_elem() const { return size_of(); }
int lengthof() const;
void log() const;
  void set_implicit_omit();
void set_param(Module_Param& param);
void encode_text(Text_Buf& text_buf) const;
void decode_text(Text_Buf& text_buf);
};

class CounterNameValsList_template : public Base_Record_Of_Template {
union {
struct {
int n_elements;
CounterNameVals_template **value_elements;
} single_value;
struct {
unsigned int n_values;
CounterNameValsList_template *list_value;
} value_list;
struct {
CounterNameValsList_template* precondition;
CounterNameValsList_template* implied_template;
} implication_;
dynmatch_struct<CounterNameValsList>* dyn_match;
};
void copy_value(const CounterNameValsList& other_value);
void copy_template(const CounterNameValsList_template& other_value);
static boolean match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy);

public:
CounterNameValsList_template();
CounterNameValsList_template(template_sel other_value);
CounterNameValsList_template(null_type other_value);
CounterNameValsList_template(const CounterNameValsList& other_value);
CounterNameValsList_template(const OPTIONAL<CounterNameValsList>& other_value);
CounterNameValsList_template(CounterNameValsList_template* p_precondition, CounterNameValsList_template* p_implied_template);
CounterNameValsList_template(Dynamic_Match_Interface<CounterNameValsList>* p_dyn_match);
CounterNameValsList_template(const CounterNameValsList_template& other_value);
~CounterNameValsList_template();

void clean_up();
CounterNameValsList_template& operator=(template_sel other_value);
CounterNameValsList_template& operator=(null_type other_value);
CounterNameValsList_template& operator=(const CounterNameValsList& other_value);
CounterNameValsList_template& operator=(const OPTIONAL<CounterNameValsList>& other_value);
CounterNameValsList_template& operator=(const CounterNameValsList_template& other_value);

CounterNameVals_template& operator[](int index_value);
CounterNameVals_template& operator[](const INTEGER& index_value);
const CounterNameVals_template& operator[](int index_value) const;
const CounterNameVals_template& operator[](const INTEGER& index_value) const;

void set_size(int new_size);
int n_elem() const;
int size_of(boolean is_size) const;
inline int size_of() const { return size_of(TRUE); }
inline int lengthof() const { return size_of(FALSE); }
boolean match(const CounterNameValsList& other_value, boolean legacy = FALSE) const;
inline boolean is_bound() const 
  {return template_selection != UNINITIALIZED_TEMPLATE; }
boolean is_value() const;
CounterNameValsList valueof() const;
CounterNameValsList substr(int index, int returncount) const;

CounterNameValsList replace(int index, int len, const CounterNameValsList_template& repl) const;

CounterNameValsList replace(int index, int len, const CounterNameValsList& repl) const;

void set_type(template_sel template_type, unsigned int list_length);
CounterNameValsList_template& list_item(unsigned int list_index);
void log() const;
void log_match(const CounterNameValsList& match_value, boolean legacy = FALSE) const;
void encode_text(Text_Buf& text_buf) const;
void decode_text(Text_Buf& text_buf);
boolean is_present(boolean legacy = FALSE) const;
boolean match_omit(boolean legacy = FALSE) const;
  void set_implicit_omit();
void set_param(Module_Param& param);
void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
boolean get_istemplate_kind(const char* type) const;
};


/* Function prototypes */

extern CHARSTRING f__gen__rand__id();
extern CHARSTRING f__ctrl__get(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING& variable, const CHARSTRING_template& on__err);
extern void f__ctrl__set(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING& variable, const CHARSTRING& val);
extern void f__ctrl__trap(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING& variable, const CHARSTRING& val);
extern CHARSTRING f__ctrl__exp__trap(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING_template& variable, const CHARSTRING_template& val, const FLOAT& timeout__val);
extern CHARSTRING f__ctrl__exp__set(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING_template& variable, const CHARSTRING_template& val, const CHARSTRING_template& rsp, const FLOAT& timeout__val);
extern void f__ctrl__exp__get(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING_template& variable, const CHARSTRING_template& rsp, const FLOAT& timeout__val);
extern void f__ctrl__get__exp(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING& variable, const CHARSTRING_template& exp);
extern CHARSTRING_template ts__ctrl__ratectr(const CHARSTRING& grp, const INTEGER& instance, const CHARSTRING& name, const CHARSTRING& kind);
extern INTEGER f__ctrl__get__ratectr__abs(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING& grp, const INTEGER& instance, const CHARSTRING& name);
extern void f__ctrl__get__exp__ratectr__abs(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING& grp, const INTEGER& instance, const CHARSTRING& name, const INTEGER_template& exp);
extern boolean operator==(null_type null_value, const CounterNameVals& other_value);
inline boolean operator!=(null_type null_value, const CounterNameVals& other_value) { return !(null_value == other_value); }
extern boolean operator==(null_type null_value, const CounterNameValsList& other_value);
inline boolean operator!=(null_type null_value, const CounterNameValsList& other_value) { return !(null_value == other_value); }
extern CounterNameVals f__counter__name__vals__get(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING& instance__name, const INTEGER& instance__nr, const CounterNameVals& counternames);
extern CounterNameValsList f__counter__name__vals__get__n(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING& instance__name, const INTEGER& instance__count, const CounterNameVals& counternames, const INTEGER& start__idx);
extern void f__counter__name__vals__add(CounterNameVals& vals, const CHARSTRING& countername, const INTEGER& val);
extern void f__counter__name__vals__set(CounterNameVals& vals, const CHARSTRING& countername, const INTEGER& val);
extern void f__counter__name__vals__list__add(CounterNameValsList& vals, const INTEGER& instance__nr, const CHARSTRING& countername, const INTEGER& val);
extern void f__counter__name__vals__list__set(CounterNameValsList& vals, const INTEGER& instance__nr, const CHARSTRING& countername, const INTEGER& val);
extern CHARSTRING f__counter__val__to__str(const INTEGER& val);
extern void f__counter__name__vals__expect(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING& instance__name, const INTEGER& instance__nr, const CounterNameVals& vals);
extern void f__counter__name__vals__expect__n(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING& instance__name, const CounterNameValsList& valslist);
extern charstring__list f__counter__name__vals__get__changed(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING& instance__name, const INTEGER& instance__nr, const CounterNameVals& vals);
extern charstring__list f__counter__name__vals__get__changed__n(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING& instance__name, const CounterNameValsList& valslist);
extern void f__counter__name__vals__expect__changed(IPA__Emulation::IPA__CTRL__PT& pt, const CHARSTRING& instance__name, const CounterNameValsList& valslist, const charstring__list& expect__changed);
extern void f__counter__name__vals__expect__changed__list(const charstring__list& got__list, const charstring__list& expect__list);
extern void pre_init_module();
extern void post_init_module();

/* Global variable declarations */

extern const TTCN_Typedescriptor_t charstring__list_descr_;
extern const XERdescriptor_t charstring__list_0_xer_;
extern const TTCN_Typedescriptor_t charstring__list_0_descr_;
extern const CHARSTRING_template& f__ctrl__get_on__err_defval;
extern CHARSTRING_template template_f__ctrl__get_on__err_defval;
extern const CHARSTRING_template& f__ctrl__exp__trap_val_defval;
extern CHARSTRING_template template_f__ctrl__exp__trap_val_defval;
extern const FLOAT& f__ctrl__exp__trap_timeout__val_defval;
extern FLOAT const_f__ctrl__exp__trap_timeout__val_defval;
extern const CHARSTRING_template& f__ctrl__exp__set_val_defval;
extern CHARSTRING_template template_f__ctrl__exp__set_val_defval;
extern const CHARSTRING_template& f__ctrl__exp__set_rsp_defval;
extern CHARSTRING_template template_f__ctrl__exp__set_rsp_defval;
extern const FLOAT& f__ctrl__exp__set_timeout__val_defval;
extern FLOAT const_f__ctrl__exp__set_timeout__val_defval;
extern const CHARSTRING_template& f__ctrl__exp__get_rsp_defval;
extern CHARSTRING_template template_f__ctrl__exp__get_rsp_defval;
extern const FLOAT& f__ctrl__exp__get_timeout__val_defval;
extern FLOAT const_f__ctrl__exp__get_timeout__val_defval;
extern const CHARSTRING& ts__ctrl__ratectr_kind_defval;
extern CHARSTRING const_ts__ctrl__ratectr_kind_defval;
extern const XERdescriptor_t CounterNameVal_name_xer_;
extern const TTCN_Typedescriptor_t CounterNameVal_name_descr_;
extern const XERdescriptor_t CounterNameVal_val_xer_;
extern const TTCN_Typedescriptor_t CounterNameVal_val_descr_;
extern const TTCN_Typedescriptor_t CounterNameVal_descr_;
extern const TTCN_Typedescriptor_t CounterNameVals_descr_;
extern const TTCN_Typedescriptor_t CounterNameValsList_descr_;
extern const CHARSTRING& f__counter__name__vals__get__n_instance__name_defval;
extern CHARSTRING const_f__counter__name__vals__get__n_instance__name_defval;
extern const INTEGER& f__counter__name__vals__get__n_start__idx_defval;
extern INTEGER const_f__counter__name__vals__get__n_start__idx_defval;
extern const INTEGER& f__counter__name__vals__add_val_defval;
extern INTEGER const_f__counter__name__vals__add_val_defval;
extern const INTEGER& f__counter__name__vals__set_val_defval;
extern INTEGER const_f__counter__name__vals__set_val_defval;
extern const INTEGER& f__counter__name__vals__list__add_val_defval;
extern INTEGER const_f__counter__name__vals__list__add_val_defval;
extern const INTEGER& f__counter__name__vals__list__set_val_defval;
extern INTEGER const_f__counter__name__vals__list__set_val_defval;
extern const CHARSTRING cs_15,
cs_12,
cs_18,
cs_16,
cs_14,
cs_7,
cs_13,
cs_6,
cs_5,
cs_3,
cs_17,
cs_10,
cs_1,
cs_11,
cs_19,
cs_4,
cs_8,
cs_9,
cs_0,
cs_2;
extern const unsigned char module_checksum[];
extern TTCN_Module module_object;
extern const RuntimeVersionChecker ver_checker;

} /* end of namespace */

#endif
