SOLA
Loading...
Searching...
No Matches
response_algorithm_general.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_RESPONSE_ALGORITHM_GENERAL_H_
8#define MINHTON_ALGORITHMS_MISC_RESPONSE_ALGORITHM_GENERAL_H_
9
10#include <memory>
11
12#include "minhton/algorithms/misc/interface_response_algorithm.h"
13#include "minhton/message/get_neighbors.h"
14#include "minhton/message/inform_about_neighbors.h"
15#include "minhton/message/message.h"
16#include "minhton/message/remove_neighbor.h"
17#include "minhton/message/update_neighbors.h"
18
19namespace minhton {
20
22public:
23 explicit ResponseAlgorithmGeneral(std::shared_ptr<AccessContainer> access)
25 void process(const MessageVariant &msg) override;
26
27private:
40 void processUpdateNeighbors(const MessageUpdateNeighbors &msg);
41
53 void processRemoveNeighbor(const MessageRemoveNeighbor &msg);
54
66 void processRemoveAndUpdateNeighbors(const MessageRemoveAndUpdateNeighbors &msg);
67
79 void processGetNeighbors(const MessageGetNeighbors &msg);
80
81 void waitForAcks(uint32_t number, std::function<void()> cb) final;
82
83 void processRemoveNeighborAck();
84
99 void processInformAboutNeighbors(const MessageInformAboutNeighbors &msg);
100};
101
102} // namespace minhton
103
104#endif
Usage: Currently only used in the join accept procedure in rare cases by the parent to get the correc...
Definition get_neighbors.h:19
Usage: This message is an answer to a MessageGetNeighbors. It contains the node information about the...
Definition inform_about_neighbors.h:18
Usage: Used in the leave and response algorithms for updating the routing information.
Definition remove_and_update_neighbor.h:19
Usage: A node is leaving the network. This is a notification to remove the given node from the routin...
Definition remove_neighbor.h:17
Usage: Informing a node about a new or updated neighbor. Used mainly in the join accept and leave pro...
Definition update_neighbors.h:20
Definition response_algorithm_general.h:21
Definition interface_response_algorithm.h:18
Definition minhton_watchdog_ns3.cpp:24