Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JCF: perform renames as described in DUNE-DAQ/daq-release#373 #128

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions plugins/NICReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
#include "appfwk/ConfigurationManager.hpp"
#include "appfwk/ModuleConfiguration.hpp"

#include "appdal/DataReader.hpp"
#include "coredal/ReadoutInterface.hpp"
#include "appdal/NICReceiverConf.hpp"
#include "appdal/NICInterface.hpp"
#include "appdal/NICInterfaceConfiguration.hpp"
#include "appdal/NICStatsConf.hpp"
#include "appdal/EthStreamParameters.hpp"
#include "coredal/QueueWithId.hpp"
#include "appmodel/DataReader.hpp"
#include "confmodel/ReadoutInterface.hpp"
#include "appmodel/NICReceiverConf.hpp"
#include "appmodel/NICInterface.hpp"
#include "appmodel/NICInterfaceConfiguration.hpp"
#include "appmodel/NICStatsConf.hpp"
#include "appmodel/EthStreamParameters.hpp"
#include "confmodel/QueueWithId.hpp"

#include "logging/Logging.hpp"

Expand Down Expand Up @@ -93,7 +93,7 @@ tokenize(std::string const& str, const char delim, std::vector<std::string>& out
void
NICReceiver::init(const std::shared_ptr<appfwk::ModuleConfiguration> mcfg )
{
auto mdal = mcfg->module<appdal::DataReader>(get_name());
auto mdal = mcfg->module<appmodel::DataReader>(get_name());
m_cfg = mcfg;
if (mdal->get_outputs().empty()) {
auto err = dunedaq::readoutlibs::InitializationError(ERS_HERE, "No outputs defined for NIC reader in configuration.");
Expand All @@ -102,7 +102,7 @@ NICReceiver::init(const std::shared_ptr<appfwk::ModuleConfiguration> mcfg )
}

for (auto con : mdal->get_outputs()) {
auto queue = con->cast<coredal::QueueWithId>();
auto queue = con->cast<confmodel::QueueWithId>();
if(queue == nullptr) {
auto err = dunedaq::readoutlibs::InitializationError(ERS_HERE, "Outputs are not of type QueueWithGeoId.");
ers::fatal(err);
Expand Down Expand Up @@ -131,8 +131,8 @@ NICReceiver::do_configure(const data_t& /*args*/)
{
TLOG() << get_name() << ": Entering do_conf() method";
//auto session = appfwk::ModuleManager::get()->session();
auto mdal = m_cfg->module<appdal::DataReader>(get_name());
auto module_conf = mdal->get_configuration()->cast<appdal::NICReceiverConf>();
auto mdal = m_cfg->module<appmodel::DataReader>(get_name());
auto module_conf = mdal->get_configuration()->cast<appmodel::NICReceiverConf>();
auto res_set = mdal->get_interfaces();
// EAL setup
TLOG() << "Setting up EAL with params from config.";
Expand All @@ -143,7 +143,7 @@ NICReceiver::do_configure(const data_t& /*args*/)
std::string first_pcie_addr;
bool is_first_pcie_addr = true;
for (auto res : res_set) {
auto interface = res->cast<appdal::NICInterface>();
auto interface = res->cast<appmodel::NICInterface>();
if (interface == nullptr) {
dunedaq::readoutlibs::GenericConfigurationError err(
ERS_HERE, "NICReceiver configuration failed due expected but unavailable interface!");
Expand Down Expand Up @@ -182,7 +182,7 @@ NICReceiver::do_configure(const data_t& /*args*/)
}

for (auto res : res_set) {
auto interface = res->cast<appdal::NICInterface>();
auto interface = res->cast<appmodel::NICInterface>();
if (interface == nullptr) {
dunedaq::readoutlibs::GenericConfigurationError err(
ERS_HERE, "NICReceiver configuration failed due expected but unavailable interface!");
Expand Down
20 changes: 10 additions & 10 deletions src/IfaceWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
#include "IfaceWrapper.hpp"

#include "appfwk/ConfigurationManager.hpp"
#include "coredal/DROStreamConf.hpp"
#include "coredal/StreamParameters.hpp"
#include "coredal/GeoId.hpp"
#include "appdal/NICInterface.hpp"
#include "appdal/NICInterfaceConfiguration.hpp"
#include "appdal/NICStatsConf.hpp"
#include "appdal/EthStreamParameters.hpp"
#include "confmodel/DROStreamConf.hpp"
#include "confmodel/StreamParameters.hpp"
#include "confmodel/GeoId.hpp"
#include "appmodel/NICInterface.hpp"
#include "appmodel/NICInterfaceConfiguration.hpp"
#include "appmodel/NICStatsConf.hpp"
#include "appmodel/EthStreamParameters.hpp"

#include <chrono>
#include <memory>
Expand All @@ -47,7 +47,7 @@ enum
namespace dunedaq {
namespace dpdklibs {

IfaceWrapper::IfaceWrapper(const appdal::NICInterface *iface_cfg, source_to_sink_map_t& sources, std::atomic<bool>& run_marker)
IfaceWrapper::IfaceWrapper(const appmodel::NICInterface *iface_cfg, source_to_sink_map_t& sources, std::atomic<bool>& run_marker)
: m_sources(sources)
, m_run_marker(run_marker)
{
Expand Down Expand Up @@ -83,7 +83,7 @@ IfaceWrapper::IfaceWrapper(const appdal::NICInterface *iface_cfg, source_to_sink
auto res_set = iface_cfg->get_contains();
for (const auto res : res_set) {

auto stream = res->cast<coredal::DROStreamConf>();
auto stream = res->cast<confmodel::DROStreamConf>();
if (stream == nullptr) {
dunedaq::readoutlibs::GenericConfigurationError err(
ERS_HERE, std::string("NICInterface contains resources other than DROStreamConf!"));
Expand All @@ -93,7 +93,7 @@ IfaceWrapper::IfaceWrapper(const appdal::NICInterface *iface_cfg, source_to_sink
TLOG() << "Sink for source_id "<< stream->get_source_id() << " not initialized!";
continue;
}
auto stream_params = stream->get_stream_params()->cast<appdal::EthStreamParameters>();
auto stream_params = stream->get_stream_params()->cast<appmodel::EthStreamParameters>();

auto src_ip = stream_params->get_tx_ip();
auto rx_q = stream_params->get_rx_queue();
Expand Down
8 changes: 4 additions & 4 deletions src/IfaceWrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define DPDKLIBS_SRC_IFACEWRAPPER_HPP_

//#include "dpdklibs/nicreader/Structs.hpp"
#include "appdal/NICInterface.hpp"
#include "appmodel/NICInterface.hpp"

#include "dpdklibs/nicreaderinfo/InfoNljs.hpp"

Expand All @@ -22,8 +22,8 @@
#include "dpdklibs/XstatsHelper.hpp"
#include "SourceConcept.hpp"

#include <coredal/Session.hpp>
#include <appdal/NICInterface.hpp>
#include <confmodel/Session.hpp>
#include <appmodel/NICInterface.hpp>

#include <nlohmann/json.hpp>

Expand All @@ -45,7 +45,7 @@ class IfaceWrapper
//using source_conf_t = dunedaq::dpdklibs::nicreader::Source;
using source_to_sink_map_t = std::map<int, std::unique_ptr<SourceConcept>>;

IfaceWrapper(const appdal::NICInterface* interface, source_to_sink_map_t& sources, std::atomic<bool>& run_marker);
IfaceWrapper(const appmodel::NICInterface* interface, source_to_sink_map_t& sources, std::atomic<bool>& run_marker);
~IfaceWrapper();

IfaceWrapper(const IfaceWrapper&) = delete; ///< IfaceWrapper is not copy-constructible
Expand Down
Loading