/******************************************************************************
 * Copyright (c) 2000-2019 Ericsson Telecom AB
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
 *
 * Contributors:
 *   Balasko, Jeno
 *   Forstner, Matyas
 *   Lovassy, Arpad
 *   Raduly, Csaba
 *   Szabo, Janos Zoltan – initial implementation
 *
 ******************************************************************************/
// This Test Port skeleton source file was generated by the
// TTCN-3 Compiler of the TTCN-3 Test Executor version 1.2.pl2
// for Matyas Forstner (tmpmfr@saussure) on Thu Oct 17 16:56:18 2002


// You may modify this file. Complete the body of empty functions and
// add your member functions here.

#include "MyPort1.hh"

#ifndef OLD_NAMES
namespace Regr {
#endif

MyPort1::MyPort1(const char *par_port_name)
	: MyPort1_BASE(par_port_name)
{

}

MyPort1::~MyPort1()
{

}

void MyPort1::set_parameter(const char *parameter_name,
	const char *parameter_value)
{

}

void MyPort1::Event_Handler(const fd_set *read_fds,
	const fd_set *write_fds, const fd_set *error_fds,
	double time_since_last_call)
{

}

void MyPort1::user_map(const char *system_port)
{

}

void MyPort1::user_unmap(const char *system_port)
{

}

void MyPort1::user_start()
{

}

void MyPort1::user_stop()
{

}

#ifndef OLD_NAMES

#define SEND_MACRO(module, type) \
void MyPort1::outgoing_send(const module::type& send_par) \
{ \
  TTCN_Buffer buf; \
  send_par.encode(module::type##_descr_, buf, \
                  TTCN_EncDec::CT_BER, BER_ENCODE_DER); \
  OCTETSTRING os; \
  buf.get_string(os); \
  incoming_message(os); \
}

#else

#define SEND_MACRO(module, type) \
void MyPort1::outgoing_send(const type& send_par) \
{ \
  TTCN_Buffer buf; \
  send_par.encode(type##_descr_, buf, \
                  TTCN_EncDec::CT_BER, BER_ENCODE_DER); \
  OCTETSTRING os; \
  buf.get_string(os); \
  incoming_message(os); \
}

#endif

SEND_MACRO(Regr1, T0)
SEND_MACRO(Regr1, T2)
SEND_MACRO(Regr1, T3)
SEND_MACRO(Regr1, T4)
SEND_MACRO(Regr1, T5)
SEND_MACRO(Regr1, T6)
SEND_MACRO(Regr1, T7)
SEND_MACRO(Regr1, T8)
SEND_MACRO(Regr2, T10)
SEND_MACRO(Regr2, T11)

#ifndef OLD_NAMES
} /* end of namespace */
#endif
