// 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 TRXC__CodecPort_HH
#define TRXC__CodecPort_HH

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

/* Header file includes */

#include <TTCN3.hh>
#include "IPL4asp_PortType.hh"
#include "TRXC_Types.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 TRXC__CodecPort_HH
#endif

namespace TRXC__CodecPort {

/* Forward declarations of classes */

class TRXC__RecvFrom;
class TRXC__RecvFrom_template;
class TRXC__Send;
class TRXC__Send_template;
class TRXC__CODEC__PT;

} /* end of namespace */

#ifndef TRXC__CodecPort_HH
#define TRXC__CodecPort_HH

namespace TRXC__CodecPort {

/* Class definitions */

class TRXC__RecvFrom {
  INTEGER field_connId;
  CHARSTRING field_remName;
  INTEGER field_remPort;
  CHARSTRING field_locName;
  INTEGER field_locPort;
  TRXC__Types::TrxcMessage field_msg;
public:
  TRXC__RecvFrom();
  TRXC__RecvFrom(const INTEGER& par_connId,
    const CHARSTRING& par_remName,
    const INTEGER& par_remPort,
    const CHARSTRING& par_locName,
    const INTEGER& par_locPort,
    const TRXC__Types::TrxcMessage& par_msg);
  TRXC__RecvFrom(const TRXC__RecvFrom& other_value);
  inline boolean is_component() { return FALSE; }
  void clean_up();
const TTCN_Typedescriptor_t* get_descriptor() const;
  TRXC__RecvFrom& operator=(const TRXC__RecvFrom& other_value);
  boolean operator==(const TRXC__RecvFrom& other_value) const;
  inline boolean operator!=(const TRXC__RecvFrom& 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& connId()
    {return field_connId;}
  inline const INTEGER& connId() const
    {return field_connId;}
  inline CHARSTRING& remName()
    {return field_remName;}
  inline const CHARSTRING& remName() const
    {return field_remName;}
  inline INTEGER& remPort()
    {return field_remPort;}
  inline const INTEGER& remPort() const
    {return field_remPort;}
  inline CHARSTRING& locName()
    {return field_locName;}
  inline const CHARSTRING& locName() const
    {return field_locName;}
  inline INTEGER& locPort()
    {return field_locPort;}
  inline const INTEGER& locPort() const
    {return field_locPort;}
  inline TRXC__Types::TrxcMessage& msg()
    {return field_msg;}
  inline const TRXC__Types::TrxcMessage& msg() const
    {return field_msg;}
  inline int size_of() const
    {return 6;}
  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 TRXC__RecvFrom_template : public Base_Template {
struct single_value_struct;
union {
single_value_struct *single_value;
struct {
unsigned int n_values;
TRXC__RecvFrom_template *list_value;
} value_list;
struct {
TRXC__RecvFrom_template* precondition;
TRXC__RecvFrom_template* implied_template;
} implication_;
dynmatch_struct<TRXC__RecvFrom>* dyn_match;
};

void set_specific();
void copy_value(const TRXC__RecvFrom& other_value);
void copy_template(const TRXC__RecvFrom_template& other_value);

public:
TRXC__RecvFrom_template();
TRXC__RecvFrom_template(template_sel other_value);
TRXC__RecvFrom_template(const TRXC__RecvFrom& other_value);
TRXC__RecvFrom_template(const OPTIONAL<TRXC__RecvFrom>& other_value);
TRXC__RecvFrom_template(TRXC__RecvFrom_template* p_precondition, TRXC__RecvFrom_template* p_implied_template);
TRXC__RecvFrom_template(Dynamic_Match_Interface<TRXC__RecvFrom>* p_dyn_match);
TRXC__RecvFrom_template(const TRXC__RecvFrom_template& other_value);
~TRXC__RecvFrom_template();
TRXC__RecvFrom_template& operator=(template_sel other_value);
TRXC__RecvFrom_template& operator=(const TRXC__RecvFrom& other_value);
TRXC__RecvFrom_template& operator=(const OPTIONAL<TRXC__RecvFrom>& other_value);
TRXC__RecvFrom_template& operator=(const TRXC__RecvFrom_template& other_value);
boolean match(const TRXC__RecvFrom& other_value, boolean legacy = FALSE) const;
boolean is_bound() const;
boolean is_value() const;
void clean_up();
TRXC__RecvFrom valueof() const;
void set_type(template_sel template_type, unsigned int list_length);
TRXC__RecvFrom_template& list_item(unsigned int list_index) const;
INTEGER_template& connId();
const INTEGER_template& connId() const;
CHARSTRING_template& remName();
const CHARSTRING_template& remName() const;
INTEGER_template& remPort();
const INTEGER_template& remPort() const;
CHARSTRING_template& locName();
const CHARSTRING_template& locName() const;
INTEGER_template& locPort();
const INTEGER_template& locPort() const;
TRXC__Types::TrxcMessage_template& msg();
const TRXC__Types::TrxcMessage_template& msg() const;
int size_of() const;
void log() const;
void log_match(const TRXC__RecvFrom& 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 TRXC__Send {
  INTEGER field_connId;
  TRXC__Types::TrxcMessage field_msg;
public:
  TRXC__Send();
  TRXC__Send(const INTEGER& par_connId,
    const TRXC__Types::TrxcMessage& par_msg);
  TRXC__Send(const TRXC__Send& other_value);
  inline boolean is_component() { return FALSE; }
  void clean_up();
const TTCN_Typedescriptor_t* get_descriptor() const;
  TRXC__Send& operator=(const TRXC__Send& other_value);
  boolean operator==(const TRXC__Send& other_value) const;
  inline boolean operator!=(const TRXC__Send& 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& connId()
    {return field_connId;}
  inline const INTEGER& connId() const
    {return field_connId;}
  inline TRXC__Types::TrxcMessage& msg()
    {return field_msg;}
  inline const TRXC__Types::TrxcMessage& msg() const
    {return field_msg;}
  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 TRXC__Send_template : public Base_Template {
struct single_value_struct;
union {
single_value_struct *single_value;
struct {
unsigned int n_values;
TRXC__Send_template *list_value;
} value_list;
struct {
TRXC__Send_template* precondition;
TRXC__Send_template* implied_template;
} implication_;
dynmatch_struct<TRXC__Send>* dyn_match;
};

void set_specific();
void copy_value(const TRXC__Send& other_value);
void copy_template(const TRXC__Send_template& other_value);

public:
TRXC__Send_template();
TRXC__Send_template(template_sel other_value);
TRXC__Send_template(const TRXC__Send& other_value);
TRXC__Send_template(const OPTIONAL<TRXC__Send>& other_value);
TRXC__Send_template(TRXC__Send_template* p_precondition, TRXC__Send_template* p_implied_template);
TRXC__Send_template(Dynamic_Match_Interface<TRXC__Send>* p_dyn_match);
TRXC__Send_template(const TRXC__Send_template& other_value);
~TRXC__Send_template();
TRXC__Send_template& operator=(template_sel other_value);
TRXC__Send_template& operator=(const TRXC__Send& other_value);
TRXC__Send_template& operator=(const OPTIONAL<TRXC__Send>& other_value);
TRXC__Send_template& operator=(const TRXC__Send_template& other_value);
boolean match(const TRXC__Send& other_value, boolean legacy = FALSE) const;
boolean is_bound() const;
boolean is_value() const;
void clean_up();
TRXC__Send valueof() const;
void set_type(template_sel template_type, unsigned int list_length);
TRXC__Send_template& list_item(unsigned int list_index) const;
INTEGER_template& connId();
const INTEGER_template& connId() const;
TRXC__Types::TrxcMessage_template& msg();
const TRXC__Types::TrxcMessage_template& msg() const;
int size_of() const;
void log() const;
void log_match(const TRXC__Send& 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 TRXC__CODEC__PT : public IPL4asp__PortType::IPL4asp__PT_PROVIDER {
enum msg_selection { MESSAGE_0, MESSAGE_1, MESSAGE_2 };
struct msg_queue_item : public msg_queue_item_base {
msg_selection item_selection;
union {
TRXC__RecvFrom *message_0;
IPL4asp__Types::ASP__ConnId__ReadyToRelease *message_1;
Socket__API__Definitions::PortEvent *message_2;
};
component sender_component;
};

void remove_msg_queue_head();
protected:
void clear_queue();
public:
TRXC__CODEC__PT(const char *par_port_name = NULL);
~TRXC__CODEC__PT();
void send(const TRXC__Send& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const TRXC__Send& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const TRXC__Send& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const TRXC__Send_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const TRXC__Send_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const TRXC__Send_template& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
public:
PORT* get_provider_port();
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 TRXC__RecvFrom_template& value_template, TRXC__RecvFrom *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const TRXC__RecvFrom_template& value_template, TRXC__RecvFrom *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const TRXC__RecvFrom_template& value_template, TRXC__RecvFrom *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status receive(const IPL4asp__Types::ASP__ConnId__ReadyToRelease_template& value_template, IPL4asp__Types::ASP__ConnId__ReadyToRelease *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const IPL4asp__Types::ASP__ConnId__ReadyToRelease_template& value_template, IPL4asp__Types::ASP__ConnId__ReadyToRelease *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const IPL4asp__Types::ASP__ConnId__ReadyToRelease_template& value_template, IPL4asp__Types::ASP__ConnId__ReadyToRelease *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status receive(const Socket__API__Definitions::PortEvent_template& value_template, Socket__API__Definitions::PortEvent *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const Socket__API__Definitions::PortEvent_template& value_template, Socket__API__Definitions::PortEvent *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const Socket__API__Definitions::PortEvent_template& value_template, Socket__API__Definitions::PortEvent *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
private:
void incoming_message(const IPL4asp__Types::ASP__RecvFrom& incoming_par, component sender_component);
void incoming_message(const Socket__API__Definitions::PortEvent& incoming_par, component sender_component);
void incoming_message(const IPL4asp__Types::ASP__ConnId__ReadyToRelease& incoming_par, component sender_component);
protected:
void incoming_message(const IPL4asp__Types::ASP__RecvFrom& incoming_par);
void incoming_message(const Socket__API__Definitions::PortEvent& incoming_par);
void incoming_message(const IPL4asp__Types::ASP__ConnId__ReadyToRelease& incoming_par);
boolean process_message(const char *message_type, Text_Buf& incoming_buf, component sender_component, OCTETSTRING& slider);
};


/* Function prototypes */

extern TRXC__RecvFrom_template tr__TRXC__RecvFrom(const INTEGER_template& cid, const TRXC__Types::TrxcMessage_template& msg);
extern void IPL4__to__TRXC__RecvFrom(const IPL4asp__Types::ASP__RecvFrom& pin, TRXC__RecvFrom& pout);
extern void TRXC__to__IPL4__Send(const TRXC__Send& pin, IPL4asp__Types::ASP__Send& pout);
extern TRXC__Send_template ts__TRXC__Send(const INTEGER& cid, const TRXC__Types::TrxcMessage_template& msg);
extern TRXC__Types::TrxcMessage f__TRXC__transceive(TRXC__CODEC__PT& pt, const INTEGER& conn__id, const TRXC__Types::TrxcMessage_template& tx, const TRXC__Types::TrxcMessage_template& tr);
extern void pre_init_module();
extern void post_init_module();

/* Global variable declarations */

extern const XERdescriptor_t TRXC__RecvFrom_connId_xer_;
extern const TTCN_OERdescriptor_t TRXC__RecvFrom_connId_oer_;
extern const TTCN_Typedescriptor_t TRXC__RecvFrom_connId_descr_;
extern const XERdescriptor_t TRXC__RecvFrom_remName_xer_;
extern const TTCN_Typedescriptor_t TRXC__RecvFrom_remName_descr_;
extern const XERdescriptor_t TRXC__RecvFrom_remPort_xer_;
extern const TTCN_OERdescriptor_t TRXC__RecvFrom_remPort_oer_;
extern const TTCN_Typedescriptor_t TRXC__RecvFrom_remPort_descr_;
extern const XERdescriptor_t TRXC__RecvFrom_locName_xer_;
extern const TTCN_Typedescriptor_t TRXC__RecvFrom_locName_descr_;
extern const XERdescriptor_t TRXC__RecvFrom_locPort_xer_;
extern const TTCN_OERdescriptor_t TRXC__RecvFrom_locPort_oer_;
extern const TTCN_Typedescriptor_t TRXC__RecvFrom_locPort_descr_;
extern UNIVERSAL_CHARSTRING TRXC__RecvFrom_msg_default_coding;
extern const TTCN_Typedescriptor_t TRXC__RecvFrom_descr_;
extern const XERdescriptor_t TRXC__Send_connId_xer_;
extern const TTCN_OERdescriptor_t TRXC__Send_connId_oer_;
extern const TTCN_Typedescriptor_t TRXC__Send_connId_descr_;
extern UNIVERSAL_CHARSTRING TRXC__Send_msg_default_coding;
extern const TTCN_Typedescriptor_t TRXC__Send_descr_;
extern const TRXC__Types::TrxcMessage_template& f__TRXC__transceive_tr_defval;
extern TRXC__Types::TrxcMessage_template template_f__TRXC__transceive_tr_defval;
extern const CHARSTRING cs_0;
extern const unsigned char module_checksum[];
extern TTCN_Module module_object;
extern const RuntimeVersionChecker ver_checker;

} /* end of namespace */

#endif
