SOLA
Loading...
Searching...
No Matches
interface_join_algorithm.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_ALGORITHMS_JOIN_JOIN_ALGORITHM_INTERFACE_H_
8#define MINHTON_ALGORITHMS_JOIN_JOIN_ALGORITHM_INTERFACE_H_
9
10#include <memory>
11
12#include "minhton/algorithms/algorithm_interface.h"
13#include "minhton/core/physical_node_info.h"
14#include "minhton/message/message.h"
15
16namespace minhton {
17
19public:
20 explicit JoinAlgorithmInterface(std::shared_ptr<AccessContainer> access)
21 : AlgorithmInterface(access){};
22
23 ~JoinAlgorithmInterface() override = default;
24
25 void process(const MessageVariant &msg) override = 0;
26 virtual void initiateJoin(NodeInfo &node_info) = 0;
27 virtual void initiateJoin(const PhysicalNodeInfo &p_node_info) = 0;
28
29 virtual void continueAcceptChildProcedure(const MessageInformAboutNeighbors &message) noexcept(
30 false) = 0;
31
32 static std::vector<MessageType> getSupportedMessageTypes() {
33 return {MessageType::kJoin, MessageType::kJoinAccept, MessageType::kJoinAcceptAck};
34 }
35};
36
37} // namespace minhton
38
39#endif
Definition algorithm_interface.h:18
Definition interface_join_algorithm.h:18
Usage: This message is an answer to a MessageGetNeighbors. It contains the node information about the...
Definition inform_about_neighbors.h:18
Definition node_info.h:24
Definition physical_node_info.h:23
Definition minhton_watchdog_ns3.cpp:24