SOLA
Loading...
Searching...
No Matches
minhton
include
minhton
message
join.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_H_
8
#define MINHTON_MESSAGE_JOIN_H_
9
10
#include "minhton/message/find_end.h"
11
#include "minhton/message/message.h"
12
#include "solanet/serializer/serialize.h"
13
14
namespace
minhton
{
19
class
MessageJoin
:
public
MinhtonMessage
<MessageJoin> {
20
public
:
21
MessageJoin
(
MinhtonMessageHeader
header,
NodeInfo
entering_node,
22
SearchProgress
search_progress = SearchProgress::kNone, uint16_t hop_count = 0);
23
24
NodeInfo
getEnteringNode()
const
;
25
SearchProgress
getSearchProgress()
const
;
26
uint16_t getHopCount()
const
;
27
28
SERIALIZE(header_, entering_node_, search_progress_, hop_count_);
29
30
MessageJoin
() =
default
;
31
32
private
:
33
friend
MinhtonMessage
;
34
36
MinhtonMessageHeader
header_;
37
39
bool
validateImpl()
const
;
40
42
NodeInfo
entering_node_;
43
45
SearchProgress
search_progress_ = SearchProgress::kNone;
46
48
uint16_t hop_count_ = 0;
49
};
50
}
// namespace minhton
51
52
#endif
minhton::MessageJoin
Usage: When a node wants to join the network, it sends a MessageJoin to one node in the network....
Definition
join.h:19
minhton::MinhtonMessageHeader
Definition
message_header.h:24
minhton::MinhtonMessage
Definition
message.h:28
minhton::NodeInfo
Definition
node_info.h:24
minhton
Definition
minhton_watchdog_ns3.cpp:24
minhton::SearchProgress
SearchProgress
Used by the minhton join & leave algorithm to save the progress of the position finding.
Definition
find_end.h:12
Generated by
1.9.8