SOLA
Loading...
Searching...
No Matches
join_accept.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_JOIN_ACCEPT_H_
8#define MINHTON_MESSAGE_JOIN_ACCEPT_H_
9
10#include "minhton/message/message.h"
11#include "solanet/serializer/serialize.h"
12
13namespace minhton {
19class MessageJoinAccept : public MinhtonMessage<MessageJoinAccept> {
20public:
28 MessageJoinAccept(MinhtonMessageHeader header, uint16_t fanout, NodeInfo adjacent_left,
29 NodeInfo adjacent_right, std::vector<NodeInfo> routing_table_neighbors);
30
31 uint16_t getFanout() const;
32 NodeInfo getAdjacentLeft() const;
33 NodeInfo getAdjacentRight() const;
34 std::vector<NodeInfo> getRoutingTableNeighbors() const;
35
36 SERIALIZE(header_, fanout_, adjacent_left_, adjacent_right_, routing_table_neighbors_);
37
38 MessageJoinAccept() = default;
39
40private:
41 friend MinhtonMessage;
42
45
47 bool validateImpl() const;
48
50 uint16_t fanout_ = 0;
51
54 NodeInfo adjacent_left_;
55
58 NodeInfo adjacent_right_;
59
61 std::vector<NodeInfo> routing_table_neighbors_;
62};
63} // namespace minhton
64
65#endif
Usage: A fitting join position has been found by forwarding the MessageJoin appropriately....
Definition join_accept.h:19
Definition message_header.h:24
Definition message.h:28
Definition node_info.h:24
Definition minhton_watchdog_ns3.cpp:24