SOLA
Loading...
Searching...
No Matches
minhton
include
minhton
message
replacement_ack.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_ACK_H_
8
#define MINHTON_MESSAGE_REPLACEMENT_ACK_H_
9
10
#include "minhton/message/message.h"
11
#include "solanet/serializer/serialize.h"
12
13
namespace
minhton
{
19
class
MessageReplacementAck
:
public
MinhtonMessage
<MessageReplacementAck> {
20
public
:
21
struct
LockedStates
{
22
bool
locked;
23
bool
locked_right;
24
bool
locked_left;
25
};
26
30
MessageReplacementAck
(
MinhtonMessageHeader
header, std::vector<minhton::NodeInfo> neighbors,
31
LockedStates
lockedStates);
32
33
std::vector<minhton::NodeInfo> getNeighbors()
const
;
34
LockedStates
getLockedStates()
const
;
35
36
SERIALIZE(header_, neighbors_, locked_, locked_right_, locked_left_);
37
38
MessageReplacementAck
() =
default
;
39
40
private
:
41
friend
MinhtonMessage
;
42
44
MinhtonMessageHeader
header_;
45
47
bool
validateImpl()
const
;
48
50
std::vector<minhton::NodeInfo> neighbors_;
51
53
bool
locked_ =
false
;
54
bool
locked_right_ =
false
;
55
bool
locked_left_ =
false
;
56
};
57
}
// namespace minhton
58
59
#endif
minhton::MessageReplacementAck
Usage: The node that wants to leave the network receives a MessageReplacementOffer from a node that i...
Definition
replacement_ack.h:19
minhton::MessageReplacementAck::MessageReplacementAck
MessageReplacementAck(MinhtonMessageHeader header, std::vector< minhton::NodeInfo > neighbors, LockedStates lockedStates)
minhton::MinhtonMessageHeader
Definition
message_header.h:24
minhton::MinhtonMessage
Definition
message.h:28
minhton
Definition
minhton_watchdog_ns3.cpp:24
minhton::MessageReplacementAck::LockedStates
Definition
replacement_ack.h:21
Generated by
1.9.8