SOLA
Loading...
Searching...
No Matches
config_node.h
1// Copyright The SOLA Contributors
2//
3// Licensed under the MIT License.
4// For details on the licensing terms, see the LICENSE file.
5// SPDX-License-Identifier: MIT
6
7#ifndef MINHTON_UTILS_CONFIG_NODE_H_
8#define MINHTON_UTILS_CONFIG_NODE_H_
9
10#include <cstdint>
11#include <vector>
12
13#include "minhton/core/constants.h"
14#include "minhton/logging/logger.h"
15#include "minhton/utils/algorithm_types_container.h"
16#include "minhton/utils/timeout_lengths_container.h"
17
18namespace minhton {
23
24struct JoinInfo {
25 enum { kIp, kNone, kDiscovery } join_mode;
26 std::string ip;
27 uint16_t port = 0;
28};
29
31private:
32 // IP to bind to
33 std::string own_ip_;
36 uint16_t fanout_ = 0;
37
40 uint16_t treemapper_ = kTreeMapperRootValue; // missing getter
41
43 std::vector<Logger::LoggerPtr> logger_;
44
46 JoinInfo join_info_ = JoinInfo{JoinInfo::kNone, ""};
47
49 std::string log_level_;
50
51 bool root_ = false;
52
53 bool verbose_ = false;
54
55 TimeoutLengthsContainer timeout_lengths_container_{};
56 AlgorithmTypesContainer algorithm_types_container_{};
57
58public:
59 uint16_t getFanout() const;
60 void setFanout(uint16_t fanout);
61
62 std::string getOwnIP() const;
63 void setOwnIP(const std::string &own_ip);
64
65 bool isRoot() const;
66 void setIsRoot(bool isRoot);
67
68 bool getVerbose() const;
69 void setVerbose(bool verbose);
70
71 uint16_t getTreemapper() const;
72 void setTreemapper(uint16_t treemapper);
73
74 std::vector<Logger::LoggerPtr> getLogger() const;
75 void setLogger(std::vector<Logger::LoggerPtr> logger);
76
77 JoinInfo getJoinInfo() const;
78 void setJoinInfo(JoinInfo info);
79
80 std::string getLogLevel() const;
81 void setLogLevel(const std::string &log_level);
82
83 void setAlgorithmTypesContainer(const AlgorithmTypesContainer &algorithm_types_container);
84 AlgorithmTypesContainer getAlgorithmTypesContainer() const;
85
86 void setTimeoutLengthsContainer(const TimeoutLengthsContainer &timeout_lengths_container);
87 TimeoutLengthsContainer getTimeoutLengthsContainer() const;
88};
89} // namespace minhton
90
91#endif
Definition config_node.h:30
Definition minhton_watchdog_ns3.cpp:24
Definition algorithm_types_container.h:14
Definition config_node.h:24
Definition timeout_lengths_container.h:14