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

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

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

#ifndef FrameRelay__CodecPort_HH
#define FrameRelay__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 "AF_PACKET_PortType.hh"
#include "FrameRelay_Types.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 FrameRelay__CodecPort_HH
#endif

namespace FrameRelay__CodecPort {

/* Forward declarations of classes */

class FR__CODEC__PT;

} /* end of namespace */

#ifndef FrameRelay__CodecPort_HH
#define FrameRelay__CodecPort_HH

namespace FrameRelay__CodecPort {

/* Class definitions */

class FR__CODEC__PT : public AF__PACKET__PortType::AF__PACKET__PT_PROVIDER {
enum msg_selection { MESSAGE_0 };
struct msg_queue_item : public msg_queue_item_base {
msg_selection item_selection;
union {
FrameRelay__Types::FrameRelayFrame *message_0;
};
component sender_component;
};

void remove_msg_queue_head();
protected:
void clear_queue();
public:
FR__CODEC__PT(const char *par_port_name = NULL);
~FR__CODEC__PT();
void send(const FrameRelay__Types::FrameRelayFrame& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const FrameRelay__Types::FrameRelayFrame& send_par, FLOAT* timestamp_redirect = NULL);
void send(const FrameRelay__Types::FrameRelayFrame_template& send_par, const COMPONENT& destination_component, FLOAT* timestamp_redirect = NULL);
void send(const FrameRelay__Types::FrameRelayFrame_template& send_par, 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 FrameRelay__Types::FrameRelayFrame_template& value_template, FrameRelay__Types::FrameRelayFrame *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status check_receive(const FrameRelay__Types::FrameRelayFrame_template& value_template, FrameRelay__Types::FrameRelayFrame *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
alt_status trigger(const FrameRelay__Types::FrameRelayFrame_template& value_template, FrameRelay__Types::FrameRelayFrame *value_redirect, const COMPONENT_template& sender_template, COMPONENT *sender_ptr, FLOAT* timestamp_redirect, Index_Redirect*);
private:
void incoming_message(const AF__PACKET__PortTypes::AF__PACKET__Unitdata& incoming_par, component sender_component);
protected:
void incoming_message(const AF__PACKET__PortTypes::AF__PACKET__Unitdata& incoming_par);
boolean process_message(const char *message_type, Text_Buf& incoming_buf, component sender_component, OCTETSTRING& slider);
};


/* Function prototypes */

extern void AFP__to__FR(const AF__PACKET__PortTypes::AF__PACKET__Unitdata& pin, FrameRelay__Types::FrameRelayFrame& pout);
extern void FR__to__AFP(const FrameRelay__Types::FrameRelayFrame& pin, AF__PACKET__PortTypes::AF__PACKET__Unitdata& pout);
extern void pre_init_module();
extern void post_init_module();

/* Global variable declarations */

extern const unsigned char module_checksum[];
extern TTCN_Module module_object;
extern const RuntimeVersionChecker ver_checker;

} /* end of namespace */

#endif
