GeoNetworkingPort.cc 1.92 KB
Newer Older
// This Test Port skeleton source file was generated by the
// TTCN-3 Compiler of the TTCN-3 Test Executor version CRL 113 200/5 R3A
// for U-ERICSSON\ethgry (ethgry@HU00078339) on Sat Aug 15 22:33:04 2015

// Copyright Ericsson Telecom AB 2000-2014

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

#include "GeoNetworkingPort.hh"
garciay's avatar
garciay committed
#include "loggers.hh"

namespace LibItsGeoNetworking__TestSystem {

GeoNetworkingPort::GeoNetworkingPort(const char *par_port_name)
garciay's avatar
garciay committed
	: GeoNetworkingPort_BASE(par_port_name), _params(), _layer(NULL)
{

}

GeoNetworkingPort::~GeoNetworkingPort()
{

}

garciay's avatar
garciay committed
void GeoNetworkingPort::set_parameter(const char * parameter_name, const char * parameter_value)
garciay's avatar
garciay committed
    loggers::loggers::log("GeoNetworkingPort::set_parameter: %s=%s", parameter_name, parameter_value);
    _params.insert(std::pair<std::string, std::string>(std::string(parameter_name), std::string(parameter_value)));
}

/*void GeoNetworkingPort::Handle_Fd_Event(int fd, boolean is_readable,
	boolean is_writable, boolean is_error) {}*/

void GeoNetworkingPort::Handle_Fd_Event_Error(int /*fd*/)
{

}

void GeoNetworkingPort::Handle_Fd_Event_Writable(int /*fd*/)
{

}

void GeoNetworkingPort::Handle_Fd_Event_Readable(int /*fd*/)
{

}

/*void GeoNetworkingPort::Handle_Timeout(double time_since_last_call) {}*/

garciay's avatar
garciay committed
void GeoNetworkingPort::user_map(const char * system_port)
garciay's avatar
garciay committed
    loggers::loggers::log("GeoNetworkingPort::user_map: %s", system_port);
    std::map<std::string, std::string>::iterator it = _params.find(std::string("params"));
    if (it != _params.end()) {
		_layer = LayerStackBuilder::GetInstance()->createLayerStack(it->second.c_str());
    }
}

void GeoNetworkingPort::user_unmap(const char * /*system_port*/)
{

}

void GeoNetworkingPort::user_start()
{

}

void GeoNetworkingPort::user_stop()
{

}

void GeoNetworkingPort::outgoing_send(const GeoNetworkingReq& /*send_par*/)
{

}

} /* end of namespace */