#include "CommsigniaLayerFactory.hh"

#include "loggers.hh"

CommsigniaLayer::CommsigniaLayer(const std::string & p_type, const std::string & param) : Layer(p_type), _params() {
  loggers::get_instance().log(">>> CommsigniaLayer::CommsigniaLayer: %s, %s", to_string().c_str(), param.c_str());
  // Setup parameters
  Params::convert(_params, param);
  Params::const_iterator it = _params.find("mac_bc");
  if (it == _params.cend()) {
    _params.insert(std::pair<std::string, std::string>(std::string("mac_bc"), "FFFFFFFFFFFF"));
  }
  //_params.log();
}

void CommsigniaLayer::sendData(OCTETSTRING& data, Params& params) {
  loggers::get_instance().log_msg(">>> CommsigniaLayer::sendData: ", data);

}

void CommsigniaLayer::receiveData(OCTETSTRING& data, Params& params) {
  loggers::get_instance().log_msg(">>> CommsigniaLayer::receiveData: ", data);

}

CommsigniaLayerFactory CommsigniaLayerFactory::_f;
