SOLA
Loading...
Searching...
No Matches
minhton
include
minhton
message
replacement_update.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_REPLACEMENT_UPDATE_H_
8
#define MINHTON_MESSAGE_REPLACEMENT_UPDATE_H_
9
10
#include "minhton/message/message.h"
11
#include "solanet/serializer/serialize.h"
12
13
namespace
minhton
{
20
class
MessageReplacementUpdate
:
public
MinhtonMessage
<MessageReplacementUpdate> {
21
public
:
28
MessageReplacementUpdate
(
MinhtonMessageHeader
header,
NodeInfo
removed_position_node,
29
NodeInfo
replaced_position_node,
LogicalNodeInfo
new_l_node_info,
30
bool
should_acknowledge =
false
);
31
32
NodeInfo
getRemovedPositionNode()
const
;
33
NodeInfo
getReplacedPositionNode()
const
;
34
LogicalNodeInfo
getNewLogicalNodeInfo()
const
;
35
bool
getShouldAcknowledge()
const
;
36
37
SERIALIZE(header_, removed_position_node_, replaced_position_node_, new_l_node_info_,
38
should_acknowledge_);
39
40
MessageReplacementUpdate
() =
default
;
41
42
private
:
43
friend
MinhtonMessage
;
44
46
MinhtonMessageHeader
header_;
47
49
bool
validateImpl()
const
;
50
52
NodeInfo
removed_position_node_;
53
56
NodeInfo
replaced_position_node_;
57
59
LogicalNodeInfo
new_l_node_info_;
60
61
bool
should_acknowledge_ =
false
;
62
};
63
}
// namespace minhton
64
65
#endif
minhton::LogicalNodeInfo
Definition
logical_node_info.h:23
minhton::MessageReplacementUpdate
Usage: During the replacement process, the neighbor nodes of the leaving node / the replaced position...
Definition
replacement_update.h:20
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
Generated by
1.9.8