SOLA
Loading...
Searching...
No Matches
interface_bootstrap_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_MISC_BOOTSTRAP_ALGORITHM_INTERFACE_H_
8#define MINHTON_ALGORITHMS_MISC_BOOTSTRAP_ALGORITHM_INTERFACE_H_
9
10#include <memory>
11
12#include "minhton/algorithms/algorithm_interface.h"
13#include "minhton/message/message.h"
14
15namespace minhton {
16
18public:
19 explicit BootstrapAlgorithmInterface(std::shared_ptr<AccessContainer> access)
20 : AlgorithmInterface(access){};
21
22 ~BootstrapAlgorithmInterface() override = default;
23
24 void process(const MessageVariant &msg) override = 0;
25 virtual void initiateJoin(const PhysicalNodeInfo &p_node_info) = 0;
26
27 virtual void processBootstrapResponseTimeout() = 0;
28 virtual bool isBootstrapResponseValid() const = 0;
29
30 static std::vector<minhton::MessageType> getSupportedMessageTypes() {
31 return {MessageType::kBootstrapDiscover, MessageType::kBootstrapResponse};
32 }
33};
34
35} // namespace minhton
36
37#endif
Definition algorithm_interface.h:18
Definition interface_bootstrap_algorithm.h:17
Definition physical_node_info.h:23
Definition minhton_watchdog_ns3.cpp:24