SOLA
Loading...
Searching...
No Matches
config_helper_ns3.h
1// Copyright 2023 The SOLA authors
2//
3// This file is part of DAISI.
4//
5// DAISI is free software: you can redistribute it and/or modify it under the terms of the GNU
6// General Public License as published by the Free Software Foundation; version 2.
7//
8// DAISI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
9// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
10// Public License for more details.
11//
12// You should have received a copy of the GNU General Public License along with DAISI. If not, see
13// <https://www.gnu.org/licenses/>.
14//
15// SPDX-License-Identifier: GPL-2.0-only
16
17#ifndef DAISI_SOLA_NS3_CONFIG_HELPER_NS3_H_
18#define DAISI_SOLA_NS3_CONFIG_HELPER_NS3_H_
19
20#include "SOLA/event_dissemination_minhcast.h"
21#include "SOLA/management_overlay_minhton.h"
22#include "logging/logger_manager.h"
23
24namespace daisi::sola_ns3 {
25
26inline void configureLogger(sola::ManagementOverlayMinhton::Config &config) {
27 config.setLogger(std::vector<sola::ManagementOverlayMinhton::Logger>{
28 daisi::global_logger_manager->createMinhtonLogger("MO")});
29}
30
31inline void configureLogger(sola::EventDisseminationMinhcast::Config &config) {
32 config.logger = std::vector<sola::EventDisseminationMinhcast::Logger>{
33 daisi::global_logger_manager->createNatterLogger()};
34 config.topic_tree_logger_create_fct = [](const std::string &topic) {
35 const std::string postfix = "ED:" + topic;
36 return daisi::global_logger_manager->createMinhtonLogger(postfix);
37 };
38}
39
40} // namespace daisi::sola_ns3
41#endif
Definition config_node.h:30
Definition event_dissemination_minhcast.h:35
std::function< minhton::Logger::LoggerPtr(std::string)> topic_tree_logger_create_fct
Definition event_dissemination_minhcast.h:40