// This C++ header file was generated by the TTCN-3 compiler // of the TTCN-3 Test Executor version 9.0.0 // for (build@df34402ede0d) on Tue Jun 25 17:59:45 2024 // Copyright (c) 2000-2023 Ericsson Telecom AB // Do not edit this file unless you know what you are doing. #ifndef StatsD__Checker_HH #define StatsD__Checker_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 #include "StatsD_CodecPort_CtrlFunct.hh" #include "Osmocom_VTY_Functions.hh" #if TTCN3_VERSION != 90000 #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 StatsD__Checker_HH #endif namespace StatsD__Checker { /* Forward declarations of classes */ class StatsDExpect; class StatsDExpect_template; class StatsDExpects; class StatsDExpects_template; class StatsDExpectPriv; class StatsDExpectPriv_template; class StatsDExpectPrivs; class StatsDExpectPrivs_template; class StatsDResultType; class StatsDResultType_template; class StatsDExpectResult; class StatsDExpectResult_template; class STATSD__reset_call; class STATSD__reset_call_redirect; class STATSD__reset_reply; class STATSD__reset_reply_redirect; class STATSD__reset_template; class STATSD__expect_call; class STATSD__expect_call_redirect; class STATSD__expect_reply; class STATSD__expect_reply_redirect; class STATSD__expect_template; class STATSD__PROC__PT; } /* end of namespace */ #ifndef StatsD__Checker_HH #define StatsD__Checker_HH namespace StatsD__Checker { /* Type definitions */ typedef COMPONENT StatsD__Checker__CT; typedef COMPONENT_template StatsD__Checker__CT_template; typedef COMPONENT StatsD__ConnHdlr; typedef COMPONENT_template StatsD__ConnHdlr_template; /* Class definitions */ class StatsDExpect { CHARSTRING field_name; CHARSTRING field_mtype; INTEGER field_min; INTEGER field_max; public: StatsDExpect(); StatsDExpect(const CHARSTRING& par_name, const CHARSTRING& par_mtype, const INTEGER& par_min, const INTEGER& par_max); StatsDExpect(const StatsDExpect& other_value); inline boolean is_component() { return FALSE; } void clean_up(); const TTCN_Typedescriptor_t* get_descriptor() const; StatsDExpect& operator=(const StatsDExpect& other_value); boolean operator==(const StatsDExpect& other_value) const; inline boolean operator!=(const StatsDExpect& 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 CHARSTRING& mtype() {return field_mtype;} inline const CHARSTRING& mtype() const {return field_mtype;} inline INTEGER& min() {return field_min;} inline const INTEGER& min() const {return field_min;} inline INTEGER& max() {return field_max;} inline const INTEGER& max() const {return field_max;} inline int size_of() const {return 4;} 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 StatsDExpect_template : public Base_Template { struct single_value_struct; union { single_value_struct *single_value; struct { unsigned int n_values; StatsDExpect_template *list_value; } value_list; struct { StatsDExpect_template* precondition; StatsDExpect_template* implied_template; } implication_; dynmatch_struct* dyn_match; }; void set_specific(); void copy_value(const StatsDExpect& other_value); void copy_template(const StatsDExpect_template& other_value); public: StatsDExpect_template(); StatsDExpect_template(template_sel other_value); StatsDExpect_template(const StatsDExpect& other_value); StatsDExpect_template(const OPTIONAL& other_value); StatsDExpect_template(StatsDExpect_template* p_precondition, StatsDExpect_template* p_implied_template); StatsDExpect_template(Dynamic_Match_Interface* p_dyn_match); StatsDExpect_template(const StatsDExpect_template& other_value); ~StatsDExpect_template(); StatsDExpect_template& operator=(template_sel other_value); StatsDExpect_template& operator=(const StatsDExpect& other_value); StatsDExpect_template& operator=(const OPTIONAL& other_value); StatsDExpect_template& operator=(const StatsDExpect_template& other_value); boolean match(const StatsDExpect& other_value, boolean legacy = FALSE) const; boolean is_bound() const; boolean is_value() const; void clean_up(); StatsDExpect valueof() const; void set_type(template_sel template_type, unsigned int list_length); StatsDExpect_template& list_item(unsigned int list_index) const; CHARSTRING_template& name(); const CHARSTRING_template& name() const; CHARSTRING_template& mtype(); const CHARSTRING_template& mtype() const; INTEGER_template& min(); const INTEGER_template& min() const; INTEGER_template& max(); const INTEGER_template& max() const; int size_of() const; void log() const; void log_match(const StatsDExpect& match_value, boolean legacy = FALSE) const; 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 StatsDExpects : public Base_Type { struct recordof_setof_struct { int ref_count; int n_elements; StatsDExpect **value_elements; } *val_ptr; static const StatsDExpect UNBOUND_ELEM; private: friend boolean operator==(null_type null_value, const StatsDExpects& other_value); static boolean compare_function(const Base_Type *left_ptr, int left_index, const Base_Type *right_ptr, int right_index); public: typedef StatsDExpect of_type; StatsDExpects(); StatsDExpects(null_type other_value); StatsDExpects(const StatsDExpects& other_value); ~StatsDExpects(); void clean_up(); StatsDExpects& operator=(null_type other_value); StatsDExpects& operator=(const StatsDExpects& other_value); boolean operator==(null_type other_value) const; boolean operator==(const StatsDExpects& other_value) const; inline boolean operator!=(null_type other_value) const { return !(*this == other_value); } inline boolean operator!=(const StatsDExpects& other_value) const { return !(*this == other_value); } StatsDExpect& operator[](int index_value); StatsDExpect& operator[](const INTEGER& index_value); const StatsDExpect& operator[](int index_value) const; const StatsDExpect& operator[](const INTEGER& index_value) const; StatsDExpects operator<<=(int rotate_count) const; StatsDExpects operator<<=(const INTEGER& rotate_count) const; StatsDExpects operator>>=(int rotate_count) const; StatsDExpects operator>>=(const INTEGER& rotate_count) const; StatsDExpects operator+(const StatsDExpects& other_value) const; StatsDExpects substr(int index, int returncount) const; StatsDExpects replace(int index, int len, const StatsDExpects& repl) const; StatsDExpects replace(int index, int len, const StatsDExpects_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 StatsDExpects_template : public Restricted_Length_Template { union { struct { int n_elements; StatsDExpect_template **value_elements; } single_value; struct { unsigned int n_values; StatsDExpects_template *list_value; } value_list; struct { StatsDExpects_template* precondition; StatsDExpects_template* implied_template; } implication_; dynmatch_struct* dyn_match; struct { unsigned int n_items; StatsDExpect_template *set_items; } value_set; }; void copy_value(const StatsDExpects& other_value); void copy_template(const StatsDExpects_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); static boolean match_function_set(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy); static void log_function(const Base_Type *value_ptr, const Restricted_Length_Template *template_ptr, int index_value, int index_template, boolean legacy); public: StatsDExpects_template(); StatsDExpects_template(template_sel other_value); StatsDExpects_template(null_type other_value); StatsDExpects_template(const StatsDExpects& other_value); StatsDExpects_template(const OPTIONAL& other_value); StatsDExpects_template(StatsDExpects_template* p_precondition, StatsDExpects_template* p_implied_template); StatsDExpects_template(Dynamic_Match_Interface* p_dyn_match); StatsDExpects_template(const StatsDExpects_template& other_value); ~StatsDExpects_template(); void clean_up(); StatsDExpects_template& operator=(template_sel other_value); StatsDExpects_template& operator=(null_type other_value); StatsDExpects_template& operator=(const StatsDExpects& other_value); StatsDExpects_template& operator=(const OPTIONAL& other_value); StatsDExpects_template& operator=(const StatsDExpects_template& other_value); StatsDExpect_template& operator[](int index_value); StatsDExpect_template& operator[](const INTEGER& index_value); const StatsDExpect_template& operator[](int index_value) const; const StatsDExpect_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 StatsDExpects& other_value, boolean legacy = FALSE) const; inline boolean is_bound() const {return template_selection != UNINITIALIZED_TEMPLATE; } boolean is_value() const; StatsDExpects valueof() const; StatsDExpects substr(int index, int returncount) const; StatsDExpects replace(int index, int len, const StatsDExpects_template& repl) const; StatsDExpects replace(int index, int len, const StatsDExpects& repl) const; void set_type(template_sel template_type, unsigned int list_length); StatsDExpects_template& list_item(unsigned int list_index); StatsDExpect_template& set_item(unsigned int set_index); void log() const; void log_match(const StatsDExpects& 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_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 StatsDExpectPriv { StatsDExpect field_expect; INTEGER field_seen; public: StatsDExpectPriv(); StatsDExpectPriv(const StatsDExpect& par_expect, const INTEGER& par_seen); StatsDExpectPriv(const StatsDExpectPriv& other_value); inline boolean is_component() { return FALSE; } void clean_up(); const TTCN_Typedescriptor_t* get_descriptor() const; StatsDExpectPriv& operator=(const StatsDExpectPriv& other_value); boolean operator==(const StatsDExpectPriv& other_value) const; inline boolean operator!=(const StatsDExpectPriv& other_value) const { return !(*this == other_value); } boolean is_bound() const; inline boolean is_present() const { return is_bound(); } boolean is_value() const; inline StatsDExpect& expect() {return field_expect;} inline const StatsDExpect& expect() const {return field_expect;} inline INTEGER& seen() {return field_seen;} inline const INTEGER& seen() const {return field_seen;} 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 StatsDExpectPriv_template : public Base_Template { struct single_value_struct; union { single_value_struct *single_value; struct { unsigned int n_values; StatsDExpectPriv_template *list_value; } value_list; struct { StatsDExpectPriv_template* precondition; StatsDExpectPriv_template* implied_template; } implication_; dynmatch_struct* dyn_match; }; void set_specific(); void copy_value(const StatsDExpectPriv& other_value); void copy_template(const StatsDExpectPriv_template& other_value); public: StatsDExpectPriv_template(); StatsDExpectPriv_template(template_sel other_value); StatsDExpectPriv_template(const StatsDExpectPriv& other_value); StatsDExpectPriv_template(const OPTIONAL& other_value); StatsDExpectPriv_template(StatsDExpectPriv_template* p_precondition, StatsDExpectPriv_template* p_implied_template); StatsDExpectPriv_template(Dynamic_Match_Interface* p_dyn_match); StatsDExpectPriv_template(const StatsDExpectPriv_template& other_value); ~StatsDExpectPriv_template(); StatsDExpectPriv_template& operator=(template_sel other_value); StatsDExpectPriv_template& operator=(const StatsDExpectPriv& other_value); StatsDExpectPriv_template& operator=(const OPTIONAL& other_value); StatsDExpectPriv_template& operator=(const StatsDExpectPriv_template& other_value); boolean match(const StatsDExpectPriv& other_value, boolean legacy = FALSE) const; boolean is_bound() const; boolean is_value() const; void clean_up(); StatsDExpectPriv valueof() const; void set_type(template_sel template_type, unsigned int list_length); StatsDExpectPriv_template& list_item(unsigned int list_index) const; StatsDExpect_template& expect(); const StatsDExpect_template& expect() const; INTEGER_template& seen(); const INTEGER_template& seen() const; int size_of() const; void log() const; void log_match(const StatsDExpectPriv& match_value, boolean legacy = FALSE) const; 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 StatsDExpectPrivs : public Base_Type { struct recordof_setof_struct { int ref_count; int n_elements; StatsDExpectPriv **value_elements; } *val_ptr; static const StatsDExpectPriv UNBOUND_ELEM; private: friend boolean operator==(null_type null_value, const StatsDExpectPrivs& other_value); static boolean compare_function(const Base_Type *left_ptr, int left_index, const Base_Type *right_ptr, int right_index); public: typedef StatsDExpectPriv of_type; StatsDExpectPrivs(); StatsDExpectPrivs(null_type other_value); StatsDExpectPrivs(const StatsDExpectPrivs& other_value); ~StatsDExpectPrivs(); void clean_up(); StatsDExpectPrivs& operator=(null_type other_value); StatsDExpectPrivs& operator=(const StatsDExpectPrivs& other_value); boolean operator==(null_type other_value) const; boolean operator==(const StatsDExpectPrivs& other_value) const; inline boolean operator!=(null_type other_value) const { return !(*this == other_value); } inline boolean operator!=(const StatsDExpectPrivs& other_value) const { return !(*this == other_value); } StatsDExpectPriv& operator[](int index_value); StatsDExpectPriv& operator[](const INTEGER& index_value); const StatsDExpectPriv& operator[](int index_value) const; const StatsDExpectPriv& operator[](const INTEGER& index_value) const; StatsDExpectPrivs operator<<=(int rotate_count) const; StatsDExpectPrivs operator<<=(const INTEGER& rotate_count) const; StatsDExpectPrivs operator>>=(int rotate_count) const; StatsDExpectPrivs operator>>=(const INTEGER& rotate_count) const; StatsDExpectPrivs operator+(const StatsDExpectPrivs& other_value) const; StatsDExpectPrivs substr(int index, int returncount) const; StatsDExpectPrivs replace(int index, int len, const StatsDExpectPrivs& repl) const; StatsDExpectPrivs replace(int index, int len, const StatsDExpectPrivs_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 StatsDExpectPrivs_template : public Restricted_Length_Template { union { struct { int n_elements; StatsDExpectPriv_template **value_elements; } single_value; struct { unsigned int n_values; StatsDExpectPrivs_template *list_value; } value_list; struct { StatsDExpectPrivs_template* precondition; StatsDExpectPrivs_template* implied_template; } implication_; dynmatch_struct* dyn_match; struct { unsigned int n_items; StatsDExpectPriv_template *set_items; } value_set; }; void copy_value(const StatsDExpectPrivs& other_value); void copy_template(const StatsDExpectPrivs_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); static boolean match_function_set(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy); static void log_function(const Base_Type *value_ptr, const Restricted_Length_Template *template_ptr, int index_value, int index_template, boolean legacy); public: StatsDExpectPrivs_template(); StatsDExpectPrivs_template(template_sel other_value); StatsDExpectPrivs_template(null_type other_value); StatsDExpectPrivs_template(const StatsDExpectPrivs& other_value); StatsDExpectPrivs_template(const OPTIONAL& other_value); StatsDExpectPrivs_template(StatsDExpectPrivs_template* p_precondition, StatsDExpectPrivs_template* p_implied_template); StatsDExpectPrivs_template(Dynamic_Match_Interface* p_dyn_match); StatsDExpectPrivs_template(const StatsDExpectPrivs_template& other_value); ~StatsDExpectPrivs_template(); void clean_up(); StatsDExpectPrivs_template& operator=(template_sel other_value); StatsDExpectPrivs_template& operator=(null_type other_value); StatsDExpectPrivs_template& operator=(const StatsDExpectPrivs& other_value); StatsDExpectPrivs_template& operator=(const OPTIONAL& other_value); StatsDExpectPrivs_template& operator=(const StatsDExpectPrivs_template& other_value); StatsDExpectPriv_template& operator[](int index_value); StatsDExpectPriv_template& operator[](const INTEGER& index_value); const StatsDExpectPriv_template& operator[](int index_value) const; const StatsDExpectPriv_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 StatsDExpectPrivs& other_value, boolean legacy = FALSE) const; inline boolean is_bound() const {return template_selection != UNINITIALIZED_TEMPLATE; } boolean is_value() const; StatsDExpectPrivs valueof() const; StatsDExpectPrivs substr(int index, int returncount) const; StatsDExpectPrivs replace(int index, int len, const StatsDExpectPrivs_template& repl) const; StatsDExpectPrivs replace(int index, int len, const StatsDExpectPrivs& repl) const; void set_type(template_sel template_type, unsigned int list_length); StatsDExpectPrivs_template& list_item(unsigned int list_index); StatsDExpectPriv_template& set_item(unsigned int set_index); void log() const; void log_match(const StatsDExpectPrivs& 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_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 StatsDResultType : public Base_Type { // enum friend class StatsDResultType_template; public: enum enum_type { e__Matched = 0, e__Mismatched = 1, e__NotFound = 2, UNKNOWN_VALUE = 3, UNBOUND_VALUE = 4 }; private: enum_type enum_value; public: StatsDResultType(); StatsDResultType(int other_value); StatsDResultType(enum_type other_value); StatsDResultType(const StatsDResultType& other_value); StatsDResultType& operator=(int other_value); StatsDResultType& operator=(enum_type other_value); StatsDResultType& operator=(const StatsDResultType& other_value); boolean operator==(enum_type other_value) const; boolean operator==(const StatsDResultType& other_value) const; inline boolean operator!=(enum_type other_value) const { return !(*this == other_value); } inline boolean operator!=(const StatsDResultType& other_value) const { return !(*this == other_value); } boolean operator<(enum_type other_value) const; boolean operator<(const StatsDResultType& other_value) const; boolean operator>(enum_type other_value) const; boolean operator>(const StatsDResultType& other_value) const; inline boolean operator<=(enum_type other_value) const { return !(*this > other_value); } inline boolean operator<=(const StatsDResultType& other_value) const { return !(*this > other_value); } inline boolean operator>=(enum_type other_value) const { return !(*this < other_value); } inline boolean operator>=(const StatsDResultType& other_value) const { return !(*this < other_value); } static const char *enum_to_str(enum_type enum_par); static enum_type str_to_enum(const char *str_par); static boolean is_valid_enum(int int_par); static int enum2int(enum_type enum_par); static int enum2int(const StatsDResultType& enum_par); int as_int() const { return enum2int(enum_value); } void from_int(int p_val) { *this = p_val; } void int2enum(int int_val); operator enum_type() const; inline boolean is_bound() const { return enum_value != UNBOUND_VALUE; } inline boolean is_value() const { return enum_value != UNBOUND_VALUE; } inline void clean_up(){ enum_value = UNBOUND_VALUE; } inline boolean is_present() const { return is_bound(); } void log() const; void set_param(Module_Param& param); void encode_text(Text_Buf& text_buf) const; void decode_text(Text_Buf& text_buf); }; class StatsDResultType_template : public Base_Template { union { StatsDResultType::enum_type single_value; struct { unsigned int n_values; StatsDResultType_template *list_value; } value_list; struct { StatsDResultType_template* precondition; StatsDResultType_template* implied_template; } implication_; dynmatch_struct* dyn_match; }; void copy_template(const StatsDResultType_template& other_value); public: StatsDResultType_template(); StatsDResultType_template(template_sel other_value); StatsDResultType_template(int other_value); StatsDResultType_template(StatsDResultType::enum_type other_value); StatsDResultType_template(const StatsDResultType& other_value); StatsDResultType_template(const OPTIONAL& other_value); StatsDResultType_template(StatsDResultType_template* p_precondition, StatsDResultType_template* p_implied_template); StatsDResultType_template(Dynamic_Match_Interface* p_dyn_match); StatsDResultType_template(const StatsDResultType_template& other_value); ~StatsDResultType_template(); boolean is_bound() const; boolean is_value() const; void clean_up(); StatsDResultType_template& operator=(template_sel other_value); StatsDResultType_template& operator=(int other_value); StatsDResultType_template& operator=(StatsDResultType::enum_type other_value); StatsDResultType_template& operator=(const StatsDResultType& other_value); StatsDResultType_template& operator=(const OPTIONAL& other_value); StatsDResultType_template& operator=(const StatsDResultType_template& other_value); boolean match(StatsDResultType::enum_type other_value, boolean legacy = FALSE) const; boolean match(const StatsDResultType& other_value, boolean legacy = FALSE) const; StatsDResultType::enum_type valueof() const; void set_type(template_sel template_type, unsigned int list_length); StatsDResultType_template& list_item(unsigned int list_index); void log() const; void log_match(const StatsDResultType& 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_param(Module_Param& param); void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const; }; class StatsDExpectResult { StatsDResultType field_kind; INTEGER field_idx; public: StatsDExpectResult(); StatsDExpectResult(const StatsDResultType& par_kind, const INTEGER& par_idx); StatsDExpectResult(const StatsDExpectResult& other_value); inline boolean is_component() { return FALSE; } void clean_up(); const TTCN_Typedescriptor_t* get_descriptor() const; StatsDExpectResult& operator=(const StatsDExpectResult& other_value); boolean operator==(const StatsDExpectResult& other_value) const; inline boolean operator!=(const StatsDExpectResult& other_value) const { return !(*this == other_value); } boolean is_bound() const; inline boolean is_present() const { return is_bound(); } boolean is_value() const; inline StatsDResultType& kind() {return field_kind;} inline const StatsDResultType& kind() const {return field_kind;} inline INTEGER& idx() {return field_idx;} inline const INTEGER& idx() const {return field_idx;} 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 StatsDExpectResult_template : public Base_Template { struct single_value_struct; union { single_value_struct *single_value; struct { unsigned int n_values; StatsDExpectResult_template *list_value; } value_list; struct { StatsDExpectResult_template* precondition; StatsDExpectResult_template* implied_template; } implication_; dynmatch_struct* dyn_match; }; void set_specific(); void copy_value(const StatsDExpectResult& other_value); void copy_template(const StatsDExpectResult_template& other_value); public: StatsDExpectResult_template(); StatsDExpectResult_template(template_sel other_value); StatsDExpectResult_template(const StatsDExpectResult& other_value); StatsDExpectResult_template(const OPTIONAL& other_value); StatsDExpectResult_template(StatsDExpectResult_template* p_precondition, StatsDExpectResult_template* p_implied_template); StatsDExpectResult_template(Dynamic_Match_Interface* p_dyn_match); StatsDExpectResult_template(const StatsDExpectResult_template& other_value); ~StatsDExpectResult_template(); StatsDExpectResult_template& operator=(template_sel other_value); StatsDExpectResult_template& operator=(const StatsDExpectResult& other_value); StatsDExpectResult_template& operator=(const OPTIONAL& other_value); StatsDExpectResult_template& operator=(const StatsDExpectResult_template& other_value); boolean match(const StatsDExpectResult& other_value, boolean legacy = FALSE) const; boolean is_bound() const; boolean is_value() const; void clean_up(); StatsDExpectResult valueof() const; void set_type(template_sel template_type, unsigned int list_length); StatsDExpectResult_template& list_item(unsigned int list_index) const; StatsDResultType_template& kind(); const StatsDResultType_template& kind() const; INTEGER_template& idx(); const INTEGER_template& idx() const; int size_of() const; void log() const; void log_match(const StatsDExpectResult& match_value, boolean legacy = FALSE) const; 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 STATSD__reset_call { public: inline void encode_text(Text_Buf&) const { } inline void decode_text(Text_Buf&) { } void log() const; }; class STATSD__reset_call_redirect { public: inline void set_parameters(const STATSD__reset_call&) const { } }; class STATSD__reset_reply { public: inline void encode_text(Text_Buf&) const { } inline void decode_text(Text_Buf&) { } void log() const; }; class STATSD__reset_reply_redirect { public: inline void set_parameters(const STATSD__reset_reply&) const {} }; class STATSD__reset_template { public: STATSD__reset_template() { } STATSD__reset_template(null_type) { } inline STATSD__reset_template& operator=(null_type) { return *this; } inline STATSD__reset_call create_call() const { return STATSD__reset_call(); } inline STATSD__reset_reply create_reply() const { return STATSD__reset_reply(); } inline boolean match_call(const STATSD__reset_call&, boolean legacy = FALSE) const { return TRUE; } inline boolean match_reply(const STATSD__reset_reply&, boolean legacy = FALSE) const { return TRUE; } void log() const; void log_match_call(const STATSD__reset_call& match_value, boolean legacy = FALSE) const; void log_match_reply(const STATSD__reset_reply& match_value, boolean legacy = FALSE) const; inline void encode_text(Text_Buf&) const { } inline void decode_text(Text_Buf&) { } }; class STATSD__expect_call { StatsDExpects param_expects; public: inline StatsDExpects& expects() { return param_expects; } inline const StatsDExpects& expects() const { return param_expects; } void encode_text(Text_Buf& text_buf) const; void decode_text(Text_Buf& text_buf); void log() const; }; class STATSD__expect_call_redirect { StatsDExpects *ptr_expects; public: STATSD__expect_call_redirect(StatsDExpects *par_expects = NULL) : ptr_expects(par_expects) { } virtual ~STATSD__expect_call_redirect() { } virtual void set_parameters(const STATSD__expect_call& call_par) const; }; class STATSD__expect_reply { BOOLEAN reply_value; public: inline BOOLEAN& return_value() { return reply_value; } inline const BOOLEAN& return_value() const { return reply_value; } void encode_text(Text_Buf& text_buf) const; void decode_text(Text_Buf& text_buf); void log() const; }; class STATSD__expect_reply_redirect { BOOLEAN *ret_val_redir; public: STATSD__expect_reply_redirect(BOOLEAN *return_redirect) : ret_val_redir(return_redirect) { } virtual ~STATSD__expect_reply_redirect() { } virtual void set_parameters(const STATSD__expect_reply& reply_par) const; }; class STATSD__expect_template { StatsDExpects_template param_expects; mutable BOOLEAN_template reply_value; public: STATSD__expect_template(); inline StatsDExpects_template& expects() { return param_expects; } inline const StatsDExpects_template& expects() const { return param_expects; } inline BOOLEAN_template& return_value() const { return reply_value; } STATSD__expect_call create_call() const; STATSD__expect_reply create_reply() const; boolean match_call(const STATSD__expect_call& match_value, boolean legacy = FALSE) const; boolean match_reply(const STATSD__expect_reply& match_value, boolean legacy = FALSE) const; const STATSD__expect_template& set_value_template(const BOOLEAN_template& new_template) const; void log() const; void log_match_call(const STATSD__expect_call& match_value, boolean legacy = FALSE) const; void log_match_reply(const STATSD__expect_reply& match_value, boolean legacy = FALSE) const; void encode_text(Text_Buf& text_buf) const; void decode_text(Text_Buf& text_buf); }; class STATSD__PROC__PT : public PORT { enum proc_selection { CALL_0, CALL_1, REPLY_0, REPLY_1 }; struct proc_queue_item { proc_selection item_selection; union { STATSD__reset_call *call_0; STATSD__expect_call *call_1; STATSD__reset_reply *reply_0; STATSD__expect_reply *reply_1; }; component sender_component; proc_queue_item *next_item; } *proc_queue_head, *proc_queue_tail; void append_to_proc_queue(proc_queue_item *new_item); void remove_proc_queue_head(); protected: void clear_queue(); public: STATSD__PROC__PT(const char *par_port_name = NULL); ~STATSD__PROC__PT(); void call(const STATSD__reset_template& call_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL); void call(const STATSD__reset_template& call_template, FLOAT* timestamp_redirect = NULL); void call(const STATSD__expect_template& call_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL); void call(const STATSD__expect_template& call_template, FLOAT* timestamp_redirect = NULL); void reply(const STATSD__reset_template& reply_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL); void reply(const STATSD__reset_template& reply_template, FLOAT* timestamp_redirect = NULL); void reply(const STATSD__expect_template& reply_template, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL); void reply(const STATSD__expect_template& reply_template, FLOAT* timestamp_redirect = NULL); public: alt_status getcall(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*); alt_status check_getcall(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*); alt_status getcall(const STATSD__reset_template& getcall_template, const COMPONENT_template& sender_template, const STATSD__reset_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*); alt_status check_getcall(const STATSD__reset_template& getcall_template, const COMPONENT_template& sender_template, const STATSD__reset_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*); alt_status getcall(const STATSD__expect_template& getcall_template, const COMPONENT_template& sender_template, const STATSD__expect_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*); alt_status check_getcall(const STATSD__expect_template& getcall_template, const COMPONENT_template& sender_template, const STATSD__expect_call_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*); alt_status getreply(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*); alt_status check_getreply(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*); alt_status getreply(const STATSD__reset_template& getreply_template, const COMPONENT_template& sender_template, const STATSD__reset_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*); alt_status check_getreply(const STATSD__reset_template& getreply_template, const COMPONENT_template& sender_template, const STATSD__reset_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*); alt_status getreply(const STATSD__expect_template& getreply_template, const COMPONENT_template& sender_template, const STATSD__expect_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*); alt_status check_getreply(const STATSD__expect_template& getreply_template, const COMPONENT_template& sender_template, const STATSD__expect_reply_redirect& param_ref, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*); private: void incoming_call(const STATSD__reset_call& incoming_par, component sender_component); void incoming_call(const STATSD__expect_call& incoming_par, component sender_component); void incoming_reply(const STATSD__reset_reply& incoming_par, component sender_component); void incoming_reply(const STATSD__expect_reply& incoming_par, component sender_component); protected: boolean process_call(const char *signature_name, Text_Buf& incoming_buf, component sender_component); boolean process_reply(const char *signature_name, Text_Buf& incoming_buf, component sender_component); }; /* Function prototypes */ extern boolean operator==(null_type null_value, const StatsDExpects& other_value); inline boolean operator!=(null_type null_value, const StatsDExpects& other_value) { return !(null_value == other_value); } extern boolean operator==(null_type null_value, const StatsDExpectPrivs& other_value); inline boolean operator!=(null_type null_value, const StatsDExpectPrivs& other_value) { return !(null_value == other_value); } extern void main_(const CHARSTRING& statsd__host, const INTEGER& statsd__port); extern void start_main_(const COMPONENT& component_reference, const CHARSTRING& statsd__host, const INTEGER& statsd__port); extern BOOLEAN f__compare__expect(const StatsD__Types::StatsDMetric& metric, const StatsDExpect& expect); extern StatsDExpectResult f__statsd__checker__metric__expects(const StatsDExpectPrivs& exp__seen, const StatsD__Types::StatsDMetric& metric); extern StatsDExpectPriv_template t__statsd__expect__priv(const StatsDExpect_template& expect); extern BOOLEAN f__statsd__checker__expect(const StatsDExpects& expects); extern void start_f__statsd__checker__expect(const COMPONENT& component_reference, const StatsDExpects& expects); extern void f__init__statsd(const CHARSTRING& id, COMPONENT& vc__STATSD, const CHARSTRING& local__addr, const INTEGER& local__port); extern void f__statsd__reset(); extern void start_f__statsd__reset(const COMPONENT& component_reference); extern BOOLEAN f__statsd__expect(const StatsDExpects& expects); extern void start_f__statsd__expect(const COMPONENT& component_reference, const StatsDExpects& expects); extern void pre_init_module(); extern void post_init_module(); extern boolean set_module_param(Module_Param& param); extern void log_module_param(); extern boolean init_comp_type(const char *component_type, boolean init_base_comps); extern boolean init_system_port(const char* component_type, const char* port_name); extern boolean start_ptc_function(const char *function_name, Text_Buf& function_arguments); /* Global variable declarations */ extern const BOOLEAN& mp__enable__stats; extern BOOLEAN modulepar_mp__enable__stats; extern const XERdescriptor_t StatsDExpect_name_xer_; extern const TTCN_Typedescriptor_t StatsDExpect_name_descr_; extern UNIVERSAL_CHARSTRING StatsDExpect_name_default_coding; extern const XERdescriptor_t StatsDExpect_mtype_xer_; extern const TTCN_Typedescriptor_t StatsDExpect_mtype_descr_; extern UNIVERSAL_CHARSTRING StatsDExpect_mtype_default_coding; extern const XERdescriptor_t StatsDExpect_min_xer_; extern const TTCN_Typedescriptor_t StatsDExpect_min_descr_; extern UNIVERSAL_CHARSTRING StatsDExpect_min_default_coding; extern const XERdescriptor_t StatsDExpect_max_xer_; extern const TTCN_OERdescriptor_t StatsDExpect_max_oer_; extern const TTCN_Typedescriptor_t StatsDExpect_max_descr_; extern UNIVERSAL_CHARSTRING StatsDExpect_max_default_coding; extern const TTCN_Typedescriptor_t StatsDExpect_descr_; extern const TTCN_Typedescriptor_t StatsDExpects_descr_; extern const XERdescriptor_t StatsDExpectPriv_seen_xer_; extern const TTCN_Typedescriptor_t StatsDExpectPriv_seen_descr_; extern const TTCN_Typedescriptor_t StatsDExpectPriv_descr_; extern const TTCN_Typedescriptor_t StatsDExpectPrivs_descr_; extern const TTCN_Typedescriptor_t StatsDResultType_descr_; extern const XERdescriptor_t StatsDExpectResult_idx_xer_; extern const TTCN_Typedescriptor_t StatsDExpectResult_idx_descr_; extern const TTCN_Typedescriptor_t StatsDExpectResult_descr_; extern const TTCN_Typedescriptor_t& StatsD__Checker__CT_descr_; extern TELNETasp__PortType::TELNETasp__PT StatsD__Checker__CT_component_STATSVTY; extern STATSD__PROC__PT StatsD__Checker__CT_component_STATSD__PROC; extern StatsD__CodecPort::STATSD__CODEC__PT StatsD__Checker__CT_component_STATS; extern TIMER StatsD__Checker__CT_component_T__statsd; extern const TTCN_Typedescriptor_t& StatsD__ConnHdlr_descr_; extern STATSD__PROC__PT StatsD__ConnHdlr_component_STATSD__PROC; extern const CHARSTRING cs_5, cs_1, cs_0, cs_2, cs_4, cs_3; extern const unsigned char module_checksum[]; extern TTCN_Module module_object; extern const RuntimeVersionChecker ver_checker; } /* end of namespace */ #endif