SOLA
Loading...
Searching...
No Matches
minhton
include
minhton
message
find_replacement.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_FIND_REPLACEMENT_H_
8
#define MINHTON_MESSAGE_FIND_REPLACEMENT_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
{
21
class
MessageFindReplacement
:
public
MinhtonMessage
<MessageFindReplacement> {
22
public
:
27
MessageFindReplacement
(
MinhtonMessageHeader
header,
NodeInfo
node_to_replace,
28
SearchProgress
search_progress = SearchProgress::kNone,
29
uint16_t hop_count = 0);
30
31
NodeInfo
getNodeToReplace()
const
;
32
SearchProgress
getSearchProgress()
const
;
33
uint16_t getHopCount()
const
;
34
35
SERIALIZE(header_, node_to_replace_, search_progress_, hop_count_);
36
37
MessageFindReplacement
() =
default
;
38
39
private
:
40
friend
MinhtonMessage
;
41
43
MinhtonMessageHeader
header_;
44
46
bool
validateImpl()
const
;
47
49
NodeInfo
node_to_replace_;
50
52
SearchProgress
search_progress_ = SearchProgress::kNone;
53
56
uint16_t hop_count_ = 0;
57
};
58
}
// namespace minhton
59
60
#endif
minhton::MessageFindReplacement
Usage: A node wants to leave the network, but cannot leave the position directly because it would vio...
Definition
find_replacement.h:21
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