// 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 UD__PortType_HH
#define UD__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>
#include "UD_Types.hh"
#include "UD_PT.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 UD__PortType_HH
#endif

namespace UD__PortType {

/* Forward declarations of classes */

class UD__PT;

} /* end of namespace */

#ifndef UD__PortType_HH
#define UD__PortType_HH

namespace UD__PortType {

/* Class definitions */

class UD__PT : public UD__PT_PROVIDER {
enum msg_selection { MESSAGE_0, MESSAGE_1, MESSAGE_2, MESSAGE_3 };
struct msg_queue_item : public msg_queue_item_base {
msg_selection item_selection;
union {
UD__Types::UD__listen__result *message_0;
UD__Types::UD__connect__result *message_1;
UD__Types::UD__connected *message_2;
UD__Types::UD__send__data *message_3;
};
component sender_component;
};

void remove_msg_queue_head();
protected:
void clear_queue();
private:
PORT** mapped_ports;
size_t n_mapped_ports;
public:
UD__PT(const char *par_port_name = NULL);
~UD__PT();
void send(const UD__Types::UD__close& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__close& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__close& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__close_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__close_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__close_template& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__listen& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__listen& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__listen& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__listen_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__listen_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__listen_template& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__shutdown& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__shutdown& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__shutdown& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__shutdown_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__shutdown_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__shutdown_template& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__connect& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__connect& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__connect& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__connect_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__connect_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__connect_template& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__send__data& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__send__data& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__send__data& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__send__data_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__send__data_template& send_par, size_t nof_components, const COMPONENT* destination_components, FLOAT* timestamp_redirect = NULL);
void send(const UD__Types::UD__send__data_template& send_par, boolean broadcast = FALSE, FLOAT* timestamp_redirect = NULL);
public:
void add_port(PORT* p);
void remove_port(PORT* p);
private:
void reset_port_variables();
public:
void outgoing_public_send(const UD__Types::UD__close& send_par);
void outgoing_public_send(const UD__Types::UD__listen& send_par);
void outgoing_public_send(const UD__Types::UD__shutdown& send_par);
void outgoing_public_send(const UD__Types::UD__connect& send_par);
void outgoing_public_send(const UD__Types::UD__send__data& send_par);
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 UD__Types::UD__listen__result_template& value_template, UD__Types::UD__listen__result *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const UD__Types::UD__listen__result_template& value_template, UD__Types::UD__listen__result *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const UD__Types::UD__listen__result_template& value_template, UD__Types::UD__listen__result *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status receive(const UD__Types::UD__connect__result_template& value_template, UD__Types::UD__connect__result *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const UD__Types::UD__connect__result_template& value_template, UD__Types::UD__connect__result *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const UD__Types::UD__connect__result_template& value_template, UD__Types::UD__connect__result *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status receive(const UD__Types::UD__connected_template& value_template, UD__Types::UD__connected *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const UD__Types::UD__connected_template& value_template, UD__Types::UD__connected *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const UD__Types::UD__connected_template& value_template, UD__Types::UD__connected *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status receive(const UD__Types::UD__send__data_template& value_template, UD__Types::UD__send__data *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const UD__Types::UD__send__data_template& value_template, UD__Types::UD__send__data *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const UD__Types::UD__send__data_template& value_template, UD__Types::UD__send__data *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
private:
void incoming_message(const UD__Types::UD__listen__result& incoming_par, component sender_component);
void incoming_message(const UD__Types::UD__connect__result& incoming_par, component sender_component);
void incoming_message(const UD__Types::UD__connected& incoming_par, component sender_component);
void incoming_message(const UD__Types::UD__send__data& incoming_par, component sender_component);
private:
protected:
void incoming_message(const UD__Types::UD__listen__result& incoming_par);
void incoming_message(const UD__Types::UD__connect__result& incoming_par);
void incoming_message(const UD__Types::UD__connected& incoming_par);
void incoming_message(const UD__Types::UD__send__data& incoming_par);
boolean process_message(const char *message_type, Text_Buf& incoming_buf, component sender_component, OCTETSTRING& slider);
};


/* Function prototypes */

extern void f__UD__setGetMsgLen(UD__PT& portRef, const INTEGER& connId, Socket__API__Definitions::f__getMsgLen& f, const Socket__API__Definitions::ro__integer& msgLenArgs);
extern void pre_init_module();
extern void post_init_module();

/* Global variable declarations */

extern const INTEGER& f__UD__setGetMsgLen_connId_defval;
extern INTEGER const_f__UD__setGetMsgLen_connId_defval;
extern const unsigned char module_checksum[];
extern TTCN_Module module_object;
extern const RuntimeVersionChecker ver_checker;

} /* end of namespace */

#endif
