SOLA
Loading...
Searching...
No Matches
get_neighbors.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_MESSAGE_GET_NEIGHBORS_H_
8#define MINHTON_MESSAGE_GET_NEIGHBORS_H_
9
10#include "minhton/message/message.h"
11#include "solanet/serializer/serialize.h"
12
13namespace minhton {
19class MessageGetNeighbors : public MinhtonMessage<MessageGetNeighbors> {
20public:
24 MessageGetNeighbors(MinhtonMessageHeader header, NodeInfo send_back_to_node,
25 std::vector<NeighborRelationship> relationships);
26
27 NodeInfo getSendBackToNode() const;
28 std::vector<NeighborRelationship> getRelationships() const;
29
30 SERIALIZE(header_, send_back_to_node_, relationships_);
31
32 MessageGetNeighbors() = default;
33
34private:
35 friend MinhtonMessage;
36
39
41 bool validateImpl() const;
42
43 NodeInfo send_back_to_node_;
44
46 std::vector<NeighborRelationship> relationships_;
47};
48} // namespace minhton
49
50#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
Definition message_header.h:24
Definition message.h:28
Definition node_info.h:24
Definition minhton_watchdog_ns3.cpp:24