// 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 TELNETasp__PortType_HH
#define TELNETasp__PortType_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>

#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 TELNETasp__PortType_HH
#endif

namespace TELNETasp__PortType {

/* Forward declarations of classes */

class TelnetReadMode;
class TelnetReadMode_template;
class TelnetWindowSize;
class TelnetWindowSize_template;
class TelnetPrompt;
class TelnetPrompt_template;
class TelnetPrompts;
class TelnetPrompts_template;
class ASP__TelnetPortParameters;
class ASP__TelnetPortParameters_template;
class ASP__TelnetDynamicConfig;
class ASP__TelnetDynamicConfig_template;
class ASP__TelnetConnection;
class ASP__TelnetConnection_template;
class ASP__TelnetClose;
class ASP__TelnetClose_template;
class ASP__Get__portnum;
class ASP__Get__portnum_template;
class ASP__Portnum;
class ASP__Portnum_template;
class TELNETasp__PT_BASE;
class TELNETasp__PT;

} /* end of namespace */

#ifndef TELNETasp__PortType_HH
#define TELNETasp__PortType_HH

namespace TELNETasp__PortType {

/* Type definitions */

typedef BOOLEAN TelnetEcho;
typedef BOOLEAN_template TelnetEcho_template;

/* Class definitions */

class TelnetReadMode : public Base_Type { // enum
friend class TelnetReadMode_template;
public:
enum enum_type { UNBUFFERED = 0, BUFFERED = 1, UNKNOWN_VALUE = 2, UNBOUND_VALUE = 3 };
private:
enum_type enum_value;

public:
TelnetReadMode();
TelnetReadMode(int other_value);
TelnetReadMode(enum_type other_value);
TelnetReadMode(const TelnetReadMode& other_value);

TelnetReadMode& operator=(int other_value);
TelnetReadMode& operator=(enum_type other_value);
TelnetReadMode& operator=(const TelnetReadMode& other_value);

boolean operator==(int other_value) const;
boolean operator==(enum_type other_value) const;
boolean operator==(const TelnetReadMode& other_value) const;
inline boolean operator!=(int other_value) const { return !(*this == other_value); }
inline boolean operator!=(enum_type other_value) const { return !(*this == other_value); }
inline boolean operator!=(const TelnetReadMode& other_value) const { return !(*this == other_value); }
boolean operator<(int other_value) const;
boolean operator<(enum_type other_value) const;
boolean operator<(const TelnetReadMode& other_value) const;
boolean operator>(int other_value) const;
boolean operator>(enum_type other_value) const;
boolean operator>(const TelnetReadMode& other_value) const;
inline boolean operator<=(int other_value) const { return !(*this > other_value); }
inline boolean operator<=(enum_type other_value) const { return !(*this > other_value); }
inline boolean operator<=(const TelnetReadMode& other_value) const { return !(*this > other_value); }
inline boolean operator>=(int other_value) const { return !(*this < other_value); }
inline boolean operator>=(enum_type other_value) const { return !(*this < other_value); }
inline boolean operator>=(const TelnetReadMode& 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, const int* int_par = NULL, const int* int_par2 = NULL);
static boolean is_valid_enum(int int_par);

static int enum2int(enum_type enum_par);
static int enum2int(const TelnetReadMode& 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 TelnetReadMode_template : public Base_Template {
union {
TelnetReadMode::enum_type single_value;
struct {
unsigned int n_values;
TelnetReadMode_template *list_value;
} value_list;
struct {
TelnetReadMode_template* precondition;
TelnetReadMode_template* implied_template;
} implication_;
dynmatch_struct<TelnetReadMode>* dyn_match;
};

void copy_template(const TelnetReadMode_template& other_value);

public:
TelnetReadMode_template();
TelnetReadMode_template(template_sel other_value);
TelnetReadMode_template(int other_value);
TelnetReadMode_template(TelnetReadMode::enum_type other_value);
TelnetReadMode_template(const TelnetReadMode& other_value);
TelnetReadMode_template(const OPTIONAL<TelnetReadMode>& other_value);
TelnetReadMode_template(TelnetReadMode_template* p_precondition, TelnetReadMode_template* p_implied_template);
TelnetReadMode_template(Dynamic_Match_Interface<TelnetReadMode>* p_dyn_match);
TelnetReadMode_template(const TelnetReadMode_template& other_value);
~TelnetReadMode_template();

boolean is_bound() const;
boolean is_value() const;
void clean_up();
TelnetReadMode_template& operator=(template_sel other_value);
TelnetReadMode_template& operator=(int other_value);
TelnetReadMode_template& operator=(TelnetReadMode::enum_type other_value);
TelnetReadMode_template& operator=(const TelnetReadMode& other_value);
TelnetReadMode_template& operator=(const OPTIONAL<TelnetReadMode>& other_value);
TelnetReadMode_template& operator=(const TelnetReadMode_template& other_value);

boolean match(TelnetReadMode::enum_type other_value, boolean legacy = FALSE) const;
boolean match(const TelnetReadMode& other_value, boolean legacy = FALSE) const;
TelnetReadMode::enum_type valueof() const;
void set_type(template_sel template_type, unsigned int list_length = 0);
TelnetReadMode_template& list_item(unsigned int list_index);
void log() const;
void log_match(const TelnetReadMode& 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 TelnetWindowSize {
  INTEGER field_width;
  INTEGER field_height;
public:
  TelnetWindowSize();
  TelnetWindowSize(const INTEGER& par_width,
    const INTEGER& par_height);
  TelnetWindowSize(const TelnetWindowSize& other_value);
  inline boolean is_component() { return FALSE; }
  void clean_up();
const TTCN_Typedescriptor_t* get_descriptor() const;
  TelnetWindowSize& operator=(const TelnetWindowSize& other_value);
  boolean operator==(const TelnetWindowSize& other_value) const;
  inline boolean operator!=(const TelnetWindowSize& other_value) const
    { return !(*this == other_value); }

  boolean is_bound() const;

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

  inline INTEGER& width()
    {return field_width;}
  inline const INTEGER& width() const
    {return field_width;}
  inline INTEGER& height()
    {return field_height;}
  inline const INTEGER& height() const
    {return field_height;}
  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 TelnetWindowSize_template : public Base_Template {
struct single_value_struct;
union {
single_value_struct *single_value;
struct {
unsigned int n_values;
TelnetWindowSize_template *list_value;
} value_list;
struct {
TelnetWindowSize_template* precondition;
TelnetWindowSize_template* implied_template;
} implication_;
dynmatch_struct<TelnetWindowSize>* dyn_match;
};

void set_specific();
void copy_value(const TelnetWindowSize& other_value);
void copy_template(const TelnetWindowSize_template& other_value);

public:
TelnetWindowSize_template();
TelnetWindowSize_template(template_sel other_value);
TelnetWindowSize_template(const TelnetWindowSize& other_value);
TelnetWindowSize_template(const OPTIONAL<TelnetWindowSize>& other_value);
TelnetWindowSize_template(TelnetWindowSize_template* p_precondition, TelnetWindowSize_template* p_implied_template);
TelnetWindowSize_template(Dynamic_Match_Interface<TelnetWindowSize>* p_dyn_match);
TelnetWindowSize_template(const TelnetWindowSize_template& other_value);
~TelnetWindowSize_template();
TelnetWindowSize_template& operator=(template_sel other_value);
TelnetWindowSize_template& operator=(const TelnetWindowSize& other_value);
TelnetWindowSize_template& operator=(const OPTIONAL<TelnetWindowSize>& other_value);
TelnetWindowSize_template& operator=(const TelnetWindowSize_template& other_value);
boolean match(const TelnetWindowSize& other_value, boolean legacy = FALSE) const;
boolean is_bound() const;
boolean is_value() const;
void clean_up();
TelnetWindowSize valueof() const;
void set_type(template_sel template_type, unsigned int list_length);
TelnetWindowSize_template& list_item(unsigned int list_index) const;
INTEGER_template& width();
const INTEGER_template& width() const;
INTEGER_template& height();
const INTEGER_template& height() const;
int size_of() const;
void log() const;
void log_match(const TelnetWindowSize& 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 TelnetPrompt {
  INTEGER field_id;
  CHARSTRING field_prompt;
  BOOLEAN field_has__wildcards;
public:
  TelnetPrompt();
  TelnetPrompt(const INTEGER& par_id,
    const CHARSTRING& par_prompt,
    const BOOLEAN& par_has__wildcards);
  TelnetPrompt(const TelnetPrompt& other_value);
  inline boolean is_component() { return FALSE; }
  void clean_up();
const TTCN_Typedescriptor_t* get_descriptor() const;
  TelnetPrompt& operator=(const TelnetPrompt& other_value);
  boolean operator==(const TelnetPrompt& other_value) const;
  inline boolean operator!=(const TelnetPrompt& other_value) const
    { return !(*this == other_value); }

  boolean is_bound() const;

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

  inline INTEGER& id()
    {return field_id;}
  inline const INTEGER& id() const
    {return field_id;}
  inline CHARSTRING& prompt()
    {return field_prompt;}
  inline const CHARSTRING& prompt() const
    {return field_prompt;}
  inline BOOLEAN& has__wildcards()
    {return field_has__wildcards;}
  inline const BOOLEAN& has__wildcards() const
    {return field_has__wildcards;}
  inline int size_of() const
    {return 3;}
  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 TelnetPrompt_template : public Base_Template {
struct single_value_struct;
union {
single_value_struct *single_value;
struct {
unsigned int n_values;
TelnetPrompt_template *list_value;
} value_list;
struct {
TelnetPrompt_template* precondition;
TelnetPrompt_template* implied_template;
} implication_;
dynmatch_struct<TelnetPrompt>* dyn_match;
};

void set_specific();
void copy_value(const TelnetPrompt& other_value);
void copy_template(const TelnetPrompt_template& other_value);

public:
TelnetPrompt_template();
TelnetPrompt_template(template_sel other_value);
TelnetPrompt_template(const TelnetPrompt& other_value);
TelnetPrompt_template(const OPTIONAL<TelnetPrompt>& other_value);
TelnetPrompt_template(TelnetPrompt_template* p_precondition, TelnetPrompt_template* p_implied_template);
TelnetPrompt_template(Dynamic_Match_Interface<TelnetPrompt>* p_dyn_match);
TelnetPrompt_template(const TelnetPrompt_template& other_value);
~TelnetPrompt_template();
TelnetPrompt_template& operator=(template_sel other_value);
TelnetPrompt_template& operator=(const TelnetPrompt& other_value);
TelnetPrompt_template& operator=(const OPTIONAL<TelnetPrompt>& other_value);
TelnetPrompt_template& operator=(const TelnetPrompt_template& other_value);
boolean match(const TelnetPrompt& other_value, boolean legacy = FALSE) const;
boolean is_bound() const;
boolean is_value() const;
void clean_up();
TelnetPrompt valueof() const;
void set_type(template_sel template_type, unsigned int list_length);
TelnetPrompt_template& list_item(unsigned int list_index) const;
INTEGER_template& id();
const INTEGER_template& id() const;
CHARSTRING_template& prompt();
const CHARSTRING_template& prompt() const;
BOOLEAN_template& has__wildcards();
const BOOLEAN_template& has__wildcards() const;
int size_of() const;
void log() const;
void log_match(const TelnetPrompt& 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 TelnetPrompts : public Base_Type {
struct recordof_setof_struct {
int ref_count;
int n_elements;
TelnetPrompt **value_elements;
} *val_ptr;

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

public:
  typedef TelnetPrompt of_type;
TelnetPrompts();
TelnetPrompts(null_type other_value);
TelnetPrompts(const TelnetPrompts& other_value);
~TelnetPrompts();

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

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

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

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

TelnetPrompts operator+(const TelnetPrompts& other_value) const;

TelnetPrompts substr(int index, int returncount) const;

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

TelnetPrompts replace(int index, int len, const TelnetPrompts_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 TelnetPrompts_template : public Base_Record_Of_Template {
union {
struct {
int n_elements;
TelnetPrompt_template **value_elements;
} single_value;
struct {
unsigned int n_values;
TelnetPrompts_template *list_value;
} value_list;
struct {
TelnetPrompts_template* precondition;
TelnetPrompts_template* implied_template;
} implication_;
dynmatch_struct<TelnetPrompts>* dyn_match;
};
void copy_value(const TelnetPrompts& other_value);
void copy_template(const TelnetPrompts_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:
TelnetPrompts_template();
TelnetPrompts_template(template_sel other_value);
TelnetPrompts_template(null_type other_value);
TelnetPrompts_template(const TelnetPrompts& other_value);
TelnetPrompts_template(const OPTIONAL<TelnetPrompts>& other_value);
TelnetPrompts_template(TelnetPrompts_template* p_precondition, TelnetPrompts_template* p_implied_template);
TelnetPrompts_template(Dynamic_Match_Interface<TelnetPrompts>* p_dyn_match);
TelnetPrompts_template(const TelnetPrompts_template& other_value);
~TelnetPrompts_template();

void clean_up();
TelnetPrompts_template& operator=(template_sel other_value);
TelnetPrompts_template& operator=(null_type other_value);
TelnetPrompts_template& operator=(const TelnetPrompts& other_value);
TelnetPrompts_template& operator=(const OPTIONAL<TelnetPrompts>& other_value);
TelnetPrompts_template& operator=(const TelnetPrompts_template& other_value);

TelnetPrompt_template& operator[](int index_value);
TelnetPrompt_template& operator[](const INTEGER& index_value);
const TelnetPrompt_template& operator[](int index_value) const;
const TelnetPrompt_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 TelnetPrompts& other_value, boolean legacy = FALSE) const;
inline boolean is_bound() const 
  {return template_selection != UNINITIALIZED_TEMPLATE; }
boolean is_value() const;
TelnetPrompts valueof() const;
TelnetPrompts substr(int index, int returncount) const;

TelnetPrompts replace(int index, int len, const TelnetPrompts_template& repl) const;

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

void set_type(template_sel template_type, unsigned int list_length);
TelnetPrompts_template& list_item(unsigned int list_index);
void log() const;
void log_match(const TelnetPrompts& 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 ASP__TelnetPortParameters {
  OPTIONAL< CHARSTRING > field_ctrl__hostname;
  OPTIONAL< INTEGER > field_ctrl__portnum;
  OPTIONAL< CHARSTRING > field_ctrl__username;
  OPTIONAL< CHARSTRING > field_ctrl__password;
  OPTIONAL< CHARSTRING > field_ctrl__domain;
  OPTIONAL< TelnetReadMode > field_ctrl__readmode;
  OPTIONAL< BOOLEAN > field_ctrl__login__skipped;
  OPTIONAL< BOOLEAN > field_ctrl__detect__server__disconnected;
  OPTIONAL< TelnetPrompts > field_prompts;
  OPTIONAL< CHARSTRING > field_ctrl__terminal__type;
  OPTIONAL< BOOLEAN > field_ctrl__echo;
  OPTIONAL< BOOLEAN > field_ctrl__CRLF;
  OPTIONAL< TelnetWindowSize > field_ctrl__window__size;
public:
  ASP__TelnetPortParameters();
  ASP__TelnetPortParameters(const OPTIONAL< CHARSTRING >& par_ctrl__hostname,
    const OPTIONAL< INTEGER >& par_ctrl__portnum,
    const OPTIONAL< CHARSTRING >& par_ctrl__username,
    const OPTIONAL< CHARSTRING >& par_ctrl__password,
    const OPTIONAL< CHARSTRING >& par_ctrl__domain,
    const OPTIONAL< TelnetReadMode >& par_ctrl__readmode,
    const OPTIONAL< BOOLEAN >& par_ctrl__login__skipped,
    const OPTIONAL< BOOLEAN >& par_ctrl__detect__server__disconnected,
    const OPTIONAL< TelnetPrompts >& par_prompts,
    const OPTIONAL< CHARSTRING >& par_ctrl__terminal__type,
    const OPTIONAL< BOOLEAN >& par_ctrl__echo,
    const OPTIONAL< BOOLEAN >& par_ctrl__CRLF,
    const OPTIONAL< TelnetWindowSize >& par_ctrl__window__size);
  ASP__TelnetPortParameters(const ASP__TelnetPortParameters& other_value);
  inline boolean is_component() { return FALSE; }
  void clean_up();
const TTCN_Typedescriptor_t* get_descriptor() const;
  ASP__TelnetPortParameters& operator=(const ASP__TelnetPortParameters& other_value);
  boolean operator==(const ASP__TelnetPortParameters& other_value) const;
  inline boolean operator!=(const ASP__TelnetPortParameters& other_value) const
    { return !(*this == other_value); }

  boolean is_bound() const;

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

  inline OPTIONAL< CHARSTRING >& ctrl__hostname()
    {return field_ctrl__hostname;}
  inline const OPTIONAL< CHARSTRING >& ctrl__hostname() const
    {return field_ctrl__hostname;}
  inline OPTIONAL< INTEGER >& ctrl__portnum()
    {return field_ctrl__portnum;}
  inline const OPTIONAL< INTEGER >& ctrl__portnum() const
    {return field_ctrl__portnum;}
  inline OPTIONAL< CHARSTRING >& ctrl__username()
    {return field_ctrl__username;}
  inline const OPTIONAL< CHARSTRING >& ctrl__username() const
    {return field_ctrl__username;}
  inline OPTIONAL< CHARSTRING >& ctrl__password()
    {return field_ctrl__password;}
  inline const OPTIONAL< CHARSTRING >& ctrl__password() const
    {return field_ctrl__password;}
  inline OPTIONAL< CHARSTRING >& ctrl__domain()
    {return field_ctrl__domain;}
  inline const OPTIONAL< CHARSTRING >& ctrl__domain() const
    {return field_ctrl__domain;}
  inline OPTIONAL< TelnetReadMode >& ctrl__readmode()
    {return field_ctrl__readmode;}
  inline const OPTIONAL< TelnetReadMode >& ctrl__readmode() const
    {return field_ctrl__readmode;}
  inline OPTIONAL< BOOLEAN >& ctrl__login__skipped()
    {return field_ctrl__login__skipped;}
  inline const OPTIONAL< BOOLEAN >& ctrl__login__skipped() const
    {return field_ctrl__login__skipped;}
  inline OPTIONAL< BOOLEAN >& ctrl__detect__server__disconnected()
    {return field_ctrl__detect__server__disconnected;}
  inline const OPTIONAL< BOOLEAN >& ctrl__detect__server__disconnected() const
    {return field_ctrl__detect__server__disconnected;}
  inline OPTIONAL< TelnetPrompts >& prompts()
    {return field_prompts;}
  inline const OPTIONAL< TelnetPrompts >& prompts() const
    {return field_prompts;}
  inline OPTIONAL< CHARSTRING >& ctrl__terminal__type()
    {return field_ctrl__terminal__type;}
  inline const OPTIONAL< CHARSTRING >& ctrl__terminal__type() const
    {return field_ctrl__terminal__type;}
  inline OPTIONAL< BOOLEAN >& ctrl__echo()
    {return field_ctrl__echo;}
  inline const OPTIONAL< BOOLEAN >& ctrl__echo() const
    {return field_ctrl__echo;}
  inline OPTIONAL< BOOLEAN >& ctrl__CRLF()
    {return field_ctrl__CRLF;}
  inline const OPTIONAL< BOOLEAN >& ctrl__CRLF() const
    {return field_ctrl__CRLF;}
  inline OPTIONAL< TelnetWindowSize >& ctrl__window__size()
    {return field_ctrl__window__size;}
  inline const OPTIONAL< TelnetWindowSize >& ctrl__window__size() const
    {return field_ctrl__window__size;}
  int size_of() 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 ASP__TelnetPortParameters_template : public Base_Template {
struct single_value_struct;
union {
single_value_struct *single_value;
struct {
unsigned int n_values;
ASP__TelnetPortParameters_template *list_value;
} value_list;
struct {
ASP__TelnetPortParameters_template* precondition;
ASP__TelnetPortParameters_template* implied_template;
} implication_;
dynmatch_struct<ASP__TelnetPortParameters>* dyn_match;
};

void set_specific();
void copy_value(const ASP__TelnetPortParameters& other_value);
void copy_template(const ASP__TelnetPortParameters_template& other_value);

public:
ASP__TelnetPortParameters_template();
ASP__TelnetPortParameters_template(template_sel other_value);
ASP__TelnetPortParameters_template(const ASP__TelnetPortParameters& other_value);
ASP__TelnetPortParameters_template(const OPTIONAL<ASP__TelnetPortParameters>& other_value);
ASP__TelnetPortParameters_template(ASP__TelnetPortParameters_template* p_precondition, ASP__TelnetPortParameters_template* p_implied_template);
ASP__TelnetPortParameters_template(Dynamic_Match_Interface<ASP__TelnetPortParameters>* p_dyn_match);
ASP__TelnetPortParameters_template(const ASP__TelnetPortParameters_template& other_value);
~ASP__TelnetPortParameters_template();
ASP__TelnetPortParameters_template& operator=(template_sel other_value);
ASP__TelnetPortParameters_template& operator=(const ASP__TelnetPortParameters& other_value);
ASP__TelnetPortParameters_template& operator=(const OPTIONAL<ASP__TelnetPortParameters>& other_value);
ASP__TelnetPortParameters_template& operator=(const ASP__TelnetPortParameters_template& other_value);
boolean match(const ASP__TelnetPortParameters& other_value, boolean legacy = FALSE) const;
boolean is_bound() const;
boolean is_value() const;
void clean_up();
ASP__TelnetPortParameters valueof() const;
void set_type(template_sel template_type, unsigned int list_length);
ASP__TelnetPortParameters_template& list_item(unsigned int list_index) const;
CHARSTRING_template& ctrl__hostname();
const CHARSTRING_template& ctrl__hostname() const;
INTEGER_template& ctrl__portnum();
const INTEGER_template& ctrl__portnum() const;
CHARSTRING_template& ctrl__username();
const CHARSTRING_template& ctrl__username() const;
CHARSTRING_template& ctrl__password();
const CHARSTRING_template& ctrl__password() const;
CHARSTRING_template& ctrl__domain();
const CHARSTRING_template& ctrl__domain() const;
TelnetReadMode_template& ctrl__readmode();
const TelnetReadMode_template& ctrl__readmode() const;
BOOLEAN_template& ctrl__login__skipped();
const BOOLEAN_template& ctrl__login__skipped() const;
BOOLEAN_template& ctrl__detect__server__disconnected();
const BOOLEAN_template& ctrl__detect__server__disconnected() const;
TelnetPrompts_template& prompts();
const TelnetPrompts_template& prompts() const;
CHARSTRING_template& ctrl__terminal__type();
const CHARSTRING_template& ctrl__terminal__type() const;
BOOLEAN_template& ctrl__echo();
const BOOLEAN_template& ctrl__echo() const;
BOOLEAN_template& ctrl__CRLF();
const BOOLEAN_template& ctrl__CRLF() const;
TelnetWindowSize_template& ctrl__window__size();
const TelnetWindowSize_template& ctrl__window__size() const;
int size_of() const;
void log() const;
void log_match(const ASP__TelnetPortParameters& 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 ASP__TelnetDynamicConfig : public Base_Type {
public:
enum union_selection_type { UNBOUND_VALUE = 0, ALT_readmode = 1, ALT_window__size = 2, ALT_echo = 3, ALT_prompt = 4 };
private:
union_selection_type union_selection;
union {
TelnetReadMode *field_readmode;
TelnetWindowSize *field_window__size;
BOOLEAN *field_echo;
TelnetPrompt *field_prompt;
};
void copy_value(const ASP__TelnetDynamicConfig& other_value);

public:
ASP__TelnetDynamicConfig();
ASP__TelnetDynamicConfig(const ASP__TelnetDynamicConfig& other_value);
~ASP__TelnetDynamicConfig();
ASP__TelnetDynamicConfig& operator=(const ASP__TelnetDynamicConfig& other_value);
boolean operator==(const ASP__TelnetDynamicConfig& other_value) const;
inline boolean operator!=(const ASP__TelnetDynamicConfig& other_value) const { return !(*this == other_value); }
TelnetReadMode& readmode();
const TelnetReadMode& readmode() const;
TelnetWindowSize& window__size();
const TelnetWindowSize& window__size() const;
BOOLEAN& echo();
const BOOLEAN& echo() const;
TelnetPrompt& prompt();
const TelnetPrompt& prompt() const;
inline union_selection_type get_selection() const { return union_selection; }
boolean ischosen(union_selection_type checked_selection) const;
boolean is_bound() const;
boolean is_value() const;
void clean_up();
inline boolean is_present() const { return is_bound(); }
void log() const;
void set_param(Module_Param& param);
  void set_implicit_omit();
void encode_text(Text_Buf& text_buf) const;
void decode_text(Text_Buf& text_buf);
};

class ASP__TelnetDynamicConfig_template : public Base_Template {
union {
struct {
ASP__TelnetDynamicConfig::union_selection_type union_selection;
union {
TelnetReadMode_template *field_readmode;
TelnetWindowSize_template *field_window__size;
BOOLEAN_template *field_echo;
TelnetPrompt_template *field_prompt;
};
} single_value;
struct {
unsigned int n_values;
ASP__TelnetDynamicConfig_template *list_value;
} value_list;
struct {
ASP__TelnetDynamicConfig_template* precondition;
ASP__TelnetDynamicConfig_template* implied_template;
} implication_;
dynmatch_struct<ASP__TelnetDynamicConfig>* dyn_match;
};
void copy_value(const ASP__TelnetDynamicConfig& other_value);

void copy_template(const ASP__TelnetDynamicConfig_template& other_value);

public:
ASP__TelnetDynamicConfig_template();
ASP__TelnetDynamicConfig_template(template_sel other_value);
ASP__TelnetDynamicConfig_template(const ASP__TelnetDynamicConfig& other_value);
ASP__TelnetDynamicConfig_template(const OPTIONAL<ASP__TelnetDynamicConfig>& other_value);
ASP__TelnetDynamicConfig_template(ASP__TelnetDynamicConfig_template* p_precondition, ASP__TelnetDynamicConfig_template* p_implied_template);
ASP__TelnetDynamicConfig_template(Dynamic_Match_Interface<ASP__TelnetDynamicConfig>* p_dyn_match);
ASP__TelnetDynamicConfig_template(const ASP__TelnetDynamicConfig_template& other_value);
~ASP__TelnetDynamicConfig_template();
void clean_up();
ASP__TelnetDynamicConfig_template& operator=(template_sel other_value);
ASP__TelnetDynamicConfig_template& operator=(const ASP__TelnetDynamicConfig& other_value);
ASP__TelnetDynamicConfig_template& operator=(const OPTIONAL<ASP__TelnetDynamicConfig>& other_value);
ASP__TelnetDynamicConfig_template& operator=(const ASP__TelnetDynamicConfig_template& other_value);
boolean match(const ASP__TelnetDynamicConfig& other_value, boolean legacy = FALSE) const;
boolean is_value() const;ASP__TelnetDynamicConfig valueof() const;
ASP__TelnetDynamicConfig_template& list_item(unsigned int list_index) const;
void set_type(template_sel template_type, unsigned int list_length);
TelnetReadMode_template& readmode();
const TelnetReadMode_template& readmode() const;
TelnetWindowSize_template& window__size();
const TelnetWindowSize_template& window__size() const;
BOOLEAN_template& echo();
const BOOLEAN_template& echo() const;
TelnetPrompt_template& prompt();
const TelnetPrompt_template& prompt() const;
boolean ischosen(ASP__TelnetDynamicConfig::union_selection_type checked_selection) const;
void log() const;
void log_match(const ASP__TelnetDynamicConfig& 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);
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 ASP__TelnetConnection : public Base_Type { // enum
friend class ASP__TelnetConnection_template;
public:
enum enum_type { CONNECT = 0, UNKNOWN_VALUE = 1, UNBOUND_VALUE = 2 };
private:
enum_type enum_value;

public:
ASP__TelnetConnection();
ASP__TelnetConnection(int other_value);
ASP__TelnetConnection(enum_type other_value);
ASP__TelnetConnection(const ASP__TelnetConnection& other_value);

ASP__TelnetConnection& operator=(int other_value);
ASP__TelnetConnection& operator=(enum_type other_value);
ASP__TelnetConnection& operator=(const ASP__TelnetConnection& other_value);

boolean operator==(int other_value) const;
boolean operator==(enum_type other_value) const;
boolean operator==(const ASP__TelnetConnection& other_value) const;
inline boolean operator!=(int other_value) const { return !(*this == other_value); }
inline boolean operator!=(enum_type other_value) const { return !(*this == other_value); }
inline boolean operator!=(const ASP__TelnetConnection& other_value) const { return !(*this == other_value); }
boolean operator<(int other_value) const;
boolean operator<(enum_type other_value) const;
boolean operator<(const ASP__TelnetConnection& other_value) const;
boolean operator>(int other_value) const;
boolean operator>(enum_type other_value) const;
boolean operator>(const ASP__TelnetConnection& other_value) const;
inline boolean operator<=(int other_value) const { return !(*this > other_value); }
inline boolean operator<=(enum_type other_value) const { return !(*this > other_value); }
inline boolean operator<=(const ASP__TelnetConnection& other_value) const { return !(*this > other_value); }
inline boolean operator>=(int other_value) const { return !(*this < other_value); }
inline boolean operator>=(enum_type other_value) const { return !(*this < other_value); }
inline boolean operator>=(const ASP__TelnetConnection& 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, const int* int_par = NULL, const int* int_par2 = NULL);
static boolean is_valid_enum(int int_par);

static int enum2int(enum_type enum_par);
static int enum2int(const ASP__TelnetConnection& 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 ASP__TelnetConnection_template : public Base_Template {
union {
ASP__TelnetConnection::enum_type single_value;
struct {
unsigned int n_values;
ASP__TelnetConnection_template *list_value;
} value_list;
struct {
ASP__TelnetConnection_template* precondition;
ASP__TelnetConnection_template* implied_template;
} implication_;
dynmatch_struct<ASP__TelnetConnection>* dyn_match;
};

void copy_template(const ASP__TelnetConnection_template& other_value);

public:
ASP__TelnetConnection_template();
ASP__TelnetConnection_template(template_sel other_value);
ASP__TelnetConnection_template(int other_value);
ASP__TelnetConnection_template(ASP__TelnetConnection::enum_type other_value);
ASP__TelnetConnection_template(const ASP__TelnetConnection& other_value);
ASP__TelnetConnection_template(const OPTIONAL<ASP__TelnetConnection>& other_value);
ASP__TelnetConnection_template(ASP__TelnetConnection_template* p_precondition, ASP__TelnetConnection_template* p_implied_template);
ASP__TelnetConnection_template(Dynamic_Match_Interface<ASP__TelnetConnection>* p_dyn_match);
ASP__TelnetConnection_template(const ASP__TelnetConnection_template& other_value);
~ASP__TelnetConnection_template();

boolean is_bound() const;
boolean is_value() const;
void clean_up();
ASP__TelnetConnection_template& operator=(template_sel other_value);
ASP__TelnetConnection_template& operator=(int other_value);
ASP__TelnetConnection_template& operator=(ASP__TelnetConnection::enum_type other_value);
ASP__TelnetConnection_template& operator=(const ASP__TelnetConnection& other_value);
ASP__TelnetConnection_template& operator=(const OPTIONAL<ASP__TelnetConnection>& other_value);
ASP__TelnetConnection_template& operator=(const ASP__TelnetConnection_template& other_value);

boolean match(ASP__TelnetConnection::enum_type other_value, boolean legacy = FALSE) const;
boolean match(const ASP__TelnetConnection& other_value, boolean legacy = FALSE) const;
ASP__TelnetConnection::enum_type valueof() const;
void set_type(template_sel template_type, unsigned int list_length = 0);
ASP__TelnetConnection_template& list_item(unsigned int list_index);
void log() const;
void log_match(const ASP__TelnetConnection& 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 ASP__TelnetClose : public Base_Type {
boolean bound_flag;
public:
ASP__TelnetClose();
ASP__TelnetClose(null_type other_value);
ASP__TelnetClose(const ASP__TelnetClose& other_value);
ASP__TelnetClose& operator=(null_type other_value);
ASP__TelnetClose& operator=(const ASP__TelnetClose& other_value);
boolean operator==(null_type other_value) const;
boolean operator==(const ASP__TelnetClose& other_value) const;
inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
inline boolean operator!=(const ASP__TelnetClose& other_value) const { return !(*this == other_value); }
inline boolean is_bound() const { return bound_flag; }
inline boolean is_present() const { return is_bound(); }
inline boolean is_value() const { return bound_flag; }
inline void clean_up() { bound_flag = FALSE; }
inline void must_bound(const char *err_msg) const { if (!bound_flag) TTCN_error("%s", err_msg); }
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 ASP__TelnetClose_template : public Base_Template {
union {
struct {
unsigned int n_values;
ASP__TelnetClose_template *list_value;
} value_list;
struct {
ASP__TelnetClose_template* precondition;
ASP__TelnetClose_template* implied_template;
} implication_;
dynmatch_struct<ASP__TelnetClose>* dyn_match;
};
void copy_template(const ASP__TelnetClose_template& other_value);

public:
ASP__TelnetClose_template();
ASP__TelnetClose_template(template_sel other_value);
ASP__TelnetClose_template(null_type other_value);
ASP__TelnetClose_template(const ASP__TelnetClose& other_value);
ASP__TelnetClose_template(const OPTIONAL<ASP__TelnetClose>& other_value);
ASP__TelnetClose_template(ASP__TelnetClose_template* p_precondition, ASP__TelnetClose_template* p_implied_template);
ASP__TelnetClose_template(Dynamic_Match_Interface<ASP__TelnetClose>* p_dyn_match);
ASP__TelnetClose_template(const ASP__TelnetClose_template& other_value);
~ASP__TelnetClose_template();
void clean_up();
ASP__TelnetClose_template& operator=(template_sel other_value);
ASP__TelnetClose_template& operator=(null_type other_value);
ASP__TelnetClose_template& operator=(const ASP__TelnetClose& other_value);
ASP__TelnetClose_template& operator=(const OPTIONAL<ASP__TelnetClose>& other_value);
ASP__TelnetClose_template& operator=(const ASP__TelnetClose_template& other_value);
boolean match(null_type other_value, boolean legacy = FALSE) const;
boolean match(const ASP__TelnetClose& other_value, boolean legacy = FALSE) const;
ASP__TelnetClose valueof() const;
void set_type(template_sel template_type, unsigned int list_length);
ASP__TelnetClose_template& list_item(unsigned int list_index) const;
void log() const;
void log_match(const ASP__TelnetClose& 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 ASP__Get__portnum : public Base_Type {
boolean bound_flag;
public:
ASP__Get__portnum();
ASP__Get__portnum(null_type other_value);
ASP__Get__portnum(const ASP__Get__portnum& other_value);
ASP__Get__portnum& operator=(null_type other_value);
ASP__Get__portnum& operator=(const ASP__Get__portnum& other_value);
boolean operator==(null_type other_value) const;
boolean operator==(const ASP__Get__portnum& other_value) const;
inline boolean operator!=(null_type other_value) const { return !(*this == other_value); }
inline boolean operator!=(const ASP__Get__portnum& other_value) const { return !(*this == other_value); }
inline boolean is_bound() const { return bound_flag; }
inline boolean is_present() const { return is_bound(); }
inline boolean is_value() const { return bound_flag; }
inline void clean_up() { bound_flag = FALSE; }
inline void must_bound(const char *err_msg) const { if (!bound_flag) TTCN_error("%s", err_msg); }
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 ASP__Get__portnum_template : public Base_Template {
union {
struct {
unsigned int n_values;
ASP__Get__portnum_template *list_value;
} value_list;
struct {
ASP__Get__portnum_template* precondition;
ASP__Get__portnum_template* implied_template;
} implication_;
dynmatch_struct<ASP__Get__portnum>* dyn_match;
};
void copy_template(const ASP__Get__portnum_template& other_value);

public:
ASP__Get__portnum_template();
ASP__Get__portnum_template(template_sel other_value);
ASP__Get__portnum_template(null_type other_value);
ASP__Get__portnum_template(const ASP__Get__portnum& other_value);
ASP__Get__portnum_template(const OPTIONAL<ASP__Get__portnum>& other_value);
ASP__Get__portnum_template(ASP__Get__portnum_template* p_precondition, ASP__Get__portnum_template* p_implied_template);
ASP__Get__portnum_template(Dynamic_Match_Interface<ASP__Get__portnum>* p_dyn_match);
ASP__Get__portnum_template(const ASP__Get__portnum_template& other_value);
~ASP__Get__portnum_template();
void clean_up();
ASP__Get__portnum_template& operator=(template_sel other_value);
ASP__Get__portnum_template& operator=(null_type other_value);
ASP__Get__portnum_template& operator=(const ASP__Get__portnum& other_value);
ASP__Get__portnum_template& operator=(const OPTIONAL<ASP__Get__portnum>& other_value);
ASP__Get__portnum_template& operator=(const ASP__Get__portnum_template& other_value);
boolean match(null_type other_value, boolean legacy = FALSE) const;
boolean match(const ASP__Get__portnum& other_value, boolean legacy = FALSE) const;
ASP__Get__portnum valueof() const;
void set_type(template_sel template_type, unsigned int list_length);
ASP__Get__portnum_template& list_item(unsigned int list_index) const;
void log() const;
void log_match(const ASP__Get__portnum& 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 ASP__Portnum {
  INTEGER field_local__port__num;
public:
  ASP__Portnum();
  ASP__Portnum(const INTEGER& par_local__port__num);
  ASP__Portnum(const ASP__Portnum& other_value);
  inline boolean is_component() { return FALSE; }
  void clean_up();
const TTCN_Typedescriptor_t* get_descriptor() const;
  ASP__Portnum& operator=(const ASP__Portnum& other_value);
  boolean operator==(const ASP__Portnum& other_value) const;
  inline boolean operator!=(const ASP__Portnum& other_value) const
    { return !(*this == other_value); }

  boolean is_bound() const;

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

  inline INTEGER& local__port__num()
    {return field_local__port__num;}
  inline const INTEGER& local__port__num() const
    {return field_local__port__num;}
  inline int size_of() const
    {return 1;}
  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 ASP__Portnum_template : public Base_Template {
struct single_value_struct;
union {
single_value_struct *single_value;
struct {
unsigned int n_values;
ASP__Portnum_template *list_value;
} value_list;
struct {
ASP__Portnum_template* precondition;
ASP__Portnum_template* implied_template;
} implication_;
dynmatch_struct<ASP__Portnum>* dyn_match;
};

void set_specific();
void copy_value(const ASP__Portnum& other_value);
void copy_template(const ASP__Portnum_template& other_value);

public:
ASP__Portnum_template();
ASP__Portnum_template(template_sel other_value);
ASP__Portnum_template(const ASP__Portnum& other_value);
ASP__Portnum_template(const OPTIONAL<ASP__Portnum>& other_value);
ASP__Portnum_template(ASP__Portnum_template* p_precondition, ASP__Portnum_template* p_implied_template);
ASP__Portnum_template(Dynamic_Match_Interface<ASP__Portnum>* p_dyn_match);
ASP__Portnum_template(const ASP__Portnum_template& other_value);
~ASP__Portnum_template();
ASP__Portnum_template& operator=(template_sel other_value);
ASP__Portnum_template& operator=(const ASP__Portnum& other_value);
ASP__Portnum_template& operator=(const OPTIONAL<ASP__Portnum>& other_value);
ASP__Portnum_template& operator=(const ASP__Portnum_template& other_value);
boolean match(const ASP__Portnum& other_value, boolean legacy = FALSE) const;
boolean is_bound() const;
boolean is_value() const;
void clean_up();
ASP__Portnum valueof() const;
void set_type(template_sel template_type, unsigned int list_length);
ASP__Portnum_template& list_item(unsigned int list_index) const;
INTEGER_template& local__port__num();
const INTEGER_template& local__port__num() const;
int size_of() const;
void log() const;
void log_match(const ASP__Portnum& 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 TELNETasp__PT_BASE : public PORT {
enum msg_selection { MESSAGE_0, MESSAGE_1, MESSAGE_2 };
struct msg_queue_item : public msg_queue_item_base {
msg_selection item_selection;
union {
INTEGER *message_0;
ASP__Portnum *message_1;
CHARSTRING *message_2;
};
component sender_component;
};

void remove_msg_queue_head();
protected:
void clear_queue();
public:
TELNETasp__PT_BASE(const char *par_port_name);
~TELNETasp__PT_BASE();
void send(const ASP__TelnetPortParameters& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetPortParameters& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetPortParameters& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetPortParameters_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetPortParameters_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetPortParameters_template& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetDynamicConfig& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetDynamicConfig& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetDynamicConfig& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetDynamicConfig_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetDynamicConfig_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetDynamicConfig_template& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetConnection& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetConnection& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetConnection& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetConnection_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetConnection_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetConnection_template& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetClose& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetClose& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetClose& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetClose_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetClose_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const ASP__TelnetClose_template& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const ASP__Get__portnum& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const ASP__Get__portnum& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const ASP__Get__portnum& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const ASP__Get__portnum_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const ASP__Get__portnum_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const ASP__Get__portnum_template& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const CHARSTRING& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const CHARSTRING& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const CHARSTRING& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const CHARSTRING_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const CHARSTRING_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const CHARSTRING_template& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
protected:
virtual void outgoing_send(const ASP__TelnetPortParameters& send_par) = 0;
virtual void outgoing_send(const ASP__TelnetDynamicConfig& send_par) = 0;
virtual void outgoing_send(const ASP__TelnetConnection& send_par) = 0;
virtual void outgoing_send(const ASP__TelnetClose& send_par) = 0;
virtual void outgoing_send(const ASP__Get__portnum& send_par) = 0;
virtual void outgoing_send(const CHARSTRING& send_par) = 0;
public:
alt_status receive(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status receive(const INTEGER_template& value_template, INTEGER *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const INTEGER_template& value_template, INTEGER *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const INTEGER_template& value_template, INTEGER *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status receive(const ASP__Portnum_template& value_template, ASP__Portnum *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const ASP__Portnum_template& value_template, ASP__Portnum *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const ASP__Portnum_template& value_template, ASP__Portnum *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status receive(const CHARSTRING_template& value_template, CHARSTRING *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const CHARSTRING_template& value_template, CHARSTRING *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const CHARSTRING_template& value_template, CHARSTRING *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
private:
void incoming_message(const INTEGER& incoming_par, component sender_component);
void incoming_message(const ASP__Portnum& incoming_par, component sender_component);
void incoming_message(const CHARSTRING& incoming_par, component sender_component);
protected:
inline void incoming_message(const INTEGER& incoming_par) { incoming_message(incoming_par, SYSTEM_COMPREF); }
inline void incoming_message(const ASP__Portnum& incoming_par) { incoming_message(incoming_par, SYSTEM_COMPREF); }
inline void incoming_message(const CHARSTRING& incoming_par) { incoming_message(incoming_par, SYSTEM_COMPREF); }
boolean process_message(const char *message_type, Text_Buf& incoming_buf, component sender_component, OCTETSTRING& slider);
};


/* Function prototypes */

extern INTEGER FindString(const CHARSTRING& msg__ch, const CHARSTRING& pattern__ch);
extern boolean operator==(null_type null_value, const TelnetPrompts& other_value);
inline boolean operator!=(null_type null_value, const TelnetPrompts& other_value) { return !(null_value == other_value); }
extern boolean operator==(null_type null_value, const ASP__TelnetClose& other_value);
inline boolean operator!=(null_type null_value, const ASP__TelnetClose& other_value) { return !(null_value == other_value); }
extern boolean operator==(null_type null_value, const ASP__Get__portnum& other_value);
inline boolean operator!=(null_type null_value, const ASP__Get__portnum& other_value) { return !(null_value == other_value); }
extern void pre_init_module();

/* Global variable declarations */

extern const TTCN_Typedescriptor_t TelnetReadMode_descr_;
extern const XERdescriptor_t TelnetWindowSize_width_xer_;
extern const TTCN_Typedescriptor_t TelnetWindowSize_width_descr_;
extern const XERdescriptor_t TelnetWindowSize_height_xer_;
extern const TTCN_Typedescriptor_t TelnetWindowSize_height_descr_;
extern const TTCN_Typedescriptor_t TelnetWindowSize_descr_;
extern const XERdescriptor_t TelnetPrompt_id_xer_;
extern const TTCN_Typedescriptor_t TelnetPrompt_id_descr_;
extern const XERdescriptor_t TelnetPrompt_prompt_xer_;
extern const TTCN_Typedescriptor_t TelnetPrompt_prompt_descr_;
extern const XERdescriptor_t TelnetPrompt_has__wildcards_xer_;
extern const TTCN_OERdescriptor_t TelnetPrompt_has__wildcards_oer_;
extern const TTCN_Typedescriptor_t TelnetPrompt_has__wildcards_descr_;
extern const TTCN_Typedescriptor_t TelnetPrompt_descr_;
extern const TTCN_Typedescriptor_t TelnetPrompts_descr_;
extern const XERdescriptor_t TelnetEcho_xer_;
extern const TTCN_OERdescriptor_t TelnetEcho_oer_;
extern const TTCN_Typedescriptor_t TelnetEcho_descr_;
extern const TTCN_Typedescriptor_t ASP__TelnetPortParameters_descr_;
extern const XERdescriptor_t ASP__TelnetPortParameters_ctrl__hostname_xer_;
extern const TTCN_Typedescriptor_t ASP__TelnetPortParameters_ctrl__hostname_descr_;
extern const XERdescriptor_t ASP__TelnetPortParameters_ctrl__portnum_xer_;
extern const TTCN_Typedescriptor_t ASP__TelnetPortParameters_ctrl__portnum_descr_;
extern const XERdescriptor_t ASP__TelnetPortParameters_ctrl__username_xer_;
extern const TTCN_Typedescriptor_t ASP__TelnetPortParameters_ctrl__username_descr_;
extern const XERdescriptor_t ASP__TelnetPortParameters_ctrl__password_xer_;
extern const TTCN_Typedescriptor_t ASP__TelnetPortParameters_ctrl__password_descr_;
extern const XERdescriptor_t ASP__TelnetPortParameters_ctrl__domain_xer_;
extern const TTCN_Typedescriptor_t ASP__TelnetPortParameters_ctrl__domain_descr_;
extern const XERdescriptor_t ASP__TelnetPortParameters_ctrl__login__skipped_xer_;
extern const TTCN_OERdescriptor_t ASP__TelnetPortParameters_ctrl__login__skipped_oer_;
extern const TTCN_Typedescriptor_t ASP__TelnetPortParameters_ctrl__login__skipped_descr_;
extern const XERdescriptor_t ASP__TelnetPortParameters_ctrl__detect__server__disconnected_xer_;
extern const TTCN_OERdescriptor_t ASP__TelnetPortParameters_ctrl__detect__server__disconnected_oer_;
extern const TTCN_Typedescriptor_t ASP__TelnetPortParameters_ctrl__detect__server__disconnected_descr_;
extern const XERdescriptor_t ASP__TelnetPortParameters_ctrl__terminal__type_xer_;
extern const TTCN_Typedescriptor_t ASP__TelnetPortParameters_ctrl__terminal__type_descr_;
extern const XERdescriptor_t ASP__TelnetPortParameters_ctrl__echo_xer_;
extern const TTCN_OERdescriptor_t ASP__TelnetPortParameters_ctrl__echo_oer_;
extern const TTCN_Typedescriptor_t ASP__TelnetPortParameters_ctrl__echo_descr_;
extern const XERdescriptor_t ASP__TelnetPortParameters_ctrl__CRLF_xer_;
extern const TTCN_OERdescriptor_t ASP__TelnetPortParameters_ctrl__CRLF_oer_;
extern const TTCN_Typedescriptor_t ASP__TelnetPortParameters_ctrl__CRLF_descr_;
extern const TTCN_Typedescriptor_t ASP__TelnetDynamicConfig_descr_;
extern const XERdescriptor_t ASP__TelnetDynamicConfig_echo_xer_;
extern const TTCN_OERdescriptor_t ASP__TelnetDynamicConfig_echo_oer_;
extern const TTCN_Typedescriptor_t ASP__TelnetDynamicConfig_echo_descr_;
extern const TTCN_Typedescriptor_t ASP__TelnetConnection_descr_;
extern const TTCN_Typedescriptor_t ASP__TelnetClose_descr_;
extern const TTCN_Typedescriptor_t ASP__Get__portnum_descr_;
extern const XERdescriptor_t ASP__Portnum_local__port__num_xer_;
extern const TTCN_Typedescriptor_t ASP__Portnum_local__port__num_descr_;
extern const TTCN_Typedescriptor_t ASP__Portnum_descr_;
extern const unsigned char module_checksum[];
extern TTCN_Module module_object;
extern const RuntimeVersionChecker ver_checker;

} /* end of namespace */

/* Test port header files */

#include "TELNETasp_PT.hh"

#endif
