UpperTesterPort_DENM.partC 3.01 KB
Newer Older
garciay's avatar
garciay committed
#include "UpperTesterLayer.hh"
#include "loggers.hh"

//=============================================================================
namespace LibItsDenm__TestSystem {

UpperTesterPort::UpperTesterPort(const char *par_port_name)
garciay's avatar
garciay committed
	: UpperTesterPort_BASE(par_port_name), _cfg_params(), _layer_params(), _layer(NULL), _time_key("UpperTesterPort::outgoing_send")
garciay's avatar
garciay committed
    loggers::get_instance().log("UpperTesterPort_Denm::UpperTesterPort_Denm");

}

UpperTesterPort::~UpperTesterPort()
{
garciay's avatar
garciay committed
    if (_layer != NULL) {
      delete _layer;
    }
garciay's avatar
garciay committed
void UpperTesterPort::set_parameter(const char * parameter_name, const char * parameter_value)
garciay's avatar
garciay committed
    loggers::get_instance().log("UpperTesterPort::set_parameter: %s=%s", parameter_name, parameter_value);
    _cfg_params.insert(std::pair<std::string, std::string>(std::string(parameter_name), std::string(parameter_value)));
    _cfg_params.log();
}

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

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

}

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

}

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

}

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

garciay's avatar
garciay committed
void UpperTesterPort::user_map(const char * system_port)
{
    loggers::get_instance().log(">>> UpperTesterPort::user_map: %s", system_port);
    // Build layer stack
    /*    Params::iterator it = _cfg_params.find(std::string("params"));
    if (it != _cfg_params.end()) {
      loggers::get_instance().log("UpperTesterPort::user_map: %s", it->second.c_str());
      _layer = LayerStackBuilder::GetInstance()->createLayerStack(it->second.c_str());
    if (static_cast<UpperTesterLayer *>(_layer) == NULL) {
      loggers::get_instance().error("UpperTesterPort::user_map: Invalid stack configuration: %s", it->second.c_str());
    }
      static_cast<UpperTesterLayer *>(_layer)->addUpperPort(this);
    } else {
      loggers::get_instance().error("UpperTesterPort::user_map: No layers defined in configuration file");
    }
    */
}

void UpperTesterPort::user_unmap(const char * system_port)
{
    loggers::get_instance().log(">>> UpperTesterPort::user_unmap: %s", system_port);
    if (_layer != NULL) {
      delete _layer;
      _layer = NULL;
    }

}

void UpperTesterPort::user_start()
{

}

void UpperTesterPort::user_stop()
{

}

garciay's avatar
garciay committed
void UpperTesterPort::outgoing_send(const LibItsDenm__TypesAndValues::UtDenmInitialize& /*send_par*/)
{

}

void UpperTesterPort::outgoing_send(const LibItsDenm__TypesAndValues::UtDenmTrigger& /*send_par*/)
{

}

void UpperTesterPort::outgoing_send(const LibItsDenm__TypesAndValues::UtDenmUpdate& /*send_par*/)
{

}

void UpperTesterPort::outgoing_send(const LibItsDenm__TypesAndValues::UtDenmTermination& /*send_par*/)
{

}

garciay's avatar
garciay committed
void UpperTesterPort::outgoing_send(const LibItsDenm__TypesAndValues::UtDenmChangePosition& /*send_par*/)
garciay's avatar
garciay committed
void UpperTesterPort::outgoing_send(const LibItsDenm__TypesAndValues::UtChangePseudonym& /*send_par*/)